

// Copyright (c) 1999-2004 Nedstat B.V.
// All rights reserved.
// By using this software, you are agreeing to be bound by the
// terms of this license: http://www.nedstat.com/terms.html
var ns_scriptversion="132";// 2004-05-24












































																																																									function ns_14(){var ns_02 = navigator.appVersion;var ns_00 = parseInt(ns_02.substring(ns_02.indexOf("MSIE")+5, ns_02.indexOf("MSIE")+6));if (ns_00 > 0) ns_02 = 0;else ns_02 = parseInt(ns_02);return ns_02;}function ns_22(){var ns_02 = navigator.appVersion;var ns_01 = parseInt(ns_02.substring(ns_02.indexOf("MSIE")+5, ns_02.indexOf("MSIE")+6));if(ns_01>0) ns_02=ns_01;else ns_02=0;return ns_02;}function ns_pluginNetscape(){var ns_pluglength = navigator.plugins.length;var ns_08 = "";if(ns_pluglength>0){ns_08 = "&ns_java="+navigator.javaEnabled()+"&ns_plugins=";for(ns_24 = 0 ; ns_24 < ns_pluglength ; ns_24++){var ns_29 = false;for(ns_23 = 0 ; ns_23 < ns_24 ; ns_23++)ns_29 = (navigator.plugins[ns_24].description == navigator.plugins[ns_23].description);if(!ns_29)ns_08 += escape(navigator.plugins[ns_24].description +"|");}}return ns_08;}function ns_10(){var ns_15 = navigator.mimeTypes;var ns_17 = ns_15.length;if(ns_17>0){ns_08 = "&ns_mimetypes=";for(ns_24=0;ns_24<ns_17;ns_24++){ns_29 = false;for(ns_23=0;ns_23<ns_24;ns_23++)if(ns_15[ns_24].enabledPlugin == ns_15[ns_23].enabledPlugin)ns_29 = true;if(!ns_29)ns_08 += escape(ns_15[ns_24].description + "|")}}return ns_08;}function ns_12(){if(!document.body){document.write('<body>');}var ns_33=document.body;var ns_13 = 0;var ns_34 = 1;ns_11=new Array("47F67D00-9E55-11D1-BAEF-00C04FC2D130","7790769C-0471-11D2-AF11-00C04FA35D02","283807B5-2C60-11D0-A31D-00AA00B92C03","9381D8F2-0288-11D0-9501-00AA00B911A5","5A8D6EE0-3E18-11D0-821E-444553540000","630B1DA0-B465-11D1-9948-00C04F98BBC9","45EA75A0-A269-11D1-B5BF-0000F8051515","76C19B50-F0C8-11CF-87CC-0020AFEECF20","D27CDB6E-AE6D-11CF-96B8-444553540000","2A202491-F00D-11CF-87CC-0020AFEECF20","08B0E5C0-4FCB-11CF-AAA5-00401C608500","3AF36230-A269-11D1-B5BF-0000F8051515","3BF42070-B3B1-11D1-B5C5-0000F8051515","90A7533D-88FE-11D0-9DBE-0000C0411FC3","10072CEC-8CC1-11D1-986E-00A0C955B42F","4F645220-306D-11D2-995D-00C04F98BBC9","1CDEE860-E95B-11CF-B1B0-00AA00BBAD66","73FA19D0-2D75-11D2-995D-00C04F98BBC9","23064720-C4F8-11D1-994D-00C04F98BBC9","22D6F312-B0F6-11D0-94AB-0080C74C7E95","CA8A9784-280D-11CF-A24D-444553540000","CA8A9780-280D-11CF-A24D-444553540000","B801CA65-A1FC-11D0-85AD-444553540000");ns_33.addBehavior("#default#clientcaps");for(var ns_18=0;ns_18<ns_11.length;ns_18++)
																																																									{if(ns_11[ns_18])if(ns_33.isComponentInstalled("{"+ns_11[ns_18]+"}","ComponentID"))ns_13|=ns_34;ns_34*=2;}return ns_13;}function ns_26(ns_l7){var ns_31 = "";for(var i = 0; i < ns_l7.elements.length ; i++){var ns_28 = ns_l7.elements[i];if(ns_28.name){if(ns_28.type == "select-multiple") {for(var j = 0 ; j < ns_28.options.length ; j++)if(ns_28.options[j].selected)ns_31 += ns_28.name+";";}else if(ns_28.type == "select-one") {ns_31 += ns_28.name+";";}else if(ns_28.type == "checkbox" || ns_28.type == "radio") {if(ns_28.checked)ns_31 += ns_28.name+";";}else ns_31  += ns_28.name+";";}}return ns_31.substring(0,ns_31.lastIndexOf(";"));}function sitestatForm(ns_30, ns_pixelUrl, ns_03){if (ns_03 == null)ns_03 = ns_26(ns_30);if(ns_14() >=4 || ns_22() >= 4){var ns_07 = ns_03.split(";");ns_07_length = ns_07.length;ns_pixelUrl += '&ns_type=submit&ns__t=' + parseInt((new Date()).getTime());for(var ns_24=0;ns_24<ns_30.elements.length;ns_24++){var ns_32 = ns_30.elements[ns_24];var ns_04;ns_16 = false;if(ns_03){for(ns_t = 0; ns_t < ns_07_length; ns_t++)if(ns_32.name == ns_07[ns_t])ns_16 = true;}else{if(ns_32.name)ns_16 = true;}if(ns_16){if(ns_32.type == 'select-multiple'){for(var ns_j=0;ns_j<ns_32.options.length;ns_j++)if(ns_32.options[ns_j].selected)ns_pixelUrl = ns_pixelUrl + "&ns_f_" + escape(ns_32.name) + "=" + escape(ns_32.options[ns_j].value);}else{if(ns_32.type == 'select-one')ns_04 = ns_32.options[ns_32.selectedIndex].value;else{if(ns_32.type == 'checkbox' || ns_32.type == 'radio')if(!ns_32.checked)continue;ns_04 = ns_32.value;}ns_pixelUrl = ns_pixelUrl + "&ns_f_" + escape(ns_32.name) + "=" + escape(ns_04);}}}ns_30.onsubmit = null;var ns_21 = new Image();ns_21.ns_30 = ns_30;ns_21.onload = ns_1O;ns_21.onerror = ns_1O;ns_21.onabort = ns_1O;document.sitestatForm = ns_30;ns_21.timerID = setTimeout(ns_19, 5000);ns_21.src = ns_pixelUrl;}}function ns_1O(){this.onload = null;this.onerror = null;this.onabort = null;clearTimeout(this.timerID);this.ns_30.submit();}function ns_19(){var ns_30 = document.sitestatForm;ns_30.onload = null;ns_30.onerror = null;ns_30.onabort = null;ns_30.submit();}function ns_25()
																																																									{ns_pixelUrl+="&ns_type=hidden&ns_ver="+ns_scriptversion;if(ns_14() >=3) {ns_pixelUrl+=ns_pluginNetscape();ns_pixelUrl+=ns_10();}if(ns_14() >=4 || ns_22() >= 4){var ns_screen=screen;if(parent.innerWidth) {ns_pixelUrl+= "&ns_innersize="+parent.innerWidth+"x"+parent.innerHeight+ "&ns_offset="+parent.pageXOffset+"x"+parent.pageYOffset;}ns_pixelUrl +=  "&ns_availscreen="+ns_screen.availWidth+"x"+ns_screen.availHeight;if(ns_screen)ns_pixelUrl += "&ns_screen="+ns_screen.width+"x"+ns_screen.height+"&ns_colordepth="+ns_screen.colorDepth;}if(document.images)	{ns_pixel= new Image();ns_pixel.src=ns_pixelUrl;}}function ns_09(){if(typeof (ns_loadingtime2) != "undefined"){var ns_html_loading_time=(ns_loadingtime2 - ns_loadingtime1)/1000;var ns_full_loading_time=((new Date()).getTime() - ns_loadingtime1)/1000;ns_pixelUrl += "&ns_html_loading_time="+ns_html_loading_time+"&ns_full_loading_time="+ns_full_loading_time;ns_25();}if (typeof (ns_05)!="undefined")ns_06();}document.cookie = "ns_cookietest=true";if(document.cookie.indexOf("ns_cookietest",0)>=0){if(document.cookie.indexOf("ns_session",0)<0){document.cookie = "ns_session=true";if (typeof(ns_pixelUrl) != "undefined" ) {if (ns_22() >= 5 && navigator.appVersion.indexOf("Mac")<0) {ns_pixelUrl+="&ns_p="+ns_12();}if (typeof (ns_loadingtime1) == "undefined" || ns_22() < 4)ns_25();else {if (document.body.onload) {ns_05 = 1;ns_06 = document.body.onload;}document.body.onload = ns_09;}}}}

/*
## vBegin
## Eclydre Web Manager v1.0.0
## Dateversion 2008-06-17
## File : ../../../cms/template//js/jquery-1.2.6.min.js
## Changelogs : nc;
## vEnd
*/
/*
 * jQuery 1.2.6 - New Wave Javascript
 *
 * Copyright (c) 2008 John Resig (jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $
 * $Rev: 5685 $
 */
(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else
return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else
return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else
selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)return value;values.push(value);}}return values;}else
return(this[0].value||"").replace(/\r/g,"");}return undefined;}if(value.constructor==Number)value+='';return this.each(function(){if(this.nodeType!=1)return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else
this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else
return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i<length;i++)if((options=arguments[i])!=null)for(var name in options){var src=target[name],copy=options[name];if(target===copy)continue;if(deep&&copy&&typeof copy=="object"&&!copy.nodeType)target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)target[name]=copy;}return target;};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)script.text=data;else
script.appendChild(document.createTextNode(data));head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!==undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object)if(callback.apply(object[name],args)===false)break;}else
for(;i<length;)if(callback.apply(object[i++],args)===false)break;}else{if(length==undefined){for(name in object)if(callback.call(object[name],name,object[name])===false)break;}else
for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else
jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i<stack.length;i++)if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++)if(swap[i]!=null)stack[i].style.display=swap[i];}if(name=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)return;if(elem.constructor==Number)elem+='';if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else
ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&&notxml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else
while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)if(array[i]===elem)return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++])if(elem.nodeType!=8)first[pos++]=elem;}else
while(elem=second[i++])first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)if(!inv!=!callback(elems[i],i))ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)ret[ret.length]=value;}return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last)add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else
for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i<args.length)jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else
jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();if(jQuery.browser.opera)document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}if(numStyles===undefined)numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!='string')return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else
xhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else
jQuery.handleError(s,xhr,status);complete();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done)this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})();

/*
## vBegin
## Eclydre Web Manager v1.0.0
## Dateversion 2008-07-07
## File : ../../../cms/template//js/scroller_fade.js
## Changelogs : nc;
## vEnd
*/
// Scroller avec effet Fade 
// 
// Par Sebastien Fichot et VL
// Pour Eclydre
// Projet TV5.org
// First release date : 12 Juin 2008
// 
//
// Revision : 1.4
// Revision date : 18 Juin 2008

// ajout VL pour l'auto-rotate
var autoScroll = new Array();
var doScroll = new Array();

function initScrollers(uniqueBlocid, auto_rotation)
{
	
	if(uniqueBlocid!=''){
		
		// ### COMMON VAR ### //
		var sliderRootElement = uniqueBlocid
		var sliderRootElementID = "#" + sliderRootElement // Ex : #home_une
		var slideElements = $(sliderRootElementID).children('div')
		var slideElementClass = slideElements[0].className.split(' ')[0]
		if(slideElementClass=='' && jQuery.browser.msie)
		{
			slideElementClass = slideElements[0].className.split(' ')[1] // Previens une erreur IE
		}

		// Ex : bloc_hpune
		var slideScrollerPath = sliderRootElementID+' > div.'+scrollerClass // Ex : #home_une > div.scroller
			initScroller(sliderRootElement, sliderRootElementID, slideElements, slideElementClass, slideScrollerPath, auto_rotation);
			
		
	}else{
	
	// Instancie le script Scroller pour chacune des divs.scroller.
	$('div.'+scrollerClass).each(function(i)
		{
			
		// ### COMMON VAR ### //
		var sliderRootElement = $(this).parent('div').attr('id')
		var sliderRootElementID = "#" + sliderRootElement // Ex : #home_une
		var slideElements = $(sliderRootElementID).children('div')
		var slideElementClass = slideElements[0].className.split(' ')[0]
		if(slideElementClass=='' && jQuery.browser.msie)
		{
			slideElementClass = slideElements[0].className.split(' ')[1] // Previens une erreur IE
		}
		// Ex : bloc_hpune
		var slideScrollerPath = sliderRootElementID+' > div.'+scrollerClass // Ex : #home_une > div.scroller
		
			initScroller(sliderRootElement, sliderRootElementID, slideElements, slideElementClass, slideScrollerPath, auto_rotation);
			
		});
	}
}
	
