im = new Array; //tableau contenant l'ensemble des images préchargées

/**********************************************************************
precharge l'image de substitution "numéro" et "fleche" du calque de
navigation entre les carousels
url = adresse des images
**********************************************************************/
function prechargement(url){
	
	for (i = 0 ; i < nb ; i ++ )
	{
	im[i] = new Image;
	im[i].src = url + (i+1) + "_2.jpg";
	}
	
	im[nb] = new Image;
	im[nb].src = url + "back2.jpg";
	
	im[(nb)+1] = new Image;
	im[(nb)+1].src = url + "next2.jpg";
}

/**********************************************************************
OpenWindow ouvrant une ambiance
theURL = le nom de l'ambiance (3 premieres lettres)
***********************************************************************/

function resolutionX() {
  return (screen.width-10)
}
function resolutionY() {
  return (screen.height-95);
}

function openAmbianceNEW(thePARAMS) {

    theURL = "front.asp?" + thePARAMS + ""
    param00 = 'resizable=no,scrollbars=yes,directories=no,width=' + resolutionX() + ',height=' + resolutionY() + ',top=0,left=0,location=no,menubar=no,status=no,toolbar=no,titlebar=yes,fullscreen=no,top=0,left=0'
    window.open(theURL,'ambiance',param00)
}
function openAmbianceNEWviaProducts(thePARAMS) {

    theURL = "../gallery/front.asp?" + thePARAMS + ""
    param00 = 'resizable=no,scrollbars=yes,directories=no,width=' + resolutionX() + ',height=' + resolutionY() + ',top=0,left=0,location=no,menubar=no,status=no,toolbar=no,titlebar=yes,fullscreen=no,top=0,left=0'
    window.open(theURL,'ambiance_via_products',param00)
}
function openAmbianceNEW_Stools(thePARAMS) {

    theURL = "front.asp?" + thePARAMS + ""
    window.open(theURL,'','directories=no,width=358,height=535,top=0,left=0,hotkeys=no,location=no,menubar=no,resizable=yes,status=no,toolbar=no,titlebar=yes,fullscreen=no')

}

/**********************************************************************
Dirige vers la page désignée par le menu déroulant indentique a 
openAmbience mais avec conversion pour les menus déroulants
selObj = résultante du menu déroulant
***********************************************************************/
function popUpNEWen(selObj){

  var theURL;
  vLANG = "en"
  
  eval("theURL = selObj.options[selObj.selectedIndex].value");

  theURL = "front.asp?id_photoE=" + theURL + "&lang=" + vLANG + ""
  window.open(theURL,'','resizable=no,scrollbars=yes,directories=no,width=' + resolutionX() + ',height=' + resolutionY() + ',top=0,left=0,location=no,menubar=no,status=no,toolbar=no,titlebar=yes,fullscreen=no,top=0,left=0')
}
function popUpNEWfr(selObj){

  var theURL;
  vLANG = "fr"
  
  eval("theURL = selObj.options[selObj.selectedIndex].value");

  theURL = "front.asp?id_photoE=" + theURL + "&lang=" + vLANG + ""
  window.open(theURL,'','resizable=no,scrollbars=yes,directories=no,width=' + resolutionX() + ',height=' + resolutionY() + ',top=0,left=0,location=no,menubar=no,status=no,toolbar=no,titlebar=yes,fullscreen=no,top=0,left=0')
}
