// All Rights Reserved C 2001-2004 hurriKane Solutions, LLC 
var hK;
function hkOpen(winurl,winname,winfeatures)
{
	hK = window.open(winurl,winname,winfeatures);
 	setTimeout('hK.focus();',250);
}

function IsValidEmail (strEmail){
		var bIsValid=true;
		var Space1=" ";
		var At1="@";
		var Dot1=".";
		var strTemp=new String(strEmail);
		if (strTemp.length < 5) 
				bIsValid = false;
		
		if (strTemp.indexOf(Space1)>0)
				bIsValid = false;
		
		if (strTemp.indexOf(At1)<2)
				bIsValid = false;
		
		if (strTemp.lastIndexOf(Dot1) < strTemp.indexOf(At1, 1) + 1)
				bIsValid = false;
		return bIsValid; 
}

function contact(theForm)
{
 if (theForm.name.value == "")
  {
    alert("Please enter a value for the \"name\" field.");
    theForm.name.focus();
    return (false);
  }
  
      if (theForm.phone.value == "")
  {
    alert("Please enter a value for the \"phone\" field.");
    theForm.phone.focus();
    return (false);
  }
  
	if (theForm.email.value == "")
  	{
    alert("Please enter a value for the \"Email\" field.");
    theForm.email.focus();
    return (false);
  	}
	var ValidEmail=IsValidEmail (theForm.email.value);
	if ((ValidEmail==false) && (theForm.email.value != "")){
	alert("You have entered in a invalid email address");
	theForm.email.focus();
	return (false);
	}
  
  return (true);
}