function initScroller(sliderRootElement, sliderRootElementID, slideElements, slideElementClass, slideScrollerPath, auto_rotation)
{
	
	// Defini l'affichage par defaut, lorsque nous nous trouvons sur le premier element
  	$(sliderRootElementID+':eq(0) > div.'+slideElementClass+':gt(0)').hide(); // Masque tous les elements de la liste, sauf le premier.
	
  	$(sliderRootElementID+':eq(0) > div.'+slideElementClass+':gt(0)').css('opacity', '0'); // Defini une opcaite a 0 pour tous les elements de la liste sauf le premier.
	
  	$(sliderRootElementID+':eq(0) > div.'+slideElementClass+':eq(0)').css('opacity', '1'); // Defini l'opacite du premier uniquement. Si l'opacite des elements n'etait pas definie, on ne verrai pas l'effet fadeIn/out.
	IEisNotUgglyButSFis(sliderRootElementID+':eq(0) > div.'+slideElementClass+':eq(0)');
	initImages(sliderRootElementID); // Defini les images par defaut.
	
	if (useLoop==false)
	{
		$(sliderRootElementID+' > div.'+scrollerClass+' > ul > li.'+scrollerPrecClass+' > img').hide(); // Cache le buton precedent
		
	}else{
		$(slideScrollerPath + ' > ul > li.'+scrollerPrecClass+' > img').attr('class', $(slideScrollerPath + ' > ul > li.'+scrollerMiddleItemClass).length); // donne au bouton precedent l'ID de la derniere slide.
		
	}
	
 	$(sliderRootElementID+' > div.'+scrollerClass+' > ul > li.'+scrollerSuivClass+' > img').attr('class', '2'); // Defini la valeur par defaut pour le bouton Suivant
  
  
  	// Evenement click sur un bouton rond
  	$(slideScrollerPath+':eq(0) > ul > li.'+scrollerMiddleItemClass+' > img').click(function() {
														 											 
		var objDivId = "#" + this.className
		SwitchIt(objDivId, this, slideElementClass, sliderRootElementID);	
	  	autoScroll[slideScrollerPath] = 0;
	
  	});
  
  	// Evenement click sur Suivant
  	$(slideScrollerPath+':eq(0) > ul > li.'+scrollerSuivClass+' > img').click(function() {
	
		var elmntSwitchers = $(slideScrollerPath + ' > ul > li.'+scrollerMiddleItemClass+' > img') // Liste des elements du milieu														
	 								
									
		var elmntSwitcher = elmntSwitchers[this.className - 1]	
		var objDivId = "#" + elmntSwitcher.className
	
    	SwitchIt(objDivId, elmntSwitcher, slideElementClass, sliderRootElementID);
	  	autoScroll[slideScrollerPath] = 0;
  
  	});
  
    // Evenement click sur Precedent
  	$(slideScrollerPath+':eq(0) > ul > li.'+scrollerPrecClass+' > img').click(function() {
						
		var elmntSwitchers = $(slideScrollerPath + ' > ul > li.'+scrollerMiddleItemClass+' > img') // Liste des elements du milieu																				
									
		var elmntSwitcher = elmntSwitchers[this.className - 1]	
		var objDivId = "#" + elmntSwitcher.className
		
		SwitchIt(objDivId, elmntSwitcher, slideElementClass, sliderRootElementID);
	  	autoScroll[slideScrollerPath] = 0;
 		
  	});

    // Evenement rollover sur le DIV complet
  	$(sliderRootElementID).hover(
      function () {
	  	doScroll[slideScrollerPath] = 0;
      }, 
      function () {
	  	doScroll[slideScrollerPath] = 1;
      }
    );
	  
  	doScroll[slideScrollerPath] = 1;
  	if(auto_rotation) autoScroll[slideScrollerPath] = 1;
	else  autoScroll[slideScrollerPath] = 0;
	setTimeout( "autoSlide( '"+slideScrollerPath+"', '"+sliderRootElementID+"', '"+slideElementClass+"', 5000)", 5000);
  
}
  


function IEisNotUgglyButSFis(objThis)
{
	if(jQuery.browser.msie){
		$(objThis).each(function(){
			$(this).get(0).style.removeAttribute('filter')
		});
	}
}

// ## COMMON FUNCTIONS ## //

// Fonction assurant le switch entre les slides
function SwitchIt(objDivId, elmntSwitcher, slideElementClass, sliderRootElementID)
{
		
		$(objDivId).css('display', 'block') // Redonne le flow a l'element cible
   	 	.siblings('div.'+slideElementClass+':visible').animate({ opacity: '0'}, 'slow').css('display', 'none'); // ##Debug## a faire lorsque plusieurs sur une page
																													// La requete XPath rapide peut nous provoquer le changement de tous les scrollers
	
			
		if(jQuery.browser.msie) // modif VL pour bug IE7
		{
			$(objDivId).css('opacity', '1'); // Affiche l'element cible
			IEisNotUgglyButSFis(sliderRootElementID+ ':eq(0) > div.'+slideElementClass );
		}
		else 
		{
			$(objDivId).animate({ opacity: '1'}, 'slow'); // Affiche l'element cible
		}
		resetImages(sliderRootElementID); 
		
		$(elmntSwitcher).attr("src", imageActive); // Defini l'image signifiant l'activite sur l'image cliquee
		
		setPrecSuiv(sliderRootElementID, objDivId);
																
		makeItSpot(elmntSwitcher);
	
		
}


// Defini les images lors du premier chargement
function initImages(bloc_id)
{
	
	var scroller_element = bloc_id + "> div."+scrollerClass
	var count = 0;
	
	$(scroller_element + ' > ul > li.'+scrollerMiddleItemClass+' > img').each(function(i)
		{
			
			if(count==0){
				
				$(this).attr("src", imageActive);
			}else{
				$(this).attr("src", imageInactive);
			}
			count+=1;
			
		});
}


// Defini l'image signifiant l'innactivite sur chacune des images
function resetImages(bloc_id)
{
	
	var scroller_element = bloc_id + "> div."+scrollerClass
	
	$(scroller_element + ' > ul > li.'+scrollerMiddleItemClass+' > img').each(function(i)
		{
			$(this).attr("src", imageInactive);
			
		});
}

// Envoie un effet de clignotement sur le bouton d'activite de la page
function makeItSpot(element)
{
	// Anime le bouton pour montrer le dernier clic
		$(element).animate({ opacity: '0.2' }, 'fast');
		$(element).animate({ opacity: '1' }, 'fast');
		$(element).animate({ opacity: '0.2' }, 'fast');
		$(element).animate({ opacity: '1' }, 'fast');
}



// Defini la visibilite des bouttons precedents et suivants, ainsi que le parametre class permettant de determiner qui ils appellent.
function setPrecSuiv(bloc_id, lastcall_elementid)
{
	
		var scroller_element = bloc_id + " > div."+scrollerClass
		var elmntPrec = $(scroller_element + ' > ul > li.'+scrollerPrecClass+' > img') // bouton Precedent
		var elmntSuiv = $(scroller_element + ' > ul > li.'+scrollerSuivClass+' > img') // Bouton Suivant
		var elmntSwitcher = $(scroller_element + ' > ul > li.'+scrollerMiddleItemClass+' > img') // Liste des elements du milieu
		
		var count = 1
		var elementCount = $(scroller_element + ' > ul > li.'+scrollerMiddleItemClass).length
		elmntSwitcher.each(function(i)
		{
			
			if ($(this).attr("src")==imageActive)
			{
				
					if(count<elementCount)
					{
						// Il va y avoir un suivant et un precedent
						elmntSuiv.show();
						elmntPrec.show();
							
						elmntPrec.attr('class', count - 1);
						elmntSuiv.attr('class', count + 1);
					
					}
				
					
					if (useLoop==false)
					{
						
						
						if(count==elementCount)
						{
							// On est au dernier
							elmntSuiv.hide('fast');
							
							elmntPrec.show();
							elmntPrec.attr('class', count - 1);
						}
				
						if(count==1)
						{
						// On est au premier
						elmntPrec.hide('fast');
						}
						
						
					}else{ // useLoop = true
					
					
					
						if(count==elementCount) // On est au dernier
						{
							
							
							elmntPrec.attr('class', count - 1);
							
							elmntSuiv.attr('class', 1);
						}
						
						if(count==1)// On est au premier
						{
					
							
							elmntPrec.attr('class', elementCount);
							
							elmntSuiv.attr('class', count + 1);
							
						}
						
					}	
			}
			
			count+=1;
			
		});

	
}

// ajout VL....on va essayer d'automatiser un peu tout ça !

function autoSlide( slideScrollerPath, sliderRootElementID, slideElementClass, timeout) 
{
	var elmntSwitchers = $(slideScrollerPath + ' > ul > li.'+scrollerMiddleItemClass+' > img') // Liste des elements du milieu														
	var elmntSwitcher = elmntSwitchers[$(slideScrollerPath + ' > ul > li.suiv > img').attr('class') - 1]	
	if(elmntSwitcher)
	{
		var objDivId = "#" + elmntSwitcher.className
	
		if(autoScroll[slideScrollerPath])
	 	{
			if(doScroll[slideScrollerPath])
			{
				SwitchIt(objDivId, elmntSwitcher, slideElementClass, sliderRootElementID);
			}
			setTimeout( "autoSlide( '"+slideScrollerPath+"', '"+sliderRootElementID+"', '"+slideElementClass+"', "+timeout+")", timeout);
		}
	}
}


/*
## vBegin
## Eclydre Web Manager v1.0.0
## Dateversion 2008-06-20
## File : ../../../cms/template//js/jquery.scrollTo-1.3.3-min.js
## Changelogs : nc;
## vEnd
*/
/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * Date: 2/19/2008
 * @author Ariel Flesler
 * @version 1.3.3
 */
