function feedbackForm(form)
{
	msg = "";
	if(form.fname.value=="")
	{
		msg += "- Please type the Name.\n";
	}
	/*if(form.contact.value=="")
	{
		msg += "- Please type the contact Number .\n";
	}
	if(isNaN(form.contact.value)==true)
	{
		form.contact.focus()
		msg+= "- Invalid Contact Number. Please type the number only.\n";
	}
	if(isNaN(form.contact.value)==true)
	{
		form.contact.focus()
		msg+= "- Invalid Contact Number. Please type the number only.\n";
	}
	*/
	if(form.email.value=="")
	{
		msg += "- Please type the email address.\n";
	}
	if (echeck(form.email.value)==false)
	{
		form.email.value=""
		form.email.focus()
		msg+= "- Invalid Email Address.\n";
	}
	if(form.subject.value=="")
	{
		msg += "- Please type the subject.\n";
	}
	if(form.feedback.value=="")
	{
		msg += "- Please type the message.\n";
	}
	
	if(msg!="")
	{
		alert(msg);
		msg="";
		return false;
	}
	else
	{
		return true;
	}
}
function echeck(str) 
{

	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	if (str.indexOf(at)==-1){
	   //alert("Invalid E-mail ID")
	   return false
	}

	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
	   //alert("Invalid E-mail ID")
	   return false
	}

	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
	   // alert("Invalid E-mail ID")
		return false
	}

	 if (str.indexOf(at,(lat+1))!=-1){
	   //alert("Invalid E-mail ID")
		return false
	 }

	 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		//alert("Invalid E-mail ID")
		return false
	 }

	 if (str.indexOf(dot,(lat+2))==-1){
	  // alert("Invalid E-mail ID")
		return false
	 }
	
	 if (str.indexOf(" ")!=-1){
		//alert("Invalid E-mail ID")
		return false
	 }
	 return true					
}
function resetForm()
{
	document.frm.fname.value="";
	document.frm.phone.value="";
	document.frm.email.value="";
	document.frm.address.value="";
	document.frm.city.value="";
	document.frm.country.value="";
	document.frm.feedback.value="";
}