<!--
function cancelLink() {
	if (event.keyCode == 13)
	{
		window.event.returnValue = false;
	}
}
function chkTitle() {
	var f;
	var i=0;
   for (f = 0; f < document.frmData.length; ++f) {	
		if (document.frmData.Title[f]) {
			if (document.frmData.Title[f].checked == 1) {
				++i;		
			}
		}
	}

	if (i == 0) {
	  return(true); 
	  } else {
	  return(false);
	}  
}
function navDirect(num){
var num;
	if (parent.location != self.location) {parent.frames[0].location='sidenav' + num + '.htm';}
}
	function chkspaces(strname) {
		var aString=strname;
		var kBlank= " ";
		if (aString.indexOf(kBlank) >= 0)
		{
			for ( var i=0; i<aString.length; i++)
				if (aString.charAt(i) != kBlank)
					break;
			for ( var j=aString.length-1; j>=0; j--)
				if (aString.charAt(j) != kBlank)
					break;
			if (i == aString.length && j == -1)
				// there are no non-blank characters
				return (true);
		}
	}
	 	function chknum(theForm, str){    
	  	if (theForm.value == "")
  		{
    		alert("Please enter a value in the \"" + str + ":\" field.");
    		return (false);
  		}
		  var checkOK = "0123456789-()# ";
		  var checkStr = theForm.value;
		  var allValid = true;
		  var decPoints = 0;
		  var allNum = "";
		  
		  for (i = 0;  i < checkStr.length;  i++)
		  {
			ch = checkStr.charAt(i);
			for (j = 0;  j < checkOK.length;  j++)
			  if (ch == checkOK.charAt(j))
				break;
			if (j == checkOK.length)
			{
			  allValid = false;
			  break;
			}
			if (ch == ".")
			{
			  allNum += ".";
			  decPoints++;
			}
			else
			  allNum += ch;
		  }
		  if (!allValid)
		  {
    		alert("Please enter only digit characters in the \"" + str + ":\" field.");
    		//theForm.focus();
    		return (false);
		  }

		  if (decPoints > 1)
		  {
    		alert("Please enter a valid value in the \"" + str + ":\" field.");
    		theForm.focus();
    		return (false);
		  }
		  return (true);       
	}
function email_verif(addr) {
  var sign=addr.indexOf("@");
  var before=addr.substring(0,sign);
  var after=addr.substring(sign+1,addr.length);
  var lower=after.toLowerCase();
  var coma=before.indexOf(",");
  var period=after.indexOf(".");

  if (sign==0){alert("EMAIL: User name is missing before the @.")}
  if (sign==-1){alert("EMAIL: You need an @ somewhere in the address.")}
  if (sign==(name.length-1)){alert("EMAIL: Missing host name after the @.")}
  if (lower=="compuserve.com") {
    if (coma>=0) {
      alert("EMAIL: You must change the coma to a period in the first part of the address.");
    }
  }

  if (period==-1){
    alert("EMAIL: You need a period in the second part of the address");
  }
}
  function checklength(mess, val) {
    var over = val.length - 256;
    if (over > 0) {
      message = mess + " is too long.  Please reduce by " + over + " characters.";
      alert(message);
    }
  }
