function submit_func()
{
	var frm = this.document.frm;			
		if ( frm.journeytype.value == "select" )
        {
                alert( "Select Your Journey Type" );
                frm.journeytype.focus( );
                return false;
        }
		if ( frm.txtfrom.value == "select" )
        {
                alert( "Select From Area" );
                frm.txtfrom.focus( );
                return false;
        }
		if ( frm.txtto.value == "select" )
        {
                alert( "Select To Area" );
                frm.txtto.focus( );
                return false;
        }
		if ( frm.txtfrom.value ==frm.txtto.value)
		{
				alert( "From Area And To Area Cannot Be Same" );
				frm.txtfrom.focus( );
                return false;
		}
		if ( frm.vehicle.value == "select" )
        {
                alert( "Select To Vehicle Type" );
                frm.vehicle.focus( );
                return false;
        }

		
		
	//document.frm.action='airportonlybooking.php';	
	//document.frm.method='POST';	
	//document.frm.submit();
	$jtype = document.getElementById('journeytype').value;
	//alert($jtype);
	$from = document.getElementById('txtfrom').value;
	//alert($from);
	$to = document.getElementById('txtto').value;
	//alert($to);
	return true;
}
	// ajax coding starts here
		function makeObject()
		{
			var x;
			var browser = navigator.appName;
				if(browser == "Microsoft Internet Explorer")
				{
					x = new ActiveXObject("Microsoft.XMLHTTP");
				}
				else
				{
					x = new XMLHttpRequest();
				}
			return x;
		}
		var request = makeObject();

function loadpage()
{
		//alert("hai");
	var jtype;
    jtype=document.getElementById('journeytype').value;
   
	request.open('get','loadpage1.php?jtype='+jtype);
	request.onreadystatechange=dis;
	request.send('');
}
function dis()
{
	if(request.readystate == 4)
	{
		var answer = request.responseText;
		//alert(answer);
		document.getElementById('fromto').innerHTML = answer;
	}
}

