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 overlay_revert() {
		document.getElementById('quote').style.display='none';
		document.getElementById('quote_overlay').style.display='';
		document.getElementById('news').style.display='';
		document.getElementById('overlay_spacer').style.display='';
		document.getElementById('domestic').style.display='';
		}
	function overlay() {
		document.getElementById('quote').style.display='';
		document.getElementById('quote_overlay').style.display='none';
		document.getElementById('news').style.display='none';
		document.getElementById('overlay_spacer').style.display='none';
		document.getElementById('domestic').style.display='none';
		document.getElementById('first_name1').value.replace=document.getElementById('first_name_overlay').value;
		}
function unclearall() {
		window.opener.document.getElementById('leftColumn').style.display='';
		window.opener.document.getElementById('rightColumn').style.display='';
		window.opener.document.getElementById('quote').style.display='';
		window.opener.document.getElementById('news').style.display='';
		window.opener.document.getElementById('results').style.display='none';
		window.opener.document.getElementById('quote_overlay').style.display='';
		window.opener.document.getElementById('domestic').style.display='';
		window.opener.document.getElementById('results_header').style.display='none';
		}
function sm_adult(objSelect){
showHideAdults(objSelect.options.value);
}
function sm_child(objSelect){
showHideChild(objSelect.options.value);
}
function sm_infant(objSelect){
showHideInfant(objSelect.options.value);
}
function verify() {
var themessage = "Following Information Missing:";
var messageflag = 0;
if (document.quoteform.first_name1.value=="Your First Name") {
themessage = themessage + "\n - Your First Name\n";
messageflag = 1;


}
if (document.quoteform.first_name1.value=="") {
themessage = themessage + "\n - Your First Name\n";
messageflag = 1;
document.forms.quoteform.first_name1.focus();
}
if (document.quoteform.last_name1.value=="Your Last Name") {
themessage = themessage + "\n - Your Last Name\n";
messageflag = 1;


}
if (document.quoteform.last_name1.value=="") {
themessage = themessage + "\n - Your Last Name\n";
messageflag = 1;
document.forms.quoteform.last_name1.focus();
}
if (document.quoteform.email.value=="Your Email Address") {
themessage = themessage + "\n - Your Email Address\n";
messageflag = 1;

}
if (document.quoteform.email.value=="") {
themessage = themessage + "\n - Your E-mail Address\n";
messageflag = 1;
document.forms.quoteform.email.focus();
}
if (document.quoteform.phone.value=="Your Phone Number") {
themessage = themessage + "\n - Your Phone Number\n";
messageflag = 1;

}
if (document.quoteform.phone.value=="") {
themessage = themessage + "\n - Your Phone Number\n";
messageflag = 1;
document.forms.quoteform.phone.focus();
}
if (document.quoteform.leaving.value=="Departure City") {
themessage = themessage + "\n - Departure City\n";
messageflag = 1;

}
if (document.quoteform.going.value=='Destination City') {
themessage = themessage + "\n - Destination City\n";
messageflag = 1;

}
if (document.quoteform.leaving.value=="") {
themessage = themessage + "\n - Departure City\n";
messageflag = 1;
document.forms.quoteform.leaving.focus();
}
if (document.quoteform.dedate.value=="") {
themessage = themessage + "\n - Departure Date\n";
messageflag = 1;
document.forms.quoteform.dedate.focus();
}


if (messageflag == 0) {
	
	/***** checking for valid email address *****/
	var emailID=document.quoteform.email
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	else{
		document.quoteform.submit();	
	}
}
else {
alert(themessage);
return false;
}
}