lacssenteursOn = new Image();
espacechaleurOn = new Image();
naturesaveursOn = new Image();
bouillonenergieOn = new Image();
thalassoOn = new Image();
tarifssejoursOn = new Image();
soinsjourneeOn = new Image();
tarifssoinsOn = new Image();
tarifschambresOn = new Image();
promotionsOn = new Image();
infosutilesOn = new Image();
liensutilesOn = new Image();
contactOn = new Image();
partenairesOn = new Image();
emailOn = new Image();

tarifsOn = new Image();
reservationOn = new Image();
reserverOn = new Image();

langFrOn = new Image();
langEnOn = new Image();
langNlOn = new Image();


lacssenteursOn.src = "./imagesen/lacssenteursOn.jpg";
espacechaleurOn.src = "./imagesen/espacechaleurOn.jpg";
naturesaveursOn.src = "./imagesen/naturesaveursOn.jpg";
bouillonenergieOn.src = "./imagesen/bouillonenergieOn.jpg";
thalassoOn.src = "./imagesen/thalassoOn.jpg";
tarifssejoursOn.src = "./imagesen/tarifssejoursOn.jpg";
soinsjourneeOn.src = "./imagesen/soinsjourneeOn.jpg";
tarifssoinsOn.src = "./imagesen/tarifssoinsOn.jpg";

tarifschambresOn.src = "./imagesen/tarifschambresOn.jpg";
promotionsOn.src = "./imagesen/promotionsOn.jpg";
infosutilesOn.src = "./imagesen/infosutilesOn.jpg";
liensutilesOn.src = "./imagesen/liensutilesOn.jpg";
contactOn.src = "./imagesen/contactOn.jpg";
partenairesOn.src = "./imagesen/partenairesOn.jpg";
emailOn.src = "./imagesen/emailOn.jpg";

tarifsOn.src = "./imagesen/tarifsOn.jpg";
reservationOn.src = "./imagesen/reservationOn.jpg";
reserverOn.src = "./imagesen/reserverOn.jpg";

langFrOn.src = "./imagesen/langFrOn.jpg";
langEnOn.src = "./imagesen/langEnOn.jpg";
langNlOn.src = "./imagesen/langNlOn.jpg";

lacssenteursOn.name = "lacssenteurs";
espacechaleurOn.name = "espacechaleur";
naturesaveursOn.name = "naturesaveurs";
bouillonenergieOn.name = "bouillonenergie";
thalassoOn.name = "thalasso";
tarifssejoursOn.name = "tarifssejours";
soinsjourneeOn.name = "soinsjournee";
tarifschambresOn.name = "tarifschambres";
tarifssoinsOn.name = "tarifssoins";
promotionsOn.name = "promotions";
infosutilesOn.name = "infosutiles";
liensutilesOn.name = "liensutiles";
contactOn.name = "contact";
partenairesOn.name = "partenaires";
emailOn.name = "email";

tarifsOn.name = "tarifsoff";
reservationOn.name = "reservationoff";
reserverOn.name = "reserveroff";

langFrOn.name = "langFr";
langEnOn.name = "langEn";
langNlOn.name = "langNl";

function turnOn(aoImgOrigine){
	aoImgOrigine.src = "./imagesen/"+aoImgOrigine.id+".jpg";
}

function turnOff(aoImg){
	link = eval(aoImg.id).name;
	aoImg.src = "./imagesen/"+link+".jpg";
}


function DisplayPngByBrowser ( browser, img_path, width, height) {
var png_path;
if(width == 348) bug = 1;
else bug = 0;
if (browser == 'Microsoft Internet Explorer' && bug != 0) {
	//document.write('<img src="./images/cadrejpg.jpg" style="z-index:100; position:absolute;" />');
}else if (browser == 'Microsoft Internet Explorer' && bug == 0) {
	document.write('<img src="./images/integration/blank.gif" style="width:'+width+'px; height:'+height+'px; position:absolute; z-index:200; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+img_path+'\', sizingMethod=\'scale\'); " >');
}
else if (browser == 'Netscape')
	document.write('<img src="'+img_path+'" style="position:absolute; z-index:200;" />');
else
	document.write('<img src="'+img_path+'" style="z-index:200;" />');

}

function toggleView(asIdBlock){
	aoBlock = document.getElementById(asIdBlock);
	if(aoBlock.style.display == "block" || aoBlock.style.display == ""){
		aoBlock.style.display = "none";
	}else{
		aoBlock.style.display = "block";
	}
}

function flagReservation(asIdRes){
	window.location.href = "./index.php?page=adminreservations&check=true&idRes="+asIdRes;
}

function viewImg(asType, aoForm){
	aoForm.type.value = asType;
	aoForm.page.value = "adminviewimg"
	aoForm.submit();
}

function addImg(asType, aoForm){
	switch(asType){
		case "t":
			idPage = aoForm.idCat1.value
			break;
		case "p":
			idPage = aoForm.idCat2.value;
			break;
		case "s":
			idPage = aoForm.idCat3.value;
			break;
		case "l":
			idPage = aoForm.idCat4.value;
			break;
		case "pr":
			idPage = aoForm.idCat5.value;
			break;
		case "sc":
			idPage = aoForm.idCat6.value;
			break;
	}
	aoForm.page.value = "adminaddimg";
	aoForm.type.value = asType;
	aoForm.idPage.value = idPage;
	aoForm.submit();
}

function copythis(asUrlImg, asAltTxt, aoForm){

	aoForm.urlimagepp.value = asUrlImg;
	aoForm.alttxtpp.value = asAltTxt;
}

function pastethis(typeImg, idCadre, aoForm){
	if(aoForm.urlimagepp.value == ""){
		alert("Il n'y a pas d'images dans le presse-papier\nVeuillez d'abord copier une image.")
	}else{
		aoForm.imgType.value = typeImg;
		aoForm.idCadre.value = idCadre;
		aoForm.submit();
	}
}