;(function($){var o=$.scrollTo=function(a,b,c){o.window().scrollTo(a,b,c)};o.defaults={axis:'y',duration:1};o.window=function(){return $($.browser.safari?'body':'html')};$.fn.scrollTo=function(l,m,n){if(typeof m=='object'){n=m;m=0}n=$.extend({},o.defaults,n);m=m||n.speed||n.duration;n.queue=n.queue&&n.axis.length>1;if(n.queue)m/=2;n.offset=j(n.offset);n.over=j(n.over);return this.each(function(){var a=this,b=$(a),t=l,c,d={},w=b.is('html,body');switch(typeof t){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(t)){t=j(t);break}t=$(t,this);case'object':if(t.is||t.style)c=(t=$(t)).offset()}$.each(n.axis.split(''),function(i,f){var P=f=='x'?'Left':'Top',p=P.toLowerCase(),k='scroll'+P,e=a[k],D=f=='x'?'Width':'Height';if(c){d[k]=c[p]+(w?0:e-b.offset()[p]);if(n.margin){d[k]-=parseInt(t.css('margin'+P))||0;d[k]-=parseInt(t.css('border'+P+'Width'))||0}d[k]+=n.offset[p]||0;if(n.over[p])d[k]+=t[D.toLowerCase()]()*n.over[p]}else d[k]=t[p];if(/^\d+$/.test(d[k]))d[k]=d[k]<=0?0:Math.min(d[k],h(D));if(!i&&n.queue){if(e!=d[k])g(n.onAfterFirst);delete d[k]}});g(n.onAfter);function g(a){b.animate(d,m,n.easing,a&&function(){a.call(this,l)})};function h(D){var b=w?$.browser.opera?document.body:document.documentElement:a;return b['scroll'+D]-b['client'+D]}})};function j(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);

/*!
 * jQuery.SerialScroll
 * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 06/14/2009
 *
 * @projectDescription Animated scrolling of series.
 * @author Ariel Flesler
 * @version 1.2.2
 *
 * @id jQuery.serialScroll
 * @id jQuery.fn.serialScroll
 * @param {Object} settings Hash of settings, it is passed in to jQuery.ScrollTo, none is required.
 * @return {jQuery} Returns the same jQuery object, for chaining.
 *
 * @link {http://flesler.blogspot.com/2008/02/jqueryserialscroll.html Homepage}
 *
 * Notes:
 *	- The plugin requires jQuery.ScrollTo.
 *	- The hash of settings, is passed to jQuery.ScrollTo, so its settings can be used as well.
 */
;(function( $ ){

	var $serialScroll = $.serialScroll = function( settings ){
		return $(window).serialScroll( settings );
	};

	// Many of these defaults, belong to jQuery.ScrollTo, check it's demo for an example of each option.
	// @link {http://demos.flesler.com/jquery/scrollTo/ ScrollTo's Demo}
	$serialScroll.defaults = {// the defaults are public and can be overriden.
		duration:1000, // how long to animate.
		axis:'x', // which of top and left should be scrolled
		event:'click', // on which event to react.
		start:0, // first element (zero-based index)
		step:1, // how many elements to scroll on each action
		lock:true,// ignore events if already animating
		cycle:true, // cycle endlessly ( constant velocity )
		constant:true // use contant speed ?
		/*
		navigation:null,// if specified, it's a selector a collection of items to navigate the container
		target:window, // if specified, it's a selector to the element to be scrolled.
		interval:0, // it's the number of milliseconds to automatically go to the next
		lazy:false,// go find the elements each t	ime (allows AJAX or JS content, or reordering)
		stop:false, // stop any previous animations to avoid queueing
		force:false,// force the scroll to the first element on start ?
		jump: false,// if true, when the event is triggered on an element, the pane scrolls to it
		items:null, // selector to the items (relative to the matched elements)
		prev:null, // selector to the 'prev' button
		next:null, // selector to the 'next' button
		onBefore: function(){}, // function called before scrolling, if it returns false, the event is ignored
		exclude:0 // exclude the last x elements, so we cannot scroll past the end
		*/
	};

	$.fn.serialScroll = function( options ){
		return this.each(function(){
			var 
				settings = $.extend( {}, $serialScroll.defaults, options ),
				event = settings.event, // this one is just to get shorter code when compressed
				step = settings.step, // ditto
				lazy = settings.lazy, // ditto
				context = settings.target ? this : document, // if a target is specified, then everything's relative to 'this'.
				$pane = $(settings.target || this, context),// the element to be scrolled (will carry all the events)
				pane = $pane[0], // will be reused, save it into a variable
				items = settings.items, // will hold a lazy list of elements
				active = settings.start, // active index
				auto = settings.interval, // boolean, do auto or not
				nav = settings.navigation, // save it now to make the code shorter
				timer; // holds the interval id

			if( !lazy )// if not lazy, save the items now
				items = getItems();

			if( settings.force )
				jump( {}, active );// generate an initial call

			// Button binding, optional
			$(settings.prev||[], context).bind( event, -step, move );
			$(settings.next||[], context).bind( event, step, move );

			// Custom events bound to the container
			if( !pane.ssbound )// don't bind more than once
				$pane
					.bind('prev.serialScroll', -step, move ) // you can trigger with just 'prev'
					.bind('next.serialScroll', step, move ) // f.e: $(container).trigger('next');
					.bind('goto.serialScroll', jump ); // f.e: $(container).trigger('goto', 4 );

			if( auto )
				$pane
					.bind('start.serialScroll', function(e){
						if( !auto ){
							clear();
							auto = true;
							next();
						}
					 })
					.bind('stop.serialScroll', function(){// stop a current animation
						clear();
						auto = false;
					});

			$pane.bind('notify.serialScroll', function(e, elem){// let serialScroll know that the index changed externally
				var i = index(elem);
				if( i > -1 )
					active = i;
			});
		  	$pane.hover(
		      function () {
			  	auto = false;
				clear();
		      }, 
		      function () {
			  	if(settings.interval)
				{
				  	auto = true;
					next();
				}
		      }
		    );
			

			pane.ssbound = true;// avoid many bindings

			if( settings.jump )// can't use jump if using lazy items and a non-bubbling event
				(lazy ? $pane : getItems()).bind( event, function( e ){
					jump( e, index(e.target) );
				});

			if( nav )
				nav = $(nav, context).bind(event, function( e ){
					e.data = Math.round(getItems().length / nav.length) * nav.index(this);
					jump( e, this );
				});

			function move( e ){
				e.data += active;
				jump( e, this );
			};
			function jump( e, button ){
				if( !isNaN(button) ){// initial or special call from the outside $(container).trigger('goto',[index]);
					e.data = button;
					button = pane;
				}

				var
					pos = e.data, n,
					real = e.type, // is a real event triggering ?
					$items = settings.exclude ? getItems().slice(0,-settings.exclude) : getItems(),// handle a possible exclude
					limit = $items.length,
					elem = $items[pos],
					duration = settings.duration;

						
				if( real )// real event object
					e.preventDefault();

				if( auto ){
					clear();// clear any possible automatic scrolling.
					timer = setTimeout( next, settings.interval ); 
				}

				if( !elem ){ // exceeded the limits
					n = pos < 0 ? 0 : limit - 1;
					if( active != n )// we exceeded for the first time
						pos = n;
					else if( !settings.cycle )// this is a bad case
						return;
					else
						pos = limit - n - 1;// invert, go to the other side
					elem = $items[pos];
				}

				if( !elem || settings.lock && $pane.is(':animated') || // no animations while busy
					real && settings.onBefore &&
					settings.onBefore(e, elem, $pane, getItems(), pos) === false ) return;

				if( settings.stop )
					$pane.queue('fx',[]).stop();// remove all its animations

				if( settings.constant )
					duration = Math.abs(duration/step * (active - pos ));// keep constant velocity
				$pane
					.scrollTo( elem, duration, settings )// do scroll
					.trigger('notify.serialScroll',[pos]);// in case serialScroll was called on this elem more than once.
			};

			function next(){// I'll use the namespace to avoid conflicts
				$pane.trigger('next.serialScroll');
			};

			function clear(){
				clearTimeout(timer);
			};

			function getItems(){
				return $( items, pane );
			};

			function index( elem ){
				if( !isNaN(elem) ) return elem;// number
				var $items = getItems(), i;
				while(( i = $items.index(elem)) == -1 && elem != pane )// see if it matches or one of its ancestors
					elem = elem.parentNode;
				return i;
			};
		});
	};

})( jQuery );

/*
## vBegin
## 
## Copyright 2008, 2009, 2010 ECLYDRE <ewm@eclydre.fr>
## This file is part of Eclydre Web Manager.
## 
## Eclydre Web Manager is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
## 
## Eclydre Web Manager is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
## 
## You should have received a copy of the GNU General Public License
## along with Eclydre Web Manager.  If not, see <http://www.gnu.org/licenses/>.
## 
## This copyright notice MUST APPEAR in all copies of the script!  
## 
## Eclydre Web Manager v2.6.3
## Dateversion 2011-11-01
## File : ../core//js/inc_fct.js
## Changelogs : 
## v2.6.3 2011-11-01 Fixing snewpage on folder
## v2.5.2 2011-07-06 Adding image crop
## v2.5.1 2011-06-14 Adding undo functions
## v2.0.7 2010-11-08 Adding input focus/blur effect
## v2.0.6 2010-10-07 Adding nodrag
## v2.0.5 2010-10-04 Adding new page, new folder, waiting_animation()
## v2.0.4 2010-09-28 Adding drag & drop confirm
## v2.0.3 2010-09-27 Adding drag & drop support in saveBloc()
## v2.0.2 2010-09-25 Adding drag & drop support in list
## v2.0.1 2010-09-24 Adding drag & drop support
## ;
## vEnd
*/
if(typeof(ewm_admin) == "undefined") ewm_admin=0;
var msie = navigator.userAgent.indexOf('MSIE')>-1?1:0;
$(document).ready(
	function () {
		if(typeof $.fn.datePicker != 'undefined')
		{
			Date.format = 'yyyy-mm-dd 00:00:00';
			$('.datepicker').datePicker({clickInput:false,startDate:'1900-01-01'});
		}
		if(ewm_admin)
		{
			// ___ drag and drop dans les listes
			if(typeof $.fn.draggable != 'undefined')
			{
			//__ DRAG
				$(".tabentete").draggable({axis:'y', opacity: 0.50, revert: 'invalid', scroll: true, zIndex: 999 });
				$(".form_div_inline").draggable({axis:'y', opacity: 0.50, revert: 'invalid', scroll: true, zIndex: 999 });
				$(".draggable").draggable({axis:'y', opacity: 0.50, revert: 'invalid', scroll: true, zIndex: 999 });
			//__ DROP
				$(".tabentete,.form_td_lib_sstable,.form_div_inline").droppable({
				  tolerance: 'pointer',
				  hoverClass: 'drophover',
				  drop: function(event, ui) { 
					// on va tenter de simuler un couper/coller
					if(confirm(config_confirm_draganddrop)) ssaction( '', form_name, 'draganddrop|::'+(ui.draggable.parent().find('.move').html())+'|::'+($(this).parent().find('.paste').html()));
					else { ui.draggable.css('top',0); ui.draggable.css('left',0); }
				  }
				});
				$(".trList1,.trList2").droppable({
				  tolerance: 'pointer',
				  hoverClass: 'drophover',
				  drop: function(event, ui) { 
					// on va tenter de simuler un couper/coller
					if(confirm(config_confirm_draganddrop)) ssaction( '', form_name, 'draganddrop|::'+(ui.draggable.parent().parent().find('.move').html())+'|::'+($(this).find('.paste').html()));
					else { ui.draggable.css('top',0); ui.draggable.css('left',0); }
				  }
				});
				// plan du site
				$('.file').draggable({ opacity: 0.50, revert: 'invalid', scroll: true, zIndex: 999 });
				$('.folder').draggable({ opacity: 0.50, revert: 'invalid', scroll: true, zIndex: 999 });
				$('.file').droppable({
				  tolerance: 'pointer',
				  accept: '.file,.snewpage',
				  hoverClass: 'drophover',
				  drop: function(event, ui) { 
					// on va tenter de simuler un couper/coller
					if(ui.draggable.hasClass('snewpage'))
					{
						// new page
						nompage = '';
						nbnom = 0;
						for(i=1;i<6;i++)
						{
							if(document.stoolbox.elements['n_page_'+i].value)
							{
								nompage = document.stoolbox.elements['n_page_'+i].value+(nompage?'/#/':'')+nompage;
								nbnom++;
							}
						}
						if(!nompage) nompage = 'new page';
						ssaction = $(this).find('.insert').html()+'|nom|'+nompage;
						waiting_animation();
						window.location.href = '?ssaction='+escape((config_charset=='UTF-8'?utf8encode(ssaction):ssaction));
					}
					else if(confirm(config_confirm_draganddrop)) 
					{
						waiting_animation();
						window.location.href = '?ssaction='+escape('draganddrop|::'+(ui.draggable.find('.move').html())+'|::'+($(this).find('.paste').html()));
					}
					else { ui.draggable.css('top',0); ui.draggable.css('left',0); }
				 }});
				$('.folder').droppable({
				  tolerance: 'pointer',
				  accept: '.file,.folder,.snewpage,.snewrub',
				  hoverClass: 'drophover',
				  drop: function(event, ui) { 
					// on va tenter de simuler un couper/coller
					// on regarde si on colle une page 
					if(ui.draggable.hasClass('snewpage'))
					{
						// new page
						nompage = '';
						nbnom = 0;
						for(i=1;i<6;i++)
						{
							if(document.stoolbox.elements['n_page_'+i].value)
							{
								nompage = document.stoolbox.elements['n_page_'+i].value+(nompage?'/#/':'')+nompage;
								nbnom++;
							}
						}
						if(!nompage) nompage = 'new page';
						ssaction = $(this).find('.insertpage').html()+'|nom|'+nompage;
						waiting_animation();
						window.location.href = '?ssaction='+escape((config_charset=='UTF-8'?utf8encode(ssaction):ssaction));
					}
					else if(ui.draggable.hasClass('snewrub'))
					{
						// new arbo
						nomarbo = '';
						nbarbo = 0;
						for(i=1;i<6;i++)
						{
							if(document.stoolbox.elements['n_arbo_'+i].value)
							{
								nomarbo = document.stoolbox.elements['n_arbo_'+i].value+(nomarbo?'/#/':'')+nomarbo;
								nbarbo++;
							}
						}
						if(!nomarbo) nomarbo = 'new folder';
						ssaction = $(this).find('.insert').html()+'|nom|'+nomarbo;
						waiting_animation();
						window.location.href = '?ssaction='+escape((config_charset=='UTF-8'?utf8encode(ssaction):ssaction));
					}
					else
					{
						if(confirm(config_confirm_draganddrop))
						{
							waiting_animation();
							if(ui.draggable.find('.move').html().substring(0, 11)=='move|c_page') window.location.href = '?ssaction='+escape('draganddrop|::'+(ui.draggable.find('.move').html())+'|::'+($(this).find('.pastepage').html()));
							else window.location.href = '?ssaction='+escape('draganddrop|::'+(ui.draggable.find('.move').html())+'|::'+($(this).find('.paste').html()));
						}
						else { ui.draggable.css('top',0); ui.draggable.css('left',0); }
					}
				 }});
				$('.folderin').droppable({
				  tolerance: 'pointer',
				  accept: '.folder,.snewrub',
				  hoverClass: 'drophoverin',
				  drop: function(event, ui) { 
					if(ui.draggable.hasClass('snewrub'))
					{
						// new arbo
						nomarbo = '';
						nbarbo = 0;
						for(i=1;i<6;i++)
						{
							if(document.stoolbox.elements['n_arbo_'+i].value)
							{
								nomarbo = document.stoolbox.elements['n_arbo_'+i].value+(nomarbo?'/#/':'')+nomarbo;
								nbarbo++;
							}
						}
						if(!nomarbo) nomarbo = 'new folder';
						ssaction = $(this).find('.insert').html()+'|nom|'+nomarbo;
						waiting_animation();
						window.location.href = '?ssaction='+escape((config_charset=='UTF-8'?utf8encode(ssaction):ssaction));
					}
					else
					{
						if(confirm(config_confirm_draganddrop)) 
						{
							waiting_animation();
							window.location.href = '?ssaction='+escape('draganddrop|::'+(ui.draggable.find('.move').html())+'|::'+($(this).find('.paste').html()));
						}
						else { ui.draggable.css('top',0); ui.draggable.css('left',0); }
					}
				 }});
				$(".nodrag").draggable("disable");
			}
		}
	}
);

function GL_checkBrowser(){
	this.dom= (document.getElementById);
	this.op=this.opera= (navigator.userAgent.indexOf("Opera")>-1);
	this.konq=  (navigator.userAgent.indexOf("Konq")>-1);
	this.ie4= (document.all && !this.dom && !this.op && !this.konq);
	this.ie5= (document.all && this.dom && !this.op && !this.konq);
	this.ns4= (document.layers && !this.dom && !this.konq);
	this.ns5= (!document.all && this.dom && !this.op && !this.konq);
	this.ns6= (this.ns5);
	this.bw=  (this.ie4 || this.ie5 || this.ns4 || this.ns6 || this.op || this.konq);
	return this;
}
bw= new GL_checkBrowser();

	//Returns css
function GL_getObjCss(obj){								
	return bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?document.layers[obj]:0;
};
function jsStyle(obj){								
	return bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?document.layers[obj]:0;
};
function jsObj(obj){								
	return bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj]:0;
};

