var IB=new Object;
var posX=0;posY=0;
if (top.frames.length!=0) top.location=self.document.location;
function getMousePos(e) {
if (document.all){posX=event.x+document.body.scrollLeft;posY=event.y+document.body.scrollTop;}else{
posX=e.pageX;posY=e.pageY;}}
function initHint() {
if (document.layers){
window.captureEvents(Event.MOUSEMOVE);window.onMouseMove=getMousePos;
document.write("<LAYER name='bulle' top=0 left=0 visibility='hide'></LAYER>");}else{
document.onmousemove=getMousePos;document.write("<DIV id='bulle' style='position:absolute;top:0;left:0;visibility:hidden;z-index:1'></DIV>");
}}
function HintMsg(texte,pos,ColTexte,ColFond,ColContour,NbPixel){
if (!ColTexte) ColTexte="#636563";
if (!ColFond) ColFond="#FDFDE7";
if (!ColContour) ColContour="#FFCF63";
if (!NbPixel) NbPixel=1;
contenu="<TABLE border=0 cellspacing=0 cellpadding="+NbPixel+"><TR bgcolor='"+ColContour+"'><TD><TABLE border=0 cellpadding=2 cellspacing=0 bgcolor='"+ColFond+"'><TR><TD><FONT class='TexteGrisFonce' color='"+ColTexte+"'>"+texte+"</FONT></TD></TR></TABLE></TD></TR></TABLE>&nbsp;";
var finalPosX=posX;var finalPosY=posY;
if (pos==0){finalPosX-=20;finalPosY+=20;}else{finalPosX+=20;}
if (finalPosX<0) finalPosX=0;if (finalPosY<0) finalPosY=0;
if (document.layers){
var bl=document.layers["bulle"];bl.document.write(contenu);bl.document.close();bl.top=finalPosY;bl.left=finalPosX;bl.visibility="show";}
if (document.all){eval("bulle.innerHTML=contenu;");document.all["bulle"].style.top=finalPosY;document.all["bulle"].style.left=finalPosX;document.all["bulle"].style.visibility="visible";}
else if (document.getElementById){$("bulle").innerHTML=contenu;$("bulle").style.top=finalPosY;$("bulle").style.left=finalPosX;$("bulle").style.visibility="visible";}
}
function HideHint() {
if (document.layers){document.layers["bulle"].visibility="hide";}if (document.all) {document.all["bulle"].style.visibility="hidden";}
else if (document.getElementById){$("bulle").style.visibility="hidden";}
}
function setActiveStyleSheet(title,reset){
var i,a,main;
for(i=0;(a=document.getElementsByTagName("link")[i]);i++){
if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")){
a.disabled=true;if(a.getAttribute("title")=="css"+title) a.disabled=false;}
}if (reset==1){createCookie("wstyle",title,365);}
}
function createCookie(name,value,days,domain){
if (days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else expires="";
document.cookie=name+"="+value+expires+"; path=/"+(domain?"; domain="+domain:"");
}
function gt(n,u,w,h,x){
var remote=null;
if (w){if (x==2){args="width="+w+",height="+h+",resizable=no,scrollbars=no,status=0";} else {args="width="+w+",height="+h+",resizable=yes,scrollbars=yes,status=0";}} else args="resizable=yes,scrollbars=yes,status=0";
remote=window.open(u,n,args);
if (remote!=null){if (remote.opener==null)remote.opener=self;}
if (x==1){return remote;}
}
function _open(url){//Need"return false;" after call
window.document.location=url;
}
function replaceAll(sStr,sSearch,sReplace){
var iPos=-1;for(;;) {iPos=sStr.indexOf(sSearch);if (iPos==-1)return sStr;sStr=sStr.replace(sSearch,sReplace);}return '';
}
function StringBuffer(){this.buffer=[];this.lc=0;}
StringBuffer.prototype.append=function append(s){this.buffer[this.lc++]=s;return this;}
StringBuffer.prototype.toString=function toString(){return this.buffer.join("");}
_retMs=300;
_xmlOid=['MSXML2.XMLHTTP.5.0','MSXML2.XMLHTTP.4.0','MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','Microsoft.XMLHTTP'];
function createQuery(){
var http;try{http=new XMLHttpRequest();}catch(e){for(var i=0;i<this._xmlOid.length;++i){try{http=new ActiveXObject(this._xmlOid[i]);} catch(e){}}} finally {return http;}
}
function HTTPQuery(u,ti,_cbf,data){
this.url=u;this.cbf=_cbf;this.data=data;this.oHttp=createQuery();try{this.oHttp.Abort();}	catch(e){}
this.oHttp.open(data?"POST":"GET",u,true);
handleReadyState(this.oHttp,_cbf?_cbf:this.cbf?this.cbf:"CnxUpdateReturn",ti,u,_cbf,data);
this.oHttp.send(data?data:this.data?this.data:null);
return this.oHttp;
}
function handleReadyState(o, callback,ti,u,cbf,data){
var poll=window.setInterval(function(){if(o.readyState==4){window.clearInterval(poll);eval(callback+"(o,this.Qry)");if (ti>0) {window.setTimeout("new HTTPQuery('"+u+"',"+ti+","+cbf+","+data+")",ti);}
}},this._retMs);
}
function CnxUpdateReturn(oHttp){
cResponse = oHttp.responseText;
if (cResponse.substr(0,1)=="!"){cResponse=cResponse.substr(1);aResponse=cResponse.split('\n');nObjCount=aResponse.length-1;
for (nCount=0;nCount<(nObjCount);nCount+=3){if (aResponse[nCount].length>0){if (aResponse[nCount]){ cObject=aResponse[nCount];}if (aResponse[nCount+1]){cProperty=aResponse[nCount+1];}cValue=aResponse[nCount+2];
try {if (cValue!=eval("document.getElementById(cObject)."+cProperty)) {eval("document.getElementById(cObject)."+cProperty+"='"+cValue+"'");}} catch (e) {}}}}
try {oHttp.Abort();} catch (e){}oHttp = null;
}
function populateList(oHttp) {
cResponse=oHttp.responseText;if (cResponse.substr(0,1)=="!"){
cResponse=cResponse.substr(1);aResponse=cResponse.split('\n');nObjCount=aResponse.length-1;cObject=aResponse[0];ptr=$(cObject).options;
$(cObject).options.length=0;for (nCount=1;nCount<(nObjCount);nCount+=2){
if (aResponse[nCount].length>0){if (aResponse[nCount]){cLabel=aResponse[nCount];}cValue=aResponse[nCount+1];try{ptr[ptr.length]=new Option(cLabel,cValue,false,false);} catch (e){}}}}
try {oHttp.Abort();} catch (e){}oHttp = null;
}
function $(id){if (arguments.length==1){return ((typeof(id)=="string")?document.getElementById(id):id);}}
function runP(){fprint.document.getElementById("idprint").innerHTML=$("pContent").innerHTML;window.setTimeout('fprint.runP2();',300);}
function loadP(){$("fprint").src="/print/0/";}
