ml = ldReadCookie('dl_langue');
lg = new Array();
lg[null] = fr;
lg[0] = fr;
lg[1] = en;
if(ml==1) {
	document.write('<style>');
	document.write('.Fr{display: none;}');
	document.write('.En{display: block;}');
	document.write('</style>');
}
else {
	document.write('<style>');
	document.write('.Fr{display: block;}');
	document.write('.En{display: none;}');
	document.write('</style>');
}
function ldSaveCookie(name,value) {
	var date = new Date();
	date.setTime(date.getTime()+(365*24*60*60*1000*5));
	var expires = "; expires="+date.toGMTString();
	document.cookie = name+"="+value+expires+"; path=/";
}
function ldReadCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i<ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}
function ldDeleteCookie(name) {
	ldSaveCookie(name,"",-1);
}
function ldVersion() {
	ml = ldReadCookie('dl_langue');
	if (ml==1) {ml=0;} else {ml=1;}
	ldSaveCookie('dl_langue',ml);
	location.reload([true]);
}
function ldTxt(txt) {
	document.write(lg[ml][txt]);
}
function ldTrad(fr,en) {
	if(ml==1)	document.write(en);
	else		document.write(fr);
}
function ldStatus() {
	window.status="";
	return true;
}
function ldCourriel(prefix,domaine,css,txt) {
	document.write ("<a class='"+css+"' href='mailto:"+prefix+"@"+domaine+"'>");
	ldTxt(txt);
	document.write ("</a>");
}
var BW, BH;
function ldContenu() {
    BW=document.body.offsetWidth;
    BH=document.body.offsetHeight;
	document.write('<img style="position: absolute; top: 70px; left: 136px; height: 2px; width: '+(BW-136)+';"');
	document.write(' src="images/fonds_ligne.gif">');
    document.write('<table border=0 cellpadding=0 cellspacing=0 style="background: none; overflow: auto; ');
    document.write('position: absolute; top: 72px; left: 0px; width:'+BW+'; height:'+(BH-72)+';"><tr>');
    document.write('');
    document.write('');

}
function ldTitreP(Xf,Xe,Y,Pt,Txt) { // Titre positionné
	if (ml==1) {X = Xe;}
	else {X	= Xf;}
	document.write('<span style="font-family:Comic sans MS;font-size:'+Pt+'pt">');
	document.write('<span style="position:absolute;left:'+X+';top:'+Y+';color:#FFFFFF">');
	document.write('<nobr>'+Txt+'</nobr></span>');
	document.write('<span style="position:absolute;left:'+(X+2)+';top:'+(Y+2)+';color:#000000">');
	document.write('<nobr>'+Txt+'</nobr></span>');
	document.write('<span style="position:absolute;left:'+(X+1)+';top:'+(Y+1)+';color:#FFCC99">');
	document.write('<nobr>'+Txt+'</nobr></span>');
	document.write('</span>');
}
function ldTitreC(Texte) { // Titre centré
	document.write('<span id="theSpan" style="visibility:hidden; ');
	document.write('font-family:Comic sans MS; font-size:16pt;">');
	document.write('<nobr>'+Texte+'</nobr></span>');
	W=document.getElementById("theSpan").offsetWidth;
	H=document.getElementById("theSpan").offsetHeight;
    BW=document.body.offsetWidth;
	X=((BW-W)/2);Y=5;
	BX=X+2;BY=Y+2;NX=X+1;NY=Y+1;
	document.write('<span style="position:absolute;z-index:1;left:'+X+';top:'+Y+';height:'+H+';');
	document.write('font-family:Comic sans MS; font-size:16pt;color:#FFFFFF">');
	document.write('<nobr>'+Texte+'</nobr></span>');
	document.write('<span style="position:absolute;z-index:2;left:'+BX+';top:'+BY+';');
	document.write('font-family:Comic sans MS; font-size:16pt;color:#000000">');
	document.write('<nobr>'+Texte+'</nobr></span>');
	document.write('<span style="position:absolute;z-index:3;left:'+NX+';top:'+NY+';');
	document.write('font-family:Comic sans MS; font-size:16pt;color:#FFCC99">');
	document.write('<nobr>'+Texte+'</nobr></span><br>');
}
function ldItem(X,Y,S,L,N) {
	T=lg[ml][L];
	document.write('<a class="dlItem" target="_top" href="/?section='+S+'">');
	document.write('<span style="position:absolute;left:'+X+';top:'+Y+';color:#FFFFFF">');
	document.write('<nobr>'+T+' ( '+N+' )</nobr></span>');
	document.write('<span style="position:absolute;left:'+(X+2)+';top:'+(Y+2)+';color:#000000">');
	document.write('<nobr>'+T+' ( '+N+' )</nobr></span>');
	document.write('<span style="position:absolute;left:'+(X+1)+';top:'+(Y+1)+';color:#FFCC99">');
	document.write('<nobr>'+T+' ( '+N+' )</nobr></span>');
	document.write('</a>');
}
function ldPopup(url,popup,windowW,windowH,css,invite) {
    windowX = (screen.width/2)-(windowW/2);
    windowY = (screen.height/2)-(windowH/2);
    properties1 = "toolbar=0, location=0, directories=0, menubar=0, scrollbars=0, resizable=0,";
	properties2 = "left="+windowX+", top="+windowY+", width="+windowW+", height="+windowH;
    document.write('<a class="'+css+'" href="#" on'+'Click=');
	document.write("\'");
	document.write('window.open("'+url+'","'+popup+'","'+properties1+properties2+'")');
	document.write("\'");
	document.write('>'+invite+'</a>');
}
var options = 'toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,  width=610,height='+screen.height+',left='+(screen.width-610)+',top=0';
function ldOpen(param){
	if (param) {window.open(Form.LinkList.options[Form.LinkList.selectedIndex].value);}
	else {location=Form.LinkList.options[Form.LinkList.selectedIndex].value;}
}
function ldPreview(){
	eval("parent.Frame.location='"+Form.LinkList.options[Form.LinkList.selectedIndex].value+"'");
}
function ldGrabIt(field) {
	var tempval=eval("document.Page."+field);
	tempval.focus();
	tempval.select();
	therange=tempval.createTextRange();
	therange.execCommand("Copy");
}
function ldParam() {
  param=ldReadCookie('DL_Target');
  document.write('<input type="radio" name="Target" value="_self"');
  if(param==null || param==undefined || param==0) document.write(' checked');
  document.write(' onclick="ldSaveCookie(\'DL_Target\',0);');
  document.write('document.location.reload();">');
  document.write('<b> ');
  document.write(lg[ml][menu_thiswin]);
  document.write('</b></input>');
  document.write('&nbsp;&nbsp;');
  document.write('<input type="radio" name="Target" value="_new"');
  if(param==1) document.write(' checked');
  document.write('');
  document.write(' onclick="ldSaveCookie(\'DL_Target\',1);');
  document.write('document.location.reload();">');
  document.write('<b> ');
  document.write(lg[ml][menu_newwin]);
  document.write('</b></input>');
}
function ldTarget() {
  target=ldReadCookie('DL_Target');
  if(target==1) document.write('<base target="_new">');
  else document.write('<base target="_self">');
}
