/* librairie crée par Sébastien Tiphaine : */
/* www.web-xperience.com et www.dhtml.libs.free.fr */


/* objects */
dlib=new Object; 
dlib.controls=new Object;
dlib_tmp_eCV=new Object;

/* tableaux */
dlib.tmp=[];
dlib.version=[]; 
dlib.tor=[]; 
dObjPrivArray=[];
dlib.DomE_TagTable=["A","IMG","FORM","DIV", "SPAN", "TABLE"];
dlib.DomE_TagTableCorresp=["anchor","image","form","layer","layer","layer"];
dlib.ErMsg=["bad argument : ","Bad or Missing Argument(s)"," No Index ","No Clipping zone","NS4 cannot read unchanged innerHTML property","object already exist"," is not a control."];
/* variables */
dlib_debugWindowOpen=0;

/* versions */
dlib.version.main="2.35beta - DHTML Lib Custom Version for lexerciste.net - 2002 - www.web-xperience.com";
dlib.version.IsUndefined="1.1-12/10/02";
dlib.version.IsObject="1.1-12/10/02";
dlib.version.IsString="1.0-12/10/02";
dlib.version.plateforme="1.11-12/10/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.56-13/10/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";
dlib.version.addEvent="1.0-12/10/02";
dlib.version.releaseEvent="1.0-12/10/02";

/* functions basic de testes */

function IsUndefined(Var){
	return (Var!=0 && !Var || typeof Var=="undefined")?true:false;
}

function IsObject(Object){
	return (typeof Object=="object")? true:false;
}

function IsString(String){
	return (typeof String=="string")? true:false;
}

function add(value){
	d_add_retValue=(arguments.length && !isNaN(parseInt(value)))?value+"add":value;
	if(arguments.length && !isNaN(parseInt(value))) dlib.debugLog('value','add' , value);
	else dlib.debugLog('Error','add function' ,  dlib.ErMsg[0]+value);
	return d_add_retValue;
}

function keep(){
	return "1k";
}

/* function de d'information navigateur et plateforme */
/* ne pas oublier de changer la version */
dlib.plateforme=function (plateforme){
	dlib.tmp.chkNav=(navigator.appVersion.indexOf('Windows')>-1 || navigator.appVersion.indexOf('Win')>-1)? 'WIN':(navigator.appVersion.indexOf('Mac')>-1)? 'MAC':'OTHER';
	return (arguments.length && plateforme.toUpperCase()!=dlib.tmp.chkNav) ? false:dlib.tmp.chkNav
}

/* ne pas oublier de changer la version */
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;
}

/* debug */
	/* activation du debuger*/
	/* ne pas oublier de changer la version */
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";
}

	/* function de stockage des infos pour le debuger*/
	/* ne pas oublier de changer la version */
dlib.debugLog=function(title, ObjName, value, silent){
	
	dlib.execControl(title,ObjName,value); // cette ligne verifie les entrées, pour le passage de control appliqués.
	
	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(!silent && !dlib.tmp.MustPassOut && dlib.tmp.debObjNPass){
		if(dlib.activeDebug==1 || (dlib.activeDebug==2 && title.indexOf('Error')>-1)){
			dlib.tmp.debugLogLineNumber++;
			dlib.tmp.debugLog+=dlib.tmp.debugLogLineNumber+"  "+ObjName+" : "+title+" : "+value+"\n";
		}
	}	
	
	dlib.debugUpdateWin();
	return true;
}

	/* mise a jour du debuger en mode "windowed" */
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;
}

	/* function de remise a zero du debiger*/
dlib.debugClearLog=function(){
	dlib.tmp.debugLogLineNumber=0;
	dlib.tmp.debugLog="- "+dlib.navigator()+" / "+dlib.plateforme()+" - dlib log :\n";
	dlib.debugUpdateWin(); 
	return true;
}

/* function d'excution des controle */
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;
}

/* function recherche d'objet interne a la library*/
/* ne pas oublier de changer la version */
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];
}	

/* ne pas oublier de changer la version */
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;
}

/* ne pas oublier de changer la version */
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;
}

