DOM=(document.getElementById)?true:false;
IE=(document.all)?true:false;
IE4=IE&&!DOM;
IE5=IE&&DOM;
Mac=(navigator.appVersion.indexOf("Mac")!=-1);
IE5M=IE5&&Mac;
IE4M=IE4&&Mac;
IEW=IE&&!Mac;
IE4W=IE4&&IEW;
IE5W=IE5&&IEW;
NS=navigator.appName==("Netscape");
NS4=(document.layers)?true:false;
NS6=navigator.vendor==("Netscape6");
if(IE5M){DOM=false;IE4=true}
MnuPref="Menu";
ItemPref="Item";
TabPref="Param";
mnudef=[
["MenuWidth",50],
["FontFamily","Arial,sans-serif"],
["FontSize",12],
["FontBold",true],
["FontItalic",false],
["FontColor","blue"],
["FontColorOver","white"],
["BGColor","#DDDDDD"],
["BGColorOver","#FFCCCC"],
["ItemPadding",3],
["BorderWidth",1],
["BorderColor","black"],
["BorderStyle","solid"],
["SeparSize",1],
["SeparColor","yellow"],
["ImgSrc","tri.gif"],
["ImgSize",5],
["ImgHorizSpace",0],
["ImgVertSpace",0],
["KeepHilite",true],
["ClickStart",0],
["ClickKill",true],
["ChildOverlap",20],
["ChildOffset",10],
["ChildPerOver",null],
["StatusDispLink",1],
["RightToLeft",false]
];
function SupBlanc(){
var chaine=this;
while(chaine.charAt(0)==" "){chaine=chaine.substr(1)};
while(chaine.charAt(chaine.length-1)==" "){chaine=chaine.substr(0,chaine.length-1)};
return chaine.toString();
}
String.prototype.trim=SupBlanc;
function TestChaine(TesteCh){
var pospv=TesteCh.indexOf(",");
if(pospv!=-1)TesteCh=TesteCh.substr(0,pospv);
var posv=TesteCh.indexOf(".");
if(posv!=-1){
posvLast=TesteCh.lastIndexOf(".");
if(posv==posvLast)TesteCh=TesteCh.substr(0,posv);
}
return TesteCh;
}
function AffectParam(nomparam,valdef){
var ParamComp=""+nomparam;
if(typeof eval("window.GL_"+nomparam)=="undefined")eval(ParamComp+"= valdef");
var TesteCh=eval(ParamComp);
if(eval("typeof(TesteCh)")=="string"){
TesteCh=TesteCh.trim();
if(TesteCh.length==0){
eval(ParamComp+"= null");
return;
}
if(TesteCh.charAt(0)=="#")return;
else TesteCh=TestChaine(TesteCh);
}
if(eval("typeof("+TesteCh+")")!="undefined"){
eval(ParamComp+"= eval("+ParamComp+")");
}
}
for(i=0;i<mnudef.length;i++){
AffectParam(mnudef[i][0],mnudef[i][1]);
}
ChildPerOver=(isNaN(parseFloat(ChildPerOver)))?null:parseFloat(ChildPerOver)/100;
function Valide(nomtab){
return((typeof eval("window."+nomtab)=="object")&&(eval(nomtab).length>0))
}
mh_a_creer=[];
if(Valide(TabPref+"1"))mh_a_creer[mh_a_creer.length]=1;
TabCourant=null;
MnuHier=null;
MnuCourant=null;
ZIndex=5000;
AreLoaded=false;
AreCreated=false;
BeingCreated=false;
UserOverMenu=false;
HideAllTimer=null;
TotalMH=0;
Oldleft="0px";
OldWidth="0px";
function Init(){
if(AreCreated)clearTimeout(HideAllTimer);
AreCreated=false;
BeingCreated=false;
UserOverMenu=false;
MnuCourant=null;
HideAllTimer=null;
TotalMH=0;
Oldleft=0;
OldWidth="0px";
}
function TransObj(){
this.obj=eval(this.id+"Obj");
for(temp in this.obj){this[temp]=this.obj[temp]}
}
if(NS4){
NS_OrigWidth=window.innerWidth;
NS_OrigHeight=window.innerHeight;
window.onresize=function(){
if(window.innerWidth==NS_OrigWidth&&window.innerHeight==NS_OrigHeight)return;
Init();
window.location.reload();
}
Layer.prototype.propertyTransfer=TransObj;
}
function go(){
AreLoaded=true;
CreatMnuHier();
}
function AffParamMnu(tabval,valdef){
var ValCh=(typeof tabval=="string");
if(ValCh)tabval=tabval.trim();
var ValueIsNull=((tabval==null)||(typeof tabval=="undefined")||(ValCh&&tabval.length==0));
if(ValueIsNull)return valdef;
var TesteCh=tabval;
if(eval("typeof(TesteCh)")=="string"){
if(TesteCh.charAt(0)=="#")return tabval;
else TesteCh=TestChaine(TesteCh);
}
if(eval("typeof("+TesteCh+" )")!="undefined"){
eval("tabval=eval(tabval)");
}
return tabval;
}
TreeHasChildren=false;
function CreatMnuHier(){
BeingCreated=true;
var TreeParams=null;
var ItemArray=null;
for(var t=0;t<mh_a_creer.length;t++){
if(!Valide(TabPref+mh_a_creer[t]))continue;
TabCourant=eval(TabPref+mh_a_creer[t]);
if(Valide(TabPref)){
TreeParams=eval(TabPref);
}
for(var i=0;i<TabCourant.length;i++){
ItemArray=TabCourant[i];
if(ItemArray[ItemArray.length-1]){TreeHasChildren=true;break}
}
MnuHier={
MenuWidth:MenuWidth=100,
MenuLeft:MenuLeft=AffParamMnu(TreeParams[0],null),
MenuTop:MenuTop=AffParamMnu(TreeParams[1],null),
ItemWidth:ItemWidth=MenuWidth-(BorderWidth*2),
FontColor:AffParamMnu(TreeParams[2],FontColor),
FontColorOver:AffParamMnu(TreeParams[3],FontColorOver),
BGColor:AffParamMnu(TreeParams[4],BGColor),
BGColorOver:AffParamMnu(TreeParams[5],BGColorOver),
BorderColor:AffParamMnu(TreeParams[6],BorderColor),
SeparColor:AffParamMnu(TreeParams[7],SeparColor),
TopIsPermanent:((MenuLeft==null)||(MenuTop==null))?false:true,
TopIsHorizontal:TopIsHorizontal=AffParamMnu(TreeParams[8],false),
TreeIsHorizontal:TreeHasChildren?AffParamMnu(TreeParams[9],false):false,
FontFamily:FontFamily=AffParamMnu(TreeParams[10],FontFamily),
FontSize:FontSize=AffParamMnu(TreeParams[11],FontSize),
FontBold:FontBold=AffParamMnu(TreeParams[12],FontBold),
FontItalic:FontItalic=AffParamMnu(TreeParams[13],FontItalic),
PositionUnder:(!TopIsHorizontal||!TreeHasChildren)?false:true,
TopImageShow:TreeHasChildren=false,
TreeImageShow:TreeHasChildren=true
}
MnuCourant=null;
CreatMenu(mh_a_creer[t]);
if(MnuHier.TopIsPermanent){
MnuHier.treeParent.moveTo(MnuHier.MenuLeft,MnuHier.MenuTop);
if(NS4){
MnuHier.treeParent.zIndex=5000;
MnuHier.treeParent.visibility="show";
}
else{
MnuHier.treeParent.style.zIndex=5000;
MnuHier.treeParent.style.visibility="visible";
}
}
}
AreCreated=true;
BeingCreated=false;
}
function ObtHtmlStr(arraystring){
var TempString=arraystring;
if(MnuHier.FontBold)TempString=TempString.bold();
if(MnuHier.FontItalic)TempString=TempString.italics();
TempString="<FONT FACE='"+MnuHier.FontFamily+"' POINT-SIZE="+MnuHier.FontSize+">"+TempString+"</FONT>";
var TempStringOver=TempString.fontcolor(MnuHier.FontColorOver);
TempString=TempString.fontcolor(MnuHier.FontColor);
return[TempString,TempStringOver];
}
function ObtLayStr(itemid,htmlstrings,hasmore,ItemTextWidth,ItemWidth){
var TempString="<LAYER ID="+itemid+" WIDTH="+(ItemTextWidth-(ItemPadding*2))+">"+"<LAYER WIDTH="+(ItemTextWidth-(ItemPadding*2))+">"+htmlstrings[0]+"</LAYER>"+"<LAYER WIDTH="+(ItemTextWidth-(ItemPadding*2))+">"+htmlstrings[1]+"</LAYER>"+"<LAYER></LAYER>"
if(hasmore && MnuCourant.showImage)
TempString+="<LAYER WIDTH="+ImgSize+"><IMG SRC='"+ImgSrc+"' WIDTH="+ImgSize+" VSPACE=0 HSPACE=0 BORDER=0></LAYER>";
TempString+="</LAYER>";
return TempString;
}
function ObtDivStr(itemid,disptext,hasmore,MenuWidth,ItemWidth){
var WidthValue=MnuCourant.isHorizontal?(ItemElement.isLastItem)?(MenuWidth-BorderWidth-SeparSize):(MenuWidth-BorderWidth):ItemWidth;
var TempString="<DIV ID="+itemid+" STYLE='position:absolute;width:"+WidthValue+"px'>";
if(MnuCourant.showImage){
var FullPadding=(ItemPadding*2)+ImgSize+ImgHorizSpace;
}
if(hasmore&&MnuCourant.showImage){
var ImgPosition=RightToLeft?"absolute;":"relative;";
var ImgSrc=RightToLeft?ImgSrcLeft:ImgSrc;
var ImgHSpace=(RightToLeft||IE5M)?0:ItemPadding;
var ImgStyle=RightToLeft?("left:"+(ItemPadding+ImgHorizSpace)+"px;top:"+(ItemPadding+ImgVertSpace)+ "px;"):("float:right;margin-right:"+(IE5M?-(ImgSize+ItemPadding):(-FullPadding))+"px;margin-top:"+ImgVertSpace+"px;width:"+ImgSize+"px;");
var ImgString="<IMG STYLE='position:"+ImgPosition+ImgStyle+"' SRC='"+ImgSrc+"' HSPACE="+ImgHSpace+" VSPACE=0 BORDER=0>";
TempString+=ImgString;
}
TempString+=disptext+"</DIV>";
return TempString;
}
function PropMenu(itemid,itemidsuffix){
this.tree=MnuHier;
this.index=MnuCourant.itemCount-1;
this.isLastItem=(MnuCourant.itemCount==MnuCourant.maxItems);
this.array=MnuCourant.array[MnuCourant.itemCount-1];
this.dispText=this.array[0];
this.linkText=this.array[1];
this.hasRollover=true;
this.hasMore=this.array[2];
this.MenuWidth=this.array[3];
if(this.MenuWidth==0)this.MenuWidth=MnuHier.MenuWidth;
this.ItemWidth=this.MenuWidth-(BorderWidth*2);
this.ItemTextWidth=TreeHasChildren?(this.ItemWidth-(ImgSize+ImgHorizSpace)):this.ItemWidth;
this.HorizOffsetRight=(parseInt((ChildPerOver!=null)?(ChildPerOver*this.ItemWidth):ChildOverlap))-(NS4?ItemPadding:0);
this.HorizOffsetLeft=(this.MenuWidth-this.HorizOffsetRight)-(NS4?(BorderWidth*2):0);
this.childID=this.hasMore?(MnuPref+itemidsuffix):null;
this.child=null;
this.onmouseover=OnSousMenuOver;
this.onmouseout=OnSousMenuOut;
this.itemsetup=TraceMnu;
if(NS4){
var HtmlStrings=ObtHtmlStr(this.dispText);
this.htmStr=HtmlStrings[0];
this.htmStrOver=HtmlStrings[1];
this.itemStr=ObtLayStr(itemid,HtmlStrings,this.hasMore,this.ItemTextWidth,this.ItemWidth);
}
else{
this.setItemStyle=StyleSousMenu;
if(IE4){
this.itemStr=ObtDivStr(itemid,this.dispText,this.hasMore,this.MenuWidth,this.ItemWidth);
}
}
}
function CreatElem(menucount){
var ItemIDSuffix=menucount+"_"+MnuCourant.itemCount;
var LayerID=ItemPref+ItemIDSuffix;
var ObjectID=LayerID+"Obj";
eval(ObjectID+"=new Object()");
ItemElement=eval(ObjectID);
ItemElement.setItemProperties=PropMenu;
ItemElement.setItemProperties(LayerID,ItemIDSuffix);
return ItemElement;
}
function ObtMenu(menuid){
var MenuObject;
if(DOM){
MenuObject=document.createElement("DIV");
with(MenuObject){
id=menuid;
with(style){
position="absolute";
visibility="hidden";
width=(NS6?MnuHier.ItemWidth:MnuHier.MenuWidth)+"px";
}
}
document.body.appendChild(MenuObject);
}
else{
var LayerID=menuid;
var ObjectID=LayerID+"Obj";
eval(ObjectID+"=new Object()");
MenuObject=eval(ObjectID);
}
return MenuObject;
}
function CreatMenu(menucount){
if(!Valide(TabPref+menucount))return false;
TabCourant=eval(TabPref+menucount);
NouvMnu=ObtMenu(MnuPref+menucount);
NouvMnu.array=TabCourant;
NouvMnu.tree=MnuHier;
if(MnuCourant){
NouvMnu.parentMenu=MnuCourant;
NouvMnu.parentItem=MnuCourant.itemElement;
NouvMnu.parentItem.child=NouvMnu;
NouvMnu.hasParent=true;
NouvMnu.isHorizontal=MnuHier.TreeIsHorizontal;
NouvMnu.showImage=MnuHier.TreeImageShow;
}
else{
NouvMnu.isHorizontal=MnuHier.TopIsHorizontal;
NouvMnu.showImage=MnuHier.TopImageShow;
}
NouvMnu.itemCount=0;
NouvMnu.maxItems=NouvMnu.array.length;
NouvMnu.zIndex=++ZIndex;
NouvMnu.showIt=voir;
NouvMnu.keepInWindow=affiche;
NouvMnu.onmouseover=OnMenuOver;
NouvMnu.onmouseout=OnMenuOut;
NouvMnu.hideTree=CacheMenu;
NouvMnu.hideParents=CacheParents;
NouvMnu.hideChildren=CacheSousMenu;
NouvMnu.hideTop=CacheTop;
NouvMnu.hideSelf=CacheSelf;
NouvMnu.hasChildVisible=false;
NouvMnu.isOn=false;
NouvMnu.hideTimer=null;
NouvMnu.currentItem=null;
NouvMnu.setMenuStyle=StyleMenu;
if(IE)NouvMnu.onselectstart=annule;
if(!NS4)NouvMnu.moveTo=place;
if(NS4)NouvMnu.htmlString="<LAYER ID='"+MnuPref+menucount+"' VISIBILITY=HIDE WIDTH="+MnuHier.MenuWidth+">";
if(IE4)NouvMnu.htmlString="<DIV ID='"+MnuPref+menucount+"' STYLE='position:absolute;visibility:hidden;width:"+MnuHier.MenuWidth+"'>";
MnuCourant=NouvMnu;
if(DOM)NouvMnu.setMenuStyle();
while(NouvMnu.itemCount<NouvMnu.maxItems){
NouvMnu.itemCount++;
NouvMnu.itemElement=(NS4||IE4)?CreatElem(menucount):CreatSousMenu(menucount);
if(!DOM)NouvMnu.htmlString+=NouvMnu.itemElement.itemStr;
if(NouvMnu.itemElement.hasMore){
MenuCreated=CreatMenu(menucount+"_"+NouvMnu.itemCount);
if(MenuCreated)MnuCourant=NouvMnu=NouvMnu.parentMenu;
else NouvMnu.itemElement.hasMore=false;
}
}
if(IE4){
document.write(NouvMnu.htmlString+"</DIV>");
menuLyr=document.all[MnuPref+menucount];
menuLyr.propertyTransfer=TransObj;
menuLyr.propertyTransfer();
NouvMnu=menuLyr;
NouvMnu.setMenuStyle();
if(!IE5M)NouvMnu.childNodes=NouvMnu.children;
NouvMnu.lastItem=NouvMnu.childNodes[NouvMnu.childNodes.length-1];
for(var i=0;i<NouvMnu.childNodes.length;i++){
it=NouvMnu.childNodes[i];
it.siblingBelow=i>0?NouvMnu.childNodes[i-1]:null;
it.propertyTransfer=TransObj;
it.propertyTransfer();
it.itemsetup(i+1);
}
}
if(NS4){
document.write(NouvMnu.htmlString+"</LAYER>");
menuLyr=document.layers[document.layers.length-1];
menuLyr.propertyTransfer();
eval(menuLyr.id+"=menuLyr");
NouvMnu=menuLyr;
NouvMnu.childNodes=NouvMnu.document.layers;
NouvMnu.lastItem=NouvMnu.childNodes[NouvMnu.childNodes.length-1];
for(var i=0;i<NouvMnu.childNodes.length;i++){
it=NouvMnu.childNodes[i];
it.propertyTransfer();
it.itemsetup(i+1);
}
NouvMnu.fullHeight=NouvMnu.lastItem.top+NouvMnu.lastItem.clip.bottom+BorderWidth;
NouvMnu.bgColor=MnuHier.BorderColor;
NouvMnu.clip.top=0;
if(NouvMnu.isHorizontal){
NouvMnu.clip.right=NouvMnu.lastItem.left+NouvMnu.lastItem.clip.right+BorderWidth;
}
else{
NouvMnu.clip.right=NouvMnu.lastItem.clip.right+BorderWidth+5;
}
NouvMnu.clip.bottom=NouvMnu.fullHeight;
}
if(DOM||IE4){
if(NouvMnu.isHorizontal){
var ChildHeight=parseInt(NouvMnu.style.height);
ChildHeight-=(NS6)?(ItemPadding*2):(BorderWidth*2);
for(i=0;i<NouvMnu.childNodes.length;i++){
NouvMnu.childNodes[i].style.height=ChildHeight+"px";
}
}
}
NouvMnu.moveTo(0,0);
MnuHier.treeParent=NouvMnu.tree.startChild=NouvMnu;
return true;
}
function StyleMenu(){
with(this.style){
borderWidth=BorderWidth+"px";
borderColor=MnuHier.BorderColor;
borderStyle=BorderStyle;
zIndex=--ZIndex;
overflow="hidden";
cursor="default";
fontStyle=(MnuHier.FontItalic)?"italic":"normal";
font=((MnuHier.FontBold)?"bold ":"normal ")+MnuHier.FontSize+"pt "+MnuHier.FontFamily ;
}
}
function CreatSousMenu(){
var ssmenu=document.createElement("DIV");
ssmenu.style.position="absolute";
ssmenu.style.visibility="inherit";
MnuCourant.appendChild(ssmenu);
ssmenu.setItemProperties=PropMenu;
ssmenu.setItemProperties();
ssmenu.siblingBelow=ssmenu.previousSibling;
var TxtNode=document.createTextNode(ssmenu.dispText);
if(ssmenu.linkText)ssmenu.onclick=lien;
ssmenu.menu=MnuCourant;
var FullPadding=(ItemPadding*2)+ImgSize+ImgHorizSpace;
if(ssmenu.hasMore && MnuCourant.showImage){
var ImageElement=document.createElement("IMG");
with(ImageElement){
src=RightToLeft?ImgSrcLeft:ImgSrc;
hspace=(!RightToLeft&&IE5W)?ItemPadding:0;
vspace=0;
with(style){
if(RightToLeft)position="absolute";
else{
position="relative";
marginTop=ImgVertSpace+"px";
if(IE5W)marginRight=-FullPadding+"px";
else marginRight=-(ImgSize+ItemPadding)+"px";
if(NS6)cssFloat="right";
else styleFloat="right";
}
width=ImgSize+"px";
}
}
ssmenu.appendChild(ImageElement);
}
ssmenu.appendChild(TxtNode);
ssmenu.setItemStyle();
return ssmenu;
}
function StyleSousMenu(){
with(this.style){
backgroundColor=(this.permHilite)?MnuHier.BGColorOver:MnuHier.BGColor;
color=(this.permHilite)?MnuHier.FontColorOver:MnuHier.FontColor;
padding=ItemPadding+"px";
fontStyle=(MnuHier.FontItalic)?"italic":"normal";
if(MnuCourant.showImage){
var FullPadding=(ItemPadding*2)+ImgSize+ImgHorizSpace;
if(RightToLeft)paddingLeft=FullPadding+"px";
else paddingRight=FullPadding+"px";
}
if(!this.isLastItem){
var SeparString=SeparSize+"px solid "+this.tree.SeparColor;
if(this.menu.isHorizontal)borderRight=SeparString;
else borderBottom=SeparString;
}
if(IE)width=this.ItemWidth+"px";
else width=(this.ItemWidth-(parseInt(paddingLeft)+parseInt(paddingRight)))+"px";
if(this.menu.isHorizontal){
if(IE){
if(this.isLastItem)width=(this.MenuWidth-BorderWidth-SeparSize)+"px";
else width=(this.MenuWidth-BorderWidth)+"px";
}
if(NS6)width=(this.MenuWidth-BorderWidth-parseInt(paddingLeft)-parseInt(paddingRight)-SeparSize)+"px";
top="0px";
if(this.index!=0){
if(OldWidth!="0px")left=(parseInt(Oldleft)+parseInt(OldWidth))+"px";
}
else left=top;
Oldleft=left;
OldWidth=(this.MenuWidth-BorderWidth)+"px";
if(NS6)left=((this.index*parseInt(width))+((SeparSize*this.index)))+((parseInt(paddingLeft)+parseInt(paddingRight))*this.index)+"px";
var LeftAndWidth=parseInt(left)+parseInt(width);
this.menu.style.width=LeftAndWidth+(IE?(BorderWidth*2):(parseInt(paddingLeft)+parseInt(paddingRight)))+"px"
if(this.index){
var SiblingHeight=(IE4W)?(this.siblingBelow.scrollHeight):this.siblingBelow.offsetHeight;
this.menu.style.height=Math.max(parseInt(this.menu.style.height),SiblingHeight+(NS6?0:BorderWidth*2))+"px";
}
else{
var SiblingHeight=(IE4W)?(this.scrollHeight):this.offsetHeight;
this.menu.style.height=SiblingHeight+(NS6?0:BorderWidth*2)+"px";
}
if(this.index==mnu_sel-1){
this.style.backgroundColor=MnuHier.BGColorOver;
this.style.color=MnuHier.FontColorOver;
}
}
else{
left="0px";
if(this.index){
var SiblingHeight=(IE4W)?(this.siblingBelow.scrollHeight+SeparSize):this.siblingBelow.offsetHeight;
top=parseInt(this.siblingBelow.style.top)+SiblingHeight+"px";
}
else top="0px";
this.menu.style.width=(this.MenuWidth-BorderWidth)+"px";
this.menu.style.height=parseInt(top)+(IEW?this.scrollHeight:this.offsetHeight)+(NS6?0:(BorderWidth*2))+"px";
}
}
}
function TraceMnu(whichItem){
this.menu=(NS4)?this.parentLayer:this.parentElement;
if(this.hasMore){
this.child=eval(this.childID);
this.child.parentMenu=this.menu;
this.child.parentItem=this;
}
if(this.linkText){
if(NS4){
this.captureEvents(Event.MOUSEUP)
this.onmouseup=lien;
}
else this.onclick=lien;
}
if(IE4)this.setItemStyle();
if(NS4){
if(this.menu.isHorizontal){
if(this.index!=0)this.left=this.siblingBelow.left+this.siblingBelow.clip.width+SeparSize;
else this.left=(BorderWidth+ItemPadding);
this.top=(BorderWidth+ItemPadding);
}
else{
this.left=(BorderWidth+ItemPadding);
if(this.index!=0)this.top=this.siblingBelow.top+this.siblingBelow.clip.height+SeparSize;
else this.top=(BorderWidth+ItemPadding)
}
this.clip.top=this.clip.left=-ItemPadding;
this.clip.right=this.ItemWidth- ItemPadding;
this.bgColor=this.permHilite?this.tree.BGColorOver:this.tree.BGColor;
this.txtLyrOff= this.document.layers[0];
with(this.txtLyrOff){
if(RightToLeft&&this.menu.showImage)left=(ItemPadding*2)+ImgSize+ImgHorizSpace;
visibility=this.permHilite?"hide":"inherit";
}
this.txtLyrOn=this.document.layers[1];
with(this.txtLyrOn){
if(RightToLeft&&this.menu.showImage)left=(ItemPadding*2)+ImgSize+ImgHorizSpace;
visibility=this.permHilite?"inherit":"hide";
}
this.dummyLyr=this.document.layers[2];
with(this.dummyLyr){
left=top=-ItemPadding;
clip.width=this.clip.width;
clip.height=this.clip.height;
}
if(this.document.layers.length>3){
this.imgLyr=this.document.layers[3];
with(this.imgLyr){
moveBelow(this.txtLyrOff);
left=(RightToLeft)?0:this.ItemWidth-(ItemPadding*2)-ImgSize-ImgHorizSpace;
top=ImgVertSpace;
}
}
this.fullClip=this.txtLyrOff.document.height+(ItemPadding*2);
if(this.menu.isHorizontal){
if(this.index)this.fullClip=Math.max(this.siblingBelow.fullClip,this.fullClip);
}
this.clip.height=this.fullClip;
if(this.index==mnu_sel-1){
this.bgColor=this.tree.BGColorOver;
this.txtLyrOff.visibility="hide";
this.txtLyrOn.visibility="inherit";
}
}
}
function OnMenuOver(e){
if(!this.tree.startChild){this.tree.startChild=this}
if(this.tree.startChild==this)CacheTout(this)
this.isOn=true;
UserOverMenu=true;
MnuCourant=this;
if(this.hideTimer)clearTimeout(this.hideTimer);
}
function OnMenuOut(){
if(IE5&&event.srcElement.contains(event.toElement))return;
this.isOn=false;
UserOverMenu=false;
if(StatusDispLink)status="";
if(ClickKill)HideAllTimer=setTimeout("MnuCourant.hideTree()",500);
}
function OnSousMenuOver(){
if(KeepHilite){
if(this.menu.currentItem&&this.menu.currentItem!=this&&this.menu.currentItem.hasRollover){
if(NS4){
with(this.menu.currentItem){
bgColor=this.tree.BGColor;
txtLyrOff.visibility="inherit";
txtLyrOn.visibility="hide";
}
}
else{
with(this.menu.currentItem.style){
backgroundColor=this.tree.BGColor;
color=this.tree.FontColor
}
}
}
}
if(IE5&&event.srcElement.tagName=="IMG")return;
if(this.hasRollover){
if(NS4){
this.bgColor=this.tree.BGColorOver;
this.txtLyrOff.visibility="hide";
this.txtLyrOn.visibility="inherit";
}
else{
this.style.backgroundColor=this.tree.BGColorOver;
this.style.color=this.tree.FontColorOver;
}
}
if(StatusDispLink)status=this.linkText;
this.menu.currentItem=this;
if(this.menu.hasChildVisible&&(this.menu.visibleChild!=this.child)){
this.menu.hideChildren(this);
}
if(this.hasMore){
if(this.tree.PositionUnder&&(this.menu==this.tree.treeParent)){
if(NS4){
this.child.xPos=this.pageX+this.clip.left-BorderWidth;
this.child.yPos=this.menu.top+this.menu.clip.height-BorderWidth;
}
else{
this.child.xPos=parseInt(this.menu.style.left)+parseInt(this.style.left);
this.child.yPos=parseInt(this.menu.style.top)+this.menu.offsetHeight-(BorderWidth);
}
}
else{
if(NS4){
this.oL=this.pageX+this.clip.left;
this.child.offsetWidth=this.child.clip.width;
this.oT=this.pageY+this.clip.top-BorderWidth;
}
else{
if(IE5M){
this.oL=parseInt(this.menu.style.left)-BorderWidth;
this.oL+=this.offsetLeft;
this.oT=parseInt(this.menu.style.top)-BorderWidth;
this.oT+=this.offsetTop;
}
else{
this.oL=(IE)?parseInt(this.menu.style.left):-BorderWidth;
this.oL+=this.offsetLeft;
this.oT=(IE)?parseInt(this.menu.style.top):-BorderWidth;
this.oT+=this.offsetTop;
}
}
if(RightToLeft){
this.child.xPos=this.oL+(this.HorizOffsetRight-this.child.offsetWidth);
}
else{
this.child.xPos=this.oL+this.HorizOffsetLeft+14;
}
this.child.yPos=this.oT+ChildOffset+BorderWidth-4;
}
if(!this.tree.PositionUnder)this.child.keepInWindow();
this.child.moveTo(this.child.xPos,this.child.yPos);
this.menu.hasChildVisible=true;
this.menu.visibleChild=this.child;
this.child.showIt(true);
}
}
function OnSousMenuOut(){
if(IE5&&(event.srcElement.contains(event.toElement)||(event.fromElement.tagName=="IMG"&&event.toElement.contains(event.fromElement))))
return;
if((!KeepHilite||((this.tree.TopIsPermanent&&(this.tree.treeParent==this))&&!this.menu.hasChildVisible))&&this.hasRollover){
if(NS4){
bgColor=this.tree.BGColor;
txtLyrOff.visibility="inherit";
txtLyrOn.visibility="hide";
}
else{
with(this.style){
backgroundColor=this.tree.BGColor;
color=this.tree.FontColor
}
}
}
if(NS4&&ClickKill&&!UserOverMenu){
HideAllTimer=setTimeout("MnuCourant.hideTree()",500);
}
}
function place(xPos,yPos){
this.style.left=xPos+"px";
this.style.top=yPos+"px";
}
function voir(on){
if(!(this.tree.TopIsPermanent&&(this.tree.treeParent==this))){
if(!this.hasParent||(this.hasParent&&this.tree.TopIsPermanent)){
var IsVisible=(NS4)?this.visibility=="show":this.style.visibility=="visible";
}
if(NS4){this.visibility=(on)?"show":"hide"}
else{this.style.visibility=(on)?"visible":"hidden"}
}
if(KeepHilite&&this.currentItem&&this.currentItem.hasRollover){
if(NS4){
with(this.currentItem){
bgColor=this.tree.BGColor;
txtLyrOff.visibility="inherit";
txtLyrOn.visibility="hide";
}
}
else{
with(this.currentItem.style){
backgroundColor=this.tree.BGColor;
color=this.tree.FontColor;
}
}
}
this.currentItem=null;
}
function affiche(){
var ExtraSpace=10;
var WinLeftEdge=(IE)?document.body.scrollLeft:window.pageXOffset;
var WinTopEdge=(IE)?document.body.scrollTop:window.pageYOffset;
var WinWidth=(IE)?document.body.clientWidth:window.innerWidth;
var WinHeight=(IE)?document.body.clientHeight:window.innerHeight;
var WinRightEdge=(WinLeftEdge+WinWidth)-ExtraSpace;
var WinBottomEdge=(WinTopEdge+WinHeight)-ExtraSpace;
var MenuLeftEdge=this.xPos;
var MenuRightEdge=MenuLeftEdge+((NS4)?this.clip.width:this.offsetWidth);
var MenuBottomEdge=this.yPos+((NS4)?this.clip.height:this.offsetHeight);
if(this.hasParent){
var ParentLeftEdge=(NS4)?this.parentMenu.pageX:parseInt(this.parentMenu.style.left);
if(NS4)this.offsetWidth=this.clip.width;
}
if(MenuRightEdge>WinRightEdge){
if(this.hasParent){
this.xPos=ParentLeftEdge+this.tree.HorizOffsetRight-this.offsetWidth;
}
else{
dif=MenuRightEdge-WinRightEdge;
this.xPos-=dif;
}
}
if(MenuBottomEdge>WinBottomEdge){
dif=MenuBottomEdge-WinBottomEdge;
this.yPos-=dif;
}
if(MenuLeftEdge<WinLeftEdge){
if(this.hasParent){
this.xPos=ParentLeftEdge+this.HorizOffsetLeft;
}
else{this.xPos=5}
}
}
function lien(){
if(this.linkText.indexOf("javascript")!=-1)eval(this.linkText)
else location.href=this.linkText;
}
function CacheTout(callingmenu){
for(var i=0;i<TotalMH;i++){
var TopMenu=TopMenus[i].tree.startChild;
if(TopMenu==callingmenu)continue;
TopMenu.isOn=false;
if(TopMenu.hasChildVisible)TopMenu.hideChildren();
TopMenu.showIt(false);
}
}
function CacheMenu(){
HideAllTimer=null;
if(UserOverMenu)return;
if(this.hasChildVisible)this.hideChildren();
this.hideParents();
}
function CacheTop(){
TopMenuToHide=this;
(ClickKill)?TopMenuToHide.hideSelf():(this.hideTimer=setTimeout("TopMenuToHide.hideSelf()",TopMilliSecondsVisible));
}
function CacheSelf(){
this.hideTimer=null;
if(!this.isOn&&!UserOverMenu)this.showIt(false);
}
function CacheParents(){
var TempMenu=this;
while(TempMenu.hasParent){
TempMenu.showIt(false);
TempMenu.parentMenu.isOn=false;
TempMenu=TempMenu.parentMenu;
}
TempMenu.hideTop();
}
function CacheSousMenu(callingitem){
var TempMenu=this.visibleChild;
while(TempMenu.hasChildVisible){
TempMenu.visibleChild.showIt(false);
TempMenu.hasChildVisible=false;
TempMenu=TempMenu.visibleChild;
}
if(!this.isOn||!callingitem.hasMore||this.visibleChild!=this.child){
this.visibleChild.showIt(false);
this.hasChildVisible=false;
}
}
function annule(){return false}
go();