	function ShowMap(){
		document.getElementById("usmap").innerHTML="<IMG src=http://www.RoadkillCustoms.com/Hot-Rods-Rat-Rods/media/images/us_map.gif width=488 height=329 border=0 usemap=#usmap>";
	}
	function SubmitPage(StateAbbr) {
	     document.submit_form.StateAbbr.value = StateAbbr;
	     document.submit_form.submit();
	}
	
	function CheckSearchForm () {
		if (document.frmSiteSearch.query.value==""){
			alert("Please enter at least one keyword...");
			document.frmSiteSearch.query.focus();
			return false;
		}else{
			document.frmSiteSearch.q.value=document.frmSiteSearch.query.value;
		}
		return true
	}
	
	//Function to check that the form is filled in correctly
	function CheckForm () {
	
		//Check User id
		if (document.form1.textfield.value == ""){
			alert("Please enter a user id");
			document.form1.textfield.focus();
			return false;
		}
		
		//Check pass
		if (document.form1.textfield2.value == ""){
			alert("Please enter a password");
			document.form1.textfield2.focus();
			return false;
		}
		
		//Check pass
		if (document.form1.textfield12.value == ""){
			alert("Please re-type your password");
			document.form1.textfield12.focus();
			return false;
		}
		
			
		//Check email
		if (document.form1.textfield6.value == ""){
			alert("Please enter your email address");
			document.form1.textfield6.focus();
			return false;
		}
		
		//Check certify
		if (document.form1.certify.checked ="NO"){
			alert("You must be 18 or Older");
			document.form1.certify.focus();
			return false;
		}
	
	 var testresults
	 var str=document.form1.textfield6.value
	 var filter=/^.+@.+\..{2,3}$/
	
	 if (filter.test(str))
	    testresults=true
	 else {
	    alert("Please enter a valid email address")
	    document.form1.textfield6.focus();
	    return false;
	}
	
	var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
	var checkStr = document.form1.textfield.value;
	var allValid = true;
	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 (!allValid)
	{
	    alert("Please enter only numbers & letters for the user id field");
	    document.form1.textfield.focus();
	    return false;
	}
	var checkkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
	var checkkStr = document.form1.textfield2.value;
	var alllValid = true;
	for (i = 0; i < checkkStr.length; i++)
	{
	    ch = checkkStr.charAt(i);
	    for (j = 0; j < checkkOK.length; j++)
	      if (ch == checkkOK.charAt(j))
	        break;
	    if (j == checkkOK.length)
	    {
	      alllValid = false;
	      break;
	    }
	}
	if (!alllValid)
	{
	    alert("Please enter only numbers & letters for the password field");
	    document.form1.textfield2.focus();
	    return false;
	}
	var checkkkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
	var checkkkStr = document.form1.textfield12.value;
	var allllValid = true;
	for (i = 0; i < checkkkStr.length; i++)
	{
	    ch = checkkkStr.charAt(i);
	    for (j = 0; j < checkkkOK.length; j++)
	      if (ch == checkkkOK.charAt(j))
	        break;
	    if (j == checkkkOK.length)
	    {
	      allllValid = false;
	      break;
	    }
	}
	if (!allllValid)
	{
	    alert("Please enter only numbers & letters for the re-type password field");
	    document.form1.textfield12.focus();
	    return false;
	}
	
		
		//Check for HTML tags before submitting the form	
		for (var count = 0; count <= 3; ++count){
			if ((document.form1.elements[count].value.indexOf("<", 0) >= 0) && (document.form1.elements[count].value.indexOf(">", 0) >= 0)){
				alert("Sorry, HTML tags are not permitted");
				document.form1.elements[count].focus();
				return false;
			}			
		}	
		
		return true
	}

	// Popup tip window processing
	function displayPopup(url, height, width) {
	  properties = "toolbar=0,location=0,scrollbars=1,height=" + height;
	  properties = properties + ",width=" + width;
	  properties = properties + ",right=0,top=0";
	  popupHandle = open(url, "tipwindow", properties);
	}

	//Function to open pop up window
	function openWin(theURL,winName,features) {
	  	window.open(theURL,winName,features);
	}	
