function enableCountry( form )
{
  if ( form.Country.selectedIndex == 1 )
  {
    form.OtherCountry.style.visibility = "visible";
    form.OtherCountry.disabled = false;
  }
  else
  {
    form.OtherCountry.style.visibility = "hidden";
    form.OtherCountry.disabled = true;
  }
}    

function isEmail(str) {
  if ( ( str.indexOf(".") > (str.indexOf("@")+1) ) && (str.indexOf("@") > 0) ) 
    return true;
  else
    return false;  
}


function validateForm(form) 
{
  var sString ="";

  if ( form.Name.value == "" ) {
    alert("Please enter your name.");
    form.Name.focus();
    return false;	  
  }

  if ( form.Company.value == "" ) 
  {
    alert("Please enter your company.");
    form.Company.focus();
    return false;
  }

  if ( form.Phone.value == "" ) 
  {
    alert("Please enter your phone number.");
    form.Phone.focus();
    return false;
  }
    
  if ( !(isEmail(form.Email.value)) ) 
  {
    alert("Please enter a valid email address.");
    form.Email.focus();
    return false;
  }
    
  return true;
}