function showDiv(id)
{
	etat = GL_getObjCss(id).display;
	switch(etat)
	{
		case "none": GL_getObjCss(id).display="block"; break;
		case "block": GL_getObjCss(id).display="none"; break;
	}
}

function showDivForm(id, inputH, withajax, ajaxpath)
{
	var numform = 0;
	while(document.forms[numform].name.substring(0, 2)!='f_') numform++;
	etat = GL_getObjCss(id).display;
	switch(etat)
	{
		case "none": 
			GL_getObjCss(id).display="block"; document.forms[numform].elements[inputH].value='0'; 
			if(withajax == 'ajax' && ajaxpath)
			{
				var nb = 0;
				$('#'+id).each(function(){
					nb++;
					div = $(this);
				});
				if(!nb)
				{
					$('div').each(function(){
						if($(this).attr('id')==id)
						{
							nb++;
							div = $(this);
						}
					});
				}
				if(nb && div.html()=='') 
				{
					div.html('<img src="load.gif" width="36" height="36" alt="loading"/>');
					$.ajax({ type: "get", dataType:"html", url: ajaxpath, data: "bloc="+id, 
						success: function(content){
							div.html(content);/*alert( content);*/
							$(".inputRequired select").each(function () {
								if(!$(this).attr('value') || $(this).attr('value')=='0') $(this).addClass('requiredEmpty');
								else  $(this).removeClass('requiredEmpty');
							   });
							$(".inputRequired input").each(function () {
								if(!$(this).attr('value') || $(this).attr('value')=='0') $(this).addClass('requiredEmpty');
								else  $(this).removeClass('requiredEmpty');
							   });
							$(".inputRequired textarea").each(function () {
								if(!$(this).attr('value') || $(this).attr('value')=='0') $(this).addClass('requiredEmpty');
								else  $(this).removeClass('requiredEmpty');
							   });
							$(".withchelp").mouseenter(function() {
								var tClass = $(this).attr('class').split(' ');
								for( var i=0; i<tClass.length && tClass[i].substring(0, 5)!='chelp'; i++);
								if(i<tClass.length && tClass[i]!=contextual_help)
								{
									contextual_help = tClass[i];
									var chelp_key = tClass[i];
									if(chelp[ chelp_key]) $("#contextual_help").html(chelp[ chelp_key]);
									else
									{
										chelp[chelp_key] = 'loading...';
										$.ajax({ type: "get", dataType:"html", url: root_path+"administrator/contextual_help.php", data: "code="+escape(chelp_key), 
											success: function(content){
												$("#contextual_help").html(content);
												chelp[chelp_key] = content;
											}
										});
									}
								}
							});
							$("input,select,textarea").focus(function(){$(this).addClass("inputfocused")});
							$("input,select,textarea").blur(function(){$(this).removeClass("inputfocused")});
							$(".inputRequired input").focus(function(){
								g_input_focus = $(this).attr('name');
								checkRequiredField( 'input', $(this).attr('name'));
							});
							$(".inputRequired input").blur(function(){
								checkRequiredField( 'input', $(this).attr('name'));
							});
							$(".inputRequired select").focus(function(){
								g_input_focus = $(this).attr('name');
								checkRequiredField( 'select', $(this).attr('name'));
							});
							$(".inputRequired select").blur(function(){
								checkRequiredField( 'select', $(this).attr('name'));
							});
							$(".inputRequired textarea").focus(function(){
								g_input_focus = $(this).attr('name');
								checkRequiredField( 'textarea', $(this).attr('name'));
							});
							$(".inputRequired textarea").blur(function(){
								checkRequiredField( 'textarea', $(this).attr('name'));
							});
							$('.datepicker').datePicker({clickInput:false,startDate:'1900-01-01'});							
							if(typeof $.fn.draggable != 'undefined')
							{
							//__ DRAG
								$(".tabentete").draggable({axis:'y', opacity: 0.50, revert: 'invalid', scroll: true, zIndex: 999 });
								$(".form_div_inline").draggable({axis:'y', opacity: 0.50, revert: 'invalid', scroll: true, zIndex: 999 });
								$(".draggable").draggable({axis:'y', opacity: 0.50, revert: 'invalid', scroll: true, zIndex: 999 });
							//__ DROP
								$(".tabentete,.form_td_lib_sstable,.form_div_inline").droppable({
								  tolerance: 'pointer',
								  hoverClass: 'drophover',
								  drop: function(event, ui) { 
									// on va tenter de simuler un couper/coller
									if(confirm(config_confirm_draganddrop)) ssaction( '', form_name, 'draganddrop|::'+(ui.draggable.parent().find('.move').html())+'|::'+($(this).parent().find('.paste').html()));
									else { ui.draggable.css('top',0); ui.draggable.css('left',0); }
								  }
								});
								$(".trList1,.trList2").droppable({
								  tolerance: 'pointer',
								  hoverClass: 'drophover',
								  drop: function(event, ui) { 
									// on va tenter de simuler un couper/coller
									if(confirm(config_confirm_draganddrop)) ssaction( '', form_name, 'draganddrop|::'+(ui.draggable.parent().parent().find('.move').html())+'|::'+($(this).find('.paste').html()));
									else { ui.draggable.css('top',0); ui.draggable.css('left',0); }
								  }
								});
								$(".nodrag").draggable("disable");
								$('textarea.grippieresizable:not(.processed)').TextAreaResizer();
								$('iframe.grippieresizable:not(.processed)').TextAreaResizer();
							}
							
							}});
				}
			}
			break;
		case "block": GL_getObjCss(id).display="none"; document.forms[numform].elements[inputH].value='1'; break;
	}
	//alert(document.forms[0].elements[inputH].value);
}

function confirmation(text, wheretogo)
{
	if(confirm(text.replace('<br>', '\n'))) window.location.href= wheretogo;
	else waiting_stop();
}

function ssaction(text, formname, val, opmult)
{
	if(!text || (text && confirm(text))) 
	{
		document.forms[formname].ssaction.value = val;
		pos = document.documentElement.scrollTop;
		document.forms[formname].posTop.value= pos;
		if(isDefined('isRichText')) 
		{
			try {
				updateRTEs();
			} catch(e) {}
		}
		// on sauve les champs CodeMirror
		for (var i = 0; i < tCodeMirror.length; i++) /*if(tCodeMirrorElements[i]!='deleted')*/ tCodeMirror[i].save();
		if(opmult) document.forms[formname].opmult.value = document.forms[formname].elements[opmult].value;
		var delSel = 0;
		if(document.forms[formname].elements["sel[]"])
		{
			 sz = document.forms[formname].elements["sel[]"].length;
			 for(i=0; i<sz; i++) if(document.forms[formname].elements["sel[]"][i].checked) delSel++;
			 if(delSel)
			 {
			 	if(confirm("warning !\n\nmarked to delete : "+delSel)) delSel = 0;
			 }
		}
		if(!delSel) 
		{
			waiting_animation( '../');
			document.forms[formname].submit();
		}
	}
}

function ajouteOption(formname, fieldname, stchaine, stid)
{
		var nb = document.forms[formname].elements[fieldname].options.length;
		//alert(nb);
		//var stchaine = new String('<?=addslashes($val)?>');
		//var stid = new String('<?=$id?>');
		//no = new Option( stchaine, stid, 0, 1);
		no = new Option( stchaine, stid, 0, 1);
		document.forms[formname].elements[fieldname].options[nb]= no;
		document.forms[formname].elements[fieldname].selectedIndex= nb;
}

function jsOpen(page, title, params)
{
	var w = window.open(page, title, params);
	w.focus();
}

function showDefault(div)
{
	jsStyle(div).display = 'block';
	if(tempX<850)
	{
		jsStyle(div).top = (tempY-20)+'px';
		jsStyle(div).left = (tempX+10)+'px';
	}
	else
	{
		jsStyle(div).top = (tempY-20)+'px';
		jsStyle(div).left = (tempX-160)+'px';
	}
}


//___________________________positionne un div par rapport à la souris
function showMouseDiv(div, dX, dY)
{
	jsStyle(div).display = 'block';
	jsStyle(div).top = (tempY+dY)+'px';
	jsStyle(div).left = (tempX+dX)+'px';
}

// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false

if(ewm_admin)
{
	// If NS -- that is, !IE -- then set up for mouse capture
	if (!IE) document.captureEvents(Event.MOUSEMOVE)

	// Set-up to use getMouseXY function onMouseMove
	if(!isDefined('noMouseMoveEvent')) noMouseMoveEvent = 0;
	if(!noMouseMoveEvent) document.onmousemove = getMouseXY;

	// Temporary variables to hold mouse x-y pos.s
	var tempX = 0
	var tempY = 0
}

// Main function to retrieve mouse x-y pos.s


function getMouseXY(e) {

  if (IE) { // grab the x-y pos.s if browser is IE
  tempX = event.clientX + document.documentElement.scrollLeft;
  tempY = event.clientY + document.documentElement.scrollTop;
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX;
    tempY = e.pageY;
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  
  return true;
}



var charArray = new Array(
	' ', '!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', ',', '-',
	'.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';',
	'<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
	'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
	'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e',
	'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's',
	't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', '', 'Ã‡', 'Ã¼',
	'Ã©', 'Ã¢', 'Ã¤', 'Ã ', 'Ã¥', 'Ã§', 'Ãª', 'Ã«', 'Ã¨', 'Ã¯', 'Ã®', 'Ã¬', 'Ã„', 'Ã…',
	'Ã‰', 'Ã¦', 'Ã†', 'Ã´', 'Ã¶', 'Ã²', 'Ã»', 'Ã¹', 'Ã¿', 'Ã–', 'Ãœ', 'Ã¸', 'Â£', 'Ã˜',
	'Ã—', 'Æ’', 'Ã¡', 'Ã­', 'Ã³', 'Ãº', 'Ã±', 'Ã‘', 'Âª', 'Âº', 'Â¿', 'Â®', 'Â¬', 'Â½',
	'Â¼', 'Â¡', 'Â«', 'Â»', '_', '_', '_', 'Â¦', 'Â¦', 'Ã', 'Ã‚', 'Ã€', 'Â©', 'Â¦',
	'Â¦', '+', '+', 'Â¢', 'Â¥', '+', '+', '-', '-', '+', '-', '+', 'Ã£', 'Ãƒ',
	'+', '+', '-', '-', 'Â¦', '-', '+', 'Â¤', 'Ã°', 'Ã', 'ÃŠ', 'Ã‹', 'Ãˆ', 'i',
	'Ã', 'ÃŽ', 'Ã', '+', '+', '_', '_', 'Â¦', 'ÃŒ', '_', 'Ã“', 'ÃŸ', 'Ã”', 'Ã’',
	'Ãµ', 'Ã•', 'Âµ', 'Ã¾', 'Ãž', 'Ãš', 'Ã›', 'Ã™', 'Ã½', 'Ã', 'Â¯', 'Â´', 'Â­', 'Â±',
	'_', 'Â¾', 'Â¶', 'Â§', 'Ã·', 'Â¸', 'Â°', 'Â¨', 'Â·', 'Â¹', 'Â³', 'Â²', '_', ' ');

var hex_digits = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
		'A', 'B', 'C', 'D', 'E', 'F');


function charToByte(c)
{
	var i;
	for(i=0; i < charArray.length; i++) {
		if(c == charArray[i]) return i+32;
	}
	return 0;
}

function byteToChar(n)
{
	if(n < 32 || n > 255) return " ";
	return charArray[n-32];
}

function byteToHex(n)
{
	return hex_digits[(n >> 4) & 0xf] + hex_digits[n & 0xf];
}

function byteToBin(n)
{
	var ret_str = "";
	var i;
	for(i=7; i>=0; i--) {
		ret_str += (n >> i) & 1;
	}
	return ret_str;
}



function clean_numstr(raw_str, base)
{
	var ret_str = "";
	var c = "";
	var i;
	for(i=0; i < raw_str.length; i++) {
		c = raw_str.charAt(i);
		if(c == "0" || parseInt(c, base) > 0) {
			ret_str += c;
		}
	}
	return ret_str;
}

function isNothing(str, theForm, form_bit)
{
	if(str == "") {
		alert("This field evaluates to nothing!");
		return false;
	}
	eval(form_bit);
	return true;
}



function hex_from_dec(theForm)
{
	var dec_str = clean_numstr(theForm.dec.value, 10);
	var delimiter = theForm.delimiter.value;
	var hex_str = "";
	var num_str = "";
	var i = 0, n;

	while(i < dec_str.length) {
		n = 0;
		if(i > 0) hex_str += delimiter;
		for(; i < dec_str.length && (n < 25 || (n == 25 && dec_str.charAt(i) < 6)); i++) {
			n *= 10;
			n += parseInt(dec_str.charAt(i));
		}
		hex_str += byteToHex(n);
	}
	return isNothing(hex_str, theForm, "theForm.hex.value = str");
}

function chars_from_hex(theForm)
{
	var hex_str = clean_numstr(theForm.hex.value, 16);
	var char_str = "";
	var num_str = "";
	var i;
	for(i=0; i < hex_str.length; i+=2)
		char_str += byteToChar(parseInt(hex_str.substring(i, i+2), 16));
	return isNothing(char_str, theForm, "theForm.chars.value = str");
}