/* function getElementsByNameIndex */
/* ne pas oublier de changer la version */
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 || BadType || !IsString(IndexString)){
		dlib.debugLog("Error", "getElementsByNameIndex"+(arguments.length? (IsString(IndexString))?" ( "+IndexString+" ) ":dlib.ErMsg[2]:""), dlib.ErMsg[1]);
	}	
	else{
		MaxNameLength=0;
		if(IndexString.indexOf(",")!=-1){
			IndexString=IndexString.split(",");
			IndexString=IndexString[0];//IndexString.substring(0,IndexString.indexOf(","));
			MaxNameLength=(isNaN(IndexString[1]))?0:IndexString[1];//parseInt(IndexString.substring(IndexString.indexOf(",")+1));
			//if(isNaN(MaxNameLength))MaxNameLength=0;			
		}
		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++){
			IEObjectType=dlib.navigator("IE")? (d_gEBI_tmp_type=="layer" && d_objRef[d_gEBI_name_i].style && d_objRef[d_gEBI_name_i].style.position && d_objRef[d_gEBI_name_i].style.position!="" )?1:(d_gEBI_tmp_type=="anchor" && d_objRef[d_gEBI_name_i].tagName=="A")?1:0:1;
			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(IEObjectType && !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;
}

/* contructeur */
/* ne pas oublier de changer la version */
dlib.ObjMaker=function (ObjName, type){ 
	d_ObjTmpRef=IsObject(ObjName)?ObjName:dlib.getElement(ObjName, type);
	this.object=(d_ObjTmpRef)? d_ObjTmpRef:new Object;
	this.object.object=new Object;
	this.type=this.object.type=type;
	this.exist=this.object.exist=(d_ObjTmpRef)?1:0;
	this.name=this.object.name=IsObject(ObjName)? (type=="layer" && !dlib.navigator("NS4"))? ObjName.id:ObjName.name:ObjName;
	this.style=(d_ObjTmpRef)?(document.layers)? this.object:this.object.style:new Object;
	this.document=(document.layers)? this.object.document:this.style;
	return true;
}	
	
/* object */
/* ne pas oublier de changer la version */
dlib.layers=function (LayerId){
	if(!dObjPrivArray[LayerId] || !dObjPrivArray[LayerId].exist) dObjPrivArray[LayerId]=new dlib.ObjMaker (LayerId, "layer");
	return dObjPrivArray[LayerId];
}

/* ne pas oublier de changer la version */
dlib.forms=function (formName){
	if(!dObjPrivArray[formName] || !dObjPrivArray[formName].exist) dObjPrivArray[formName]=dlib.getElement(formName, "form");
	return dObjPrivArray[formName];
}

/* ne pas oublier de changer la version */
dlib.images=function (imageName){
	if(!dObjPrivArray[imageName] || !dObjPrivArray[imageName].exist) dObjPrivArray[imageName]=dlib.getElement(imageName, "image");
	return dObjPrivArray[imageName];
}

/* ne pas oublier de changer la version */
dlib.anchors=function (anchorName){
	anchorObject=IsObject(anchorName)? anchorName:0;
	if(IsObject(anchorName)) anchorName=anchorName.name;
	if(!dObjPrivArray[anchorName] || !dObjPrivArray[anchorName].exist) {
		dObjPrivArray[anchorName]=(anchorObject)? new dlib.ObjMaker (anchorObject, "anchor"):new dlib.ObjMaker (anchorName, "anchor");
		dObjPrivArray[anchorName].innerAnchorObj=new Object;
		dObjPrivArray[anchorName].innerAnchorObj.object=new Object;
		if(dObjPrivArray[anchorName].exist && (dlib.navigator('IE')||dlib.navigator('NS6'))){
			dObjPrivArray[anchorName].object.innerHTML='<div id="dlibInAnchorPos'+anchorName+'" style="position:absolute;"></div>'+dObjPrivArray[anchorName].object.innerHTML;
			dObjPrivArray[anchorName].innerAnchorObj=new dlib.ObjMaker("dlibInAnchorPos"+anchorName, "layer");
		}			
	}
	return dObjPrivArray[anchorName];
}

/* Methodes */
	/*1.0-2/5/02*/
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-2/5/02*/
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 : "+dlib.ErMsg[0]+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-2/5/02*/
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 : "+dlib.ErMsg[0]+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.2-29/9/02*/
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 : "+dlib.ErMsg[0]+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;
}

	/*1.2-29/9/02*/
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 : "+dlib.ErMsg[0]+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;
}	

	/*1.0-2/5/02*/
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 : "+dlib.ErMsg[0]+value);
	d_retValue=this.left()+this.width();
	dlib.debugLog("right",this.name,d_retValue);
	return d_retValue;
}

	/*1.0-2/5/02*/
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 : "+dlib.ErMsg[0]+value);
	d_retValue=this.top()+this.height();
	dlib.debugLog("bottom",this.name, d_retValue);
	return d_retValue;
}		

	/*1.1-13/10/02*/
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 : "+dlib.ErMsg[1]);
	}
	
	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.clipTab=this.style.clip.split("(")[1].split(" ");
		}
	}
	else{
		dlib.tmp.clipTab=0;dlib.debugLog("Error", this.name, dlib.ErMsg[3]);
	}
	
	dlib.tmp.tabTmp=["top", "right", "bottom","left"];
	
	for (i=0; i<4; i++){
		dlib.tmp.clipTab[i]=dlib.tmp.clipTab[dlib.tmp.tabTmp[i]]=parseInt(dlib.tmp.clipTab[i]);
	}
	
	dlib.debugLog ("clip", this.name, dlib.tmp.clipTab);
	return dlib.tmp.clipTab;
}

	/*1.0-2/5/02*/
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 : "+dlib.ErMsg[1]+" : "+value);
	else dlib.debugLog("Error", this.name, " scrollV : "+dlib.ErMsg[3]);
	dlib.debugLog ("scrollV", this.name, this.clip());
	return this.clip();
}

	/*1.0-2/5/02*/
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 : "+dlib.ErMsg[1]+" : "+value);
	else dlib.debugLog("Error", this.name, " scrollH : "+dlib.ErMsg[3]);
	dlib.debugLog ("scrollV", this.name, this.clip());
	return this.clip();
}
	
	/*1.0-2/5/02*/
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 : "+dlib.ErMsg[4]);
	
	dlib.debugLog ("innerHTML", this.name, "innerHTML code");
	return this.object.innerHTML;
}

	/*1.0-2/5/02*/
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 : "+dlib.ErMsg[5]);
		return false;
	}
}

	/*1.0-14/9/02*/
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;
}

	/*1.0-14/9/02*/
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 : "+MethodName+" / "+functionName, this.name, " Cleared");
	}
	else dlib.debugLog("Error", this.name, MethodName+" / "+functionName+dlib.ErMsg[6]);
	return true;
}

