function showcountry(theForm)
{
	//alert(theForm.Region.selectedIndex)
	if (theForm.Region.selectedIndex == 1)
	{
		document.all.showcountry.style.display="";
	}
	else
	{
		document.all.showcountry.style.display="none";
	}
}

function Validate(theForm)
{
  if (theForm.Title.value == "")
  {
    alert("Please supply your title.");
    theForm.Title.focus();
    return (false);
  }
  
  if (theForm.FirstName.value == "")
  {
    alert("Please enter your name.");
    theForm.FirstName.focus();
    return (false);
  }

  if (theForm.LastName.value == "")
  {
    alert("Please enter your surname.");
    theForm.LastName.focus();
    return (false);
  }

  if (theForm.Email.value == "")
  {
    alert("Please enter your Email address.");
    theForm.Email.focus();
    return (false);
  }
  
  if (theForm.Email.value != theForm.Email2.value)
  {
    alert("Your email address confirmation does not match, please re-enter.");
    theForm.Email.focus();
    return (false);
  }
  
  crucial1 = theForm.Email.value
  crucial2 = crucial1.indexOf ("@")
  crucial3 = crucial1.indexOf(".", crucial1.indexOf ("@"))
  if (crucial3 != -1)
  {
    crucial4 = crucial1.slice(crucial1.indexOf(".", crucial1.indexOf ("@"))+1).length
  }
  crucial5 = crucial1.indexOf("@", crucial1.indexOf ("@")+1)
  //alert(crucial5)
  
  if (crucial2 == -1 || crucial3 == -1 || crucial4 == 0 || crucial5 != -1)
  {
    alert("The email address you supplied is invalid - please re-enter it\nin the form of someone@servername.co.za/.com/.org etc.");
    document.response.Email.focus();
    return (false);
  }
  
  if (theForm.Region.value == "")
  {
    alert("Please select a region.");
    theForm.Region.focus();
    return (false);
  }
  else if (theForm.Region.value == 'OTH' && theForm.Country.value == "")
  {
    alert("Please enter your country.");
    theForm.Country.focus();
    return (false);
  }
  

  return (true);
}