function hex_from_chars(theForm)
{
	var char_str = theForm.chars.value;
	var delimiter = theForm.delimiter.value;
	var hex_str = "";
	var i, n;
	for(i=0; i < char_str.length; i++) {
		n = charToByte(char_str.charAt(i));
		if(n != 0) {
			if(i > 0) hex_str += delimiter;
			hex_str += byteToHex(n);
		}
	}
	return isNothing(hex_str, theForm, "theForm.hex.value = str");
}

function dec_from_hex(theForm)
{
	var hex_str = clean_numstr(theForm.hex.value, 16);
	var delimiter = theForm.delimiter.value;
	var dec_str = "";
	var dec_byte = "";
	var i;
	for(i=0; i < hex_str.length-1; i+=2) {
		if(i > 0) dec_str += delimiter;
		dec_str += parseInt(hex_str.substring(i, i+2), 16);
	}
	return isNothing(dec_str, theForm, "theForm.dec.value = str");
}

function bin_from_hex(theForm)
{
	var hex_str = clean_numstr(theForm.hex.value, 16);
	var delimiter = theForm.delimiter.value;
	var bin_str = "";
	var bin_byte = "";
	var i;
	for(i=0; i < hex_str.length-1; i+=2) {
		if(i > 0) bin_str += delimiter;
		bin_str += byteToBin(parseInt(hex_str.substring(i, i+2), 16));
	}
	return isNothing(bin_str, theForm, "theForm.bin.value = str");
}

function hex_from_bin(theForm)
{
	var delimiter = theForm.delimiter.value;
	var bin_str = clean_numstr(theForm.bin.value, 2);
	var hex_str = "";
	var i;

	for (i=0; i < bin_str.length-7; i+=8) {
		if(i > 0) hex_str += delimiter;
		hex_str += byteToHex(parseInt(bin_str.substring(i, i+8), 2));
	}
	return isNothing(hex_str, theForm, "theForm.hex.value = str");
}

function from_dec(theForm)
{
	if (hex_from_dec(theForm)) {
		bin_from_hex(theForm);
		chars_from_hex(theForm);
	}
}

function from_hex(theForm)
{
	if(bin_from_hex(theForm)){
		dec_from_hex(theForm);
		chars_from_hex(theForm);
	}
}

function from_char(theForm)
{
	if(hex_from_chars(theForm)) {
		bin_from_hex(theForm);
		dec_from_hex(theForm);
	}
}

function from_bin(theForm)
{
	if(hex_from_bin(theForm)) {
		dec_from_hex(theForm);
		chars_from_hex(theForm);
	}
}

function isDefined(variable)
{
return eval('(typeof('+variable+') != "undefined");');
}

//________________________________________ scroll un div
var doscroll = 1;
function scrollzone(iddiv, decal)
{
	var t = isDefined(jsObj(iddiv).scrollTop)?jsObj(iddiv).scrollTop:0;
	
	jsObj(iddiv).scrollTop = t+decal;
	if(doscroll) setTimeout('scrollzone("'+iddiv+'", '+decal+')', 50);
}
function initscroll(iddiv, height)
{
	var h = jsObj('scroll'+iddiv).scrollHeight;
	//alert(h+' '+height+' '+jsObj('scroll'+iddiv).scrollHeight);
	if(h<=height)
	{
		jsStyle('scrollup'+iddiv).display = 'none';
		jsStyle('scrolldown'+iddiv).display = 'none';
	}
}

// ______________________ QueryString

function Querystring(qs) { // optionally pass a querystring to parse
	this.params = new Object()
	this.get=Querystring_get
	
	if (qs == null)
		qs=location.search.substring(1,location.search.length)

	if (qs.length == 0) return

// Turn <plus> back to <space>
// See: http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1
	qs = qs.replace(/\+/g, ' ')
	var args = qs.split('&') // parse out name/value pairs separated via &
	
// split out each name=value pair
	for (var i=0;i<args.length;i++) {
		var value;
		var pair = args[i].split('=')
		var name = unescape(pair[0])

		if (pair.length == 2)
			value = unescape(pair[1])
		else
			value = name
		
		this.params[name] = value
	}
}

function Querystring_get(key, default_) {
	// This silly looking line changes UNDEFINED to NULL
	if (default_ == null) default_ = null;
	
	var value=this.params[key]
	if (value==null) value=default_;
	
	return value
}
var q_GET = new Querystring(window.location.search.substring(1));

// __________________GESTION DES COOKIES

function EcrireCookie(nom, valeur)
{
	var argv=EcrireCookie.arguments;
	var argc=EcrireCookie.arguments.length;
	var expires=(argc > 2) ? argv[2] : null;
	var path=(argc > 3) ? argv[3] : null;
	var domain=(argc > 4) ? argv[4] : null;
	var secure=(argc > 5) ? argv[5] : false;
	document.cookie=nom+"="+escape(valeur)+
	((expires==null) ? "" : ("; expires="+expires.toGMTString()))+
	((path==null) ? "" : ("; path="+path))+
	((domain==null) ? "" : ("; domain="+domain))+
	((secure==true) ? "; secure" : "");
}

function getCookieVal(offset)
{
	var endstr=document.cookie.indexOf (";", offset);
	if (endstr==-1) endstr=document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}
function LireCookie(nom)
{
	var arg=nom+"=";
	var alen=arg.length;
	var clen=document.cookie.length;
	var i=0;
	while (i<clen)
	{
		var j=i+alen;
		if (document.cookie.substring(i, j)==arg) return getCookieVal(j);
		i=document.cookie.indexOf(" ",i)+1;
		if (i==0) break;
	
	}
	return null;
}

function setFlashWidth(divid, newW){
	document.getElementById(divid).style.width = newW+"px";
}
function setFlashHeight(divid, newH){
	document.getElementById(divid).style.height = newH+"px";		
}
function setFlashSize(divid, newW, newH){
	setFlashWidth(divid, newW);
	setFlashHeight(divid, newH);
}
function canResizeFlash(){
	var ua = navigator.userAgent.toLowerCase();
	var opera = ua.indexOf("opera");
	if( document.getElementById ){
		if(opera == -1) return true;
		else if(parseInt(ua.substr(opera+6, 1)) >= 7) return true;
	}
	return false;
}

function number_format( number, decimals, dec_point, thousands_sep ) {
    // http://kevin.vanzonneveld.net
    // +   original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +     bugfix by: Michael White (http://getsprink.com)
    // +     bugfix by: Benjamin Lupton
    // +     bugfix by: Allan Jensen (http://www.winternet.no)
    // +    revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
    // +     bugfix by: Howard Yeend
    // *     example 1: number_format(1234.5678, 2, '.', '');
    // *     returns 1: 1234.57     
 
    var n = number, c = isNaN(decimals = Math.abs(decimals)) ? 2 : decimals;
    var d = dec_point == undefined ? "." : dec_point;
    var t = thousands_sep == undefined ? "," : thousands_sep, s = n < 0 ? "-" : "";
    var i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + "", j = (j = i.length) > 3 ? j % 3 : 0;
    
    return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");
}

function rechercher(text, wheretogo, pattern, getParam)
{
	$("select").hide();
	$("object").hide();
	$("embed").hide();
	$("#window").html('');
	$("#overlay").show();
	$("#window").css( "width", "350px");
	$("#window").css( "height", "150px");
	$("#window").css( "left",(($(window).width()-400)/2)+"px");
	$("#window").css( "top", (($(window).height()-400)/2)+"px");
	$("#window").show();

	$.ajax({type: "get", dataType:"html", url: "jssearch.php", data: "text=" + escape(text) + "&wheretogo=" + escape(wheretogo) + "&pattern=" + escape(pattern) + "&getParam=" + escape(getParam), success: function(content){$("#window").html(content);}}); 
}

function jsprompt(text, wheretogo, callback, defaut)
{
	$("select").hide();
	$("object").hide();
	$("embed").hide();
	$("#window").html('');
	$("#overlay").show();
	$("#window").css( "width", "350px");
	$("#window").css( "height", "150px");
	$("#window").css( "left",(($(window).width()-400)/2)+"px");
	$("#window").css( "top", (($(window).height()-400)/2)+"px");
	$("#window").show();

	$.ajax({type: "get", dataType:"html", url: "jsprompt.php", data: "text=" + escape(text) + "&wheretogo=" + escape(wheretogo) + "&callback=" + escape(callback) + "&defaut=" + escape(defaut), success: function(content){$("#window").html(content);}}); 
}

function xliff_form( categ, table, id)
{
	$("select").hide();
	$("object").hide();
	$("embed").hide();
	$("#window").html('');
	$("#overlay").show();
	$("#window").css( "width", "300px");
	$("#window").css( "height", "250px");
	$("#window").css( "left",(($(window).width()-300)/2)+"px");
	$("#window").css( "top", (($(window).height()-200)/2)+"px");
	$("#window").show();

	$.ajax({type: "get", dataType:"html", url: "ajax_xliff_form.php", data: "categ=" + escape(categ)+"&table=" + escape(table)+"&id=" + escape(id), success: function(content){$("#window").html(content);}}); 
}


//_______________________________

var g_input_focus = '';
function checkRequiredField( tag, name)
{
	var input = $(".inputRequired "+tag+"[name='"+name+"']");
	var val = input.attr('value');
	if(!val || val=='0')	input.addClass('requiredEmpty');
	else input.removeClass('requiredEmpty');
	if(g_input_focus==name) setTimeout( "checkRequiredField('"+tag+"', '"+name+"')", 1000);
}

if(ewm_admin)
{
	$(document).ready(function(){
		$("input,select,textarea").focus(function(){$(this).addClass("inputfocused")});
		$("input,select,textarea").blur(function(){$(this).removeClass("inputfocused")});
		$(".inputRequired select").each(function () {
			if(!$(this).attr('value') || $(this).attr('value')=='0') $(this).addClass('requiredEmpty');
			else  $(this).removeClass('requiredEmpty');
		   });
		$(".inputRequired input").each(function () {
			if(!$(this).attr('value') || $(this).attr('value')=='0') $(this).addClass('requiredEmpty');
			else  $(this).removeClass('requiredEmpty');
		   });
		$(".inputRequired textarea").each(function () {
			if(!$(this).attr('value') || $(this).attr('value')=='0') $(this).addClass('requiredEmpty');
			else  $(this).removeClass('requiredEmpty');
		   });

		$(".inputRequired input").focus(function(){
			g_input_focus = $(this).attr('name');
			checkRequiredField( 'input', $(this).attr('name'));
		});
		$(".inputRequired input").blur(function(){
			checkRequiredField( 'input', $(this).attr('name'));
		});
		$(".inputRequired select").focus(function(){
			g_input_focus = $(this).attr('name');
			checkRequiredField( 'select', $(this).attr('name'));
		});
		$(".inputRequired select").blur(function(){
			checkRequiredField( 'select', $(this).attr('name'));
		});
		$(".inputRequired textarea").focus(function(){
			g_input_focus = $(this).attr('name');
			checkRequiredField( 'textarea', $(this).attr('name'));
		});
		$(".inputRequired textarea").blur(function(){
			checkRequiredField( 'textarea', $(this).attr('name'));
		});
		$(".withchelp").mouseenter(function() {
			var tClass = $(this).attr('class').split(' ');
			for( var i=0; i<tClass.length && tClass[i].substring(0, 5)!='chelp'; i++);
			if(i<tClass.length && tClass[i]!=contextual_help)
			{
				contextual_help = tClass[i];
				var chelp_key = tClass[i];
				if(chelp[ chelp_key]) $("#contextual_help").html(chelp[ chelp_key]);
				else
				{
					chelp[chelp_key] = 'loading...';
					$.ajax({ type: "get", dataType:"html", url: root_path+"administrator/contextual_help.php", data: "code="+escape(chelp_key), 
						success: function(content){
							$("#contextual_help").html(content);
							chelp[chelp_key] = content;
						}
					});
				}
			}
		});
		$(window).scroll(function () { 
			  topscroll = document.documentElement.scrollTop; 
			  if(topscroll>90) $("#divTools").css('top', '10px');
			  else $("#divTools").css('top', (90-topscroll)+'px');
			});
		$("#contextual_help").dblclick(function(){
			if($(this).css('width')!='600px') $(this).css('width', '600px');
			else $(this).css('width', '160px');
		});
		/*$("#contextual_help").mouseenter(function(){
			$(this).css('width', '600px');
		});
		$("#contextual_help").mouseout(function(){
			$(this).css('width', '160px');
		});*/
	});
}
//_______________________________

function waiting_animation( root_path) 
{
	$("select").hide();
	$("object").hide();
	$("embed").hide();
	$("#window").html('<img src="'+root_path+'administrator/images/waiting_animation.gif" width="52" height="52" alt="waiting" class="waiting_animation"/>');
	$("#overlay").show();
	$("#window").css( "width", "200px");
	$("#window").css( "height", "150px");
	$("#window").css( "left",(($(window).width()-319)/2)+"px");
	$("#window").css( "top", (($(window).height()-305)/2)+"px");
	$("#window").show();
}

function waiting_stop( ) 
{
	$("select").show();
	$("object").show();
	$("embed").show();
	$("#overlay").hide();
	$("#window").hide();
}

//_______________________________ saveBloc, sauve le bloc d'admin en cours en Ajax