/* gestionnaire d'evenement */
	/* 1.0-13/10/02 */
dlib.ObjMaker.prototype.captureEvent=dlib.captureEvent=function (eventName, functionName){
	if(!arguments.length || arguments.length<2 || !IsString(eventName) || !IsString(functionName)){
		dlib.debugLog('Error','captureEvent',dlib.ErMsg[1]);
	}
	else{
		captureEventName=eventName.substring(2);
		dlibEventTmpObject=IsUndefined(this.object)? document:this.object;
		dlibEventTmpObject["dlib"+captureEventName.toLowerCase()+"InterfaceName"]=functionName;
		dlib.debugLog('captureEvent',(this.object?this.name:"document"), captureEventName+" activ");
		if(dlib.navigator("NS4")){	
			dlibEventTmpObject.captureEvents(eval("Event."+captureEventName.toUpperCase()));	
		}
		if(dlib.navigator("NS6")) {
			dlibEventTmpObject.addEventListener(captureEventName.toLowerCase(), dlib.getEvent, false);	
		}
		else eval((IsUndefined(this.object)?'document':'this.object')+'.'+eventName+'=dlib.getEvent');
	}
	return true;
}
	/* 1.0-13/10/02 */
dlib.getEvent=function (e){
	dlib_tmp_object=IsUndefined(this.type)? this:eval('dlib.'+this.type+'s("'+this.name+'")');
	dlib_tmp_object.event=new Object;
	dlib_tmp_object.event.eventObject=dlib.navigator("IE")? window.event:e;
	dlib_tmp_object.event.x=dlib.navigator("IE")? window.event.x:e.pageX;
	dlib_tmp_object.event.y=dlib.navigator("IE")? window.event.y:e.pageY;
	ButtonArray=dlib.navigator("IE")?[0,"left","right",0,"middle"]:[0,"left","middle","right"];
	dlib_tmp_object.event.button=ButtonArray[dlib.navigator("IE")? window.event.button:e.which];	
	eval(this["dlib"+dlib_tmp_object.event.eventObject.type.toLowerCase()+"InterfaceName"]+"(dlib_tmp_object)");
	dlib.debugLog('captureEvent',(IsUndefined(this.type)?"document":this.name), dlib_tmp_object.event.eventObject.type+" captured");
}

	/* 1.0-12/10/02 */
dlib.ObjMaker.prototype.releaseEvent=dlib.releaseEvent=function (eventName){
	if(!arguments.length || !IsString(eventName)){
		dlib.debugLog('Error','addEvent',dlib.ErMsg[1]);
	}
	else{
		captureEventName=eventName.substring(2);
		dlibEventTmpObject=IsUndefined(this.object)? document:this.object;
		dlib.debugLog('captureEvent',(this.object?this.name:"document"), captureEventName+" released");
		if(dlib.navigator("NS4")){
			dlibEventTmpObject.releaseEvents(eval("Event."+captureEventName.toUpperCase()));			
		}
		if(dlib.navigator("NS6")){
			dlibEventTmpObject.removeEventListener(captureEventName.toLowerCase(), dlib.getEvent,false)
		}
		else eval((IsUndefined(this.object)?'document':'this.object')+'.'+eventName+'=null');	
	}
	return true;
}
/* /gestionnaire d'evenement */

