//////Script pour Ado Justice. version 0.81//////Copyright 2003 Atoll Bleu Creations S.A.//////hierarchical menu//////niv1 = new Array(6);	for (i = 0; i < niv1.length; i++) {		niv1[i] = 'table' + i;	}function showhideM(id){	if( document.getElementById && document.getElementById('table0') != null ) {		for (p = 0; p < niv1.length; p++) {				document.getElementById(niv1[p]).style.display = "none";		}		document.getElementById('sous_menu').display = "none";		document.getElementById('sous_menu').style.left = -200;		document.getElementById('sous_menu').style.top = -300;		document.getElementById(id).style.display = "block";	}}function showhideS(id){	if(document.getElementById){		for (p = 0; p < niv2.length; p++) {			document.getElementById(niv2[p]).style.display = "none";		}		document.getElementById(id).style.display = "block";	}}function showhideQ(id,etat){	if(document.getElementById){		document.getElementById(id).style.display = (etat);	}}function showhideC(id){	var imgObj = (id + "_i");	var imgOpen = ("../img/" + id + "_o.gif");	var imgClose = ("../img/" + id + "_f.gif");	if(document.getElementById){		if(document.getElementById(id).style.display == "none"){			document.getElementById(id).style.display = "block";			document.images[imgObj].src = (imgOpen);		} else {			document.getElementById(id).style.display = "none";			document.images[imgObj].src = (imgClose);		}	}}//////Bon Homme//////function bonhomme(id,etat,name,img){	var imgOpen = ("../img/" + img);;	document.images[name].src = (imgOpen);	document.getElementById(id).style.display = etat;}//////menu 3rd level//////function rCell(h){	if ( document.getElementById('table0') != null ) {		for (p = 0; p < niv2t.length; p++){			if (typeof(niv2[p]) != 'undefined' && h == (niv2[p])){				document.getElementById(niv2t[p]).style.backgroundImage = 'url(../img/menu_x.gif)';			} else {				//alert(niv2t[p]);				document.getElementById(niv2t[p]).style.backgroundImage = 'url(../img/pixt.gif)';			}		}	}}function moveLAYER(layName,x,y){      	if(document.getElementById){       //Moz,NN6,IE5		for (p = 0; p < niv2.length; p++) {			if (contient_n3[p] == 1) {				document.getElementById(niv2[p]).style.display = "none";			}		}		document.getElementById('sous_menu').style.left=x;		document.getElementById('sous_menu').style.top=y;		document.getElementById('sous_menu').style.display = "block";		document.getElementById(layName).style.display = "block";	}}function retour_menu(rub) {	if(document.getElementById(niv1[rub]).style.display == "none") {		for (p = 0; p < niv1.length; p++) {			if (typeof(document.getElementById(niv1[p])) != 'undefined') {				document.getElementById(niv1[p]).style.display = "none";			}		}		if (typeof(rub) != 'undefined' && typeof(document.getElementById(niv1[rub])) != 'undefined') {			document.getElementById(niv1[rub]).style.display = "block";		}	}}//////wide use functions//////function getTOP(layName){	if(document.all)                          //e4,e5,e6,o6		return document.all(layName).style.pixelTop	else if(document.getElementById){          //n6,m1		return (document.getElementById(layName).style.top!="")		?parseInt(document.getElementById(layName).style.top):""	} else if(document.layers)                  //n4		return document.layers[layName].top 	else return ""}  function getLEFT(layName){    if(document.all)                     //e4,e5,e6,o6      return document.all(layName).style.pixelLeft    else if(document.getElementById)     //n6,m1      return (document.getElementById(layName).style.left!="")       ?parseInt(document.getElementById(layName).style.left):""    else if(document.layers)             //n4      return document.layers[layName].left   }//////open new windows//////function openWin(picN,Fwin,picSize) {	window.open(picN,Fwin,picSize,"toolbar=0,menubar=0,location=0,directories=0,status=yes")}//////Print//////function PrintPage(){	var theAgent = navigator.userAgent;	browserName = navigator.appName;	if (theAgent.indexOf("Mac") >= 0 && getBrowserName() =="Explorer"){		alert("Fonction non supportˇe par ce navigateur. Pour imprimer, utilisez pomme P.");	} else {		window.print();	}}//////Tab//////function switchTab(id,y){	var imgObj = (id + "_i");	var imgOpen = ("../img/" + id + "_o.gif");	var imgClose = ("../img/" + id + "_f.gif");//alert(y);	if(y == 0 || y < -50){		document.images[imgObj].src = (imgOpen);	} else {		document.images[imgObj].src = (imgClose);	}	if (document.images[imgObj].style.cursor == "s-resize") document.images[imgObj].style.cursor = "n-resize";	else if (document.images[imgObj].style.cursor == "n-resize") document.images[imgObj].style.cursor = "s-resize";	else if (document.images[imgObj].style.cursor == "w-resize") document.images[imgObj].style.cursor = "e-resize";	else if (document.images[imgObj].style.cursor == "e-resize") document.images[imgObj].style.cursor = "w-resize";	}//////pull down menu//////function CSClickReturn () {	var bAgent = window.navigator.userAgent; 	var bAppName = window.navigator.appName;	if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))		return true; // dont follow link	else return false; // dont follow link}CSStopExecution=false;function CSAction(array) {return CSAction2(CSAct, array);}function CSAction2(fct, array) { 	var result;	for (var i=0;i<array.length;i++) {		if(CSStopExecution) return false; 		var aa = fct[array[i]];		if (aa == null) return false;		var ta = new Array;		for(var j=1;j<aa.length;j++) {			if((aa[j]!=null)&&(typeof(aa[j])=="object")&&(aa[j].length==2)){				if(aa[j][0]=="VAR"){ta[j]=CSStateArray[aa[j][1]];}				else{if(aa[j][0]=="ACT"){ta[j]=CSAction(new Array(new String(aa[j][1])));}				else ta[j]=aa[j];}			} else ta[j]=aa[j];		}					result=aa[0](ta);	}	return result;}CSAct = new Object;CSAg = window.navigator.userAgent; CSBVers = parseInt(CSAg.charAt(CSAg.indexOf("/")+1),10);CSIsW3CDOM = ((document.getElementById) && !(IsIE()&&CSBVers<6)) ? true : false;function IsIE() { return CSAg.indexOf("MSIE") > 0;}function CSIEStyl(s) { return document.all.tags("div")[s].style; }function CSNSStyl(s) { if (CSIsW3CDOM) return document.getElementById(s).style; else return CSFindElement(s,0);  }CSIImg=false;function CSInitImgID() {if (!CSIImg && document.images) { for (var i=0; i<document.images.length; i++) { if (!document.images[i].id) document.images[i].id=document.images[i].name; } CSIImg = true;}}function CSFindElement(n,ly) { if (CSBVers<4) return document[n];	if (CSIsW3CDOM) {CSInitImgID();return(document.getElementById(n));}	var curDoc = ly?ly.document:document; var elem = curDoc[n];	if (!elem) {for (var i=0;i<curDoc.layers.length;i++) {elem=CSFindElement(n,curDoc.layers[i]); if (elem) return elem; }}	return elem;}function CSGetImage(n) {if(document.images) {return ((!IsIE()&&CSBVers<5)?CSFindElement(n,0):document.images[n]);} else {return null;}}CSDInit=false;function CSIDOM() { if (CSDInit)return; CSDInit=true; if(document.getElementsByTagName) {var n = document.getElementsByTagName('DIV'); for (var i=0;i<n.length;i++) {CSICSS2Prop(n[i].id);}}}function CSICSS2Prop(id) { var n = document.getElementsByTagName('STYLE');for (var i=0;i<n.length;i++) { var cn = n[i].childNodes; for (var j=0;j<cn.length;j++) { CSSetCSS2Props(CSFetchStyle(cn[j].data, id),id); }}}function CSFetchStyle(sc, id) {	var s=sc; while(s.indexOf("#")!=-1) { s=s.substring(s.indexOf("#")+1,sc.length); if (s.substring(0,s.indexOf("{")).toUpperCase().indexOf(id.toUpperCase())!=-1) return(s.substring(s.indexOf("{")+1,s.indexOf("}")));}	return "";}function CSGetStyleAttrValue (si, id) {	var s=si.toUpperCase();	var myID=id.toUpperCase()+":";	var id1=s.indexOf(myID);	if (id1==-1) return "";	s=s.substring(id1+myID.length+1,si.length);	var id2=s.indexOf(";");	return ((id2==-1)?s:s.substring(0,id2));}function CSSetCSS2Props(si, id) {	var el=document.getElementById(id);	if (el==null) return;	var style=document.getElementById(id).style;	if (style) {		if (style.left=="") style.left=CSGetStyleAttrValue(si,"left");		if (style.top=="") style.top=CSGetStyleAttrValue(si,"top");		if (style.width=="") style.width=CSGetStyleAttrValue(si,"width");		if (style.height=="") style.height=CSGetStyleAttrValue(si,"height");		if (style.visibility=="") style.visibility=CSGetStyleAttrValue(si,"visibility");		if (style.zIndex=="") style.zIndex=CSGetStyleAttrValue(si,"z-index");	}}function CSSetStylePos(s,d,p) {	if (CSIsW3CDOM)d==0?document.getElementById(s).style.left=p+"px":document.getElementById(s).style.top=p+"px";	else if(IsIE())(d==0)?CSIEStyl(s).posLeft=p:CSIEStyl(s).posTop=p;	else (d==0)?CSNSStyl(s).left=p:CSNSStyl(s).top=p;}function CSGetStylePos(s,d) {	if (CSIsW3CDOM){CSIDOM();return parseInt((d==0)?document.getElementById(s).style.left:document.getElementById(s).style.top);}	else if (IsIE()) {CSIEWinInit();return(d==0)?CSIEStyl(s).posLeft:CSIEStyl(s).posTop;}	else {return (d==0)?CSNSStyl(s).left:CSNSStyl(s).top;}}CSIEWInit=false;function CSIEWinInit() { if(CSIEWInit==true) return; else CSIEWInit=true; if (IsIE()&&(CSAg.indexOf("Win")!=-1)&&CSBVers==4) { var i=0; var lyr=document.all.tags("div")[i++]; while(lyr) {lyr.style.posLeft=lyr.offsetLeft; lyr.style.posTop=lyr.offsetTop; lyr=document.all.tags("div")[i++];}}}CSLoopIsRunning = false; CSFctArray = new Array; CSTimeoutID = null;function CSLoop() {		CSLoopIsRunning = false;	for (i=0;i<CSFctArray.length;i++) {		var curFct = CSFctArray[i];		if (curFct)	{			if (curFct.DoFunction(curFct)) { CSLoopIsRunning = true; curFct.counter++; }			else CSFctArray[i] = 0;		}	}	if (CSLoopIsRunning) CSTimeoutID = setTimeout("CSLoop()", 1);}function CSStartFunction(fct,data) {	if (!CSLoopIsRunning) { CSFctArray = 0; CSFctArray = new Array; }	var fctInfo = new Object;	fctInfo.DoFunction = fct; fctInfo.counter = 0; fctInfo.data = data;	CSFctArray[CSFctArray.length] = fctInfo; 	if (!CSLoopIsRunning) CSLoop();}function CSStopFunction(sceneName) {	var i;	for (i=0;i<CSFctArray.length;i++) {		var curFct = CSFctArray[i];		if (curFct){ if (curFct.data.name == sceneName){ CSFctArray[i] = 0; return; } }	}}function CSStopComplete() {	if (CSTimeoutID == null) return;	clearTimeout (CSTimeoutID); CSLoopIsRunning = false; CSTimeoutID = null;}function CSMoveLoop(fInf) {	var ticks = 60 * (((new Date()).getTime()) - fInf.data.startTime)/1000;	var f = ticks/fInf.data.ticks;	if (f < 1) { CSSetStylePos(fInf.data.layer,0,fInf.data.start[0] * (1-f) + fInf.data.end[0] * f);		CSSetStylePos(fInf.data.layer,1,fInf.data.start[1] * (1-f) + fInf.data.end[1] * f); return true; }	else { CSSetStylePos(fInf.data.layer,0,fInf.data.end[0]);		CSSetStylePos(fInf.data.layer,1,fInf.data.end[1]); }	return false;}function CSSlideObj (layer,start,end,ticks,startTime) {	this.layer=layer;this.start=start;this.end=end;this.ticks=ticks;this.startTime=startTime;}function CSSlideLayer(l,pos,anim,ticks) {	var x = pos[0]; var y = pos[1];	if (l == '') return;	if (!anim) { CSSetStylePos(l,0,x); CSSetStylePos(l,1,y); }	else {  var fctData = new CSSlideObj(l,new Array(CSGetStylePos(l,0),CSGetStylePos(l,1)),new Array(x,y),ticks,(new Date()).getTime()); CSStartFunction(CSMoveLoop,fctData); }}function CSFlipMove(action) {	if (action[1] == '') return;	var curX = CSGetStylePos(action[1],0); var curY = CSGetStylePos(action[1],1);	var x1 = action[2][0];	var y1 = action[2][1];	if ((x1 != curX) || (y1 != curY)) CSSlideLayer(action[1],action[2],action[4],action[5]);	else CSSlideLayer(action[1],action[3],action[4],action[5]);}// start PreferencesCSAct[/*CMP*/ 'tab1'] = new Array(CSFlipMove,/*CMP*/ 'tab1',new Array(185,-201),new Array(185,-1),true,16);CSAct[/*CMP*/ 'tab2'] = new Array(CSFlipMove,/*CMP*/ 'tab2',new Array(380,-201),new Array(380,-1),true,16);CSAct[/*CMP*/ 'tab3'] = new Array(CSFlipMove,/*CMP*/ 'tab3',new Array(575,-101),new Array(575,-1),true,16);CSAct[/*CMP*/ 'tab4'] = new Array(CSFlipMove,/*CMP*/ 'tab4',new Array(-171,340),new Array(-1,340),true,16);CSAct[/*CMP*/ 'tab5'] = new Array(CSFlipMove,/*CMP*/ 'tab5',new Array(-171,282),new Array(-1,282),true,16);CSAct[/*CMP*/ 'tab2x'] = new Array(CSFlipMove,/*CMP*/ 'tab2',new Array(380,-1),new Array(380,-1),true,16);// end Preferences