


cfg_default_path="/js/dlib4/";

cfg_default_rollover_extension=["_on.", "_off."];
if(document.cfg_default_path) cfg_default_path=document.cfg_default_path;
if(document.cfg_default_rollover_extension) cfg_default_rollover_extension=document.cfg_default_rollover_extension;

	
	__DEBUG_ALLOWED__=false;

	
	__CURRENT_PLATEFORME__=false;
	
	__CURRENT_NAVIGATOR__=false;
	
	__NAVIGATOR_FILE_REFERENCE__=false;
	
	__LOADED_NAV_PLUGIN__=false;
	
		
		__IE__= false;
		
		__NS__= false;
		
		__DOM__= false;
		
		__KONQUEROR__=false;
		
		__SAFARI__=false;
	
		
		__WIN__=false;
		
		__MAC__=false;
		
		__LINUX__=false;
		
		__OTHER__=false;
		
	if(typeof(__CURRENT_PLATEFORME__)=="undefined" || !__CURRENT_PLATEFORME__)
	{
		if(navigator.appVersion.indexOf('Windows')>-1){
			__WIN__ = true;
			__CURRENT_PLATEFORME__= "__WIN__";
		}
		else if(navigator.appVersion.indexOf('Mac')>-1){
			__MAC__ = true;
			__CURRENT_PLATEFORME__ = "__MAC__";
		}
		else if (navigator.appVersion.indexOf('Linux')>-1 || navigator.appVersion.indexOf('X11')>-1){
			__LINUX__ = true;
			__CURRENT_PLATEFORME__ = "__LINUX__";
		}
		else {
			__OTHER__=true;
			__CURRENT_PLATEFORME__ = "__OTHER__";
		}
	};
	
	if(typeof(__CURRENT_NAVIGATOR__)=="undefined" || !__CURRENT_NAVIGATOR__)
	{
		if(window.clientInformation && window.clientInformation.appName=="Konqueror"){
			__KONQUEROR__=true;
			__CURRENT_NAVIGATOR__="__KONQUEROR__";
			__NAVIGATOR_FILE_REFERENCE__=__CURRENT_NAVIGATOR__;
		}
		else if(window.clientInformation && window.clientInformation.appVersion.indexOf("Safari")>-1){
			__SAFARI__=true;
			__CURRENT_NAVIGATOR__="__SAFARI__";
			__NAVIGATOR_FILE_REFERENCE__=__CURRENT_NAVIGATOR__;
		}
		else if(document.all){
			__IE__ = true;
			__CURRENT_NAVIGATOR__ = "__IE__";
			__NAVIGATOR_FILE_REFERENCE__=__CURRENT_NAVIGATOR__;
			if(navigator.appVersion.indexOf("MSIE")!=-1 && __MAC__) __NAVIGATOR_FILE_REFERENCE__="__IE__MAC__";
		}
		else if (document.layers){
			__NS__ = true;
			__CURRENT_NAVIGATOR__ = "__NS__";
			__NAVIGATOR_FILE_REFERENCE__=__CURRENT_NAVIGATOR__;
		}
		else {
			__DOM__ = true;
			__CURRENT_NAVIGATOR__ = "__DOM__";
			__NAVIGATOR_FILE_REFERENCE__=__CURRENT_NAVIGATOR__;
		}
	};

	
	__dlib_get=[];
	
	__dlib_getVarsName=[];
	if(self.location.search){
		_tmpget=self.location.search.substring(1).split("&");
		for (i=0; i<_tmpget.length; i++){
			_tmpValues=_tmpget[i].split("=");
			__dlib_get[unescape(_tmpValues[0])]=unescape(_tmpValues[1]);
			__dlib_getVarsName[__dlib_getVarsName.length]=unescape(_tmpValues[0]);
		}
	};
