
var ns=(document.layers)?true:false;var dom=(document.getElementById)?true:false;var ie=(document.all)?true:false;function changeCss(e,cls)
{if(dom&&e){e.className=cls;}}
function formCount(l,c,m){var e=document.getElementById(c);if(!e)
return;e.innerHTML=m-l;}
function is_valide_email(e){if(e.length==0)return false;var r=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;return r.test(e);}
function cssShow(id,v)
{var e=document.getElementById(id);if(e&&e.style){e.style.display=(v?'':'none');}}
function cssShowHide(id)
{var e=document.getElementById(id);if(e&&e.style){e.style.display=e.style.display==''?'none':'';}}
function showHideFolder(id)
{var e=document.getElementById(id);if(!e)
return;if(!e.style)
return;var v=(e.style.display=='');e.style.display=v?'none':'';var i=document.getElementById(id+'-img');if(!i)
return;i.src='./images/'+(v?'folder-closed.gif':'folder-opened.gif');}
function efocus(e,v){if(e.value==e.title)e.value='';}
function eblur(e,v){if(e.value=='')e.value=e.title;}
function getCoordsOfElement(e)
{if(!e)
return new coords(0,0);var r=new coords(e.offsetLeft,e.offsetTop);var l=null
for(e=e.offsetParent;e;e=e.offsetParent){r.add(e.offsetLeft,e.offsetTop);if(e.offsetTop!=0)l=e;}
return r;}
function coords(ex,ey)
{if(!ex)
this.x=0;else
this.x=ex;if(!ey)
this.y=0;else
this.y=ey;this.addC=function(c){this.x+=c.x;this.y+=c.y;};this.add=function(nx,ny){this.x+=nx;this.y+=ny;}
this.addX=function(nx){this.x+=nx;};this.addY=function(ny){this.y+=ny;};}
function checkCapsLock(elt,e){if(!e)
e=window.event;if(!e)
return;var theKey=e.which?e.which:(e.keyCode?e.keyCode:(e.charCode?e.charCode:0));var theShift=e.shiftKey||(e.modifiers&&(e.modifiers&4));if((theKey>64&&theKey<91&&!theShift)||(theKey>96&&theKey<123&&theShift)){showTooltip(elt,'<img src="../images/warning.png" class="absmiddle" /><b>Attention</b><br /><br /> La touche Verr. Maj. est enfonc&eacute;e ce qui peut fausser la saisie de votre mot de passe.<br /><br />Pour la d&eacute;sactiver appuyez sur Verr. Maj. et saisissez votre mot de passe.',8000);}else
hideTooltip();}
function imgOn(i)
{if(i)
i.src=i.src.replace('-off.','-on.');}
function imgOff(i)
{if(i)
i.src=i.src.replace('-on.','-off.');}
var tooltip=null;var tooltip_timeout=null;var tooltipShadow=null;var tooltipIframe=null;var tooltip_is_msie=(navigator.userAgent.indexOf('MSIE')>=0&&navigator.userAgent.indexOf('opera')==-1&&document.all);function showTooltip(elt,tooltipTxt,hide_timeout)
{var tooltipShadowSize=4;var tooltipMaxWidth=250;var tooltipMinWidth=100;if(tooltip_timeout)
window.clearTimeout(tooltip_timeout);var bodyWidth=Math.max(document.body.clientWidth,document.documentElement.clientWidth)-20;var coords=getCoordsOfElement(elt);if(!tooltip){tooltip=document.createElement('DIV');tooltip.id='tooltip';tooltipShadow=document.createElement('DIV');tooltipShadow.id='tooltipShadow';document.body.appendChild(tooltip);document.body.appendChild(tooltipShadow);if(tooltip_is_msie){tooltipIframe=document.createElement('IFRAME');tooltipIframe.frameborder='5';tooltipIframe.style.backgroundColor='#FFFFFF';tooltipIframe.src='#';tooltipIframe.style.zIndex=100;tooltipIframe.style.position='absolute';document.body.appendChild(tooltipIframe);}}
tooltip.onclick=function(){hideTooltip();};tooltip.style.display='block';tooltipShadow.style.display='block';if(tooltip_is_msie)
tooltipIframe.style.display='block';var leftPos=coords.x+10;var topPos=coords.y+25;tooltip.style.width=null;tooltip.innerHTML=tooltipTxt;tooltip.style.left=leftPos+'px';tooltip.style.top=topPos+'px';tooltipShadow.style.left=leftPos+tooltipShadowSize+'px';tooltipShadow.style.top=topPos+tooltipShadowSize+'px';if(tooltip.offsetWidth>tooltipMaxWidth)
tooltip.style.width=tooltipMaxWidth+'px';var tooltipWidth=tooltip.offsetWidth;if(tooltipWidth<tooltipMinWidth)
tooltipWidth=tooltipMinWidth;tooltip.style.width=tooltipWidth+'px';tooltipShadow.style.width=tooltip.offsetWidth+'px';tooltipShadow.style.height=tooltip.offsetHeight+'px';if((leftPos+tooltipWidth)>bodyWidth){tooltip.style.left=(tooltipShadow.style.left.replace('px','')-((leftPos+tooltipWidth)-bodyWidth))+'px';tooltipShadow.style.left=(tooltipShadow.style.left.replace('px','')-((leftPos+tooltipWidth)-bodyWidth)+tooltipShadowSize)+'px';}
if(tooltip_is_msie){tooltipIframe.style.left=tooltip.style.left;tooltipIframe.style.top=tooltip.style.top;tooltipIframe.style.width=tooltip.offsetWidth+'px';tooltipIframe.style.height=tooltip.offsetHeight+'px';}
if(hide_timeout){if(tooltip_timeout)
window.clearTimeout(tooltip_timeout);tooltip_timeout=tooltip_timeout=window.setTimeout('hideTooltip()',hide_timeout);}}
function hideTooltip()
{if(tooltip_timeout)
window.clearTimeout(tooltip_timeout);tooltip.style.display='none';tooltipShadow.style.display='none';if(tooltip_is_msie)
tooltipIframe.style.display='none';delete tooltip;tooltip=null;tooltip_timeout=null;delete tooltipShadow;tooltipShadow=null;delete tooltipIframe;tooltipIframe=null;}
function lineOver(e){if(!e)return;e.className+=' line_over';}
function lineOut(e){if(!e)return;var r=new RegExp(' ?line_over','g');e.className=e.className.replace(r,'');}