function saveBloc( fDIV, fForm, fTable, fId)
{
	nb = document.forms[ fForm].elements.length;
	pattern = 'r['+fTable+']['+fId+']';
	szpattern = pattern.length;
	params = '';
	try {
		updateRTEs();
	} catch(e) {}
	for (var i = 0; i < tCodeMirror.length; i++) tCodeMirror[i].save();
	for( i=0 ; i<nb; i++)
	{
		input = document.forms[ fForm].elements[ i];
		if(input && input.name.substring( 0, szpattern)==pattern) 
		{
			var type = input.type;
			if (!input.type)	type="radio";
			var value="";
			switch(type)	{
				case "text":
				case "password":
				case "hidden":
				case "textarea":
					//__ on cherche un code mirror et on le retire
					/*for (var k = 0; k < tCodeMirror.length; k++) 
					{
						if( input.name==tCodeMirrorElements[k])
						{
							tCodeMirror[k].toTextArea();
							tCodeMirrorElements[k] = 'deleted';
						}
					}*/
					//__
					value = input.value;
					params += '&'+input.name+'='+escape((config_charset=='UTF-8'?utf8encode(value):value));
				break;
				case "select-one":
					if (input.selectedIndex>=0)	{
						value = input.options[input.selectedIndex].value;
						params += '&'+input.name+'='+escape( (config_charset=='UTF-8'?utf8encode(value):value));
					}
				break;
				case "select-multiple":
					var l=input.length;
					for (a=0;a<l;a++)	{
						if (input.options[a].selected)	{
							 value = input.options[a].value;
				  			 params += '&'+input.name+'[]='+escape( (config_charset=='UTF-8'?utf8encode(value):value));
						}
					}
				break;
				case "radio":
					var l=input.length;
					if(l>0)
					{
						for (a=0; a<l;a++)	{
							if (input[a].checked)	{
								value = input[a].value;
							}
						}
						params += '&'+input.name+'='+escape( (config_charset=='UTF-8'?utf8encode(value):value));
					}
					else 
					{
						if(input.checked) 
						{
							value = input.value;
							params += '&'+input.name+'='+escape( (config_charset=='UTF-8'?utf8encode(value):value));
						}
					}
				break;
			}
			//alert(input.name+' '+type+' '+escape( value));
			//params += '&'+input.name+'='+escape( value);
		}
	}
	if(params)
	{
		//alert(params);
		if(fDIV)
		{
			var nb = 0;
			$('#'+fDIV).each(function(){
				nb++;
				div = $(this);
			});
			if(!nb)
			{
				$('div').each(function(){
					if($(this).attr('id')==fDIV)
					{
						nb++;
						div = $(this);
					}
				});
			}
			if(div.attr('id')==fDIV) 
			{
				div.html('<img src="load.gif" width="36" height="36" alt="loading"/>');
				
				$.ajax({ type: "post", dataType:"html", url: root_path+'administrator/ajax_savebloc.php', data: 'action=save&form='+escape(fForm)+'&divBloc='+escape(fDIV)+params, 
					success: function(content){
						div.html(content);
						$(".inputRequired select").each(function () {
							if(!$(this).attr('value') || $(this).attr('value')=='0') $(this).addClass('requiredEmpty');
							else  $(this).removeClass('requiredEmpty');
						   });
						$(".inputRequired input").each(function () {
							if(!$(this).attr('value') || $(this).attr('value')=='0') $(this).addClass('requiredEmpty');
							else  $(this).removeClass('requiredEmpty');
						   });
						$(".inputRequired textarea").each(function () {
							if(!$(this).attr('value') || $(this).attr('value')=='0') $(this).addClass('requiredEmpty');
							else  $(this).removeClass('requiredEmpty');
						   });
					
						$("input,select,textarea").focus(function(){$(this).addClass("inputfocused")});
						$("input,select,textarea").blur(function(){$(this).removeClass("inputfocused")});
						$(".inputRequired input").focus(function(){
							g_input_focus = $(this).attr('name');
							checkRequiredField( 'input', $(this).attr('name'));
						});
						$(".inputRequired input").blur(function(){
							checkRequiredField( 'input', $(this).attr('name'));
						});
						$(".inputRequired select").focus(function(){
							g_input_focus = $(this).attr('name');
							checkRequiredField( 'select', $(this).attr('name'));
						});
						$(".inputRequired select").blur(function(){
							checkRequiredField( 'select', $(this).attr('name'));
						});
						$(".inputRequired textarea").focus(function(){
							g_input_focus = $(this).attr('name');
							checkRequiredField( 'textarea', $(this).attr('name'));
						});
						$(".inputRequired textarea").blur(function(){
							checkRequiredField( 'textarea', $(this).attr('name'));
						});
						$(".withchelp").mouseenter(function() {
							var tClass = $(this).attr('class').split(' ');
							for( var i=0; i<tClass.length && tClass[i].substring(0, 5)!='chelp'; i++);
							if(i<tClass.length && tClass[i]!=contextual_help)
							{
								contextual_help = tClass[i];
								var chelp_key = tClass[i];
								if(chelp[ chelp_key]) $("#contextual_help").html(chelp[ chelp_key]);
								else
								{
									chelp[chelp_key] = 'loading...';
									$.ajax({ type: "get", dataType:"html", url: root_path+"administrator/contextual_help.php", data: "code="+escape(chelp_key), 
										success: function(content){
											$("#contextual_help").html(content);
											chelp[chelp_key] = content;
										}
									});
								}
							}
						});
						$('.datepicker').datePicker({clickInput:false,startDate:'1900-01-01'});							
						if(typeof $.fn.draggable != 'undefined')
						{
						//__ DRAG
							$(".tabentete").draggable({axis:'y', opacity: 0.50, revert: 'invalid', scroll: true, zIndex: 999 });
							$(".form_div_inline").draggable({axis:'y', opacity: 0.50, revert: 'invalid', scroll: true, zIndex: 999 });
							$(".draggable").draggable({axis:'y', opacity: 0.50, revert: 'invalid', scroll: true, zIndex: 999 });
						//__ DROP
							$(".tabentete,.form_td_lib_sstable,.form_div_inline").droppable({
							  tolerance: 'pointer',
							  hoverClass: 'drophover',
							  drop: function(event, ui) { 
								// on va tenter de simuler un couper/coller
								if(confirm(config_confirm_draganddrop)) ssaction( '', form_name, 'draganddrop|::'+(ui.draggable.parent().find('.move').html())+'|::'+($(this).parent().find('.paste').html()));
								else { ui.draggable.css('top',0); ui.draggable.css('left',0); }
							  }
							});
							$(".trList1,.trList2").droppable({
							  tolerance: 'pointer',
							  hoverClass: 'drophover',
							  drop: function(event, ui) { 
								// on va tenter de simuler un couper/coller
								if(confirm(config_confirm_draganddrop)) ssaction( '', form_name, 'draganddrop|::'+(ui.draggable.parent().parent().find('.move').html())+'|::'+($(this).find('.paste').html()));
								else { ui.draggable.css('top',0); ui.draggable.css('left',0); }
							  }
							});
							$(".nodrag").draggable("disable");
						}
						
						}});
				
			}
		}
		else 
		{
			waiting_animation( root_path);
			document.forms[ fForm].submit();
		}
	}
}

function utf8encode(string) 
{
	string = string.replace(/\r\n/g,"\n");
	var utftext = "";

	for (var n = 0; n < string.length; n++) {

		var c = string.charCodeAt(n);

		if (c < 128) {
			utftext += String.fromCharCode(c);
		}
		else if((c > 127) && (c < 2048)) {
			utftext += String.fromCharCode((c >> 6) | 192);
			utftext += String.fromCharCode((c & 63) | 128);
		}
		else {
			utftext += String.fromCharCode((c >> 12) | 224);
			utftext += String.fromCharCode(((c >> 6) & 63) | 128);
			utftext += String.fromCharCode((c & 63) | 128);
		}

	}

	return utftext;
}

function mailto( nom, domaine, ext)
{
	window.location.href= 'mailto:'+nom+'@'+domaine+'.'+ext;
}

function jsUNDO( table, id, field, form) 
{
	$("select").hide();
	$("object").hide();
	$("embed").hide();
	if(!$("#window").html()) $("#window").html('<img src="'+root_path+'administrator/images/waiting_animation.gif" width="52" height="52" alt="waiting" class="waiting_animation"/>');
	$("#overlay").show();
	$.ajax({ type: "get", dataType:"html", url: root_path+"administrator/ajax_undo_liste.php", data: "table="+escape(table)+"&id="+id+"&dbfield="+escape(field)+"&form="+escape(form), 
		success: function(content){
			$("#window").html(content);
		}
	});
	
	$("#window").css( "width", "640px");
	$("#window").css( "height", "400px");
	$("#window").css( "left",(($(window).width()-640)/2)+"px");
	$("#window").css( "top", (($(window).height()-400)/2)+"px");
	$("#window").show();
}

function jsCrop(img, imgdest, imgname, id, w, h, tw, th, form, table, field, format)
{
	
	$("select").hide();
	$("object").hide();
	$("embed").hide();
	
	if(!$("#window").html()) $("#window").html('<img src="'+root_path+'administrator/images/waiting_animation.gif" width="52" height="52" alt="waiting" class="waiting_animation"/>');
	$("#overlay").show();
	
	ft = Math.max(Math.max(tw/(980-w), th/(450-h)), 1);
	
	var html = '<div class="jscrop" style="padding:10px; overflow: hidden;"><h1 style="text-align: center; background: gray;">Cropping tool</h1><div class="original" style="float:left"><h2>original</h2>';
	html += '<img src="'+img+'" id="img_target" style="width:'+(tw/ft)+'px;height:'+(th/ft)+'px"/>';
	html += '</div>';
	html += '<div style="'+(w?'width:'+w+'px;':'')+'float:right"><h2>preview</h2>';
	html += '<div id="preview" style="'+(w?'width:'+w+'px;':'')+(h?'height:'+h+'px;':'')+'overflow:hidden;"><img src="'+imgdest+'" id="img_preview" alt="Preview" />';
	html += '</div></div>';
	html += '<span style="visibility:hidden" id="cx"></span>';
	html += '<span style="visibility:hidden" id="cy"></span>';
	html += '<span style="visibility:hidden" id="cw"></span>';
	html += '<span style="visibility:hidden" id="ch"></span>';
	html += '<div style="z-index:10000; position:absolute; bottom:0; left:10px; width:960px; text-align: center; padding: 10px; background: gray; border-top: 10px solid white;"><input type="button" onclick="$(\'select\').show();$(\'object\').show();$(\'embed\').show();$(\'#overlay\').hide();$(\'#window\').hide();" value="cancel"/> <input type="submit" value="'+config_confirm_crop+'" onclick="if(confirm(config_confirm_cropimg)) confirmCrop(\''+form+'\', \''+table+'\', \''+field+'\', '+id+',\''+imgname+'\', \''+format+'\'); return false;"/></div></div>';
	
	$("#window").html(html);
	
	$("#window #img_target").Jcrop(
		{
        	trueSize: [tw, th],
			onChange: function(c){updatePreview(c)},
        	minSize : Array((w?w:0), (h?h:0)),
			onSelect: function(c){updatePreview(c)},
        	aspectRatio: (w && h ? w/h : 0)
      	},
		function()
		{
        	// Use the API to get the real image size
        	var bounds = this.getBounds();
        	boundx = bounds[0];
        	boundy = bounds[1];
			// Store the API in the jcrop_api variable
        	jcrop_api = this;
			hh = h;
			ww = w;
      	}
	);
	
	$("#window").css( "width", "1000px");
	$("#window").css( "height", "600px");
	$("#window").css( "left",(($(window).width()-990)/2)+"px");
	$("#window").css( "top", (($(window).height()-600)/2)+"px");
	$("#window").show();
	$("#overlay").click(
		function(){
			$("select").show();
			$("object").show();
			$("embed").show();
			$(this).hide();
			$("#window").hide();
		}
	);
}
function confirmCrop(form, table, field, id, imgname, format){
	if(form && table && field && id && imgname && format)
		ssaction( '', form, 'cropimg|'+table+'|'+field+'|'+id+'|'+imgname+'|'+format+'|'+$("#cx").html()+'|'+$("#cy").html()+'|'+$("#cw").html()+'|'+$("#ch").html());	
}
function updatePreview(c)
{
	if (parseInt(c.w) > 0)
	{
		$('#window #img_preview').attr('src', $('#window #img_target').attr('src'));
		
		$('#cx').html(c.x);
		$('#cy').html(c.y);
		$('#cw').html(c.w);
		$('#ch').html(c.h);
		
		if(ww)
		{
			var rx = $('#window #preview').width() / c.w;
	  		$('#window #img_preview').css('width', Math.round(rx * boundx) + 'px');
			$('#window #img_preview').css('margin-left', -Math.round(rx * c.x) + 'px');
			//$('#cw').html($('#window #preview').width());
		}
		else
		{
			var rx = $('#window #img_preview').width() / ($('#window #img_target').width()*ft);
			$('#window #preview').css('width', Math.round(rx * c.w) + 'px');
			$('#window #img_preview').css('margin-top', -Math.round(rx * c.x) + 'px');
			//$('#cw').html(Math.round(rx * c.w));
		}
		if(hh)
		{
			var ry = $('#window #preview').height() / c.h;
			$('#window #img_preview').css('height', Math.round(ry * boundy) + 'px');
			$('#window #img_preview').css('margin-top', -Math.round(ry * c.y) + 'px');
			//$('#ch').html($('#window #preview').height());
		}
		else
		{
			var ry = $('#window #img_preview').height() / ($('#window #img_target').height()*ft);
			$('#window #preview').css('height', Math.round(ry * c.h) + 'px');
			$('#window #img_preview').css('margin-top', -Math.round(ry * c.y) + 'px');
			//$('#ch').html(Math.round(ry * c.h));
		}
	}
};

