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 verify()
{
if(document.frm.txt_name.value=="your name" || document.frm.txt_name.value=="")
{
alert("Please fill name");
document.frm.txt_name.focus();

return false;
}


// *************************************** Start code for email address ***********************************************
		var emailID=document.getElementById("txt_email");
		      
		if((emailID.value==null)||(emailID.value=="")){
		
		alert("Please Enter your Email ID");
		document.getElementById("txt_email").focus();
		return false;
	}
	else if(echeck(emailID.value)==false){
		emailID.value="";
		document.getElementById("txt_email").focus();
		return false;
	}	
// ************************************** End Code For email Address *************************************************		



if(document.frm.txt_phone.value=="contact no." || document.frm.txt_phone.value=="")
{
alert("Please fill phone no");
document.frm.txt_phone.focus();
return false;
}

if(document.frm.txt_from.value=="from" || document.frm.txt_from.value=="")
{
alert("Please fill from");
document.frm.txt_from.focus();
return false;
}

if(document.frm.txt_to.value=="to" || document.frm.txt_to.value=="")
{
alert("Please fill to");
document.frm.txt_to.focus();
return false;
}

if(document.frm.txt_people.value=="# of people" || document.frm.txt_people.value=="")
{
alert("Please fill people");
document.frm.txt_people.focus();
return false;
}

if(document.frm.txt_select_from.value=="from" || document.frm.txt_select_from.value=="")
{
alert("Please fill from");
document.frm.txt_select_from.focus();
return false;
}

if(document.frm.txt_select_to.value=="to" || document.frm.txt_select_to.value=="")
{
alert("Please fill to");
document.frm.txt_select_to.focus();
return false;
}

}

function make_blank1(ctrl)
{
 	if(ctrl.value=='your name')
 	{
		ctrl.value='';
	}
}
function make_blank1_out(ctrl)
{
	if(ctrl.value=='')
 	{
		ctrl.value='your name';
	}
}
function make_blank2(ctrl)
{
 	if(ctrl.value=='your email')
 	{
		ctrl.value='';
	}
}
function make_blank2_out(ctrl)
{
	if(ctrl.value=='')
 	{
		ctrl.value='your email';
	}
}
function make_blank3_out(ctrl)
{
	if(ctrl.value=='')
 	{
		ctrl.value='contact no.';
	}
}

function make_blank3(ctrl)
{
 	if(ctrl.value=='contact no.')
 	{
		ctrl.value='';
	}
}
function make_blank4_out(ctrl)
{
	if(ctrl.value=='')
 	{
		ctrl.value='from';
	}
}

function make_blank4(ctrl)
{
 	if(ctrl.value=='from')
 	{
		ctrl.value='';
	}
}
function make_blank5_out(ctrl)
{
	if(ctrl.value=='')
 	{
		ctrl.value='to';
	}
}

function make_blank5(ctrl)
{
 	if(ctrl.value=='to')
 	{
		ctrl.value='';
	}
}
function make_blank6_out(ctrl)
{
	if(ctrl.value=='')
 	{
		ctrl.value='# of people';
	}
}
function make_blank6(ctrl)
{
 	if(ctrl.value=='# of people')
 	{
		ctrl.value='';
	}
}
function make_blank7_out(ctrl)
{
	if(ctrl.value=='')
 	{
		ctrl.value='from';
	}
}

function make_blank7(ctrl)
{
 	if(ctrl.value=='from')
 	{
		ctrl.value='';
	}
}
function make_blank8_out(ctrl)
{
	if(ctrl.value=='')
 	{
		ctrl.value='to';
	}
}

function make_blank8(ctrl)
{
 	if(ctrl.value=='to')
 	{
		ctrl.value='';
	}
}

function search_mouse_out(ctrl)
{
	if(ctrl.value=='')
 	{
		ctrl.value='---Search Keyword---';
	}
}

function search_mouse_click(ctrl)
{
	if(ctrl.value=='---Search Keyword---')
 	{
		ctrl.value='';
	}
}