function Valid_Fields(){ 
	if (chkTitle()){
		alert("Please enter your Title.");
		return(false);
	}	
	else if (document.frmData.JobTitle.value == "" || (chkspaces(document.frmData.JobTitle.value))){
		alert("Please enter your Job Title.");
		document.frmData.JobTitle.focus();
		return(false);
	}
	else if (document.frmData.First.value == "" || (chkspaces(document.frmData.First.value))){
		alert("Please enter your First Name.");
		document.frmData.First.focus();
		return(false);
	}
	else if (document.frmData.Last.value == "" || (chkspaces(document.frmData.Last.value))){
		alert("Please enter your Last Name.");
		document.frmData.Last.focus();
		return(false);
	}
	else if (document.frmData.BusinessName.value == "" || (chkspaces(document.frmData.BusinessName.value))){
		alert("Please enter your Business Name.");
		document.frmData.BusinessName.focus();
		return(false);
	}
	else if (document.frmData.Address1.value == "" || (chkspaces(document.frmData.Address1.value))){
		alert("Please enter your Address.");
		document.frmData.Address1.focus();
		return(false);
	}
	else if (document.frmData.CountryID.value == "") { 
	  	alert("Please select a \"Country\".");
		document.frmData.CountryID.focus();
	  	return (false);
    	}  
	else if (document.frmData.CountryID.value == "CA" ) { 
	  	if (document.frmData.geoid.value == "NA" || document.frmData.geoid.value == "") {	
			alert("Please select a Province.");
			document.frmData.geoid.focus();
	  		return (false);
		}
    	} 
	else if (document.frmData.CountryID.value == "US" ) { 
		if (document.frmData.geoid.value == "NA" || document.frmData.geoid.value == "") {
	  		alert("Please select a State.");
			document.frmData.geoid.focus();
	  		return (false);
		}
    	} 
	else if (document.frmData.City.value == "" || (chkspaces(document.frmData.City.value))){
		alert("Please enter your City.");
		document.frmData.City.focus();
		return(false);
	} 
	else if (document.frmData.Postal.value == "" || (chkspaces(document.frmData.Postal.value))){
		alert("Please enter your Zip or Postal Code.");
		document.frmData.Postal.focus();
		return(false);
	}
	else if (chknum(document.frmData.Telephone, "Telephone")==false){
		document.frmData.Telephone.focus();
		return(false);
	} 
	else if (chknum(document.frmData.Fax, "Fax")==false){
		document.frmData.Fax.focus();
		return(false);
	} 
	else if (document.frmData.Email.value == "" || (chkspaces(document.frmData.Email.value))){
		alert("Please enter your Email address.");
		document.frmData.Email.focus();
		return(false);
	} 		
	else if (!document.frmData.DecisionMakerFull.checked && !document.frmData.DecisionMakerSome.checked && !document.frmData.Recommend.checked && !document.frmData.None.checked && !document.frmData.PISpecify.checked) {
		alert("Please select your Purchasing Influence.");
		return(false);
	}
	else if (!document.frmData.ProcessorMolder.checked && !document.frmData.EndUser.checked && !document.frmData.MoldMaker.checked && !document.frmData.MoldDesigner.checked && !document.frmData.PartDesigner.checked && !document.frmData.CPSpecify.checked) {
		alert("Please select a Customer Profile.");
		return(false);
	}
	else if (document.frmData.CPSpecify.checked && document.frmData.CPSpecifytxt.value == "" || (chkspaces(document.frmData.CPSpecifytxt.value))) {
		alert("Please specify a Customer Profile.");
		document.frmData.CPSpecifytxt.focus();
		return(false);		
	}
	else if (!document.frmData.Appliance.checked && !document.frmData.Automotive.checked && !document.frmData.CapsClosures.checked && !document.frmData.Electronics.checked && !document.frmData.Housewares.checked && !document.frmData.Medical.checked && !document.frmData.Packaging.checked && !document.frmData.PersonalCare.checked && !document.frmData.Technical.checked && !document.frmData.Telecommunications.checked && !document.frmData.LawnGarden.checked && !document.frmData.ISSpecify.checked) {
		alert("Please select an Industry Served.");
		return(false);
	}
	else if (document.frmData.ISSpecify.checked && document.frmData.ISSpecifytxt.value == "" || (chkspaces(document.frmData.ISSpecifytxt.value))) {
		alert("Please specify an Industry Served.");
		document.frmData.ISSpecifytxt.focus();
		return(false);		
	}
	else if (!document.frmData.AcceptTerms.checked) {
		alert("You must accept Mold Masters terms before submitting your request.");
		return(false);
	}	
	else
		return(true);
}
// -->