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 validateBook()
	{
	if (document.book.full_name.value== "")
		 {
		 alert("Please Input Your Full Name !.");
		 document.book.full_name.focus();
		 return false;
		  }
	if (document.book.email.value== "")
		 {
			 alert("Please Input Your Valid Email Address !");
			 document.book.email.focus();
			 return false;
		 }
		 else
		 { 
			 if (echeck(document.book.email.value)==false)
			 {
				document.book.email.focus();
				return false;
			 }
		 }
	if (document.book.city_departure.value== "")
		 {
		 alert("Please Input Departure City !.");
		 document.book.city_departure.focus();
		 return false;
		  }
	
	if (document.book.start_date.value== "")
		 {
		 alert("Please Input Start Date !.");
		 document.book.start_date.focus();
		 return false;
		  }
	if (document.book.end_date.value== "")
		 {
		 alert("Please Input End Date !.");
		 document.book.end_date.focus();
		 return false;
		  }
	if (document.book.phone_fax.value== "")
		 {
		 alert("Please Input Phone Or Fax !.");
		 document.book.phone_fax.focus();
		 return false;
		  }
	if (document.book.message.value== "")
		 {
		 alert("Please Input Message !.");
		 document.book.message.focus();
		 return false;
		  }
	if (document.book.security_code.value== "")
		 {
		 alert("Please Input Security Code !.");
		 document.book.security_code.focus();
		 return false;
		  }
		  
	return true;
	}  
