	function ValidState(){		
		//alert("ValidState");
		if(document.frmVendorInfo.country.value != "USA" && document.frmVendorInfo.country.value != "CAN"){
			document.frmVendorInfo.state.selectedIndex=0;
			document.frmVendorInfo.state.disabled=true;
			document.frmVendorInfo.phone0.width=100;	
			document.frmVendorInfo.phone1.width=0;			
			document.frmVendorInfo.phone2.width=0;
			document.frmVendorInfo.phone3.width=0;				
		}
		else {
			document.frmVendorInfo.state.disabled=false;
			document.frmVendorInfo.phone0.width=0;
			document.frmVendorInfo.phone1.width=30;
			document.frmVendorInfo.phone2.width=30;
			document.frmVendorInfo.phone3.width=40;					
		}
	}
	
	function ValidStateNetscape(){		
		//alert("ValidState");
		if(document.frmVendorInfo.country.value != "USA" && document.frmVendorInfo.country.value != "CAN"){
			document.frmVendorInfo.state.disabled=true;
			document.frmVendorInfo.state.selectedIndex=0;				
		}
		else
			document.frmVendorInfo.state.disabled=false;
	}	
	
	function DoSubmit() {
	valid = "yes";
	if(document.frmVendorInfo.FName.value == ""){
		alert("Please Enter Company Name.");
		document.frmVendorInfo.FName.focus();
		valid = "no";
		return;
	}
	if(document.frmVendorInfo.Street.value == ""){
		alert("Please Enter Mailing Address.");
		document.frmVendorInfo.Street.focus();
		valid = "no";
		return;
	}
	if(document.frmVendorInfo.City.value == ""){
		alert("Please Enter City.");
		document.frmVendorInfo.City.focus();
		valid = "no";
		return;
	}
	if(document.frmVendorInfo.country.value == "USA" || document.frmVendorInfo.country.value == "CAN"){
		if(document.frmVendorInfo.state.value == ""){
			alert("Please Select State.");
			document.frmVendorInfo.state.focus();
			valid = "no";
			return;
		}
	}	
	if(document.frmVendorInfo.Zip.value == "" ){
		alert("Please Enter Zip Code.");
		document.frmVendorInfo.Zip.focus();
		valid = "no";
		return;
	}
	var strIn=mytrim(document.frmVendorInfo.email.value);
	//if (strIn==""){
	//	alert("Please input email address!")
	//	valid = "no";
	//	document.frmVendorInfo.email.focus();			
	//	return;	
	//}	
	if (!(strIn=="")) {
		if (!emailexp.test(strIn)) {
			alert("Please input a valid email address!")
			valid = "no";
			document.frmVendorInfo.email.focus();			
			return;
		}
	}	
	if(valid == "yes"){
		document.frmVendorInfo.submit();	}
}		

