function CheckForm( theform )
{
	var bMissingFields = false;
	var strFields = "";
	
	if( theform.Name.value == '' ){
		bMissingFields = true;
		strFields += "     Your Name\n";
	}
	if( theform.Email.value == '' ){
		bMissingFields = true;
		strFields += "     Your Email\n";
	}
	if( theform.Comments.value == '' ){
		bMissingFields = true;
		strFields += "     Your Comments\n";
	}
		
	if( bMissingFields ) {
		alert( "Please provide the following required field(s) before continuing:\n" + strFields );
		return false;
	}
	
	return true;
}







function email() {
   var part1 = "<input type='hidden' name='recipient' value='email";
   var part2 = "@goy";
   var part3 = "oke.com'>";
   document.write(part1 + part2 + part3)
}









function setAsHomePage(link) {
    // mozilla
	if (window.sidebar) {
        window.sidebar.addPanel('Ez-Hunt.com', 'http://www.ez-hunt.com/sidebar.php', '');
	}
    // ie
    else {
        link.style.behavior = 'url(#default#homepage)';
        link.setHomePage(location.href);
        // window.external.AddFavorite(url, title);
    }
    return false;
}









      function reveal(item_name){
        var num = item_name + "_number";
	var copy = item_name + "_copy";
	if(document.getElementById(num).className == "off"){
	  //open
	  document.getElementById(num).className = "on";
	  document.getElementById(copy).className = "subcopy visible";
	} else {
	  //hide
	  document.getElementById(num).className = "off";
	  document.getElementById(copy).className = "subcopy hidden";
	}
      }	









function validateZIP(field) {
var valid = "0123456789-";
var hyphencount = 0;

if (field.length!=5 && field.length!=10) {
alert("You did not enter a valid US Zip Code.");
return false;
}
for (var i=0; i < field.length; i++) {
temp = "" + field.substring(i, i+1);
if (temp == "-") hyphencount++;
if (valid.indexOf(temp) == "-1") {
alert("You did not enter a valid US Zip Code.");
return false;
}
if ((hyphencount > 1) || ((field.length==10) && ""+field.charAt(5)!="-")) {
alert("The hyphen character should be used with a properly formatted 5 digit+four zip code, like '12345-6789'.   Please try again.");
return false;
   }
}
return true;
}


