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 validation()
{

		if(document.Validform.name.value==""){
		alert("Enter the name");
		document.Validform.name.focus();
		return false;
		}
		if(document.Validform.country.value==""){
		alert("Enter the country");
		document.Validform.country.focus();
		return false;
		}	

		if(document.Validform.add.value==""){
		alert("Enter the address");
		document.Validform.add.focus();
		return false;
		}
		if(document.Validform.email_p.value==""){
		alert("Enter Your Email");
		document.Validform.email_p.focus();
		return false;
		}
		if (echeck(document.Validform.email_p.value)==false){
		document.Validform.email_p.value="";
		document.Validform.email_p.focus();
		return false;
		}
		if(document.Validform.date_event1.value==""){
		alert("Enter Date of Travelling");
		document.Validform.date_event1.focus();
		return false;
		}
		if(document.Validform.arr_place.value==""){
		alert("Enter Arrival place of Kerala");
		document.Validform.arr_place.focus();
		return false;
		}
		
		

		
		
		if(document.Validform.rooem_need.value==""){
			alert("Enter Number of rooms needed");
			document.Validform.rooem_need.focus();
			return false;
			}

		
		return true;	
}

 	


function isInteger(s,id)
{
      var i;
	s = s.toString();
      for (i = 0; i < s.length; i++)
      {
         var c = s.charAt(i);
         if (isNaN(c)) 
	   {
		alert("Given value is not a number");
		document.getElementById(id).value="";		
		return false;
	   }
      }
      return true;
}

function time1(){
	document.getElementById('tim').style.display="none";
	
}
function time2(){
	document.getElementById('tim').style.display="block";
	
}
function banks(){
	
	document.getElementById('bank').style.display="none";
	document.getElementById('oth_pay').style.display="none";
	
}
function banks1(){
	
	document.getElementById('bank').style.display="block";
	document.getElementById('oth_payss').style.display="none";
	
}
function banks3(){
	
	document.getElementById('bank').style.display="none";
	document.getElementById('oth_payss').style.display="block";
	
}
function confrms(){
	document.getElementById('cnfrm').style.display="block";

}
function confrms_not(){
	document.getElementById('cnfrm').style.display="none";

}
function tents(){
	document.getElementById('tent').style.display="block";
	document.getElementById('tnt1').style.display="none";

}
function tents1(){
	document.getElementById('tent').style.display="none";
	document.getElementById('tnt1').style.display="block";

}
