
window.onload = function() {
   if (booCollapse)
	  collapse();
   if (glCityTab) {
	  initControls();
	  

   }
   menu();
   initVilleLaPlusProche("FRPAR")
   if(booEtiquettes)
   {
   	  change("/FRONT/iDTGV/img");
   }
	
    // We have to initialise search form cities select like the configurateur (ie6 bug)
    // Search select retreive configurateur cities choices
	if( 0 )
	{
	    oOptionCityFrom = document.getElementById('ville_depart_' + glDepartVille);
		
		// SELECT CITY FROM
		oOptionCityFrom.selected = true;
		reInitControls(glArriveeVille, document.getElementById("ville_depart"), document.getElementById("ville_destination") );
		
		// SELECT CITY TO
		oOptionCityTo 	= document.getElementById('ville_destination_' + glArriveeVille);
		oOptionCityTo.selected = true;
	} 
	
	// need to convert glCityTab into string var to search if the code is valid
	var citiesStringList = ''+glCityTab; 
	
	if(false && citiesStringList.indexOf(',')!=-1 )
	{
		$("div.topSearch").slideToggle("slow");
		
		// RESET SELECT FROM IF DEST IS PARIS
		if(''=='FRPAR') document.getElementById("ville_depart").selectedIndex = 0;
		reInitControls(glArriveeVille, document.getElementById("ville_depart"), document.getElementById("ville_destination") );
		
		// SELECT CITY TO DIRECTLY
		document.getElementById('ville_destination_' + '').selected = true;
	}
	
}

var booEtiquettes;
var booCollapse;
var glCityTab = false;
var now = new Date();
var formularies = new Formularies();
var ajaxPropre = new AjaxPropre();
var glDepartVille = "FRPAR";
var glArriveeVille = "FRXBY";
var glDateDepart = now.toLocaleString();
var glDateRetour = now.toLocaleString();
var glIsReturn = false;
var glConfig = false;
var errorColorFront = "#e0d0e5";
var errorColorBack = "#9a017f";
imgPath = "/FRONT/iDTGV/img/common/";
