// Option Stations
	var data = destination.ski ;
	function checkOption( idRegion, idStation ) 
	{
		formulaire = document.forms['fooSki'].elements['id_sta[]'] ;
		formulaire.options.length = 1 ;
		if ( idRegion != 0 )
		{
			for ( var i = 1 ; i <= data.region[idRegion-1].station.stations.length ; i++ ) 
			{
				o1 = new Option(""+ data.region[idRegion-1].station.stations[i-1].lbs +"",""+data.region[idRegion-1].station.stations[i-1].ids +"",false,false) ;
				formulaire.options[i] = o1 ;
				if ( idStation == data.region[idRegion-1].station.stations[i-1].ids ) formulaire.options[i].selected = true
				if ( idStation == 0 ) formulaire.options[0].text = choixStation ; 
			}
		} else {
			o1 = new Option( choixRegion ,"",false,false) ;
			formulaire.options[0] = o1 ;		
		}
	}

// Creation Option Formule et services
	function setOption ( liste, combo ) {
		var elt = document.forms['fooSki'].elements[combo] ;
		elt.options.length = 1 ;
		for ( var i = 1 ; i <= liste.length ; i++ )
		{
				var opt = new Option("" + liste[i-1].l  +"",""+ liste[i-1].id +"",false,false) ;
				elt.options[i] = opt ;
		}
	}
	
// Date du Jour
	var objDate = new Date();
	var leJour = '' + objDate.getDate() ;
	if ( leJour.length < 2 ) leJour = '0' + leJour ;
	var leMois = '' + Math.round(objDate.getMonth() + 1) ;
	if ( leMois.length < 2 ) leMois = '0' + leMois ;
	var dateAujourdhui = objDate.getYear() + '-' + leMois + '-' + leJour ;

// Select Dates
	function checkDate()
	{
		fooDate = document.forms['fooSki'].elements['ladate'] ;
		fooDate.options.length = 1 ;
		var idSelect = 1 ;
		for ( var i = 0 ; i < dateDepart.length ; i++ )
		{
			var splitDate = dateDepart[i].d.split("/") ;
			var dateArrive = splitDate[0] ;
			optDate = new Option("" + dateDepart[i].f + "",""+ dateDepart[i].d+"",false,false) ;
			fooDate.options[idSelect] = optDate ;
			if ( dateArrive < dateAujourdhui ) fooDate.options[idSelect].style.color = "#CCC" ;
			idSelect++ ;
		}
	}

// Verification POST
	function checkFooMoteur()
	{
		fooMoteur = document.forms['fooSki'];
		fooReg = fooMoteur.elements['id_reg[]'] ;
		fooDate = fooMoteur.elements['ladate'] ;
		if ( fooReg.value == 0 )
		{
			alert ( alertRegion ) ;
			return false ;
		} else {
			sendForm() ;
		}
	}
	
	function sendForm() {
		document.forms['fooSki'].submit() ;
	}
	
	function rid(id) {
		return document.getElementById( id ) ;
	}
	
	function offreMarchand( id , c , url  )
	{
		this.id = rid(id) ;
		this.id.couleur = c ;
		this.id.url = url ;
		this.id.onmouseover = function()
		{
			this.style.background = '#FFC' ;
		}
		this.id.onmouseout = function()
		{
			this.style.background = this.couleur ;
		}
		this.id.onclick = function ()
		{
			window.open ( 'http://www.location-vacances-express.com/scripts/dpr.php?' + url , 'f' + id ) ;
		}
	}
	
	function loadStation ( latCarte, lngCarte ) 
	{
	  if (GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById("map"));
		map.addControl(new GSmallMapControl());
		//map.addControl(new GOverviewMapControl());
		centreMap = new GLatLng( latCarte , lngCarte ) ;
		map.setCenter( centreMap, 11 );
		// infos
		function createMarker ( point ) {
			var marker = new GMarker( point ) ;
			var objIcon = marker.getIcon() ;
			marker.visibilitychanged ;
			objIcon.image = "http://www.vacances-ski.eu/img/marker-orange-1.png" ;
			objIcon.shadow = "http://www.vacances-ski.eu/img/ombre.png" ;
			objIcon.iconSize = new GSize(20, 30) ;
			objIcon.shadowSize = new GSize(20, 30);
			objIcon.iconAnchor = new GPoint(10, 15);
			return marker;
		}
		// points
		var pointStation = new GLatLng( latCarte, lngCarte );
		map.addOverlay(createMarker(pointStation));
	  }
	}


