dlib=new Object;dlib.controls=new Object;dlib_tmp_eCV=new Object;dlib.tmp=[];dlib.version=[];dlib.tor=[];dlibObjSRefsPrivLibTab=[];dlib.DomE_TagTable=["A","IMG","FORM","DIV", "SPAN", "TABLE"];dlib.DomE_TagTableCorresp=["anchor","image","form","layer", "layer", "layer"];dlib_debugWindowOpen=0;dlib.version.main="2.30-1/10/02";dlib.version.IsUndefined="1.0-12/3/02";dlib.version.IsObject="1.0-12/3/02";dlib.version.plateforme="1.0-12/3/02";dlib.version.navigator="1.1-27/5/02";dlib.version.debug="1.13-12/9/02";dlib.version.debugLog="1.1-14/9/02";dlib.version.getNS4Object="1.35-16/4/02";dlib.version.getDomElements="1.0-2/6/02";dlib.version.getElement="1.0-2/6/02";dlib.version.getElementsByNameIndex="1.10-1/10/02";dlib.version.ObjMaker="1.55-4/6/02";dlib.version.layers="1.0-2/6/02";dlib.version.forms="1.0-2/6/02";dlib.version.images="1.0-2/6/02";dlib.version.anchors="1.2-1/10/02";
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;}
function add(value){d_add_retValue=(arguments.length&&!isNaN(parseInt(value)))?value+"add":value;if(arguments.length&&!isNaN(parseInt(value)))dlib.debugLog('value','add function', value+"add");else dlib.debugLog('Error','add_function',  " bad value :"+value);return d_add_retValue;}
function keep(){return "1k";}
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.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.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>24)?dlib.tmp.debugLog:"dlib log :\nLog is empty.":"dlib log :\ndebug is not running";}
dlib.debugLog=function(title, ObjName, value, silent){dlib.execControl(title,ObjName,value);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();}return true;}
dlib.debugClearLog=function(){dlib.tmp.debugLogLineNumber=0;dlib.tmp.debugLog="- "+dlib.navigator()+" / "+dlib.plateforme()+" - dlib log :\n";dlib.debugUpdateWin();return true;}
dlib.execControl=function(MethodName, ObjectName, value){MethodName=MethodName.replace(/\u0020/gi,"").replace(/:/gi,"").toLowerCase();if(MethodName.indexOf("controle")<0&&dlib.controls[MethodName]){for(var dlibiEC in dlib.controls[MethodName]){if(ObjectName==dlib.controls[MethodName][dlibiEC]){dlib_tmp_eCV[ObjectName]=(typeof value=="string")?0:value;eval(dlibiEC+"('"+ObjectName+"', dlib_tmp_eCV['"+ObjectName+"'])");dlib.debugLog("Control : "+MethodName+" - "+dlibiEC, ObjectName, " executed.");}}}return true;}
dlib.clearAllControls=function(){dlib.controls=new Object;}
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.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.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.getElementsByNameIndex=function(IndexString, type, parentName){BadType=(type=="anchor"||type=="layer"||type=="form"||type=="image")?0:1;dlib.tmp.elementByNameIndexTable=[];if(!arguments.length||arguments.length<2){dlib.debugLog("Error", "getElementsByNameIndex"+(arguments.length?"("+IndexString+")":""), " Missing argument(s).");}else if(BadType){dlib.debugLog("Error", "getElementsByNameIndex"+(arguments.length?"("+IndexString+")":""), " Bad Type : "+type);}else{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.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;}
dlib.layers=function(LayerId){if(!dlibObjSRefsPrivLibTab[LayerId]||!dlibObjSRefsPrivLibTab[LayerId].exist)dlibObjSRefsPrivLibTab[LayerId]=new dlib.ObjMaker(LayerId, "layer");return dlibObjSRefsPrivLibTab[LayerId];}
dlib.forms=function(formName){if(!dlibObjSRefsPrivLibTab[formName]||!dlibObjSRefsPrivLibTab[formName].exist)dlibObjSRefsPrivLibTab[formName]=dlib.getElement(formName, "form");return dlibObjSRefsPrivLibTab[formName];}
dlib.images=function(imageName){if(!dlibObjSRefsPrivLibTab[imageName]||!dlibObjSRefsPrivLibTab[imageName].exist)dlibObjSRefsPrivLibTab[imageName]=dlib.getElement(imageName, "image");return dlibObjSRefsPrivLibTab[imageName];}
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=[];dlibObjSRefsPrivLibTab[anchorName].innerAnchorObj.object=[];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];}
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;}
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 : 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;}
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 : 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;}
dlib.ObjMaker.prototype.height=function(value){if(arguments.length&&!isNaN(parseInt(value)))this.style.height=(value.toString().indexOf('add')!=-1)?this.height()+parseInt(value):parseInt(value);else if(arguments.length&&isNaN(parseInt(value)))dlib.debugLog("Error",this.name," height : bad argument : "+value);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;}
dlib.ObjMaker.prototype.width=function(value){if(arguments.length&&!isNaN(parseInt(value)))this.style.width=(value.toString().indexOf('add')!=-1)?this.width()+parseInt(value):parseInt(value);else if(arguments.length&&isNaN(parseInt(value)))dlib.debugLog("Error",this.name," width : bad argument : "+value);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;}
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 : bad argument : "+value);d_retValue=this.left()+this.width();dlib.debugLog("right",this.name,d_retValue);return d_retValue;}
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 : bad argument : "+value);d_retValue=this.top()+this.height();dlib.debugLog("bottom",this.name, d_retValue);return d_retValue;}
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=[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.clipTab;}
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 : argument missing or bad argument : "+value);else dlib.debugLog("Error", this.name, " scrollV : clipping zone not defined");dlib.debugLog("scrollV", this.name, this.clip());return this.clip();}
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 : argument missing or bad argument : "+value);else dlib.debugLog("Error", this.name, " scrollH : clipping zone not defined");dlib.debugLog("scrollV", this.name, this.clip());return this.clip();}
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 : NS4 Error, cannot read innerHTML Code.\n You have to change it first.");dlib.debugLog("innerHTML", this.name, "innerHTML code");return this.object.innerHTML;}
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;}}
dlib.ObjMaker.prototype.addControl=function(MethodName, functionName){MethodName=MethodName.toLowerCase();if(!dlib.controls[MethodName])dlib.controls[MethodName]=[];dlib.controls[MethodName][functionName]=[];dlib.controls[MethodName][functionName]=this.name;dlib.debugLog("Control : "+MethodName+" - "+functionName, this.name, " Created");return true;}
dlib.ObjMaker.prototype.clearControl=function(MethodName, functionName){MethodName=MethodName.toLowerCase();if(dlib.controls[MethodName]&&dlib.controls[MethodName][functionName]){dlib.controls[MethodName][functionName]=0;dlib.debugLog("Control : Method "+MethodName+" / Function "+functionName, this.name, " Cleared");}else dlib.debugLog("Error", this.name," Unexisting Control : Method "+MethodName+" / Function "+functionName);return true;}

