var xmlHttp;
var xmlHttpAirport;
var xmlHttpAirportSelect;

function createXmlXTTP(){	
  try{  
    xmlHttp=new XMLHttpRequest();    
  }
  catch (e){	
    try{
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
    }
    catch (e){      
      try{
       xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");       
     }
      catch (e){
      	alert("Your browser does not support AJAX!");        
      	return false;        
      }      
    }    
  }
}	

function createXmlXTTPAirport(){	
  try{  
    xmlHttpAirport=new XMLHttpRequest();    
  }
  catch (e){	
    try{
      xmlHttpAirport=new ActiveXObject("Msxml2.XMLHTTP");      
    }
    catch (e){      
      try{
       xmlHttpAirport=new ActiveXObject("Microsoft.XMLHTTP");       
     }
      catch (e){
      	alert("Your browser does not support AJAX!");        
      	return false;        
      }      
    }    
  }
}	

function createXmlXTTPAirportSelect(){	
  try{  
    xmlHttpAirportSelect=new XMLHttpRequest();    
  }
  catch (e){	
    try{
      xmlHttpAirportSelect=new ActiveXObject("Msxml2.XMLHTTP");      
    }
    catch (e){      
      try{
       xmlHttpAirportSelect=new ActiveXObject("Microsoft.XMLHTTP");       
     }
      catch (e){
      	alert("Your browser does not support AJAX!");        
      	return false;        
      }      
    }    
  }
}	



var idSelectAj ="";	
var idSelectAirport ="";	
var idSelectAirportS ="";

function ajaxFunctionAirport(urltocall,idSelect){	 	     			  			
	idSelectAirport = idSelect;	
	xmlHttpAirport.open("GET",urltocall,true);		
	xmlHttpAirport.setRequestHeader( "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT" );	
	xmlHttpAirport.onreadystatechange = checkstatusAirport;
	xmlHttpAirport.send(null);       
}			

function ajaxFunctionAirportSelect(urltocall,idSelect){	 	     			  			
	idSelectAirportS = idSelect;	
	xmlHttpAirportSelect.open("GET",urltocall,true);		
	xmlHttpAirportSelect.setRequestHeader( "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT" );	
	xmlHttpAirportSelect.onreadystatechange = checkstatusAirportSelect;
	xmlHttpAirportSelect.send(null);       
}			


function checkstatusAirport(){				
		if(xmlHttpAirport.readyState==4){ 										
			document.getElementById(idSelectAirport).innerHTML =  xmlHttpAirport.responseText;
			if(xmlHttpAirport.status == 200){ 						
			}
			else{
				alert(xmlHttpAirport.responseText);				
			}
		}						
	}	  

function ajaxFunction(urltocall,idSelect){	 	     			  			
	idSelectAj = idSelect;	
	xmlHttp.open("GET",urltocall,true);		
	xmlHttp.setRequestHeader( "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT" );	
	xmlHttp.onreadystatechange = checkstatus;
	xmlHttp.send(null);       
}			

function checkstatusAirportSelect(){				
		if(xmlHttpAirportSelect.readyState==4){ 							
			document.getElementById(idSelectAirportS).innerHTML =  xmlHttpAirportSelect.responseText;
			if(xmlHttpAirportSelect.status == 200){ 						
			}
			else{
				alert(xmlHttpAirportSelect.responseText);				
			}
		}						
	}	  

function checkstatus(){				
		if(xmlHttp.readyState==4){ 							
			document.getElementById(idSelectAj).innerHTML =  xmlHttp.responseText;
			if(xmlHttp.status == 200){ 						
			}
			else{
				alert(xmlHttp.responseText);				
			}
		}						
	}	  