function validateForm() 
{
 var okSoFar=true 
 with (document.pasangiklan)
 {
  if (nama.value=="" && okSoFar)
  {
	okSoFar=false
	alert("Please enter your name")
	nama.focus()
  } 
  if (email.value=="" && okSoFar)
  {
	okSoFar=false
	alert("Please enter your email address")
	email.focus()
  } 
  var foundAt = email.value.indexOf("@",0)
  if (foundAt < 1 && okSoFar)
  {
	okSoFar = false
	alert ("Your email address is not valid!")
	email.focus()
  }
  if (judul.value=="" && okSoFar)
  {
	okSoFar=false
	alert("Please enter your ads title")
	judul.focus()
  }
  
  if (isi.value=="" && okSoFar)
  {
	okSoFar=false
	alert("Please enter the content of your ads")
	isi.focus()
  }
  
  if (okSoFar==true)  submit();
 }
}

