var TID;
var SID=null;

function getObj(n, d) { //v4.0
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=getObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function showHide() { //v3.0
var i,p,v,obj,args=showHide.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=getObj(args[i]))!=null) {
		v=args[i+2];
		if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
		obj.visibility=v;
		obj.display=(v=='visible')?'block':'none';
	}
}

function show(o){
if (o!='') showHide(o,'','show');
for(i=1;i<3;i++){
	mydiv = 'SousMenu'+i;
	if (mydiv!=o)
	showHide(mydiv,'','hide');
	}
}

function glued(o){
//alert('' & SID);
if (SID!=null) {
	clearTimeout(SID);
	SID=null;
	}
wait = 250
obj = eval('o');
TID = setTimeout('show(obj)',wait);
}

function clearGlued(o){
wait = 750
if (SID!=null) {
	clearTimeout(SID);
	SID=null;
	}
SID = setTimeout('show(\'\')',wait);
}


function keepglued(o){
clearTimeout(TID);
if (SID!=null) {
	clearTimeout(SID);
	SID=null;
	}
}


var objMenu=new Object();
objMenu={
 T:250, // - fréquence de rafraichissment
 smenu:"",
 HT:"",
 HeightOfMenu:86,
 WidthOfMenu:824, // - largeur du menu
 objMenu:function()
 {
   this.smenu=document.getElementById('MenuHorizontal');
   this.HT=document.body.clientHeight-this.HeightOfMenu;
 }
}

objMenu.scroller=function() {
 //objMenu.smenu.style.left=(navigator.appName=="Netscape")?window.pageXOffset+objMenu.HT:document.getElementsByTagName('body').item(0).scrollLeft+objMenu.HT;
 objMenu.smenu.style.left=(((document.body.offsetWidth-this.WidthOfMenu)/2)-89)>0?parseInt(((document.body.offsetWidth-this.WidthOfMenu)/2)-89,10):0;
 //alert(''+document.body.offsetHeight);
 //objMenu.smenu.style.top=(navigator.appName=="Netscape")?window.pageYOffset+objMenu.HT:document.getElementsByTagName('body').item(0).scrollTop+objMenu.HT;
objMenu.smenu.style.top=Math.max(document.body.offsetHeight,595)-this.HeightOfMenu;
//alert(''+document.getElementsByTagName('body').item(0).scrollTop);
// alert(objMenu.smenu.style.top);
 setTimeout("objMenu.scroller();",objMenu.T);
} 
window.onload=main;
function main() {
 with(objMenu) {
   objMenu();
   scroller();
 }
	if (document.getElementById('pdf')!=null) {
		//objMenu.HeightOfMenu=186;
		document.getElementById('pdf').style.display='block';
	}
}


