function validate() {
// validation procedure to validate the filling of sender's name, mail ID and message.
  if (document.writetous.yourName.value == "") {
      alert("Please enter your Name");
      document.writetous.yourName.focus();
      return false;
   }
  if (document.writetous.from.value == "") {
     alert("Please enter your email address");
     document.writetous.from.focus();
     return false;
  } else 
	{
     	var mail = document.writetous.from.value;

     if ((mail.indexOf('@') < 0) || (mail.indexOf('.') < 0))  {
        alert("Please enter a valid email id");
        document.writetous.from.focus();
        return false;
     }

	}

  if (document.writetous.message.value == "") {
     alert("Please enter some feedback");
     document.writetous.message.focus();
     return false;
  }
// compose the mail text to be sent out ...
  var mesg="";
	mesg += document.writetous.message.value+"\n*************************\n";
    mesg += "\n\n Link comes from: \n\n";
    mesg += "No link is specified; Comes from Top navigation Bar"; 
   //document.writetous.message.value = mesg;

    return true;
}

function submitEMail(){
	if(validate()){
		document.writetous.submit();
	}
}