__LAYER__="layer";
__IMAGE__="image";
__ANCHOR__="anchor";
__FORM__="form";
__DOCUMENT__="document";
HEIGHT="height";
WIDTH="width";

	
	function __dlib_get_element(strObjectName, strObjectType){
		if(__DEBUG_ALLOWED__) dlib_debugLog("<b>!!! WARNING !!!</b>", false, false, __ERRORS__[16], true);
		return false;
	}
	
	function __dlib_get_object(strObjectName, strObjectType, oObjectArgs){
		oObject=__dlib_get_element(strObjectName, strObjectType);
		if(!oObject) {
			if(__DEBUG_ALLOWED__) dlib_debugLog(strObjectName, strObjectType, false, __ERRORS__[0], true);
			return false;
		}
		if(typeof oObjectArgs=="undefined" || typeof oObjectArgs[1]=="undefined") return oObject;
		strPropertyName=oObjectArgs[1];
		if(__DLIB_FUNC__[strObjectType]){
			if(__DLIB_FUNC__[strObjectType][strPropertyName]){
				if(typeof oObjectArgs[2]=="undefined"){
					if(__DLIB_FUNC__[strObjectType][strPropertyName]["GET"]) {
						eval("returnedValue="+__DLIB_FUNC__[strObjectType][strPropertyName]["GET"][0]+"(oObject)");
						if(__DEBUG_ALLOWED__) dlib_debugLog(strObjectName, strObjectType, strPropertyName,  returnedValue, false);
						return returnedValue;
					}
					else if(__DEBUG_ALLOWED__) dlib_debugLog(strObjectName, strObjectType, false, strPropertyName+" :"+__ERRORS__[13] , true);
				}
				else {
					if(__DLIB_FUNC__[strObjectType][strPropertyName]["SET"]){
						eval("isValidParam="+__DLIB_FUNC__[strObjectType][strPropertyName]["SET"][1][2]+"(oObjectArgs[2]);");
						if(!isValidParam){
							if(__DEBUG_ALLOWED__) dlib_debugLog(strObjectName, strObjectType, strPropertyName, __ERRORS__[15]+" <b>"+ __DLIB_FUNC__[strObjectType][strPropertyName]["SET"][1][intParamNum][0]+"</b> must be a "+__DLIB_FUNC__[strObjectType][strPropertyName]["SET"][1][intParamNum][1], true);
							return false;
						}
						eval("returnedValue="+__DLIB_FUNC__[strObjectType][strPropertyName]["SET"][0]+"(oObject, oObjectArgs[2])")
						if(typeof returnedValue!="undefined"){
							if(__DEBUG_ALLOWED__) dlib_debugLog(strObjectName, strObjectType, strPropertyName, returnedValue, false);
							return returnedValue;
						}
						return true;
					}
					else if(__DEBUG_ALLOWED__) dlib_debugLog(strObjectName, strObjectType, strPropertyName, __ERRORS__[12] , true);
				}
			}
			else if(__DEBUG_ALLOWED__) dlib_debugLog(strObjectName, strObjectType, false, __ERRORS__[11]+strPropertyName , true);
		}
		else if(__DEBUG_ALLOWED__) dlib_debugLog(strObjectName, strObjectType, false, __ERRORS__[10] , true);
		return false;
	};

	
	function dlib_get(strvarname){
		return (__dlib_get[strvarname])? __dlib_get[strvarname]:false;
	};
	
	function isUndefined(Var){
		return (Var!=0 && !Var || typeof Var=="undefined")?true:false;
	};
	
	function isObject(Object){
		return (typeof Object=="object")? true:false;
	};
	
	function isString(strstr){
		return (typeof strstr=="string")? true:false;
	};
	
	function  isNumber(intint){
		return (typeof intint=="number")? true:false;
	};
	
	function  hasNumericValue(strstr){
		return (!isNaN(parseInt(strstr)))? parseInt(strstr):false;
	};
	
	function  isBoolean(intBool){
		return (intBool==true || intBool==false || isNumber(intBool))? true:false;
	};
	function returnTrueValue(){ return true; }
	
	function add(intint){
		return (arguments.length)?(isNumber(intint))?intint+"add":intint:0;
	};
	
	function keep(){ return "1k";};

	
	function dlib_define_param(strParamName, strParamType){
		switch(strParamType.toLowerCase()){
			case "integer":
				strParamTypeFunc="isInteger";
				strParamType="integer";
				break;
			case "object":
				strParamTypeFunc="isObject";
				strParamType="object";
				break;
			case "boolean":
				strParamTypeFunc="isBoolean";
				strParamType="boolean";
				break;
			case "array":
				strParamTypeFunc="isObject";
				strParamType="array";
				break;
			case "string":
				strParamTypeFunc="isString";
				strParamType="string";
				break;
			default:
				strParamTypeFunc="returnTrueValue";
				strParamType="untyped";
		}
		return Array(strParamName, strParamType, strParamTypeFunc);
	}
	__DLIB_FUNC__=[];
	
	function dlib_declare_func(strFuncName, strObjectType, strPropertyName ){
		if(!__DLIB_FUNC__[strObjectType]) __DLIB_FUNC__[strObjectType]=[];
		if(!__DLIB_FUNC__[strObjectType][strPropertyName]) __DLIB_FUNC__[strObjectType][strPropertyName]=[];
		if(typeof arguments[3]=="undefined" || arguments.length<4) __DLIB_FUNC__[strObjectType][strPropertyName]["GET"]=[strFuncName];
		else __DLIB_FUNC__[strObjectType][strPropertyName]["SET"]=[strFuncName, arguments[3]];
		return true;
	}
		function load_required_lib(strFilePath, strFileName){
			if(__DEBUG_ALLOWED__) dlib_debugLog("dhtml library v4", false, false, "loading : "+strFilePath+strFileName , false);
			if(arguments.length>1) document.write("<script language=\"javascript\" src=\""+strFilePath+strFileName+"\"></script>");
			return true;
		};
		function dlib_load_extension(strExtName){
			strExtName=strExtName.toLowerCase();
			load_required_lib(cfg_default_path+strExtName+"/", "dlib4_"+strExtName+"_ext.js");
			return true;
		};
		__DEBUG_LOADER__=0;
		function dlib_debug(strDebugLevel, strObjectName){
			if(!arguments.length) strDebugLevel="all";
			if(arguments.length<2) strObjectName=false;
			dlib_load_extension("debug");
			__dlib_check_and_active_debug(strDebugLevel, strObjectName);
			return true;
		};
		function __dlib_check_and_active_debug(strDebugLevel, strObjectName){
			if(!arguments.length) strDebugLevel="all";
			if(arguments.length<2) strObjectName=false;
			if(typeof __DEBUGGER_IS_LOADED__!="undefined"){
				dlib_debug(strDebugLevel, strObjectName);
				return true;
			}
			if(__DEBUG_LOADER__<10){
				__DEBUG_LOADER__++;
				if(isString(strObjectName)) strObjectName="'"+strObjectName+"'";
				if(isString(strDebugLevel)) strDebugLevel="'"+strDebugLevel+"'";
				setTimeout("__dlib_check_and_active_debug("+strDebugLevel+", "+strObjectName+")", 200);
			}
			else alert("cannot load and activate dlib4 debug extension !\n\n:( ");
			return false;
		};
		function dlib_plateforme(strPlateforme){
			if (arguments.length && strPlateforme.toUpperCase()!=__CURRENT_PLATEFORME__) return false;
			return __CURRENT_PLATEFORME__;
		};
		function dlib_navigator(strNavigator){
			if (arguments.length && strNavigator.toUpperCase()!=__CURRENT_NAVIGATOR__) return false;
			return __CURRENT_NAVIGATOR__;
		};
		function dlib_screenLeft(intValue){
			if(arguments.length && isInteger(intValue)) return __dlib_setScreenLeft((intValue.toString().indexOf("add")>-1)?parseInt(intValue)+parseInt(__dlib_getScreenLeft()) :parseInt(intValue));
			return __dlib_getScreenLeft();
		};
		function dlib_screenTop(intValue){
   			if(arguments.length && isInteger(intValue)) return __dlib_setScreenTop((intValue.toString().indexOf("add")>-1)?parseInt(intValue)+parseInt(dlib.getScreenTop()) :parseInt(intValue));
			return __dlib_getScreenTop();
		};
	function dlib_layer_exists(strLayerName){ return __dlib_get_element(strLayerName, __LAYER__);};
	function dlib_layers(strLayerName ){
		if(typeof arguments[0]=="undefined") return false;
		return __dlib_get_object(strLayerName, __LAYER__, arguments);
	};
	function dlib_image_exists(strImageName){ return __dlib_get_element(strImageName, __IMAGE__);};
	function dlib_images(strImageName ){
		if(typeof arguments[0]=="undefined") return false;
		return __dlib_get_object(strImageName, __IMAGE__, arguments);
	};
	function dlib_anchor_exists(strAnchorName){ return __dlib_get_element(strAnchorName, __ANCHOR__);};
	function dlib_anchors(strAnchorName ){
		if(typeof arguments[0]=="undefined") return false;
		return __dlib_get_object(strAnchorName, __ANCHOR__, arguments);
	};
	function dlib_form_exists(strFormName){ return __dlib_get_element(strFormName, __FORM__);};
	function dlib_forms(strFormName ){
		if(typeof arguments[0]=="undefined") return false;
		return __dlib_get_object(strFormName, __FORM__, arguments);
	};
