
var inter;
        var intervalId;
        var allvaluesofsourcedest="";
        var year;
        var month;
        var day;

        function populateData(){
        	
            content();

            ajaxFunction(allvaluesofsourcedest);


        }



        function ajaxFunction(values)
        {

            var resp=values;
            var data=resp.split('{');
            var i;
            var data3;
            var data4;
            var expandInnerHtml= "";
            document.getElementById("From").value=data[0];
            var data1=data[1].split('],');

            for(i=0;i<data1.length;i++){
                data3=data1[i].split('=[');
                expandInnerHtml= expandInnerHtml+"<input type='hidden' id='hidden"+data3[0]+"' value='"+data3[1]+"' /><br> ";
            }

            var data2=data[2].split('],');
            expandInnerHtml= expandInnerHtml+"\n\n\n\n";
            for(i=0;i<data2.length;i++){
                data4=data2[i].split('=[');
                expandInnerHtml= expandInnerHtml+"<input type='hidden' id='hidden"+data4[0]+"' value='"+data4[1]+"'/><br>";
            }

            document.getElementById('allhiddenfields').innerHTML=expandInnerHtml;
            initiateSource();
   
        }

        function setCookie(name) {
            //getting all the values from respective fields 		
            var value=document.home_form.fromcity.value+"$"+document.home_form.tocity.value+"$"+document.home_form.fromStopId.value+"$"+document.home_form.toStopId.value;
            setCookieNameValue(name,value);

        }/*function disableTo() {
	//alert();
			if(!document.getElementById("single").checked){
				document.getElementById("returnTRID").style.visibility = 'visible';

				
			}else{
				document.getElementById("returnTRID").style.visibility = 'hidden';

			}	
			
}*/

function OpenTravelDateFrame(textDate,anchorDate,formatDate)
	{
//alert('openTravel');
// alert(document.getElementById(textDate).value)
	document.getElementById("CalFrame").style.visibility = "visible";
	top.frames["CalFrame"].OpenCal(textDate,anchorDate,formatDate);
	
} 
function CloseCal()
{
document.getElementById("CalFrame").style.visibility = "hidden";
}
 
function checkSearchCriteria(){
	//alert(document.getElementById('departureDate').value);
	if(document.getElementById('frombox').value=='-1'){
		document.getElementById("errorID").innerHTML='<font color="red" size="2">The FROM city cannot be blank</font>';
		document.getElementById("frombox").focus();
		document.getElementById("frombox").style.backgroundColor='LightGoldenRodYellow';
		
		return false;
	}
	if(document.getElementById('tobox').value=='' ){
		document.getElementById("errorID").innerHTML='<font color="red" size="2">The TO city cannot be blank</font>';
		document.getElementById("tobox").focus();
		document.getElementById("tobox").style.backgroundColor='LightGoldenRodYellow';
		
		return false;
	}
	if(document.getElementById('departDate').value=='dd-mm-yyyy'){
		
		document.getElementById("errorID").innerHTML='<font color="red" size="2">Pls select Depart Date</font>';
		document.getElementById("departureDate").focus();
		//document.getElementById("departureDate").style.backgroundColor='LightGoldenRodYellow';
		return false;
	}

	
}

