var checkFlag;

function checkElement(frmElement) {
        if ( document.getElementById(frmElement).value == "" ) {
                document.getElementById(frmElement).className = 'highlight';
                checkFlag = false;
        }
}

function checkForm() {

        checkFlag = true;
        checkElement("name");
        checkElement("name2");
        checkElement("company");
        checkElement("phone");
	    checkElement("email_from");
		checkElement("country");
		checkElement("industry");
		checkElement("employee");
	//	checkElement("website");
    //    checkElement("past12months");
    //    checkElement("next12months");
        if ( !checkFlag ) { alert("Please fill all the required fields highlighted in red."); }
        return checkFlag;
}

function chkRed(frmElement) {
        document.getElementById(frmElement).className = 'normal';
}


function selectstate() {
valid = true;
		if(document.submitform.state.selectedIndex==0)
			{
				
			alert("Please select any State.");
			document.submitform.state.focus();
			valid = false;
			}
			return valid;
}

function selectcountry() {
valid = true;
		if(document.submitform.country.selectedIndex==0)
			{
			alert("Please select any Country.");
			document.submitform.country.focus();
			valid = false;
			}
			return valid;
}
function selectindustry() {
valid = true;
		if(document.submitform.industry.selectedIndex==0)
			{
			alert("Please select any Industry.");
			document.submitform.industry.focus();
			valid = false;
			}
			return valid;
}
function selectemployee() {
valid = true;
		if(document.submitform.employee.selectedIndex==0)
			{
			alert("Please select number of employees.");
			document.submitform.employee.focus();
			valid = false;
			}	
			return valid;
}

