<!--
function openWin(url,hauteur,largeur)
{	
	window.open(url,'nom','toolsbar=no,height='+hauteur+',width='+largeur);
}

function openWinvideo(url,hauteur,largeur)
{	
	window.open(url,'video','toolsbar=no,height='+hauteur+',width='+largeur);
}

function openWin2(url,hauteur,largeur)
{	
	window.open(url,'nom2','toolsbar=no,scrollbars=1,height='+hauteur+',width='+largeur);
}



function rollOver(ImgNme)
{
 obj=document.images[ImgNme];
 obj.src=(obj.src.lastIndexOf('_on')!=-1)? obj.src.replace(/_on/gi,"_off"):obj.src.replace(/_off/gi,"_on");
}


function PSR_imprimer () { 
    var PSR_f1 = null; 
    var PSR_content=document.getElementById('PSR_print').parentNode.innerHTML; 
    var PSR_title=document.getElementsByTagName('title')[0].innerText; 
    if (PSR_f1) {if(!PSR_f1.closed) PSR_f1.close();} 
    PSR_f1 = window.open ('',"PSR_f1", "height=500,width=600,menubar=yes,scrollbars=yes,resizable=yes,,left=10,top=10"); ; 
    PSR_f1.document.open(); 
    PSR_f1.document.write("<html><head><title>" + PSR_title + "</title><link rel='STYLESHEET' type='text/css' href='style.css'></head><body bgcolor='#ffffff'><div align=center><img src='images/logo_aayc.gif'></div><br>"+PSR_content+"</body></html>"); 
    PSR_f1.document.close(); 

    PSR_f1.focus(); 
PSR_f1.print();
} 


function popup_images_prestataire(typeprest,code){
	var page;
	page = 'image_prestataire.php?TYPREST=' + typeprest + '&CODE=' + code;
	var win = window.open (page,'', config='height=80, width=100, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');
    if(win.focus){win.focus();} 
}

function popup_images_prestation(typeprest,code,codeprest){
	var page;
	page = 'image_prestation.php?TYPREST=' + typeprest + '&CODE=' + code + '&CODEPREST=' + codeprest;
	var win = window.open (page,'', config='height=80, width=100, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');
    if(win.focus){win.focus();} 
}

function popup_plan_situation(typeprest,code,lot){
	var page;
	page = 'plan_de_situation.php?typeprest=' + typeprest + '&presta=' + code + '&lot=' + lot;
	var win = window.open (page,'', config='height=200, width=300, toolbar=no, menubar=no, scrollbars=no, resizable=yes, location=no, directories=no, status=no');
    if(win.focus){win.focus();} 
}

function popup_plan_google(longitude,latitude){
    var page;
	page = 'plan_de_situation_google.php?longitude=' + longitude + '&latitude=' + latitude;
	var win = window.open (page,'', config='height=320, width=800, toolbar=no, menubar=no, scrollbars=no, resizable=yes, location=no, directories=no, status=no');
    
    if(win.focus){win.focus();} 
}

function popup_photo(type_prest,code_prest,code){
	var page;
	if (code != '') {
        page = 'image_prestation.php?TYPREST=' + type_prest+ '&CODEPREST=' + code_prest + '&CODE=' + code;
	} else {
        page = 'image_prestataire.php?TYPREST=' + type_prest+ '&CODEPREST=' + code_prest;
    }
    var win = window.open (page,'', config='height=400, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=yes, location=no, directories=no, status=no');
    if(win.focus){win.focus();} 
}

function redirection_moteur(moteur, langue) {
		numoption = document.frmMoteur.type_hebergement.selectedIndex;
		valeurchoix = document.frmMoteur.type_hebergement.options[numoption].value;
		window.location.href = 'http://combloux.ingenie.fr/index.php?modele=moteur_recherche&type_hebergement=' + valeurchoix;
}

/**
 * Fonction pour creation de l'objet XMLRequest AJAX
 */
function createRequestObject() {
    
    var xhr;
    
    try {
    	xhr = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (err) {
    	try {
    		xhr = new ActiveXObject("Microsoft.XMLHTTP");
    	} catch(err) {
    		xhr = false;
    	}
    }
    
    if(!xhr && typeof XMLHttpRequest != 'undefined') {
    	xhr = new XMLHttpRequest();
    }
    
    return xhr;
}

var http = createRequestObject();


function change_date_cross_selling_prestation_jour(sdate,requete) {
    //alert(sdate);
    url_envoi = 'http://clermont.ingenie.fr/index.php?dateRechercheDispoPrestationJour=' + sdate + '&' + requete;
	document.location.href =  url_envoi;
}

function div_cache(nomdiv)
{
     var style = document.getElementById(nomdiv).style.visibility;
     var display  = "block";
     
     if (style != "hidden")
     {
      style ="hidden";
      display = "none";
     }
     else
     {
      style ="visible";
      display = "block";
     }
     document.getElementById(nomdiv).style.visibility= style;
     document.getElementById(nomdiv).style.display = display; 
     //this.choix_groupe.elements[nomdiv]
}

function div_montre(nomdiv)
{
     var style = document.getElementById(nomdiv).style.visibility;
     var display  = "block";
     
     if (style != "visible")
     {
      style ="visible";
      display = "block";
     }
     else
     {
      style ="hidden";
      display = "none";
     }
     document.getElementById(nomdiv).style.visibility= style;
     document.getElementById(nomdiv).style.display = display; 
     //this.choix_groupe.elements[nomdiv]
}


/**
 * Fonction pour mettre à jour les durées proposées en fonction de la date d'arrivée
*/
function init_durees_proposees(date_debut, traduction_semaine, traduction_jour,emplacement_liste_duree) {           

    var html = '<select class="element select small" id="divDureeSejour_frmMiniMoteur" name="duree" onchange="init_nb_resultats_ajax(\'recherche\',\'frmMiniMoteur\')">';                                       
    
    switch(date_debut) {
        // --- Pour le 17/12/2011 : 7 et 8 nuits --- //
        case '17/12/2011' :        
            html = html + '<option value="7" >7 ' + traduction_jour + 's</option>';
            html = html + '<option value="8" >8 ' + traduction_jour + 's</option>';        
            break;
        // --- Pour le 25/12/2011 : 8 nuits --- //
        case '25/12/2011' :        
            html = html + '<option value="8" >8 ' + traduction_jour + 's</option>';        
            break;
        default :        
           // Durée Normale
           for(iDuree=1; iDuree<=4; iDuree++){ 
               if(iDuree>1){s = "s";}else{s = "";}
               html = html + '<option value="' + (iDuree*7) + '" >' + iDuree + ' ' + traduction_semaine + s + '</option>';
           }        
           break; 
    }
                                          
    
    html = html + '</select>';        
    if(emplacement_liste_duree != ''){           
    	document.getElementById(emplacement_liste_duree).innerHTML = html;                       
    }else{
    	document.getElementById('duree_sejour_proposee').innerHTML = html;           
    }
}


//-->



