var NS4 = (navigator.appName.indexOf("Netscape")>=0 && !document.getElementById)? true : false;
var IE4 = (document.all && !document.getElementById)? true : false;
var IE5 = (document.getElementById && document.all)? true : false;
var NS6 = (document.getElementById && navigator.appName.indexOf("Netscape")>=0 )? true: false;
var W3C = (document.getElementById)? true : false;
 
top.focus();

// Ecrit dans le document
function wdoc(str) {
        document.write(str);
}

function fen(theURL,Targ,Param) {
        window.open(theURL, Targ, Param);
}

// ********************* Scoller Horizontal *****************************
var marqueewidth="523px"
//Specify the marquee's height
//var marqueeheight="25px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=5
//configure background color:
//var marqueebgcolor="#CCFF66"
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1

var marqueecontent="";	// contenu pour le defilement.

marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1);	//slow speed down by 1 for NS
var copyspeed=marqueespeed;
var pausespeed=(pauseit==0)? copyspeed: 0;
var iedom=document.all||document.getElementById;

var actualwidth='';
var cross_marquee, ns_marquee;

function populate() {
	if (iedom) {
		cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee;
		cross_marquee.style.left=parseInt(marqueewidth)+8+"px";
		cross_marquee.innerHTML=marqueecontent;
		actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth;
	}
	else if (document.layers) {
		ns_marquee=document.ns_marquee.document.ns_marquee2;
		ns_marquee.left=parseInt(marqueewidth)+8;
		ns_marquee.document.write(marqueecontent);
		ns_marquee.document.close();
		actualwidth=ns_marquee.document.width;
	}
	lefttime=setInterval("scrollmarquee()",20);
}
function scrollmarquee() {
	if (iedom) {
		if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8)) cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed+"px";
		else cross_marquee.style.left=parseInt(marqueewidth)+8+"px";
	}
	else if (document.layers){
		if (ns_marquee.left>(actualwidth*(-1)+8)) ns_marquee.left-=copyspeed;
		else ns_marquee.left=parseInt(marqueewidth)+8;
	}
}
// *******************************************

// Fenetre flottante
var MI_IE=MI_IE4=MI_NN4=MI_ONN=MI_NN=MI_pSub=MI_sNav=0;mig_dNav()
var Style=[],Count=0,move=0,isOK=1,e_d,tb,w=window,PX=(MI_pSub)?"px":""
var d_r=(MI_IE&&document.compatMode=="CSS1Compat")? "document.documentElement":"document.body"
var ww=w.innerWidth
var wh=w.innerHeight
var sbw=MI_ONN? 15:0

function mig_hand(){
if(MI_sNav){
document.onmousemove=mig_mo
if(MI_NN4) document.captureEvents(Event.MOUSEMOVE)
}}		

function mig_dNav(){
var ua=navigator.userAgent.toLowerCase()
MI_pSub=navigator.productSub
MI_OPR=ua.indexOf("opera")>-1?parseInt(ua.substring(ua.indexOf("opera")+6,ua.length)):0
MI_IE=document.all&&!MI_OPR?parseFloat(ua.substring(ua.indexOf("msie")+5,ua.length)):0
MI_IE4=parseInt(MI_IE)==4
MI_NN4=navigator.appName.toLowerCase()=="netscape"&&!document.getElementById
MI_NN=MI_NN4||document.getElementById&&!document.all
MI_ONN=MI_NN4||MI_pSub<20020823
MI_sNav=MI_NN||MI_IE||MI_OPR>=7
}

function stm(t,s){
if(MI_sNav&&isOK){	
var ab="";var ap=""	
if(!s[12])s[12]=200
if(!s[24])s[24]=10
if(!s[25])s[25]=10
//mig_wlay(t)
tb={pos:s[23],xpos:s[24],ypos:s[25]}
if(MI_IE4)mig_layCss().width=s[12]
e_d=mig_ed()
Count=0
move=1
}}