/*
## vBegin
## 
## Copyright 2008, 2009, 2010 ECLYDRE <ewm@eclydre.fr>
## This file is part of Eclydre Web Manager.
## 
## Eclydre Web Manager is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
## 
## Eclydre Web Manager is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
## 
## You should have received a copy of the GNU General Public License
## along with Eclydre Web Manager.  If not, see <http://www.gnu.org/licenses/>.
## 
## This copyright notice MUST APPEAR in all copies of the script!  
## 
## Eclydre Web Manager v2.0.3
## Dateversion 2010-11-04
## File : ../core//js/jsfunc.validateform.js
## Changelogs : 
## v2.0.2 2010-11-04 Adding multiple required support
## v2.0.2 2010-09-24 Adding call to fonction on ereg
## v2.0.1 2010-09-14 Adding 'not matching' possiblilty on ereg
## ;
## vEnd
*/
/***************************************************************
*
*  Universal validate-form
*
* $Id: jsfunc.validateform.js,v 1.4 2004/04/19 15:25:53 typo3 Exp $
*
*
*
*  Copyright notice
*
*  (c) 1998-2003 Kasper Skaarhoj
*  All rights reserved
*
*  This script is part of the TYPO3 t3lib/ library provided by
*  Kasper Skaarhoj <kasper@typo3.com> together with TYPO3
*
*  Released under GNU/GPL (see license file in tslib/)
*
*  This script is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*  This copyright notice MUST APPEAR in all copies of this script
***************************************************************/


function validateForm(theFormname,theFieldlist,goodMess,badMess,emailMess)	{
	if (document[theFormname] && theFieldlist)	{
		var index=1;
		var theField = split(theFieldlist, ",", index);
		var msg="";
		var theEreg = '';
		var theEregMsg = '';
		var specialMode = '';
		var tOr = new Array();
		var tIndOr = new Array();
		var tIndOrValue = new Array();
		var indOr = 1;

		while (theField) {
			theEreg = '';
			specialMode = '';

				// Check special modes:
			if (theField == '_EREG')	{	// EREG mode: _EREG,[error msg],[JS ereg],[fieldname],[field Label]
				specialMode = theField;

				index++;
				theEregMsg = unescape(split(theFieldlist, ",", index));
				index++;
				theEreg = unescape(split(theFieldlist, ",", index));
			} else if (theField == '_EMAIL')	{
				specialMode = theField;
			}
			else if (theField == '_OR')	{
				specialMode = theField;
				index++;
				nbOr = split(theFieldlist, ",", index);
				tIndOr[indOr] = new Array();
				i = 0;
				while(i<nbOr)
				{
					index++;
					theOrField = split(theFieldlist, ",", index);
					tOr[theOrField] = indOr;
					tIndOr[indOr][i] = theOrField;
					tIndOrValue[indOr] = new Array();
					i++;
				}
				indOr++;
			}

				// Get real field name if special mode has been set:
			if (specialMode)	{
				index++;
				theField = split(theFieldlist, ",", index);
			}

			index++;
			theLabel = unescape(split(theFieldlist, ",", index));
			theField = unescape(theField);
			if (document[theFormname][theField])	{
				var fObj = document[theFormname][theField];
				var type=fObj.type;
				if (!fObj.type)	{
					type="radio";
				}
				var value="";
				switch(type)	{
					case "text":
					case "password":
					case "hidden":
					case "textarea":
						value = fObj.value;
					break;
					case "select-one":
						if (fObj.selectedIndex>=0)	{
							value = fObj.options[fObj.selectedIndex].value;
						}
					break;
					case "select-multiple":
						var l=fObj.length;
						for (a=0;a<l;a++)	{
							if (fObj.options[a].selected)	{
								 value+= fObj.options[a].value;
							}
						}
					break;
					case "checkbox":
						value = fObj.checked?fObj.value:0;
					break;
					case "radio":
						var l=fObj.length;
						for (a=0; a<l;a++)	{
							if (fObj[a].checked)	{
								value = fObj[a].value;
							}
						}
					break;
					default:
						value=1;
				}

				switch(specialMode)	{
					case "_EMAIL":
						var theRegEx_notValid = new RegExp("(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)", "gi");
						var theRegEx_isValid = new RegExp("^.+\@[a-zA-Z0-9\-\.]+[\.]+([a-zA-Z]{2,4}|[0-9]{1,3})$","");
						if (!theRegEx_isValid.test(value))	{	// This part was supposed to be a part of the condition: " || theRegEx_notValid.test(value)" - but I couldn't make it work (Mozilla Firefox, linux) - Anyone knows why?
							if(tOr[theField]) tIndOrValue[tOr[theField]][theField] = theLabel+' ('+(emailMess ? unescape(emailMess) : 'Email address not valid!')+')';
							else msg+="\n"+theLabel+' ('+(emailMess ? unescape(emailMess) : 'Email address not valid!')+')';
						}
					break;
					case "_EREG":
						//alert(value+" : "+theEreg);
						if(theEreg.substring(0, 9)=='function:')
						{
							// appel d'une fonction JS
							var theRegEx_function = theEreg.substring(9);
							eval("test = "+theRegEx_function+"(value)");
							if (!test)	{
								if(tOr[theField]) tIndOrValue[tOr[theField]][theField] = theLabel+' ('+theEregMsg+')';
								else msg+="\n"+theLabel+' ('+theEregMsg+')';
							}
						}
						else if(theEreg.substring(0, 1)=='!')
						{
							// mode inversé, la condition ne doit pas être rempli
							var theRegEx_isValid = new RegExp(theEreg.substring(1),"");
							if (theRegEx_isValid.test(value))	{
								if(tOr[theField]) tIndOrValue[tOr[theField]][theField] = theLabel+' ('+theEregMsg+')';
								else msg+="\n"+theLabel+' ('+theEregMsg+')';
							}
						}
						else
						{
							var theRegEx_isValid = new RegExp(theEreg,"");
							if (!theRegEx_isValid.test(value))	{
								if(tOr[theField]) tIndOrValue[tOr[theField]][theField] = " "+theLabel+' ('+theEregMsg+')';
								else msg+="\n"+theLabel+' ('+theEregMsg+')';
							}
						}
					break;
					default:
						if (!value ||value=='0')	{
							if(tOr[theField]) tIndOrValue[tOr[theField]][theField] = theLabel;
							else msg+="\n"+theLabel;
						}
				}
			}
			index++;
			theField = split(theFieldlist, ",", index);
		}
		/* traitement des required multiple (OR)*/ 
		for(i=1; i<indOr; i++)
		{
			nbItem = tIndOr[i].length;
			nbVide = 0;
			for(j=0; j<nbItem; j++)
			{
				theField = tIndOr[i][j];
				if( tIndOrValue[tOr[theField]][theField]) nbVide++;
			}
			if(nbVide == nbItem) 
			{
				msg += "\n[";
				for(j=0; j<nbItem; j++)
				{
					theField = tIndOr[i][j];
					msg += (j?"\n|| ":'')+tIndOrValue[tOr[theField]][theField];
				}
				msg += ']';
			}
		}
		/* */
		if (msg)	{
			var theBadMess = unescape(badMess);
			if (!theBadMess)	{
				theBadMess = "You must fill in these fields:";
			}
			theBadMess+="\n";
			alert(theBadMess+msg);
			return false;
		} else {
			var theGoodMess = unescape(goodMess);
			if (theGoodMess)	{
				alert(theGoodMess);
			}
			return true;
		}
	}
}
function split(theStr1, delim, index) {
	var theStr = ''+theStr1;
	var lengthOfDelim = delim.length;
	sPos = -lengthOfDelim;
	if (index<1) {index=1;}
	for (a=1; a<index; a++)	{
		sPos = theStr.indexOf(delim, sPos+lengthOfDelim);
		if (sPos==-1)	{return null;}
	}
	ePos = theStr.indexOf(delim, sPos+lengthOfDelim);
	if(ePos == -1)	{ePos = theStr.length;}
	return (theStr.substring(sPos+lengthOfDelim,ePos));
}


/* _____________________________________________ fonctions générales à tout le site ___________________________________________________*/

function set_langue( langue, redirection, local)
{
	var expcookies =new Date();
	expcookies.setDate(expcookies.getDate()+730);

	if(local) EcrireCookie( local, langue, expcookies, '/');
	else EcrireCookie( 'c_id_trad', langue, expcookies, '/');
	self.top.location.href = redirection;

}

$(document).ready(function () {
	/*
	$('.wrapper_right .bloc_coremenulist .bloc_coremenu ul').hide();
	$('.wrapper_right .bloc_coremenulist .bloc_coremenu h2').data('over', false);
	$('.wrapper_right .bloc_coremenulist .bloc_coremenu h2').hover(
		function(){
			$(this).parent().find('ul').show();
			$(this).addClass('act');
			$(this).parent().css('z-index', 15);
		},
		function(){				
		}
	);
	$('.wrapper_right .bloc_coremenulist .bloc_coremenu ul').hover(
		function(){				
		},
		function(){
			if($(this).parent().parent().parent().find('h2').attr('class') == 'act')
			{
				$(this).hide();
				$(this).parent().parent().parent().find('h2').removeClass('act');
				$(this).parent().parent().parent().css('z-index', 10);		
			}
		}
	);
	*/
	
	//__ on force le reload du captcha
	$('.captcha img').each(
		function(i)
		{
			$(this).attr("src",config_absolute_path+"core/marker/captcha.php?tps="+(new Date()).getTime());
		}
	);

	//___ on cache les déroulants JQUERY
	$('.selectbox ul').hide();
	
	$('.bloc_select ul li').hover(
		function()
		{	
			$(this).find('.selectbox').show();
			$(this).find('.selectbox ul').show();
			$(this).parent().parent().css('z-index', 150);
		},
		function()
		{
			$(this).find('.selectbox').hide();
			$(this).find('.selectbox ul').show();
			$(this).parent().parent().css('z-index', 100);
		}
	);
	
	
	$('.selectbox_bt').hover(
		function()
		{	
			$(this).find('.selectbox ul').show();
			$(this).find('.selectbox ul').css('z-index', 150);
			$(this).css('z-index', 150);
		},
		function()
		{
			$(this).find('.selectbox ul').hide();
			$(this).find('.selectbox ul').css('z-index', 100);
			$(this).css('z-index', 100);
		}
	);
	//___ on cache les déroulants VIDE
	$(".selectbox_bt .selectbox:empty").each(function(i){
		$(this).hide();
		$(this).parent().parent().hide();
	});
	
	$(".gr_sst").hover(
		function(){
			$(this).css('cursor', 'pointer');
			var layer = $(this).parent().find(".sst_layer");
			if(!layer.attr('class')) layer = $("#sst_layer"+$(this).attr('id').substr($(this).attr('id').lastIndexOf('_')));
			layer.css('left', $(this).position().left + 7);
			layer.css('top', $(this).position().top - layer.outerHeight());
			layer.show();
		},
		function(){
			var layer = $(this).parent().find(".sst_layer");
			if(!layer.attr('class')) layer = $("#sst_layer"+$(this).attr('id').substr($(this).attr('id').lastIndexOf('_')));
				layer.hide();
		}
	);
	/*
	$(".organigramme .portrait:not(:empty)").each(function(i){
		$(this).hide();
		//$(this).parent().find('.detail_perso').append('<a class="icoportrait"><span>afficher la photo</span><span class="layer_portrait"></span></a>')
	});
	$(".organigramme .portrait:empty").each(function(i){
		$(this).parent().find('.icoportrait').hide();
	});
	
	$(".organigramme .detail_perso .icoportrait").hover(
		function()
		{	
			$(this).find(".layer_portrait").html($(this).parent().parent().find('.portrait').html());
			$(this).find(".layer_portrait").show();
			//$(this).parent().parent().find('.portrait').show();		
		},
		function()
		{
			$(this).find(".layer_portrait").html('');
			//$(this).parent().parent().find('.portrait').hide();		
		}
	);
	*/
	//déroulants météo
	$('.listPays .contentPays').hover(
		function()
		{
			$(this).css('cursor', 'pointer');
			$('.listPays .contentPays ul').show();
			/*$('.listPays .contentPays ul').css('z-index', 100);*/
			
		},
		function()
		{
			$('.listPays .contentPays ul').hide();
			
		}
	);
	
	$('.selectmap').hover(
		function()
		{
			$(this).css('cursor', 'pointer');
			$(this).find('.contentPays ul').show();
			/*$(this).find('.contentPays ul').css('z-index', 100);*/
			
		},
		function()
		{
			$(this).find('.contentPays ul').hide();
			
		}
	);
	
	$('.contentListPlages').hover(
		function()
		{
			$(this).css('cursor', 'pointer');
			$('.contentListPlages ul.paysPlage').show();
			/*$('.contentListPlages ul.paysPlage').css('z-index', 100);*/
			
		},
		function()
		{
			$('.contentListPlages ul.paysPlage').hide();
			
		}
	);
	
	$('.contentHomePlages').hover(
		function()
		{
			$(this).css('cursor', 'pointer');
			$('.contentHomePlages ul.paysPlage').show();
			/*$('.contentHomePlages ul.paysPlage').css('z-index', 100);*/
			
		},
		function()
		{
			$('.contentHomePlages ul.paysPlage').hide();
			
		}
	);
	
	$('.listactus').hover(
		function()
		{
			$(this).css('cursor', 'pointer');
			$(this).find('ul').show();
			/*$(this).find('ul').css('z-index', 100);*/
			/*$(this).css('z-index', 100);*/
		},
		function()
		{
			$(this).find('ul').hide();
			/*$(this).find('ul').css('z-index', 0);*/
			/*$(this).css('z-index', 0);*/
		}
	);

	$('.listcartesprecipit24h').hover(
		function()
		{
			$(this).css('cursor', 'pointer');
			$(this).find('ul').show();
			/*$(this).find('ul').css('z-index', 100);*/
			/*$(this).css('z-index', 100);*/
			
		},
		function()
		{
			$(this).find('ul').hide();
			/*$(this).find('ul').css('z-index', 0);*/
			/*$(this).css('z-index', 0);*/
			
		}
	);
	$('.listcartesextrem3j').hover(
		function()
		{
			$(this).css('cursor', 'pointer');
			$(this).find('ul').show();
			/*$(this).find('ul').css('z-index', 100);*/
			/*$(this).css('z-index', 100);*/
			
		},
		function()
		{
			$(this).find('ul').hide();
			/*$(this).find('ul').css('z-index', 0);*/
			/*$(this).css('z-index', 0);*/
			
		}
	);
	$('.listcartesextrem6j').hover(
		function()
		{
			$(this).css('cursor', 'pointer');
			$(this).find('ul').show();
			/*$(this).find('ul').css('z-index', 100);*/
			/*$(this).css('z-index', 100);*/
			
		},
		function()
		{
			$(this).find('ul').hide();
			/*$(this).find('ul').css('z-index', 0);*/
			/*$(this).css('z-index', 0);*/
			
		}
	);
	$('.listVille').hover(
		function()
		{
			$(this).css('cursor', 'pointer');
			$(this).find('.contentVilles').show();
			/*$(this).find('.contentVilles').css('z-index', 100);*/
			
		},
		function()
		{
			$(this).find('.contentVilles').hide();
			
		}
	);
	$('.selectAutresCartes').hover(
		function()
		{
			$(this).css('cursor', 'pointer');
			$(this).find('.contentAutresCartes').show();
			/*$(this).find('.contentAutresCartes').css('z-index', 100);*/
			
		},
		function()
		{
			$(this).find('.contentAutresCartes').hide();
			
		}
	);
	
	$('.selecthomecontinent').hover(
		function()
		{
			$(this).css('cursor', 'pointer');
			$('.contentContinent').show();
			/*$('.contentContinent').css('z-index', 100);*/
			
		},
		function()
		{
			$('.contentContinent').hide();
			
		}
	);
});


