var $navi = navigator.userAgent;
var $fire = $navi.search(/Firefox/);
var $navet = $navi.search(/MSIE/);
var $navet6 = $navi.search(/MSIE 6/);
var $panais = $navi.search(/Opera/);
var $saf = $navi.search(/Safari/);
var $loading;
var $reduire=false;
var $recharge=1;
var $fenetreS = "valide_fenetre()";
var $dragX=0;
var $dragY=0;
var $zIndex=5000;
function init(){
	if($fenetreS) eval($fenetreS);
	if($loading){
		var loade = $loading.split(",");
		for(var x=0;x<loade.length;x++){
			eval(loade[x]);
		}
	}
}
function valide_ajouteEvent(objet, typeEvent, nomFunction, typePropagation){
  if(objet.addEventListener) {
    objet.addEventListener(typeEvent, nomFunction, typePropagation);
  } 
  else if (objet.attachEvent) {
  	objet.attachEvent('on' + typeEvent, nomFunction);
  }
} 
function valide_supprimeEvent(objet, typeEvent, nomFunction, typePropagation){
  if (objet.addEventListener) objet.removeEventListener(typeEvent, nomFunction, typePropagation);
  else if (objet.attachEvent) objet.detachEvent('on' + typeEvent, nomFunction);
}

function valide_fenetre(){
	var liste=document.getElementsByTagName("valide::fenetre");
	for(var x=0;x<liste.length;x++){
		if(liste[x].attributes["uid"]){
			var idElement=liste[x].attributes["uid"].value;
			window[liste[x].attributes["uid"].value]=document.createElement("div");
			var fGrandeurW=400;
			var fGrandeurH=200;
			if(liste[x].attributes["modale"] && liste[x].attributes["modale"].value=="vrai"){
				var cache = document.createElement("div");
				eval(idElement).modale=cache;
				cache.style.position="absolute";
				cache.style.width="100%";
				//cache.style.height="100%";
				cache.style.height="5000px";
				cache.style.left="0px";
				cache.style.top="0px";
				cache.setAttribute("id","cache");
				cache.style.backgroundColor="rgb(100,100,100)";
				cache.style.opacity="0.75";
				cache.style.filter="alpha(opacity=75)";
				cache.style.display="none";
				document.body.appendChild(cache);
			}
			eval(idElement).couleurFondFenetre="white";
			eval(idElement).couleurBorduresFenetre="blue";
			eval(idElement).couleurBordureHautFenetre="rgb(30,144,255)";
			eval(idElement).couleurFondBarre="blue";
			eval(idElement).couleurBarreBas="rgb(15,72,255)";
			eval(idElement).couleurTitre="white";
			eval(idElement).couleurBorduresBoutons="white";
			eval(idElement).couleurFondBoutonReduire="blue";
			eval(idElement).couleurFondBoutonReduireSur="rgb(22,100,255)";
			eval(idElement).couleurFondBoutonReduireClic="rgb(0,0,192)";
			eval(idElement).couleurTexteBoutonReduire="white";
			eval(idElement).couleurTexteBoutonReduireClic="rgb(128,128,128)";
			eval(idElement).couleurFondBoutonFermer="red";
			eval(idElement).couleurFondBoutonFermerSur="rgb(255,126,77)";
			eval(idElement).couleurFondBoutonFermerClic="rgb(142,39,0)";
			eval(idElement).couleurTexteBoutonFermer="white";
			eval(idElement).couleurTexteBoutonFermerClic="rgb(128,128,128)";
			if(liste[x].attributes["styles"]){
				var style=liste[x].attributes["styles"].value;
				var list=document.getElementsByTagName("valide::style");
				for(var z=0;z<list.length;z++){
					if(list[z].attributes["uid"].value==style){
						if(list[z].attributes["couleurFondFenetre"]) eval(idElement).couleurFondFenetre=list[z].attributes["couleurFondFenetre"].value;
						if(list[z].attributes["couleurBorduresFenetre"]) eval(idElement).couleurBorduresFenetre=list[z].attributes["couleurBorduresFenetre"].value;
						if(list[z].attributes["couleurBordureHautFenetre"]) eval(idElement).couleurBordureHautFenetre=list[z].attributes["couleurBordureHautFenetre"].value;
						if(list[z].attributes["couleurFondBarre"]) eval(idElement).couleurFondBarre=list[z].attributes["couleurFondBarre"].value;
						if(list[z].attributes["couleurBarreBas"]) eval(idElement).couleurBarreBas=list[z].attributes["couleurBarreBas"].value;
						if(list[z].attributes["couleurTitre"]) eval(idElement).couleurTitre=list[z].attributes["couleurTitre"].value;
						if(list[z].attributes["couleurBorduresBoutons"]) eval(idElement).couleurBorduresBoutons=list[z].attributes["couleurBorduresBoutons"].value;
						if(list[z].attributes["couleurFondBoutonReduire"]) eval(idElement).couleurFondBoutonReduire=list[z].attributes["couleurFondBoutonReduire"].value;
						if(list[z].attributes["couleurFondBoutonReduireSur"]) eval(idElement).couleurFondBoutonReduireSur=list[z].attributes["couleurFondBoutonReduireSur"].value;
						if(list[z].attributes["couleurFondBoutonReduireClic"]) eval(idElement).couleurFondBoutonReduireClic=list[z].attributes["couleurFondBoutonReduireClic"].value;
						if(list[z].attributes["couleurTexteBoutonReduire"]) eval(idElement).couleurTexteBoutonReduire=list[z].attributes["couleurTexteBoutonReduire"].value;
						if(list[z].attributes["couleurTexteBoutonReduireClic"]) eval(idElement).couleurTexteBoutonReduireClic=list[z].attributes["couleurTexteBoutonReduireClic"].value;
						if(list[z].attributes["couleurFondBoutonFermer"]) eval(idElement).couleurFondBoutonFermer=list[z].attributes["couleurFondBoutonFermer"].value;
						if(list[z].attributes["couleurFondBoutonFermerSur"]) eval(idElement).couleurFondBoutonFermerSur=list[z].attributes["couleurFondBoutonFermerSur"].value;
						if(list[z].attributes["couleurFondBoutonFermerClic"]) eval(idElement).couleurFondBoutonFermerClic=list[z].attributes["couleurFondBoutonFermerClic"].value;
						if(list[z].attributes["couleurTexteBoutonFermer"]) eval(idElement).couleurTexteBoutonFermer=list[z].attributes["couleurTexteBoutonFermer"].value;
						if(list[z].attributes["couleurTexteBoutonFermerClic"]) eval(idElement).couleurTexteBoutonFermerClic=list[z].attributes["couleurTexteBoutonFermerClic"].value;
					}
				}
			}
			eval(idElement).style.width=fGrandeurW+"px";
			eval(idElement).style.height=fGrandeurH+"px";
			eval(idElement).style.position="fixed";
			eval(idElement).style.display="none";
			eval(idElement).style.left="50%";
			eval(idElement).style.marginLeft="-"+Math.round(fGrandeurW/2)+"px";
			eval(idElement).style.top="50%";
			eval(idElement).style.marginTop="-"+Math.round(fGrandeurH/2)+"px";
			eval(idElement).style.backgroundColor=eval(idElement).couleurFondFenetre;
			eval(idElement).style.border="4px solid "+eval(idElement).couleurBorduresFenetre;
			eval(idElement).style.borderTop="1px solid "+eval(idElement).couleurBordureHautFenetre;
			//eval(idElement).style.MozBorderRadius="4px";
			eval(idElement).style.zIndex=$zIndex;
			document.body.appendChild(eval(idElement));
			var fenBar = document.createElement("div");
			fenBar.style.width="100%";
			if ($navet==-1) fenBar.style.height="23px";
			else fenBar.style.height="26px";
			
			fenBar.style.position="absolute";
			fenBar.style.borderBottom="2px solid "+eval(idElement).couleurBarreBas;
			fenBar.style.backgroundColor=eval(idElement).couleurFondBarre;
			fenBar.style.color=eval(idElement).couleurTitre;
			fenBar.style.fontWeight="bold";
			fenBar.style.fontSize="17px";
			if ($navet==-1) fenBar.style.paddingTop="5px";
			else fenBar.style.paddingTop="2px";
			eval(idElement).bar=fenBar;
			eval(idElement).appendChild(fenBar);
			if(liste[x].attributes["logo"]){
				var fenImg = document.createElement("img");
				fenImg.setAttribute("src",liste[x].attributes["logo"].value);
				fenImg.setAttribute("border","0");
				fenImg.setAttribute("width","22");
				fenImg.setAttribute("height","22");
				fenImg.setAttribute("align","top");
				
				fenImg.style.positon="absolute";
				fenBar.appendChild(fenImg);
				
			}
			var fenTitre = document.createElement("span");
			fenBar.appendChild(fenTitre);
			fenTitre.innerHTML="Fenêtre";
			fenTitre.style.marginLeft="10px";
			eval(idElement).titre=fenTitre;
			var fenHand = document.createElement("div");
			fenHand.style.top="-15px";
			fenHand.style.height="60px";
			fenHand.style.position="absolute";
			fenHand.style.left="0px";
			fenHand.style.right="75px";
			if(liste[x].attributes["mobile"] && liste[x].attributes["mobile"].value=="faux") fenHand.style.cursor="auto";
			else  fenHand.style.cursor="move";
			fenHand.style.backgroundColor="white";
			fenHand.style.opacity="0";
			fenHand.style.zIndex="6000";
			fenHand.style.filter="alpha(opacity=0)";
			fenHand.style.color="white";
			fenHand.style.fontWeight="bold";
			fenHand.style.fontSize="20px";
			eval(idElement).appendChild(fenHand);
			fenHand.deplace=false;
			fenHand.cible=eval(idElement);
			eval(idElement).edit=fenHand;
			if(!liste[x].attributes["fermer"] || liste[x].attributes["fermer"].value!="faux"){
				var fenFerm = document.createElement("div");
				fenFerm.style.width="19px";
				fenFerm.style.height="21px";
				fenFerm.style.position="absolute";
				fenFerm.style.MozBorderRadius="4px";
				fenFerm.style.fontSize="15px";
				fenFerm.style.color=eval(idElement).couleurTexteBoutonFermer;
				fenFerm.Texte=eval(idElement).couleurTexteBoutonFermer;
				fenFerm.cTexte=eval(idElement).couleurTexteBoutonFermerClic;
				fenFerm.style.backgroundColor=eval(idElement).couleurFondBoutonFermer;
				fenFerm.Color=eval(idElement).couleurFondBoutonFermer;
				fenFerm.sColor=eval(idElement).couleurFondBoutonFermerSur;
				fenFerm.cColor=eval(idElement).couleurFondBoutonFermerClic;
				fenFerm.style.border="1px solid "+eval(idElement).couleurBorduresBoutons;
				fenFerm.style.top="2px";
				fenFerm.style.right="1px";
				fenFerm.style.textAlign="center";
				fenFerm.innerHTML="X";
				fenFerm.setAttribute('title', 'Fermer');
				fenFerm.style.fontFamily="Comic Sans MS";
				fenFerm.style.cursor="pointer";
				fenBar.appendChild(fenFerm);
				fenFerm.cible=eval(idElement);
				if ($navet!=-1)document.documentElement.cible=fenHand;
				else window.cible=fenHand;
				valide_ajouteEvent(fenFerm,"click",valide_fermeFen,false);
				valide_ajouteEvent(fenFerm,"mouseover",valide_fermeS,false);
				valide_ajouteEvent(fenFerm,"mouseout",valide_fermeH,false);
				valide_ajouteEvent(fenFerm,"mousedown",valide_fermeD,false);
				valide_ajouteEvent(fenFerm,"mouseup",valide_fermeU,false);
			}
			//if($panais==-1){
				if(!liste[x].attributes["reduire"] || liste[x].attributes["reduire"].value!="faux"){
					$reduire=true;
					var fenBas = document.createElement("div");
					fenBas.style.width="19px";
					fenBas.style.height="21px";
					fenBas.style.position="absolute";
					fenBas.style.MozBorderRadius="4px";
					fenBas.style.color=eval(idElement).couleurTexteBoutonReduire;
					fenBas.Texte=eval(idElement).couleurTexteBoutonReduire;
					fenBas.cTexte=eval(idElement).couleurTexteBoutonReduireClic;
					fenBas.style.backgroundColor=eval(idElement).couleurFondBoutonReduire;
					fenBas.Color=eval(idElement).couleurFondBoutonReduire;
					fenBas.sColor=eval(idElement).couleurFondBoutonReduireSur;
					fenBas.cColor=eval(idElement).couleurFondBoutonReduireClic;
					fenBas.style.border="1px solid "+eval(idElement).couleurBorduresBoutons;
					fenBas.style.top="2px";
					fenBas.style.right="50px";
					fenBas.style.textAlign="center";
					fenBas.innerHTML="&minus;";
					fenBas.style.fontFamily="Comic Sans MS";
					fenBas.style.cursor="pointer";
					fenBas.setAttribute('title', 'Réduire');
					fenBas.titre=eval(idElement).titre.innerHTML;
					fenBar.appendChild(fenBas);
					
					fenBas.cible=eval(idElement);
					fenBas.bas="min";
					eval(idElement).bas=fenBas;
					fenBas.ulte=fGrandeurH;
					fenBas.large=fGrandeurW;
					valide_ajouteEvent(fenBas,"click",valide_basFen,false);
					valide_ajouteEvent(fenBas,"mouseover",valide_fermeS,false);
					valide_ajouteEvent(fenBas,"mouseout",valide_fermeH,false);
					valide_ajouteEvent(fenBas,"mousedown",valide_fermeD,false);
					valide_ajouteEvent(fenBas,"mouseup",valide_fermeU,false);
					
					var fenRed = document.createElement("div");
					fenRed.style.width="19px";
					fenRed.style.height="21px";
					fenRed.style.position="absolute";
					fenRed.style.MozBorderRadius="4px";
					fenRed.style.color=eval(idElement).couleurTexteBoutonReduire;
					fenRed.Texte=eval(idElement).couleurTexteBoutonReduire;
					fenRed.cTexte=eval(idElement).couleurTexteBoutonReduireClic;
					fenRed.style.backgroundColor=eval(idElement).couleurFondBoutonReduire;
					fenRed.Color=eval(idElement).couleurFondBoutonReduire;
					fenRed.sColor=eval(idElement).couleurFondBoutonReduireSur;
					fenRed.cColor=eval(idElement).couleurFondBoutonReduireClic;
					fenRed.style.border="1px solid "+eval(idElement).couleurBorduresBoutons;
					fenRed.style.top="2px";
					fenRed.style.right="25px";
					fenRed.style.textAlign="center";
					fenRed.innerHTML="&macr;";
					fenRed.style.fontFamily="Comic Sans MS";
					fenRed.style.cursor="pointer";
					fenRed.setAttribute('title', 'Enrouler');
					fenBar.appendChild(fenRed);
					fenRed.cible=eval(idElement);
					fenRed.red="min";
					eval(idElement).red=fenRed;
					
					fenRed.ulte=fGrandeurH;
					valide_ajouteEvent(fenRed,"click",valide_redFen,false);
					valide_ajouteEvent(fenRed,"mouseover",valide_fermeS,false);
					valide_ajouteEvent(fenRed,"mouseout",valide_fermeH,false);
					valide_ajouteEvent(fenRed,"mousedown",valide_fermeD,false);
					valide_ajouteEvent(fenRed,"mouseup",valide_fermeU,false);
				}
			var coins = document.createElement("div");
			coins.style.position="absolute";
			coins.style.top=(fGrandeurH)+"px";
			coins.style.left=(fGrandeurW)+"px";
			coins.style.width="10px";
			coins.style.height="11px";
			coins.style.backgroundImage="url('medias/coins.png')";
			coins.style.backgroundRepeat="no-repeat";
			eval(idElement).appendChild(coins);
			eval(idElement).coins=coins;
			
			var ombre = document.createElement("div");
			ombre.style.position="absolute";
			ombre.style.top=(fGrandeurH+4)+"px";
			ombre.style.left="1px";
			ombre.style.width=(fGrandeurW+2)+"px";
			ombre.style.height="8px";
			ombre.style.backgroundImage="url('medias/ombre.png')";
			eval(idElement).appendChild(ombre);
			eval(idElement).ombre=ombre;
			var ombrev = document.createElement("div");
			ombrev.style.position="absolute";
			ombrev.style.top="2px";
			ombrev.style.left=(fGrandeurW+3)+"px";
			ombrev.style.width="7px";
			ombrev.style.height=(fGrandeurH)+"px";
			ombrev.style.backgroundImage="url('medias/ombrev.png')";
			eval(idElement).appendChild(ombrev);
			eval(idElement).ombrev=ombrev;
			if((!liste[x].attributes["mobile"] || liste[x].attributes["mobile"].value!="faux") && !eval(idElement).modale){
				valide_ajouteEvent(fenHand,"mousemove",valide_deplacFen,false);
				valide_ajouteEvent(fenHand,"mousedown",valide_deplacVrai,false);
				valide_ajouteEvent(fenHand,"click",valide_z,false);
			}
		}
	}
}
function valide_lien(obj,contenue,titre,formatw,formath,recharge,edit){
	if(($navet6!=-1)){
		window.scrollTo(0,0);
	}
	if(recharge==0) $recharge=0;
	if(eval(obj).ouvert){
		if(eval(obj).red && eval(obj).red.red=="max"){
			eval(obj).style.height=eval(obj).red.ulte+"px";
			eval(obj).style.height=eval(obj).bas.ulte+"px";
			eval(obj).corp.style.display="block";
			eval(obj).red.style.visibility="visible";
			eval(obj).red.innerHTML="&macr;";
			eval(obj).bas.innerHTML="&minus;";
			eval(obj).bas.style.right="50px";
			eval(obj).red.red="min";
		}
		eval(obj).style.display="none";
		eval(obj).removeChild(eval(obj).corp);
		if(eval(obj).modale)eval(obj).modale.style.display="none";
		if($navet!=-1)valide_supprimeEvent(document.documentElement,"mouseup",valide_deplacFaux,false);
		else valide_supprimeEvent(window,"mouseup",valide_deplacFaux,false);
		eval(obj).ouvert=false;
	}
	var temp = eval(obj).modale;
	if(formatw && formath){
		fGrandeurW=formatw;
		fGrandeurH=formath;
		eval(obj).style.width=fGrandeurW+"px";
		eval(obj).style.height=fGrandeurH+"px";
		eval(obj).style.left="50%";
		eval(obj).style.marginLeft="-"+Math.round(fGrandeurW/2)+"px";
		eval(obj).style.top="50%";
		eval(obj).style.marginTop="-"+Math.round(fGrandeurH/2)+"px";

	}
	else{
		var fGrandeurW=400;
		var fGrandeurH=200;
	}
	if(temp){
		temp.style.display="block";
		window.document.body.style.overflowY="hidden";
	}
	if($reduire){
		eval(obj).red.ulte=fGrandeurH;
		eval(obj).bas.ulte=fGrandeurH;
		eval(obj).bas.large=fGrandeurW;
	}
	eval(obj).style.display="block";
	eval(obj).style.visibility="hidden";
	var longeur =eval(obj).clientHeight;
	var largeur =eval(obj).clientWidth;
	if(titre){
		if(titre.length>Math.round(fGrandeurW/2))titre=titre.substring(0,Math.round(fGrandeurW/2)-3)+"...";
		eval(obj).titre.innerHTML=titre;
		if($reduire) eval(obj).bas.titre=titre;
	}
	if(edit) valide_ajouteEvent(eval(obj).edit, "dblclick", eval(edit), false);
	else valide_ajouteEvent(eval(obj).edit, "dblclick", rien, false);
	if(contenue){
		var cont = contenue.split(":");
		var cible=cont[1];
		var type=cont[0];
		
		if (type=="url"){
			var corp=document.createElement("iframe");
			corp.setAttribute("allowtransparency","true");
			corp.setAttribute("frameborder","no");
			corp.setAttribute("src",cont[1]);
		}
		else{
			var corp = document.getElementById(cont[1]).cloneNode(true);
			corp.style.display="block";
			corp.style.overflowY="auto";
		}
		corp.style.position="absolute";
		corp.style.left="0px";
		corp.style.top="27px";
		corp.style.width=largeur+"px";
		corp.style.height=longeur-27+"px";
		corp.style.overflow="auto";
		corp.style.overflowX="hidden";
		corp.cible=eval(obj);
		valide_ajouteEvent(corp,"click",valide_z,false);
		eval(obj).appendChild(corp);
		eval(obj).corp=corp;
		eval(obj).ouvert=true;
	}
	if($navet!=-1){
		valide_ajouteEvent(document.documentElement,"mouseup",valide_deplacFaux,false);
		valide_ajouteEvent(document.documentElement,"mouseout",valide_deplacFaux,false);
	}
	else{
		valide_ajouteEvent(window,"mouseup",valide_deplacFaux,true);
		valide_ajouteEvent(window,"mouseout",valide_deplacFaux,true);
	}
		eval(obj).style.visibility="visible";
		if($reduire){
		eval(obj).red.style.visibility="visible";
			eval(obj).red.innerHTML="&macr;";
			eval(obj).bas.innerHTML="&minus;";
			eval(obj).bas.style.right="50px";
			eval(obj).red.red="min";
			eval(obj).bas.bas="min";
			eval(obj).bas.setAttribute('title', 'Réduire');
		eval(obj).red.setAttribute('title', 'Enrouler');
		}
		eval(obj).ombre.style.width=(fGrandeurW+2)+"px";
		eval(obj).ombre.style.top=(fGrandeurH+4)+"px";
		eval(obj).ombrev.style.height=(fGrandeurH)+"px";
		eval(obj).ombrev.style.left=(fGrandeurW+3)+"px";
		eval(obj).ombrev.style.width="7px";
		eval(obj).ombre.style.height="8px"
		eval(obj).ombre.style.visibility="visible";
		eval(obj).ombrev.style.visibility="visible";
		
		eval(obj).coins.style.visibility="visible";
		eval(obj).coins.style.top=(fGrandeurH)+"px";
		eval(obj).coins.style.left=(fGrandeurW)+"px";
		

		
}
function valide_fermeFen(event){
	event = event || window.event;
	var target = event.target || event.srcElement;
	if(target.cible.red && target.cible.red.red=="max"){
		target.cible.style.height=target.cible.red.ulte;
		target.cible.corp.style.display="block";
		target.cible.red.innerHTML="&macr;";
		target.cible.red.red="min";
	}
	target.cible.style.display="none";
	target.cible.removeChild(target.cible.corp);
	if(target.cible.modale){
		target.cible.modale.style.display="none";
		document.body.style.overflowY="auto";

		
	}
	if($navet!=-1)valide_supprimeEvent(document.documentElement,"mouseup",valide_deplacFaux,false);
	else valide_supprimeEvent(window,"mouseup",valide_deplacFaux,false);
	target.cible.ouvert=false;
	if($recharge==1)window.top.location.reload();
}
function valide_deplacFen(event){
	event = event || window.event;
	var target = event.target || event.srcElement;
	//if($panais==-1){
		var largeur= window.innerWidth || document.documentElement.clientWidth;
		var longeur= window.innerHeight || document.documentElement.clientHeight;
		if(target.deplace){
			var posY = target.cible.offsetTop+((event.clientY-$dragY)/2);
			var posX = target.cible.offsetLeft+((event.clientX-$dragX)/2);
			if(posY>0 && posY<longeur-60)target.cible.style.top=posY+"px";
			else if (posY<0)target.cible.style.top="1px";
			else if (posY>longeur-60)target.cible.style.top=longeur-60+"px";
			if(posX>0 && posX<largeur-200)target.cible.style.left=posX+"px";
			else if(posX<0)target.cible.style.left="1px";
			else if(posX>largeur-200)target.cible.style.left=largeur-200+"px";
		}
	//}
}
function valide_deplacVrai(event){
	event = event || window.event;
	var target = event.target || event.srcElement;
	if(typeof target.deplace !='undefined'){
		target.deplace=true;
		$dragX=event.clientX;
		$dragY=event.clientY;
	}
}
function valide_deplacFaux(event){
	event = event || window.event;
	var target = event.target || event.srcElement;
	target.deplace=false;
}
function valide_redFen(event){
	event = event || window.event;
	var target = event.target || event.srcElement;
	if(target.red=="min"){
		target.cible.corp.style.display="none";
		target.cible.style.height="27px";
		target.innerHTML="&loz;";
		target.setAttribute('title', 'Dérouler');
		target.cible.ombre.style.top="30px";
		target.cible.ombre.style.height="3px";
		target.cible.coins.style.visibility="hidden";
		target.cible.ombrev.style.width="3px";
		target.cible.ombrev.style.height="31px";
		target.red="max"
	}
	else{
		target.cible.style.height=target.ulte+"px";
		target.cible.corp.style.display="block";
		target.setAttribute('title', 'Enrouler');
		target.innerHTML="&macr;";
		target.cible.ombre.style.top=(target.ulte+4)+"px";
		target.cible.ombre.style.height="8px";
		target.cible.coins.style.visibility="visible";
		target.cible.ombrev.style.width="7px";
		target.cible.ombrev.style.height=(target.ulte)+"px";
		target.red="min"
	}
	$zIndex++;
	target.cible.style.zIndex=$zIndex;
}
function valide_basFen(event){
	event = event || window.event;
	var target = event.target || event.srcElement;
	if(target.bas=="min"){
		target.cible.corp.style.display="none";
		target.cible.style.height="27px";
		target.cible.style.width="150px";
		target.cible.titre.innerHTML="";
		target.style.right="25px";
		target.innerHTML="&loz;";
		target.setAttribute('title', 'Agrandir');
		target.cible.ombre.style.visibility="hidden";
		target.cible.ombrev.style.visibility="hidden";
		target.bas="max"
		target.cible.red.style.visibility="hidden";
		var longeur= window.innerHeight || document.documentElement.clientHeight;
		target.cible.style.marginLeft="0px";
		target.cible.style.marginTop="0px";
		target.cible.style.top=(longeur-27)+"px";
		target.cible.style.left="0px";
	}
	else{
		target.cible.style.height=target.ulte+"px";
		target.cible.style.width=target.large+"px";
		target.cible.titre.innerHTML=target.titre;
		target.cible.corp.style.display="block";
		target.innerHTML="&minus;";
		target.cible.ombre.style.visibility="visible";
		target.cible.ombrev.style.visibility="visible";
		target.cible.ombre.style.top=(target.ulte+4)+"px";
		target.cible.ombre.style.height="8px";
		target.cible.ombrev.style.width="7px";
		target.cible.ombrev.style.height=(target.ulte)+"px";
		target.bas="min"
		target.style.right="50px";
		target.setAttribute('title', 'Réduire');
		target.cible.red.style.visibility="visible";
		target.cible.red.setAttribute('title', 'Enrouler');
		target.cible.style.left="50%";
		target.cible.style.marginLeft="-"+Math.round(target.large/2)+"px";
		target.cible.style.top="50%";
		target.cible.style.marginTop="-"+Math.round(target.ulte/2)+"px";
		target.cible.coins.style.visibility="visible";
		target.cible.red.innerHTML="&macr;";
		target.cible.red.red="min"
	}
	$zIndex++;
	target.cible.style.zIndex=$zIndex;
}
function valide_fermeS(event){
	event = event || window.event;
	var target = event.target || event.srcElement;
	
	target.style.backgroundColor=target.sColor;
}
function valide_fermeH(event){
	event = event || window.event;
	var target = event.target || event.srcElement;
	target.style.backgroundColor=target.Color;
}
function valide_fermeD(event){
	event = event || window.event;
	var target = event.target || event.srcElement;
	target.style.backgroundColor=target.cColor;
	target.style.color=target.cTexte;
}
function valide_fermeU(event){
	event = event || window.event;
	var target = event.target || event.srcElement;
	target.style.color=target.Texte;
	target.style.backgroundColor=target.Color;
}
function valide_z(event){
	event = event || window.event;
	var target = event.target || event.srcElement;
	$zIndex++;
	if(target.cible)target.cible.style.zIndex=$zIndex;
}
function rien(event){
	event = event || window.event;
	//rien pantoute
}
window.onload=init;