DISPLAY="display";
dlib_declare_func("__dlib_get_layers_display", __LAYER__, DISPLAY);
function __dlib_get_layers_display(oObject){
	if(__dlib_getStyle(oObject).display) return __dlib_getStyle(oObject).display;
	return "block";
}
dlib_declare_func("__dlib_set_layers_display", __LAYER__, DISPLAY, dlib_define_param("strValue", "string"));
function __dlib_set_layers_display(oObject, strValue){
	return __dlib_getStyle(oObject).display=strValue;
}
dlib_declare_func("__dlib_get_image_height", __IMAGE__, HEIGHT);
function __dlib_get_image_height(oObject){ return oObject.height;};
dlib_declare_func("__dlib_set_image_height", __IMAGE__, HEIGHT, dlib_define_param("intHeight", "number"));
function __dlib_set_image_height(oObject, intHeight){
	oObject.height=(intHeight.toString().indexOf("add")>-1)? oObject.height+parseInt(intHeight):intHeight;
	return oObject.height;
};
dlib_declare_func("__dlib_get_image_width", __IMAGE__, WIDTH);
function __dlib_get_image_width(oObject){ return oObject.width; };
dlib_declare_func("__dlib_set_image_width", __IMAGE__, WIDTH, dlib_define_param("intWidth", "number"));
function __dlib_set_image_width(oObject, intWidth){
	oObject.width=(intWidth.toString().indexOf("add")>-1)? oObject.width+parseInt(intWidth):intWidth;
	return oObject.width;
};
ROLLOVER="rollover";
dlib_declare_func("__dlib_image_rollover", __IMAGE__, ROLLOVER, dlib_define_param("intPos", "boolean"));
function __dlib_image_rollover(oObject, intPos){
        if(__arr_dlib_images_rollover_src[__dlib_getName(oObject)]) oImage.src=(intPos)?__arr_dlib_images_rollover_src[__dlib_getName(oObject)][0]:__arr_dlib_images_rollover_src[__dlib_getName(oObject)][1];
	else oObject.src=(intPos)?oObject.src.replace(new RegExp(cfg_default_rollover_extension[1]),cfg_default_rollover_extension[0]):oObject.src.replace(new RegExp(cfg_default_rollover_extension[0]),cfg_default_rollover_extension[1])
	return oObject.src;
};
SWAP="swap";
dlib_declare_func("__dlib_image_swap", __IMAGE__, SWAP, dlib_define_param("arrValue", "array"));
function __dlib_image_swap(oObject, arrValue){
        oObject.src=oObject.src.replace(new RegExp(arrValue[0]),arrValue[1]);
	return oObject.src;
};
__arr_dlib_images_rollover_src=[];
function dlib_images_setRollOver(strImgName, strImgSrcOn, strImgSrcOff){
	dlib.preloadImg(strImgSrcOn, strImgSrcOff);
	__arr_dlib_images_rollover_src[strImgName]=[];
	__arr_dlib_images_rollover_src[strImgName]=[strImgSrcOn,strImgSrcOff];
};
__arr_dlib_images_preload=[];
function dlib_images_preload(){
	for(intImgSrc=0; intImgSrc<arguments.length; intImgSrc++){
                count=__arr_dlib_images_preload.length;
		__arr_dlib_images_preload[count]=new Image();
		__arr_dlib_images_preload[count].src=arguments[intImgSrc];
	}
	return true;
};
function dlib_patch_array_push(){
	var sub = this.length;
	for (var i = 0; i < arguments.length; ++i) {this[sub] = arguments[i];sub++;}
	return this.length;
}
function dlib_patch_array_pop(){
	var lastElement = this[this.length - 1];
	this.length--;
	return lastElement;
}
function dlib_patch_array_splice(index, howMany){
	temp = new Array(this.length - howMany - index);
	for(i=0,j=2;j<arguments.length;j++,i++) temp[i] = arguments[j];
	for(j=index+howMany;j<this.length;j++,i++) temp[i] = this[j];
	this.length -= howMany;
	for(i=0,j=index;i<temp.length;i++,j++) this[j] = temp[i];
	return this;
}
if(typeof(Array.prototype.push)=="undefined") Array.prototype.push=dlib_patch_array_push;
if(typeof(Array.prototype.pop)=="undefined") Array.prototype.pop=dlib_patch_array_pop;
if(typeof(Array.prototype.splice)=="undefined") Array.prototype.splice=dlib_patch_array_splice;
load_required_lib(cfg_default_path+"plugins/", __NAVIGATOR_FILE_REFERENCE__+".js");
if(__DEBUG_ALLOWED__) dlib_debugLog("dhtml library v4", false, false, "dlib4.js loaded" , false);