/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright Â© 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/

// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	swing: function (x, t, b, c, d) {
		//alert(jQuery.easing.default);
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeInQuad: function (x, t, b, c, d) {
		return c*(t/=d)*t + b;
	},
	easeOutQuad: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	},
	easeInOutQuad: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t + b;
		return -c/2 * ((--t)*(t-2) - 1) + b;
	},
	easeInCubic: function (x, t, b, c, d) {
		return c*(t/=d)*t*t + b;
	},
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	},
	easeInOutCubic: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t + b;
		return c/2*((t-=2)*t*t + 2) + b;
	},
	easeInQuart: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t + b;
	},
	easeOutQuart: function (x, t, b, c, d) {
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
	},
	easeInOutQuart: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
		return -c/2 * ((t-=2)*t*t*t - 2) + b;
	},
	easeInQuint: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t*t + b;
	},
	easeOutQuint: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t*t*t + 1) + b;
	},
	easeInOutQuint: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
		return c/2*((t-=2)*t*t*t*t + 2) + b;
	},
	easeInSine: function (x, t, b, c, d) {
		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
	},
	easeOutSine: function (x, t, b, c, d) {
		return c * Math.sin(t/d * (Math.PI/2)) + b;
	},
	easeInOutSine: function (x, t, b, c, d) {
		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
	},
	easeInExpo: function (x, t, b, c, d) {
		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
	},
	easeOutExpo: function (x, t, b, c, d) {
		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	},
	easeInOutExpo: function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	},
	easeInCirc: function (x, t, b, c, d) {
		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
	},
	easeOutCirc: function (x, t, b, c, d) {
		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
	},
	easeInOutCirc: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
	},
	easeInElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	},
	easeOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	},
	easeInOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
	},
	easeInBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*(t/=d)*t*((s+1)*t - s) + b;
	},
	easeOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	},
	easeInOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158; 
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	},
	easeInBounce: function (x, t, b, c, d) {
		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
	},
	easeOutBounce: function (x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	},
	easeInOutBounce: function (x, t, b, c, d) {
		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
	}
});

/*
 *
 * TERMS OF USE - EASING EQUATIONS
 * 
 * Open source under the BSD License. 
 * 
 * Copyright Â© 2001 Robert Penner
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
 */

/*
 * jQuery Easing Compatibility v1 - http://gsgd.co.uk/sandbox/jquery.easing.php
 *
 * Adds compatibility for applications that use the pre 1.2 easing names
 *
 * Copyright (c) 2007 George Smith
 * Licensed under the MIT License:
 *   http://www.opensource.org/licenses/mit-license.php
 */

jQuery.extend( jQuery.easing,
{
	easeIn: function (x, t, b, c, d) {
		return jQuery.easing.easeInQuad(x, t, b, c, d);
	},
	easeOut: function (x, t, b, c, d) {
		return jQuery.easing.easeOutQuad(x, t, b, c, d);
	},
	easeInOut: function (x, t, b, c, d) {
		return jQuery.easing.easeInOutQuad(x, t, b, c, d);
	},
	expoin: function(x, t, b, c, d) {
		return jQuery.easing.easeInExpo(x, t, b, c, d);
	},
	expoout: function(x, t, b, c, d) {
		return jQuery.easing.easeOutExpo(x, t, b, c, d);
	},
	expoinout: function(x, t, b, c, d) {
		return jQuery.easing.easeInOutExpo(x, t, b, c, d);
	},
	bouncein: function(x, t, b, c, d) {
		return jQuery.easing.easeInBounce(x, t, b, c, d);
	},
	bounceout: function(x, t, b, c, d) {
		return jQuery.easing.easeOutBounce(x, t, b, c, d);
	},
	bounceinout: function(x, t, b, c, d) {
		return jQuery.easing.easeInOutBounce(x, t, b, c, d);
	},
	elasin: function(x, t, b, c, d) {
		return jQuery.easing.easeInElastic(x, t, b, c, d);
	},
	elasout: function(x, t, b, c, d) {
		return jQuery.easing.easeOutElastic(x, t, b, c, d);
	},
	elasinout: function(x, t, b, c, d) {
		return jQuery.easing.easeInOutElastic(x, t, b, c, d);
	},
	backin: function(x, t, b, c, d) {
		return jQuery.easing.easeInBack(x, t, b, c, d);
	},
	backout: function(x, t, b, c, d) {
		return jQuery.easing.easeOutBack(x, t, b, c, d);
	},
	backinout: function(x, t, b, c, d) {
		return jQuery.easing.easeInOutBack(x, t, b, c, d);
	}
});

ï»¿/**
 * jQuery.timers - Timer abstractions for jQuery
 * Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com)
 * Licensed under the WTFPL (http://sam.zoy.org/wtfpl/).
 * Date: 2009/02/08
 *
 * @author Blair Mitchelmore
 * @version 1.1.2
 *
 **/

jQuery.fn.extend({
	everyTime: function(interval, label, fn, times, belay) {
		return this.each(function() {
			jQuery.timer.add(this, interval, label, fn, times, belay);
		});
	},
	oneTime: function(interval, label, fn) {
		return this.each(function() {
			jQuery.timer.add(this, interval, label, fn, 1);
		});
	},
	stopTime: function(label, fn) {
		return this.each(function() {
			jQuery.timer.remove(this, label, fn);
		});
	}
});

jQuery.event.special

jQuery.extend({
	timer: {
		global: [],
		guid: 1,
		dataKey: "jQuery.timer",
		regex: /^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/,
		powers: {
			// Yeah this is major overkill...
			'ms': 1,
			'cs': 10,
			'ds': 100,
			's': 1000,
			'das': 10000,
			'hs': 100000,
			'ks': 1000000
		},
		timeParse: function(value) {
			if (value == undefined || value == null)
				return null;
			var result = this.regex.exec(jQuery.trim(value.toString()));
			if (result[2]) {
				var num = parseFloat(result[1]);
				var mult = this.powers[result[2]] || 1;
				return num * mult;
			} else {
				return value;
			}
		},
		add: function(element, interval, label, fn, times, belay) {
			var counter = 0;
			
			if (jQuery.isFunction(label)) {
				if (!times) 
					times = fn;
				fn = label;
				label = interval;
			}
			
			interval = jQuery.timer.timeParse(interval);

			if (typeof interval != 'number' || isNaN(interval) || interval <= 0)
				return;

			if (times && times.constructor != Number) {
				belay = !!times;
				times = 0;
			}
			
			times = times || 0;
			belay = belay || false;
			
			var timers = jQuery.data(element, this.dataKey) || jQuery.data(element, this.dataKey, {});
			
			if (!timers[label])
				timers[label] = {};
			
			fn.timerID = fn.timerID || this.guid++;
			
			var handler = function() {
				if (belay && this.inProgress) 
					return;
				this.inProgress = true;
				if ((++counter > times && times !== 0) || fn.call(element, counter) === false)
					jQuery.timer.remove(element, label, fn);
				this.inProgress = false;
			};
			
			handler.timerID = fn.timerID;
			
			if (!timers[label][fn.timerID])
				timers[label][fn.timerID] = window.setInterval(handler,interval);
			
			this.global.push( element );
			
		},
		remove: function(element, label, fn) {
			var timers = jQuery.data(element, this.dataKey), ret;
			
			if ( timers ) {
				
				if (!label) {
					for ( label in timers )
						this.remove(element, label, fn);
				} else if ( timers[label] ) {
					if ( fn ) {
						if ( fn.timerID ) {
							window.clearInterval(timers[label][fn.timerID]);
							delete timers[label][fn.timerID];
						}
					} else {
						for ( var fn in timers[label] ) {
							window.clearInterval(timers[label][fn]);
							delete timers[label][fn];
						}
					}
					
					for ( ret in timers[label] ) break;
					if ( !ret ) {
						ret = null;
						delete timers[label];
					}
				}
				
				for ( ret in timers ) break;
				if ( !ret ) 
					jQuery.removeData(element, this.dataKey);
			}
		}
	}
});

jQuery(window).bind("unload", function() {
	jQuery.each(jQuery.timer.global, function(index, item) {
		jQuery.timer.remove(item);
	});
});

/*
## vBegin
## 
## Copyright 2008, 2009, 2010 ECLYDRE <ewm@eclydre.fr>
## This file is part of Eclydre Web Manager.
## 
## Eclydre Web Manager is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
## 
## Eclydre Web Manager is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
## 
## You should have received a copy of the GNU General Public License
## along with Eclydre Web Manager.  If not, see <http://www.gnu.org/licenses/>.
## 
## This copyright notice MUST APPEAR in all copies of the script!  
## 
## Eclydre Web Manager v2.0.0
## Dateversion 2010-08-01
## File : ../core//js/AC_ActiveX.js
## Changelogs : nc;
## vEnd
*/
//v1.1
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AX_RunContent(){
  var ret = AC_AX_GetArgs(arguments);
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_AX_GetArgs(args){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "pluginspage":
      case "type":
      case "src":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "data":
      case "codebase":
      case "classid":
      case "id":
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  return ret;
}


/*
## vBegin
## 
## Copyright 2008, 2009, 2010 ECLYDRE <ewm@eclydre.fr>
## This file is part of Eclydre Web Manager.
## 
## Eclydre Web Manager is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
## 
## Eclydre Web Manager is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
## 
## You should have received a copy of the GNU General Public License
## along with Eclydre Web Manager.  If not, see <http://www.gnu.org/licenses/>.
## 
## This copyright notice MUST APPEAR in all copies of the script!  
## 
## Eclydre Web Manager v2.0.0
## Dateversion 2010-08-01
## File : ../core//js/AC_RunActiveContent.js
## Changelogs : nc;
## vEnd
*/
//v1.7
// Flash Player Version Detection
// Detect Client Browser type
// Copyright 2005-2007 Adobe Systems Incorporated.  All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");			
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			var versionRevision = descArray[3];
			if (versionRevision == "") {
				versionRevision = descArray[4];
			}
			if (versionRevision[0] == "d") {
				versionRevision = versionRevision.substring(1);
			} else if (versionRevision[0] == "r") {
				versionRevision = versionRevision.substring(1);
				if (versionRevision.indexOf("d") > 0) {
					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
				}
			}
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '';
  if (isIE && isWin && !isOpera)
  {
    str += '<object ';
    for (var i in objAttrs)
    {
      str += i + '="' + objAttrs[i] + '" ';
    }
    str += '>';
    for (var i in params)
    {
      str += '<param name="' + i + '" value="' + params[i] + '" /> ';
    }
    str += '</object>';
  }
  else
  {
    str += '<embed ';
    for (var i in embedAttrs)
    {
      str += i + '="' + embedAttrs[i] + '" ';
    }
    str += '> </embed>';
  }
	//alert(str);
  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblclick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
      case "id":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}

