
function zipOnly(objForm, theAction)
{	var zipval = objForm.zipcode.value; 
	var ziplen = zipval.length;
	if(zipval=="")
		{	alert("Please Provide Your Zip-Code");
			objForm.zipcode.focus;
			return false;	}		
	if (isNaN(zipval))
		{	alert("The Zip Code You Entered:  " + zipval + "  Contains an ALPHABETIC CHARACTER. \n Please Change It To A Valid 5 Digits US Zip Code. ");
			objForm.zipcode.focus;
			return false;	}
	if(ziplen<5 )
		{	alert("Zip Code Should Be At Least 5 Digits Long  \n But You've Entered Only  " + ziplen + "  Digits \n Please Provide a Valid 5 digits Zip Code");
			objForm.zipcode.focus;
			return false;	}
	objForm.action = theAction +".asp";
	objForm.submit();
return true;}

function USval(objForm, theAction)
{	var state = document.frmwebloc.state.value;
	var city = document.frmwebloc.city.value;
	if(city=="")
	{alert("Please Select A US City For The State Of " + state);
	return;}

	objForm.action = theAction +".asp";
	objForm.submit();
return true;
}

function MexVal(objForm, theAction)
{	var mexZip = objForm.zipcode.value;	
	if(mexZip=="")
		{	alert("Please Provide A Mexican Zip-Code");
			objForm.zipcode.focus;
			return;	}		
	objForm.action = theAction +".asp";
	objForm.submit();
return true;
}

function postalOnly(objForm, theAction)
{	var postal = objForm.pcode.value;
	if(postal=="")
		{	alert("Please Provide A Valid Canadian Postal Code");
			objForm.pcode.focus;
			return false;	}	
	objForm.action = theAction+".asp";
	objForm.submit();
return true;}

function CanVal(objForm, theAction)
{	
	var prov=objForm.Province.value;
	var city = objForm.city.value;
		if(city=="")
		{alert("Please Select A City The Province Of " + prov);
		return;	}	
	objForm.action = theAction+".asp";
	objForm.submit();
return true;}

function Send_it(objForm, frmAction)
{	objForm.action=frmAction+".asp";
	objForm.submit();
	return true;}

function checkInfo(frmAction)
{ var objForm = document.all;

  if (objForm.fname.value=='' || objForm.lname.value=='' || objForm.city.value=='' || objForm.state.value=='' || objForm.email.value=='' || objForm.prid.value=='')
  {
    alert('You have to fill-in the required information.');
    return false;
  }
  else
  { document.all.frmDealerList.action=frmAction+'.asp';
    document.all.frmDealerList.submit();
    return true;
  }
}
