<!--// 
/*
function checkFields() {
var postalcode;
var product;
postalcode = document.submitform.postalcode.value;
//product=document.forms[0].product.options[document.forms[0].product.selectedIndex].text
if (postalcode == "") {
alert("Please enter your zip code.");
return false;
}
else if (document.forms[0].postalcode.value.length < 5)
  {
    alert("Please enter at least 5 characters in the \"Zip\" field.");
    document.forms[0].postalcode.focus();
    return (false);
  }
else if (isNaN(document.forms[0].postalcode.value))
  {
    alert("Numbers only in the \"Zip\" field.");
    document.forms[0].postalcode.focus();
    return (false);
  }
else if ((product == "Select A Dealer Type") || (product == "")){
	alert("Please select a dealer type");
	return false;
}
else return true;
}

*/


//Diamond dealer
function checkFieldsDD(pageType) {
	
var postalcode, radioField, radioLength, flagCounter, whichPage;

postalcode = document.submitform.postalcode.value;
radioField = document.submitform.product;
radioLength = document.submitform.product.length;
flagCounter = 0;
whichPage = pageType;
radioSelection = false;
//alert(whichPage);
if (whichPage == "productPage") { 
	flagCounter = flagCounter +1;
}
else if (whichPage = "locatorPage") {
	flagCounter = 0;
	//alert("flagCounter is equal to " + flagCounter);
}


	//alert("flagCounter is equal to " + flagCounter);


if (postalcode == "") {
alert("Please enter your zip code.");
document.forms[0].postalcode.focus();
return false;
}
else if (document.forms[0].postalcode.value.length < 5)  {
    alert("Please enter your FIVE digit zip code in the \"Zip\" field.");
	document.forms[0].postalcode.value="";
    document.forms[0].postalcode.focus();
    return false;
  }
else if (document.forms[0].postalcode.value.length > 5)  {
    alert("Please enter your FIVE digit zip code in the \"Zip\" field.");
	document.forms[0].postalcode.value="";
    document.forms[0].postalcode.focus();
    return false;
  } 
else if (isNaN(document.forms[0].postalcode.value))
  {
    alert("Numbers only in the \"Zip\" field.");
    document.forms[0].postalcode.focus();
    return false;
  }

	for (i=0;i<radioLength;i++) { 
	var radioValue;
	radioValue = document.submitform.product[i].value;		
		if (radioField[i].checked) {
		//alert(radioField[i].name);
		flagCounter = flagCounter + 1;	
		}
	}
	
	if (flagCounter<1){
		alert("Please select a dealer type");
		return false;
	}
else return true;
}
// End -->
