function formVooDoo(myField)
{
	if(myField.defaultValue==myField.value)
	myField.value='';
	myField.className='text user-input';
}

function valid_email(address)
{
  if (address.indexOf("@")  == -1 || address.indexOf(".") == -1)
  {
    alert("Email addresses must contain one @ symbol and at least one dot");
    return false;
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'0123456789_-.@";
  var checkStr = address;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    if (checkOK.indexOf(ch) == -1)
    {
      alert("Please enter only letter, digit and \"_-'.@\" characters in this email field.");
      return(false);
    }   
  }
  return(true);
}

function create_form_check(theform) {
  if (theform.email.value == "")
  {
    alert("Please enter a value for the Email Address field.");
    theform.email.focus();
    return (false);
  }

  if (!valid_email(theform.email.value))
  {
    theform.email.focus();
    return (false);
  }
 return true;
}           

function login_form_check(theform) {
  if (theform.email.value == "")
  {
    alert("Please enter a value for the Email Address field.");
    theform.email.focus();
    return (false);
  }
  if (!valid_email(theform.email.value))
  {
    theform.email.focus();
    return (false);
  }
  if (theform.password.value == "")
  {
    alert("Please enter a value for the Password field.");
    theform.password.focus();
    return (false);
  }
 return true;
}     
function OpenMonitor(name)
{
	nname=navigator.userAgent;
	nversion=navigator.appVersion.substring(0,1);
	if ((nname.lastIndexOf("MSIE")==-1) || (nversion!=4))
	{
		myWindow = window.open(name,"my_jobsite_sub_window","toolbar=1,location=0,directories=0,status=0,menubar=1,scrollbars=1,copyhistory=0,width=795,height=530,top=20,left=0");
		myWindow.focus();
	}
	else // IE 4 (but not 3 or 5) throws a security exception
	{    // when focusing on a window on another domain
	     //
		myWindow = window.open(name,"","toolbar=1,location=0,directories=0,status=0,menubar=1,scrollbars=1,copyhistory=0,width=795,height=530,top=20,left=0");
	}
}

