					var flip_tab_commom_portion = 'tab_content_';
					var tab_anchor_common_portion = "tab_anchor_";
					var max_flip_tab = 2;
					var act_tab =1;
					
					function flip_tab(activate_id, selectedClass, unselectedClass )  {
						
							if(act_tab == activate_id) return 
							for(var i=1; i<=max_flip_tab; i++ )		{
							
											document.getElementById(flip_tab_commom_portion + i ).style.display = "none";
							}
											
							document.getElementById(flip_tab_commom_portion + activate_id ).style.display = "";
							document.getElementById(flip_tab_commom_portion + activate_id ).style.visibility = "visible";
							
							document.getElementById(tab_anchor_common_portion + '1').className = selectedClass;
							document.getElementById(tab_anchor_common_portion + '2').className =  unselectedClass;		
							act_tab = activate_id;
					
					}
					
															
					
					function flip_radio_trip(activate_id )  {
							
							document.getElementById('multicity_radio').style.display = "none";
							document.getElementById('roundtrip_radio').style.display = "none";	
							
							if( activate_id == "roundtrip_radio" )																	
							{
							document.getElementById('flight1_from').readOnly = "";		
							document.getElementById('flight1_to').readOnly = "";
							document.getElementById('flight2_from').readOnly = "";				
							document.getElementById('flight2_to').readOnly = "";	
							document.getElementById('return_date').readOnly = "";	
							document.getElementById('return_time').disabled = "";	
							}
							
							if( activate_id == "oneway_radio" )		
							{
							document.getElementById('flight1_from').readOnly = "";		
							document.getElementById('flight1_to').readOnly = "";		
							document.getElementById('flight2_from').readOnly = " ";		
							document.getElementById('flight2_to').readOnly = " ";	
							document.getElementById('return_date').readOnly = " ";	
							document.getElementById('return_time').disabled = " ";	
							
							activate_id = "roundtrip_radio"
							}
							
							document.getElementById( activate_id ).style.display = "";
							document.getElementById(activate_id ).style.visibility = "visible";
					
}


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 ValidateForm(){
	var emailID=document.form1.email1
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	return true
 }