v=0;
whichbrowser = navigator.appName;
ver = parseInt(navigator.appVersion);
if ( (whichbrowser == "Netscape" && ver >= 3) || ver == 4 ){v=1;}

ns = (document.layers)? true:false
ie = (document.all)? true:false

ns4 = (document.layers)? true:false
ie4 = (document.all && !document.getElementById)? true:false
dom = (document.getElementById)? true:false

if (ns4){layerRef="document.layers['";		styleSwitch="']";	layerStyleRef=".document";}
if (ie4){layerRef="document.all['";		styleSwitch="'].style";	layerStyleRef="";}
if (dom){layerRef="document.getElementById('";	styleSwitch="').style";	layerStyleRef="";}

function montre(layerName)	{eval(layerRef+layerName+styleSwitch+'.visibility = "visible"')}
function cache(layerName)	{eval(layerRef+layerName+styleSwitch+'.visibility = "hidden"')}
function xpos(layerName)	{return parseInt(eval(layerRef+layerName+styleSwitch+'.left'));}
function ypos(layerName)	{return parseInt(eval(layerRef+layerName+styleSwitch+'.top'));}
function tox(layerName,x)	{eval(layerRef+layerName+styleSwitch+'.left = '+x);}
function toy(layerName,y)	{eval(layerRef+layerName+styleSwitch+'.top = '+y);}
function byx(layerName,x)	{eval(layerRef+layerName+styleSwitch+'.left = '+xpos(layerName)+'+'+x);}
function byy(layerName,y)	{eval(layerRef+layerName+styleSwitch+'.top = '+ypos(layerName)+'+'+y);}

var fen
function pop_up(sURL, iWidth, iHeight, X0, Y0, bScrollbar){
        var sName, sFeatures;
        sName = 'pop_up';
        if(ie){if((fen)&&(!fen.closed)){fen.close();}}
        if(ns){X=window.screenX+X0;Y=window.screenY+Y0;}
        else {X=X0;Y=Y0;}
        sFeatures = 'toolbar=no,location=no,directories=no,status=no,menubar=no';
        if ( bScrollbar == false )
      
                sFeatures += ',scrollbars=no';
        else
                sFeatures += ',scrollbars=yes';
        sFeatures += ',resizable=no,screenY='+Y+',screenX='+X+',top='+Y+',left='+X+',width='+iWidth+',height='+iHeight;
        fen=window.open(sURL, sName, sFeatures);
       
}





function verifyCompatibleBrowser(){
    this.ver=navigator.appVersion
    this.dom=document.getElementById?1:0
    this.ie5=( (this.ver.indexOf("MSIE 5")>-1 || this.ver.indexOf("MSIE 6")>-1 ) && this.dom)?1:0;
    this.ie4=(document.all && !this.dom)?1:0;
    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
    this.ns4=(!this.ie5 && !this.ie4 && !this.ns5)?1:0;
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
    return this
}

bw=new verifyCompatibleBrowser() 
var speed=50 
var loop, timer 
 
function MoveArea(x,y){ 
    this.x=x;this.y=y 
    this.css.left=this.x 
    this.css.top=this.y 
} 
 
function MoveAreaDown(move){ 
	if(this.y>-this.scrollHeight+objContainer.clipHeight){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".down("+move+")",speed) 
	} 
} 
function MoveAreaUp(move){ 
	if(this.y<0){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".up("+move+")",speed) 
	} 
} 

function PerformScroll(speed){ 
	
	loop=true; 
	if(speed>0) objScroller.down(speed) 
	else objScroller.up(speed) 
	
} 

function CeaseScroll(){ 
    loop=false 
    if(timer) clearTimeout(timer) 
} 

function ConstructObject(obj,nest){ 
    nest=(!nest) ? '':'document.'+nest+'.' 
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight 
    this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight 
    this.up=MoveAreaUp;this.down=MoveAreaDown; 
    this.MoveArea=MoveArea; this.x; this.y; 
    this.obj = obj + "Object" 
    eval(this.obj + "=this") 
    return this 
} 

timer=0;
roll=0;

function roll_etat(id){
roll=id
}

function desactive(){
	
	clearTimeout(timer);
	timer=setTimeout("desactive2()",1000)
}

function desactive2(){
	if (roll==0){
	cacheTout()
	}
}

timer=0;
roll=0;



function cacheTout(){	

cache('Menu0');
cache('Menu1');
cache('Menu2');

}

function montre0 (){cacheTout ();montre('Menu0')}
function montre1 (){cacheTout ();montre('Menu1')}
function montre2 (){cacheTout ();montre('Menu2')}


function chargeImg(){
	document["visu"].src="img/visu"+Math.round(3*Math.random()+0.5)+".jpg"
}


function Navig(id,ind){
	
eval("objdivContent"+id+"=new ConstructObject('divContent"+id+"')")  

cacheContent(ind);


eval("objdivContent"+id+".css.visibility='visible'") 
eval("objScroller=new ConstructObject('divContent"+id+"','divContainer')") 


objdefil=new ConstructObject('divdefil') 
objScroller.MoveArea(0,0) 

}


function cacheContent(ind){
	
for(i=1;i<=ind;i++){
	
	eval("objdivContent"+i+".css.visibility='hidden'")
	}
}