function mig_mo(e){
if(move){
var X=0,Y=0,s_d=mig_scd(),w_d=mig_wd()
var mx=MI_NN?e.pageX:MI_IE4?event.x:event.x+s_d[0]
var my=MI_NN?e.pageY:MI_IE4?event.y:event.y+s_d[1]
if(MI_IE4)e_d=mig_ed()
switch(tb.pos){
case 1:X=mx-e_d[0]-tb.xpos+6;Y=my+tb.ypos;break
case 2:X=mx-(e_d[0]/2);Y=my+tb.ypos;break
case 3:X=tb.xpos+s_d[0];Y=tb.ypos+s_d[1];break
case 4:X=tb.xpos;Y=tb.ypos;break		
default:X=mx+tb.xpos;Y=my+tb.ypos}
if(w_d[0]+s_d[0]<e_d[0]+X+sbw)X=w_d[0]+s_d[0]-e_d[0]-sbw
if(w_d[1]+s_d[1]<e_d[1]+Y+sbw){if(tb.pos>2)Y=w_d[1]+s_d[1]-e_d[1]-sbw;else Y=my-e_d[1]}
if(X<s_d[0])X=s_d[0]
with(mig_layCss()){left=X+PX;top=Y+PX}
mig_dis()
}}

function mig_dis(){Count++
if(Count==1){
mig_layCss().visibility=MI_NN4?"show":"visible"
}}

function mig_layCss(){return MI_NN4?mig_lay():mig_lay().style}
function mig_lay(){with(document)return MI_NN4?layers[TipId]:MI_IE4?all[TipId]:getElementById(TipId)}
function mig_wlay(txt){if(MI_NN4){with(mig_lay().document){open();write(txt);close()}}else mig_lay().innerHTML=txt}
function mig_hide(C){with(mig_layCss()){visibility=MI_NN4?"hide":"hidden";left=0;top=-800}}
function mig_scd(){return [parseInt(MI_IE?eval(d_r).scrollLeft:w.pageXOffset),parseInt(MI_IE?eval(d_r).scrollTop:w.pageYOffset)]}
function mig_wd(){return [parseInt(MI_ONN?w.innerWidth:eval(d_r).clientWidth),parseInt(MI_ONN?w.innerHeight:eval(d_r).clientHeight)]}
function mig_ed(){return [parseInt(MI_NN4?mig_lay().clip.width:mig_lay().offsetWidth)+3,parseInt(MI_NN4?mig_lay().clip.height:mig_lay().offsetHeight)+5]}
function htm(){if(MI_sNav&&isOK){move=0;mig_hide(1)}}

function mig_clay(){
if(!mig_lay()){isOK=0;alert("!!")} 
else{mig_hand();}}
// Fenetre flottante FIN

// Ouvre fenetre pour affichage image avec redimensionnement automatique
function pimage(img, alt, title) {
        // Compatible IE5+ / NN6+ / Mozilla
        pfen = window.open('','Image','width=10,height=10,titlebar=no,status=no,location=no,menubar=no,toolbar=no,scrollbars=no,resizable=no');
        pfen.document.write("<html><head><title>"+title+"</title>");
        pfen.document.write("<script type=\"text/javascript\">function presize() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+10,document.images[0].height+40); window.focus();} else { setTimeout('presize()',1000) } }</"+"script></head>");
        pfen.document.write("<body onload='presize()' onblur='window.close()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
        pfen.document.write("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"100%\"><tr><td valign=\"middle\" align=\"center\">");
        pfen.document.write("<img src=\""+img+"\" border=\"0\" alt=\""+alt+"\" title=\""+title+"\">");
        pfen.document.write("</th><tr></table></body></html>");
        pfen.document.close();
}

// Interdit la selection de texte
function disableselect(e){ return false; }
function reEnable(){ return true; }
function noselect() {
        document.onselectstart=new Function ("return false");   //if IE4+
        if (NS6){ document.onmousedown=disableselect; document.onclick=reEnable; }      //if NS6
}        
         
// Interdit le click droit 
function noclick() {
        var mssg="";
        function clickIE() {if (document.all) {(mssg);return false;}}
        function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) {if (e.which==2||e.which==3) {(mssg);return false;}}}
        if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
        else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
        document.oncontextmenu=new Function("return false")
}        
         
// Ajouter une adresse dans le bookmark (IE) 
function addbookmark(TheUrl,Titre){ if (document.all) window.external.AddFavorite(TheUrl,Titre); }

