
function validateEn()
{
  
   if(window.document.contact.txtname.value=="")
	{
		alert("Please enter Name.")
		window.document.contact.txtname.focus();
		return false;
	}
	 if(!blank(window.document.contact.txtname,"Name"))
		return false
	
	 if(window.document.contact.email.value=="")
	 {
		alert("Please enter Email Address.")
		window.document.contact.email.focus();
		return false;
	  }
	  if(window.document.contact.email.value.indexOf("@") == "-1" || document.contact.email.value.indexOf(".") == "-1")
	{
		alert("Please enter the Email address in correct format (yourname@company.com)");
		window.document.contact.email.focus();
		return false;
		
	if(document.contact.message.value=="")
	{
		alert("Please enter Message.")
		window.document.contact.message.focus();
		return false;
	}
	 if(!blank(document.contact.message,"Message"))
		return false
		}
     
	document.contact.action="contactus.php?msg=1";
	document.contact.submit();
} 

function doReset()
{
window.document.contact.reset();
}  

function englishText() {
  var messageText;

  messageText = document.contact.message.value + "%0D%0A%0D%0A";

  if (!(window.document.contact.txtname.value=="")) messageText += "Name: " + document.contact.txtname.value + "%0D%0A";
  if (!(window.document.contact.email.value=="")) messageText += "E-mail: " + document.contact.email.value + "%0D%0A";
  

}


function blank(field,nm)
{
if(field.value!=""){

	var crlf="\r\n"
	text=false
	
	var arr=new Array()
	arr=field.value.split(crlf)
	for(j=0;j<arr.length&&!text;j++){
		a=arr[j]
		if ((a!=crlf)){
			for(i=0;i<a.length&&!text;i++){
				str=a.substring(i,i+1)
				if((str!=" ")&&(str!=""))
					text=true
			}
		}
	}

	if (!text){
		alert(nm)
		field.focus()
		return false;
	}
	return true
}
return true
}