		function validateform()
		{
			 if (document.myform.comname.value =="" )
			 {
				alert("Please Enter Companyname")
				document.myform.comname.focus() 
				return false;
			 }
			  if (document.myform.person.value =="" )
			 {
				alert("Please Enter Your Name")
				document.myform.person.focus() 
				return false;
			 }
			 
			  if (document.myform.country.value =="0" )
			 {
				alert("Please Select Your Country")
				document.myform.country.focus() 
				return false;
			 }
			   if (document.myform.phone.value =="" )
			 {
				alert("Please Enter Your Phone Number")
				document.myform.phone.focus() 
				return false;
			 }
			 if(!ValidateNo(document.myform.phone.value,"0123456789+- "))
	{
		alert("Please Enter Only Number");
		document.myform.phone.focus();
		return false;
	}
			  
			 var mail = document.myform.email.value;

	if(document.myform.email.value=="")
	{
		alert("Please enter a value for the Email Id.");
		document.myform.email.focus();
		return false;
	}

	if ((mail.length == mail.lastIndexOf('.')+1) || (mail.indexOf('@') != mail.lastIndexOf('@')))
	{
		alert("Please enter a proper Email Id");
		document.myform.email.focus();
		return false;
	}

	if(mail.indexOf('@')==-1 || mail.indexOf('.')==-1 ||  mail.indexOf('@',0)==0 || mail.indexOf('.',0)<1 || mail.indexOf('@.')!= -1 || mail.indexOf('.@')!=-1 || mail.indexOf('..')!=-1)
	{
		alert("Please enter a proper Email Id");
		document.myform.email.focus();
		return false;
	}
	if(!ValidateNo(document.myform.email.value,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@._-"))
	{
		alert("Please enter a proper Email Id");
		document.myform.email.focus();
		return false;
	}
	  
			 if (document.myform.type.value =="" )
			 {
				alert("Please Select Your Exhibition Type")
				document.myform.type.focus() 
				return false;
			 }
			 // ajaxcode
			 var name , company , address , country , phone , fax , email , comments;

	company = document.myform.comname.value ;
	name = document.myform.person.value;
	address = document.myform.address.value;
	country = document.myform.country.value ;
	phone = document.myform.phone.value;
	fax = document.myform.fax.value;
	email = document.myform.email.value ;
	url = document.myform.website.value;
	comments = document.myform.inquiry.value;
	type = document.myform.type.value;
	
	var str;
	str = "name="+name+"&company="+company+"&country="+country+"&phone="+phone+"&email="+email+"&comments="+comments+"&address="+address+"&fax="+fax+"&url="+url+"&type="+type;
	var xmlHttp = null 	
	if (typeof window.ActiveXObject != 'undefined' ) 
	{ 
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); 
	} 
	else 
	{ 
		xmlHttp = new XMLHttpRequest(); 
	}

	var url="/ttf/sendmail.asp?"+str+"&sid="+Math.random()
	 
	xmlHttp.open("GET", url, false);
    xmlHttp.send(null);
	
	if (xmlHttp.readyState == 4 || xmlHttp.readyState=="complete") 
	{	
		document.getElementById("popup").innerHTML=xmlHttp.responseText
	}
	 return true;
		}
		
		function ValidateNo(NumStr, String)
		{
			for(var Idx=0; Idx<NumStr.length; Idx++)
			{
				var Char = NumStr.charAt(Idx);
				var Match = false;

				for(var Idx1=0; Idx1<String.length; Idx1++)
				{
					if(Char == String.charAt (Idx1))
						Match = true;
				}

				if (!Match) 
					return false;
			}
	return true;
}
		