
<!-- ******* This is the validation for the general contact form ********-->
<!--



function checkForm (Form1) {
	var data = document.Form1;
	


// Check market list selection

if (document.Form1.LstMarket.options[document.Form1.LstMarket.selectedIndex].value == "none") 
			{ alert ("Please select a Market ");
			document.Form1.LstMarket.focus ();
			return false;
			}

	
//Check name.

if (data.Contact_Name.value == "" || data.Contact_Name.value == null) {
  	 	alert("Please enter your name");
		data.Contact_Name.focus();
		return false;
		}

// Check company 

if (data.Contact_Company.value == "" || data.Contact_Company.value == null) {
  	 	alert("Please enter your company name");
		data.Contact_Company.focus();
		return false;
		}
		
// Check address

if (data.Contact_Address.value == "" || data.Contact_Address.value == null) {
  	 	alert("Please enter your address");
		data.Contact_Address.focus();
		return false;
		}
		
		
// Check city, state, providence

if (data.Contact_City_State_Province.value == "" || data.Contact_City_State_Province.value == null) {
  	 	alert("Please enter your city, state or providence");
		data.Contact_City_State_Province.focus();
		return false;
		}
		
		

// Check country list selection

if (document.Form1.Contact_Country.options[document.Form1.Contact_Country.selectedIndex].value == "none") 
			{ alert ("Please select your country");
			document.Form1.Contact_Country.focus ();
			return false;
			}
			

// Check if other is check to enforce entering a name

if (document.Form1.Contact_Country.selectedIndex == 0 && (Contact_Other_Country.value == "" || Contact_Other_Country.value == null )) { 
	alert ("Please enter the name of your country");
	document.Form1.Contact_Other_Country.focus ();
	return false;
	} 


// Check for phone

if (data.Contact_Telephone.value == "" || data.Contact_Telephone.value == null) {
  	 	alert("Please enter your telephone number");
		data.Contact_Telephone.focus();
		return false;
		}
						
// check if the phone is numeric

//if (isNaN (data.Contact_Telephone.value) == true){
//	alert("Invalid telephone number, Please re-enter");
//	data.Contact_Telephone.focus();
//	return false;
//	}		
		

// check for e-mail

if (data.Contact_Email.value == "" || data.Contact_Email.value == null) {
  	 	alert("Please enter your e-mail address");
		data.Contact_Email.focus();
		return false;
		}
		
if ((data.Contact_Email.value.indexOf('@') == -1) || (data.Contact_Email.value.indexOf('.') == -1)) {
		alert("Please enter a valid e-mail address");
		data.Contact_Email.focus();
		return false;
		}



} // end of checkForm function

	


// ********************************************************************************************
// *****************************  Check Submit Function ***************************************
// ********************************************************************************************

function checkSubmit(Form1) { 

// assign values to the hidden fields on this form which will show on top of the output assign country to the subject field


<!-- Assign email address -->


//if (document.Form1.LstMarket.selectedIndex == 0) { 
//			document.Form1.recipient.value = "ldelgallego@resourceadvantage.com";												
//							} 
//else {
//    	document.Form1.recipient.value =  document.Form1.LstMarket.options[document.Form1.LstMarket.selectedIndex].value; 
//	}
	
	
// asign email values 

//    {data.recipient.value = data.LstMarket.options[data.LstMarket.selectedIndex].value; }




// assign values to the country field
 
    if (document.Form1.Contact_Country.selectedIndex == 0) { 
			document.Form1.subject.value = "Other Country";												
							} 
else {
    document.Form1.subject.value = 
				document.Form1.Contact_Country.options[document.Form1.Contact_Country.selectedIndex].value; 
	}
	

if (document.Form1.Contact_Other_Country.value != "") { 
    document.Form1.subject.value = document.Form1.Contact_Other_Country.value; 
							}


// assign the form name to the form field

{ document.Form1.FORM.value = FormNameOut; } 


// assign the contact name

{document.Form1.realname.value = document.Form1.Contact_Name.value;}

												
		} // end of checkSubmit function


	



//-->