dlib=new Object; dlib.tmp=[]; dlib.version=[]; dlib.tor=[]; dlib.version.main="2.21 - 06/06/02"; dlibObjSRefsPrivLibTab=[]; dlib.DomE_TagTable=["A","IMG","FORM","DIV","INPUT","SELECT"]; dlib.DomE_TagTableCorresp=["anchor","image","form","layer"]; dlib_debugWindowOpen=0;
function IsUndefined(Var){Undef=false; if(Var!=0 && !Var) Undef=true; return Undef;}
function IsObject(Object){isObj=false; if((typeof Object=="object")) isObj=true; return isObj;}
dlib.version.plateforme="1.0 - 12/03/02";dlib.plateforme=function (plateforme){dlib.tmp.chkNav=(navigator.appVersion.indexOf('Windows')>-1)? 'WIN':(navigator.appVersion.indexOf('Mac')>-1)? 'MAC':'OTHER'; if (arguments.length && plateforme.toUpperCase()!=dlib.tmp.chkNav) dlib.tmp.chkNav=0; return dlib.tmp.chkNav;}
dlib.version.navigator="1.1 - 27/05/02";dlib.navigator=function (nav){dlib.tmp.ver=(navigator.appVersion.indexOf("MSIE 4")>-1)? 'IE4':(navigator.appVersion.indexOf("MSIE 5")>-1)?'IE5':(navigator.appVersion.indexOf("MSIE 6")>-1)? 'IE6':(document.layers)?'NS4':(document.getElementById)?'NS6':'OTHER'; if(arguments.length){ if(nav.toUpperCase()=='IE' && document.all) dlib.tmp.ver='IE'; else if(nav.toUpperCase()=='NS' && !document.all) dlib.tmp.ver='NS'; else if(nav.toUpperCase()!=dlib.tmp.ver) dlib.tmp.ver=0;}return dlib.tmp.ver;}
dlib.version.debug="1.12 - 04/06/02";dlib.debug=function(value, ObjName, status){dlib.activeDebugObjName=(arguments.length>1)? (ObjName!='windowed')? ObjName:0:0; 	if(arguments.length>1 && ObjName=='windowed' || status=='windowed'){ dlib.tmp.debugWindow=window.open('', 'debugWindow', 'height=300,width=380,scrollbars=1'); dlib_debugWindowOpen=1;} if(arguments.length && value) {dlib.debugClearLog(); dlib.activeDebug=value;} return dlib.activeDebug? dlib.tmp.debugLog.length>11? dlib.tmp.debugLog:"dlib log :\nLog is empty.":"dlib log :\ndebug is not running";}
dlib.debugLog=function(title, ObjName, value, silent){if(arguments.length<4) silent=0; dlib.tmp.MustPassOut=(ObjName.indexOf("dlibInAnchorPos")>-1)?1:0; dlib.tmp.debObjNPass=(!dlib.activeDebugObjName || dlib.activeDebugObjName==ObjName)?1:0; if(dlib.activeDebug==1 && !silent && !dlib.tmp.MustPassOut && dlib.tmp.debObjNPass){dlib.tmp.debugLogLineNumber++; dlib.tmp.debugLog+=dlib.tmp.debugLogLineNumber+"  "+ObjName+" : "+title+" "+value+"\n";} if(dlib.activeDebug==2 && !silent && !dlib.tmp.MustPassOut && title.indexOf('Error')>-1 && dlib.tmp.debObjNPass){dlib.tmp.debugLogLineNumber++; dlib.tmp.debugLog+=dlib.tmp.debugLogLineNumber+"  "+ObjName+" : "+title+" "+value+"\n";}	dlib.debugUpdateWin(); return true;	}
dlib.debugUpdateWin=function(){ if(dlib.tmp.debugWindow && dlib_debugWindowOpen){dlib.tmp.debugWindow.document.write('<html><head><title>DHTML Library - debug</title></head><body><a href="javascript:self.opener.dlib.debugClearLog()" ><font size=-1>Clear Console</font></a>&nbsp;&nbsp;<a href="javascript:self.opener.dlib_debugWindowOpen=0;self.close();" ><font size=-1>ShutDown</font></a><br><br><font size=-1>'+dlib.tmp.debugLog.replace(/\n/gi,'<br>')+'</font><br><a href="javascript:self.opener.dlib.debugClearLog()" ><font size=-1>Clear Console</font></a>&nbsp;&nbsp;<a href="javascript:self.opener.dlib_debugWindowOpen=0;self.close();" ><font size=-1>ShutDown</font></a></body></html>');dlib.tmp.debugWindow.document.close();}}
dlib.debugClearLog=function(){dlib.tmp.debugLogLineNumber=0;dlib.tmp.debugLog="dlib log :\n"; dlib.debugUpdateWin(); return true;}
dlib.version.getNS4Object="1.35 - 16/04/02";dlib.getNS4Object=function (ObjNme, type, PrimObj) { if(!dlib.tor[ObjNme]){if (arguments.length<3) obj=eval("document."+type+"s");else obj=PrimObj.eval("document."+type+"s"); dlib.tor[ObjNme]=0;if (PrimObj) {parentName=PrimObj.name;}PrimObj=(!PrimObj)? document.layers:PrimObj.document.layers;for (var i in obj) {if (obj[i]==obj[ObjNme] || obj[i].name==ObjNme) dlib.tor[ObjNme]=obj[i];} if (!dlib.tor[ObjNme]) {for (var i in PrimObj) {testObj=0;if (PrimObj[i]=="[object Layer]") testObj=dlib.getNS4Object(ObjNme, type, PrimObj[i]);if(testObj) {dlib.tor[ObjNme]=testObj; testObj.parentName=parentName;break;}}}} return dlib.tor[ObjNme];}	
dlib.version.getDomElements="1.0 - 02/06/02";dlib.getDomElements=function (ElementName){dDomEObj=document.getElementById(ElementName);if(!dDomEObj){for (var d_DomE_TagTable_i in dlib.DomE_TagTable){dDomEObj=document.getElementsByTagName(dlib.DomE_TagTable[d_DomE_TagTable_i])[ElementName];if(dDomEObj) break;}} return dDomEObj;}
dlib.version.getElement="1.0 - 02/06/02";dlib.getElement=function (ElementName, type){if(dlib.navigator('IE')) type=(type=="layer" || type=="anchor")? "all":type+"s";ge_ReturnObj=dlib.navigator('IE')? document[type][ElementName]:dlib.navigator('NS4')?dlib.getNS4Object(ElementName, type):dlib.getDomElements(ElementName);dlib.debugLog((ge_ReturnObj?"object":"Error"), ElementName, (ge_ReturnObj?"found  ["+type+"] ":": "+ElementName+" is NOT an OBJECT. ["+type+"]"));return ge_ReturnObj;}
dlib.version.getElementsByNameIndex="1.05 - 04/06/02"; dlib.getElementsByNameIndex=function(IndexString, type, parentName){ MaxNameLength=0; if(IndexString.indexOf(",")!=-1){ MaxNameLength=parseInt(IndexString.substring(IndexString.indexOf(",")+1));if(isNaN(MaxNameLength))MaxNameLength=0;IndexString=IndexString.substring(0,IndexString.indexOf(","));}d_gEBI_tmp_type=type; if(dlib.navigator("NS6")){ for(igEBI=0; igEBI<dlib.DomE_TagTableCorresp.length; igEBI++) {if(type==dlib.DomE_TagTableCorresp[igEBI]) type=dlib.DomE_TagTable[igEBI];}} d_objRef=dlib.navigator("NS4")? (arguments.length==3)? dlib.getNS4Object(parentName, "layer").document[type+"s"]:document[type+"s"]:dlib.navigator("IE")? (type=="layer" || type=="anchor")? document.all:document[type+"s"]:document.getElementsByTagName(type); dlib.tmp.elementByNameIndexTable=[]; for (d_gEBI_name_i=0; d_gEBI_name_i<d_objRef.length; d_gEBI_name_i++){ d_gEBI_name=dlib.navigator("NS4")? d_objRef[d_gEBI_name_i].name:(d_gEBI_tmp_type=="layer")? d_objRef[d_gEBI_name_i].id:d_objRef[d_gEBI_name_i].name;	if(!IsUndefined(d_gEBI_name) && d_gEBI_name!="" && d_gEBI_name.indexOf(IndexString)==0){ if(!MaxNameLength || d_gEBI_name.length<MaxNameLength+1) dlib.tmp.elementByNameIndexTable[dlib.tmp.elementByNameIndexTable.length]=(d_gEBI_tmp_type=="layer")? new dlib.ObjMaker (d_objRef[d_gEBI_name_i], d_gEBI_tmp_type):(d_gEBI_tmp_type=="anchor")? dlib.anchors(d_objRef[d_gEBI_name_i]):dlib.getElement(d_gEBI_name, d_gEBI_tmp_type);}} dlib.debugLog("getElementsByNameIndex : ", IndexString+"...", dlib.tmp.elementByNameIndexTable.length+" ["+d_gEBI_tmp_type+"] Element(s) found.");	return dlib.tmp.elementByNameIndexTable;}
dlib.version.ObjMaker="1.55 - 04/06/02"; dlib.ObjMaker=function (ObjName, type){ d_ObjTmpRef=IsObject(ObjName)?ObjName:dlib.getElement(ObjName, type); this.object=(d_ObjTmpRef)? d_ObjTmpRef:[];	this.type=type; this.exist=(d_ObjTmpRef)?1:0; this.name=IsObject(ObjName)? (type=="layer" && !dlib.navigator("NS4"))? ObjName.id:ObjName.name:ObjName; this.style=(d_ObjTmpRef)?(document.layers)? this.object:this.object.style:[]; this.document=(document.layers)? this.object.document:this.style; return true;}	
function add(value){ d_add_retValue=(arguments.length && !isNaN(parseInt(value)))?value+"add":value; (arguments.length && !isNaN(parseInt(value)))?dlib.debugLog('value :','add function' , value+"add"):dlib.debugLog('Error - bad value : ','add_function' , value);return d_add_retValue;}
function keep(){return "1k";}
dlib.version.layers="1.0 - 02/06/02";dlib.layers=function (LayerId){if(!dlibObjSRefsPrivLibTab[LayerId] || !dlibObjSRefsPrivLibTab[LayerId].exist) dlibObjSRefsPrivLibTab[LayerId]=new dlib.ObjMaker (LayerId, "layer");return dlibObjSRefsPrivLibTab[LayerId];}
dlib.version.forms="1.0 - 02/06/02";dlib.forms=function (formName){if(!dlibObjSRefsPrivLibTab[formName] || !dlibObjSRefsPrivLibTab[formName].exist) dlibObjSRefsPrivLibTab[formName]=dlib.getElement(formName, "form");return dlibObjSRefsPrivLibTab[formName];}
dlib.version.images="1.0 - 02/06/02";dlib.images=function (imageName){if(!dlibObjSRefsPrivLibTab[imageName] || !dlibObjSRefsPrivLibTab[imageName].exist) dlibObjSRefsPrivLibTab[imageName]=dlib.getElement(imageName, "image");return dlibObjSRefsPrivLibTab[imageName];}
dlib.version.anchors="1.12 - 06/06/02";dlib.anchors=function (anchorName){anchorObject=IsObject(anchorName)? anchorName:0; if(IsObject(anchorName)) anchorName=anchorName.name; if(!dlibObjSRefsPrivLibTab[anchorName] || !dlibObjSRefsPrivLibTab[anchorName].exist) { dlibObjSRefsPrivLibTab[anchorName]=(anchorObject)? new dlib.ObjMaker (anchorObject, "anchor"):new dlib.ObjMaker (anchorName, "anchor"); dlibObjSRefsPrivLibTab[anchorName].innerAnchorObj=1; if(dlibObjSRefsPrivLibTab[anchorName].exist && (dlib.navigator('IE')||dlib.navigator('NS6'))){ dlibObjSRefsPrivLibTab[anchorName].object.innerHTML='<div id="dlibInAnchorPos'+anchorName+'" style="position:absolute;"></div>'+dlibObjSRefsPrivLibTab[anchorName].object.innerHTML; dlibObjSRefsPrivLibTab[anchorName].innerAnchorObj=new dlib.ObjMaker("dlibInAnchorPos"+anchorName, "layer");}}	return dlibObjSRefsPrivLibTab[anchorName];}
/*1.0 - 02/05/2002*/dlib.ObjMaker.prototype.visible=function (value){ if(arguments.length) this.style.visibility=(value)? 'visible':'hidden'; dlib.tmp.vis=(!this.style.visibility || this.style.visibility=='inherit' || this.style.visibility=='show')? 'visible':this.style.visibility.toLowerCase(); d_retValue=dlib.tmp.vis.indexOf('visible')>-1?true:false; dlib.debugLog('visible()',this.name, d_retValue);return d_retValue;}
/*1.0 - 02/05/2002*/dlib.ObjMaker.prototype.top=function (value){if(arguments.length && !this.innerAnchorObj && !isNaN(parseInt(value))) this.style.top=(value.toString().indexOf('add')>-1)? this.top()+parseInt(value):parseInt(value);else if(arguments.length && !this.innerAnchorObj) dlib.debugLog("Error", this.name,"- top(value) bad argument : "+value);d_retValue=(dlib.navigator('IE') || dlib.navigator('NS6'))? (this.innerAnchorObj)?this.innerAnchorObj.object.offsetTop:this.object.offsetTop:(this.innerAnchorObj)?this.object.y:this.style.top;	dlib.debugLog("top :",this.name, d_retValue); return d_retValue;}	
/*1.0 - 02/05/2002*/dlib.ObjMaker.prototype.left=function (value){if(arguments.length && !this.innerAnchorObj && !isNaN(parseInt(value))) this.style.left=(value.toString().indexOf('add')>-1)? this.left()+parseInt(value):parseInt(value);else if(arguments.length && !this.innerAnchorObj) dlib.debugLog("Error", this.name,"- left(value) bad argument : "+value);d_retValue=(dlib.navigator('IE') || dlib.navigator('NS6'))? (this.innerAnchorObj)?this.innerAnchorObj.object.offsetLeft:this.object.offsetLeft:(this.innerAnchorObj)?this.object.x:this.style.left;dlib.debugLog("left :",this.name,d_retValue); return d_retValue;}
/*1.0 - 02/05/2002*/dlib.ObjMaker.prototype.height=function (){d_retValue=(dlib.navigator('IE') || dlib.navigator('NS6'))?this.object.offsetHeight:this.style.document.height;dlib.debugLog("height :",this.name,d_retValue);	return d_retValue;}
/*1.0 - 02/05/2002*/dlib.ObjMaker.prototype.width=function (){d_retValue=(dlib.navigator('IE') || dlib.navigator('NS6'))?this.object.offsetWidth:this.style.document.width;dlib.debugLog("width :",this.name,d_retValue);	return d_retValue;}	
/*1.0 - 02/05/2002*/dlib.ObjMaker.prototype.right=function (value){	if(arguments.length && !isNaN(parseInt(value))) this.left(parseInt(value)-this.width());	else if(arguments.length) dlib.debugLog("Error", this.name,"- right(value) bad argument : "+value);	d_retValue=this.left()+this.width(); dlib.debugLog("right :",this.name,d_retValue);	return d_retValue;}
/*1.0 - 02/05/2002*/dlib.ObjMaker.prototype.bottom=function (value){if(arguments.length && !isNaN(parseInt(value))) this.top(parseInt(value)-this.height());else if(arguments.length) dlib.debugLog("Error", this.name,"- bottom(value) bad argument : "+value);d_retValue=this.top()+this.height(); dlib.debugLog("bottom :",this.name, d_retValue); return d_retValue;}		
/*1.0 - 02/05/2002*/dlib.ObjMaker.prototype.clip=function (top, right, bottom, left){ if(arguments.length==4 && !isNaN(parseInt(top)) && !isNaN(parseInt(right)) && !isNaN(parseInt(bottom)) && !isNaN(parseInt(left)) ) {	for(dlibi=0; dlibi<4; dlibi++) arguments[dlibi]=(arguments[dlibi]=="1k")? this.clip()[dlibi]:(arguments[dlibi].toString().indexOf("add")>-1)? this.clip()[dlibi]+parseInt(arguments[dlibi]):parseInt(arguments[dlibi]);	if(dlib.navigator('NS4')) { this.object.clip.top=parseInt(top); this.object.clip.right=parseInt(right); this.object.clip.bottom=parseInt(bottom); this.object.clip.left=parseInt(left);	}else { this.style.clip='rect('+parseInt(top)+'px '+parseInt(right)+'px '+parseInt(bottom)+'px '+parseInt(left)+'px)';}}else if(arguments.length){ dlib.debugLog("Error", this.name, "- clip(top, right, bottom, left) missing arguments or bad arguments"); }if(this.style.clip) {	if(dlib.navigator('NS4')) dlib.tmp.clipTab=new Array(this.object.clip.top, this.object.clip.right, this.object.clip.bottom, this.object.clip.left);	else { dlib.tmp.IeMac4=(dlib.plateforme('MAC') && dlib.navigator('IE4'))? 1:0; dlib.tmp.clipTab=eval('new Array('+this.style.clip.substring(this.style.clip.indexOf("\u0028")+1, this.style.clip.lastIndexOf("\u0029")).replace((dlib.tmp.IeMac4)?/ /gi:/px/gi,"\u002c")+((!dlib.tmp.IeMac4)?'0':'')+')');}} else { dlib.tmp.clipTab=0; dlib.debugLog("Error", this.name, "- No Clipping zone");}dlib.tmp.tabTmp=["top", "right", "bottom","left"]; for (i=0; i<4; i++) dlib.tmp.clipTab[dlib.tmp.tabTmp[i]]=dlib.tmp.clipTab[i];dlib.debugLog ("clip :", this.name, dlib.tmp.clipTab);	return dlib.tmp.tabTmp;}
/*1.0 - 02/05/2002*/dlib.ObjMaker.prototype.scrollV=function (value){ if(arguments.length && this.style.clip && !isNaN(parseInt(value))){ this.top(add(parseInt(value))); this.clip(add(-parseInt(value)),keep(),add(-parseInt(value)),keep()); }else if(this.style.clip) dlib.debugLog("Error", this.name, "- scrollV(value) argument missing or bad argument : "+value);else dlib.debugLog("Error", this.name, "- scrollV(value) clipping zone not defined");	dlib.debugLog ("scrollV :", this.name, this.clip()); return this.clip();}
/*1.0 - 02/05/2002*/dlib.ObjMaker.prototype.scrollH=function (value){if(arguments.length && this.style.clip && !isNaN(parseInt(value))){ this.left(add(parseInt(value))); this.clip(keep(),add(-parseInt(value)),keep(),add(-parseInt(value))); }else if(this.style.clip) dlib.debugLog("Error", this.name, "- scrollH(value) argument missing or bad argument : "+value);else dlib.debugLog("Error", this.name, "- scrollH(value) clipping zone not defined");	dlib.debugLog ("scrollV :", this.name, this.clip());return this.clip();}
/*1.0 - 02/05/2002*/dlib.ObjMaker.prototype.innerHTML=function (value){	if(arguments.length){if(dlib.navigator('NS4')) { this.object.document.write(value); this.object.document.close(); this.object.innerHTML=value;}	else this.object.innerHTML=value;}else if(dlib.navigator('NS4') && !this.object.innerHTML) dlib.debugLog("Error", this.name, "- innerHTML(value) NS4 Error, cannot read innerHTML Code.\n You have to change it first.");dlib.debugLog ("innerHTML :", this.name, "innerHTML code");return this.object.innerHTML;}
/*1.0 - 02/05/2002*/dlib.ObjMaker.prototype.create=function (parentName){if(!this.Exist){ parentName=(arguments.length)? parentName:0;if(dlib.navigator('IE') || dlib.navigator('NS6')){ dlibNLcode='<div id="'+this.name+'" style="position:absolute; visibility:hidden; left:0px; top:0px;"></div>'; if(parentName) dlib.layers(parentName).object.innerHTML+=dlibNLcode; else document.body.innerHTML+=dlibNLcode;}else { if(parentName) dlib.layers(parentName).style.document.layers[this.name]=new Layer(0, dlib.getNS4object(parentName, "layer")); else document.layers[this.name]=new Layer(0);}dlib.debugLog("create :", this.name, " object Created"); return true;}	else { dlib.debugLog("Error", this.name, " - create() : object "+this.name+" already exist."); return false;}}
