function Check() {
txt=document.form1.e-mail.value;
if (txt.indexOf("@")<=2){
alert("Check your Email Address.Please"
+"check the prefix and '@' sign.");
document.form1.e-mail.focus();
return false;
}
else if (txt.indexOf(".")<1){
alert("Check your Email Address.\n");
document.form1.e-mail.focus();
return false;
} 
else
return true; 
}

function Checkfield() {
txt1=document.form.email.value;
txt2=document.form.senderemail.value;
txt=document.form.text.value;
t1=txt.length;

if(document.form.recipient.value==""){
alert("Check recipient's name.");
document.form.recipient.focus();
return false;
}

else if (txt1.indexOf("@")<=2){
alert("Check receiver's email address .Please"
+"check the prefix and '@' sign.");
document.form.email.focus();
return false;
}
else if ((txt1.indexOf(".")<1)){
alert("Check receiver's email address.\n");
document.form.email.focus();
return false;
}

else if(document.form.sender.value==""){
alert("Check sender's name.");
document.form.sender.focus();
return false;
} 

else if (txt2.indexOf("@")<=2){
alert("Check sender's email address .Please"
+"check the prefix and '@' sign.");
document.form.senderemail.focus();
return false;
}
else if (txt2.indexOf(".")<1){
alert("Check sender's email address.\n");
document.form.senderemail.focus();
return false;
} 

else if(t1 >= 750)
{
alert("Sorry! write a short message."+"Please limit your message upto 150 words\n");
document.form.text.focus();
return false;
}
else
return true; 
}



