// JavaScript Document

var isDOM=document.getElementById?1:0;

var isIE=document.all?1:0;

var isNS4=navigator.appName=='Netscape'&&!isDOM?1:0;

var isIE4=isIE&&!isDOM?1:0;

var isOp=window.opera?1:0;

var isDyn=isDOM||isIE||isNS4;

function getRef(id, par)

{

 par=!par?document:(par.navigator?par.document:par);

 return (isIE ? par.all[id] :

  (isDOM ? (par.getElementById?par:par.ownerDocument).getElementById(id) :

  (isNS4 ? par.layers[id] : null)));

}

function getSty(id, par)

{

 var r=getRef(id, par);

 return r?(isNS4?r:r.style):null;

}

if (!window.LayerObj) var LayerObj = new Function('id', 'par',

 'this.ref=getRef(id, par); this.sty=getSty(id, par); return this');

function getLyr(id, par) { return new LayerObj(id, par) }

function LyrFn(fn, fc)

{

 LayerObj.prototype[fn] = new Function('var a=arguments,p=a[0],px=isNS4||isOp?0:"px"; ' +

  'with (this) { '+fc+' }');

}

LyrFn('x','if (!isNaN(p)) sty.left=p+px; else return parseInt(sty.left)');

LyrFn('y','if (!isNaN(p)) sty.top=p+px; else return parseInt(sty.top)');

LyrFn('vis','sty.visibility=p');

LyrFn('bgColor','if (isNS4) sty.bgColor=p?p:null; ' +

 'else sty.background=p?p:"transparent"');

LyrFn('bgImage','if (isNS4) sty.background.src=p?p:null; ' +

 'else sty.background=p?"url("+p+")":"transparent"');

LyrFn('clip','if (isNS4) with(sty.clip){left=a[0];top=a[1];right=a[2];bottom=a[3]} ' +

 'else sty.clip="rect("+a[1]+"px "+a[2]+"px "+a[3]+"px "+a[0]+"px)" ');

LyrFn('write','if (isNS4) with (ref.document){write(p);close()} else ref.innerHTML=p');

LyrFn('alpha','var f=ref.filters,d=(p==null); if (f) {' +

 'if (!d&&sty.filter.indexOf("alpha")==-1) sty.filter+=" alpha(opacity="+p+")"; ' +

 'else if (f.length&&f.alpha) with(f.alpha){if(d)enabled=false;else{opacity=p;enabled=true}} }' +

 'else if (isDOM) sty.MozOpacity=d?"":p+"%"');

function setLyr(lVis, docW, par)

{

 if (!setLyr.seq) setLyr.seq=0;

 if (!docW) docW=0;

 var obj = (!par ? (isNS4 ? window : document.body) :

  (!isNS4 && par.navigator ? par.document.body : par));

 var IA='insertAdjacentHTML', AC='appendChild', newID='_js_layer_'+setLyr.seq++;

 if (obj[IA]) obj[IA]('beforeEnd', '<div id="'+newID+'" style="position:absolute"></div>');

 else if (obj[AC])

 {

  var newL=document.createElement('div');

  obj[AC](newL); newL.id=newID; newL.style.position='absolute';

 }

 else if (isNS4)

 {

  var newL=new Layer(docW, obj);

  newID=newL.id;

 }

 var lObj=getLyr(newID, par);

 with (lObj) if (ref) { vis(lVis); x(0); y(0); sty.width=docW+(isNS4?0:'px') }

 return lObj;

}

var CSSmode=document.compatMode;

CSSmode=(CSSmode&&CSSmode.indexOf('CSS')!=-1)||isDOM&&!isIE||isOp?1:0;

if (!window.page) var page = { win: window, minW: 0, minH: 0, MS: isIE&&!isOp,

 db: CSSmode?'documentElement':'body' }

page.winW=function()

 { with (this) return Math.max(minW, MS?win.document[db].clientWidth:win.innerWidth) }

page.winH=function()

 { with (this) return Math.max(minH, MS?win.document[db].clientHeight:win.innerHeight) }

page.scrollX=function()

 { with (this) return MS?win.document[db].scrollLeft:win.pageXOffset }

page.scrollY=function()

 { with (this) return MS?win.document[db].scrollTop:win.pageYOffset }




//******************* pour le scrollable area **************

function verifyCompatibleBrowser(){ 

    this.ver=navigator.appVersion 

    this.dom=document.getElementById?1:0 

    this.ie5=(this.ver.indexOf("MSIE 5")>-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=(document.layers && !this.dom)?1:0; 

    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 

    return this 

} 
//////////////////////////////////////////////////////////////////////////
bw=new verifyCompatibleBrowser() 

var speed=50 

var loop, 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 

} 

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){ 

	if(initialised){ 

		loop=true; 

		if(speed>0) objScroller.down(speed) 

		else objScroller.up(speed) 

	} 

} 

function CeaseScroll(){ 

    loop=false 

    if(timer) clearTimeout(timer) 

} 

var initialised; 

function InitialiseScrollableArea(){ 

    objContainer=new ConstructObject('divContainer') 
	
    objScroller=new ConstructObject('divContent','divContainer') 

    objScroller.MoveArea(0,0) 

    objContainer.css.visibility='visible' 

    initialised=true; 

} 