Function.__typeName="Function";Function.__class=true;Function.createCallback=function(b,a){return function(){var e=arguments.length;if(e>0){var d=[];for(var c=0;cc){var f=Error.parameterCount();f.popStackFrame();return f}return null};Function._validateParameter=function(c,a,h){var b,g=a.type,l=!!a.integer,k=!!a.domElement,m=!!a.mayBeNull;b=Function._validateParameterType(c,g,l,k,m,h);if(b){b.popStackFrame();return b}var e=a.elementType,f=!!a.elementMayBeNull;if(g===Array&&typeof c!=="undefined"&&c!==null&&(e||!f)){var j=!!a.elementInteger,i=!!a.elementDomElement;for(var d=0;dc.Calendar.TwoDigitYearMax)return a-100}return a};Date._getParseRegExp=function(b,e){if(!b._parseRegExp)b._parseRegExp={};else if(b._parseRegExp[e])return b._parseRegExp[e];var c=Date._expandFormat(b,e);c=c.replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1");var a=new Sys.StringBuilder("^"),j=[],f=0,i=0,h=Date._getTokenRegExp(),d;while((d=h.exec(c))!==null){var l=c.slice(f,d.index);f=h.lastIndex;i+=Date._appendPreOrPostMatch(l,a);if(i%2===1){a.append(d[0]);continue}switch(d[0]){case"dddd":case"ddd":case"MMMM":case"MMM":a.append("(\\D+)");break;case"tt":case"t":a.append("(\\D*)");break;case"yyyy":a.append("(\\d{4})");break;case"fff":a.append("(\\d{3})");break;case"ff":a.append("(\\d{2})");break;case"f":a.append("(\\d)");break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":a.append("(\\d\\d?)");break;case"zzz":a.append("([+-]?\\d\\d?:\\d{2})");break;case"zz":case"z":a.append("([+-]?\\d\\d?)");break}Array.add(j,d[0])}Date._appendPreOrPostMatch(c.slice(f),a);a.append("$");var k=a.toString().replace(/\s+/g,"\\s+"),g={"regExp":k,"groups":j};b._parseRegExp[e]=g;return g};Date._getTokenRegExp=function(){return/dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z/g};Date.parseLocale=function(a){return Date._parse(a,Sys.CultureInfo.CurrentCulture,arguments)};Date.parseInvariant=function(a){return Date._parse(a,Sys.CultureInfo.InvariantCulture,arguments)};Date._parse=function(g,c,h){var e=false;for(var a=1,i=h.length;a31)return null;break;case"MMMM":c=j._getMonthIndex(a);if(c<0||c>11)return null;break;case"MMM":c=j._getAbbrMonthIndex(a);if(c<0||c>11)return null;break;case"M":case"MM":var c=Date._parseInt(a)-1;if(c<0||c>11)return null;break;case"y":case"yy":f=Date._expandYear(m,Date._parseInt(a));if(f<0||f>9999)return null;break;case"yyyy":f=Date._parseInt(a);if(f<0||f>9999)return null;break;case"h":case"hh":d=Date._parseInt(a);if(d===12)d=0;if(d<0||d>11)return null;break;case"H":case"HH":d=Date._parseInt(a);if(d<0||d>23)return null;break;case"m":case"mm":n=Date._parseInt(a);if(n<0||n>59)return null;break;case"s":case"ss":o=Date._parseInt(a);if(o<0||o>59)return null;break;case"tt":case"t":var u=a.toUpperCase();r=u===m.PMDesignator.toUpperCase();if(!r&&u!==m.AMDesignator.toUpperCase())return null;break;case"f":e=Date._parseInt(a)*100;if(e<0||e>999)return null;break;case"ff":e=Date._parseInt(a)*10;if(e<0||e>999)return null;break;case"fff":e=Date._parseInt(a);if(e<0||e>999)return null;break;case"dddd":g=j._getDayIndex(a);if(g<0||g>6)return null;break;case"ddd":g=j._getAbbrDayIndex(a);if(g<0||g>6)return null;break;case"zzz":var q=a.split(/:/);if(q.length!==2)return null;var i=Date._parseInt(q[0]);if(i<-12||i>13)return null;var l=Date._parseInt(q[1]);if(l<0||l>59)return null;k=i*60+(a.startsWith("-")?-l:l);break;case"z":case"zz":var i=Date._parseInt(a);if(i<-12||i>13)return null;k=i*60;break}}var b=new Date;if(f===null)f=b.getFullYear();if(c===null)c=b.getMonth();if(h===null)h=b.getDate();b.setFullYear(f,c,h);if(b.getDate()!==h)return null;if(g!==null&&b.getDay()!==g)return null;if(r&&d<12)d+=12;b.setHours(d,n,o,e);if(k!==null){var t=b.getMinutes()-(k+b.getTimezoneOffset());b.setHours(b.getHours()+parseInt(t/60),t%60)}return b}};Date._parseInt=function(a){return parseInt(a.replace(/^[\s0]+(\d+)$/,"$1"))};Date.prototype.format=function(a){return this._toFormattedString(a,Sys.CultureInfo.InvariantCulture)};Date.prototype.localeFormat=function(a){return this._toFormattedString(a,Sys.CultureInfo.CurrentCulture)};Date.prototype._toFormattedString=function(e,h){if(!e||e.length===0||e==="i")if(h&&h.name.length>0)return this.toLocaleString();else return this.toString();var d=h.dateTimeFormat;e=Date._expandFormat(d,e);var a=new Sys.StringBuilder,b;function c(a){if(a<10)return"0"+a;return a.toString()}function g(a){if(a<10)return"00"+a;if(a<100)return"0"+a;return a.toString()}var j=0,i=Date._getTokenRegExp();for(;true;){var l=i.lastIndex,f=i.exec(e),k=e.slice(l,f?f.index:e.length);j+=Date._appendPreOrPostMatch(k,a);if(!f)break;if(j%2===1){a.append(f[0]);continue}switch(f[0]){case"dddd":a.append(d.DayNames[this.getDay()]);break;case"ddd":a.append(d.AbbreviatedDayNames[this.getDay()]);break;case"dd":a.append(c(this.getDate()));break;case"d":a.append(this.getDate());break;case"MMMM":a.append(d.MonthNames[this.getMonth()]);break;case"MMM":a.append(d.AbbreviatedMonthNames[this.getMonth()]);break;case"MM":a.append(c(this.getMonth()+1));break;case"M":a.append(this.getMonth()+1);break;case"yyyy":a.append(this.getFullYear());break;case"yy":a.append(c(this.getFullYear()%100));break;case"y":a.append(this.getFullYear()%100);break;case"hh":b=this.getHours()%12;if(b===0)b=12;a.append(c(b));break;case"h":b=this.getHours()%12;if(b===0)b=12;a.append(b);break;case"HH":a.append(c(this.getHours()));break;case"H":a.append(this.getHours());break;case"mm":a.append(c(this.getMinutes()));break;case"m":a.append(this.getMinutes());break;case"ss":a.append(c(this.getSeconds()));break;case"s":a.append(this.getSeconds());break;case"tt":a.append(this.getHours()<12?d.AMDesignator:d.PMDesignator);break;case"t":a.append((this.getHours()<12?d.AMDesignator:d.PMDesignator).charAt(0));break;case"f":a.append(g(this.getMilliseconds()).charAt(0));break;case"ff":a.append(g(this.getMilliseconds()).substr(0,2));break;case"fff":a.append(g(this.getMilliseconds()));break;case"z":b=this.getTimezoneOffset()/60;a.append((b>=0?"+":"-")+Math.floor(Math.abs(b)));break;case"zz":b=this.getTimezoneOffset()/60;a.append((b>=0?"+":"-")+c(Math.floor(Math.abs(b))));break;case"zzz":b=this.getTimezoneOffset()/60;a.append((b>=0?"+":"-")+c(Math.floor(Math.abs(b)))+d.TimeSeparator+c(Math.abs(this.getTimezoneOffset()%60)));break}}return a.toString()};Number.__typeName="Number";Number.__class=true;Number.parseLocale=function(a){return Number._parse(a,Sys.CultureInfo.CurrentCulture)};Number.parseInvariant=function(a){return Number._parse(a,Sys.CultureInfo.InvariantCulture)};Number._parse=function(g,f){var a=g.trim();if(a.match(/infinity/i)!==null)return parseFloat(a);if(a.match(/^0x[a-f0-9]+$/i)!==null)return parseInt(a);var d=f.numberFormat,b=d.NumberDecimalSeparator,c=d.NumberGroupSeparator,e=new RegExp("^[+-]?[\\d\\"+c+"]*\\"+b+"?\\d*([eE][+-]?\\d+)?$");if(!a.match(e))return Number.NaN;a=a.split(c).join("");a=a.replace(b,".");return parseFloat(a)};Number.prototype.format=function(a){return this._toFormattedString(a,Sys.CultureInfo.InvariantCulture)};Number.prototype.localeFormat=function(a){return this._toFormattedString(a,Sys.CultureInfo.CurrentCulture)};Number.prototype._toFormattedString=function(d,j){if(!d||d.length===0||d==="i")if(j&&j.name.length>0)return this.toLocaleString();else return this.toString();var q=["n %","n%","%n"],p=["-n %","-n%","-%n"],r=["(n)","-n","- n","n-","n -"],o=["$n","n$","$ n","n $"],n=["($n)","-$n","$-n","$n-","(n$)","-n$","n-$","n$-","-n $","-$ n","n $-","$ n-","$ -n","n- $","($ n)","(n $)"];function i(p,k,j,l,o){var e=j[0],g=1,c=p.toString(),a="",m="",i=c.split(".");if(i.length>1){c=i[0];a=i[1];var h=a.split(/e/i);if(h.length>1){a=h[0];m="e"+h[1]}}if(k>0){var f=a.length-k;if(f>0)a=a.slice(0,k);else if(f<0)for(var n=0;n=0){if(e===0||e>b)if(d.length>0)return c.slice(0,b+1)+l+d+a;else return c.slice(0,b+1)+a;if(d.length>0)d=c.slice(b-e+1,b+1)+l+d;else d=c.slice(b-e+1,b+1);b-=e;if(g1)b=parseInt(d.slice(1));var c;switch(d.charAt(0)){case"d":case"D":c="n";if(b!==-1){var g=""+e,k=b-g.length;if(k>0)for(var m=0;m=0};Array.dequeue=function(a){return a.shift()};Array.forEach=function(b,e,d){for(var a=0,f=b.length;a=0)b.splice(a,1);return a>=0};Array.removeAt=function(a,b){a.splice(b,1)};String.__typeName="String";String.__class=true;String.prototype.endsWith=function(a){return this.substr(this.length-a.length)===a};String.prototype.startsWith=function(a){return this.substr(0,a.length)===a};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.trimEnd=function(){return this.replace(/\s+$/,"")};String.prototype.trimStart=function(){return this.replace(/^\s+/,"")};String.format=function(){return String._toFormattedString(false,arguments)};String.localeFormat=function(){return String._toFormattedString(true,arguments)};String._toFormattedString=function(l,j){var c="",e=j[0];for(var a=0;true;){var f=e.indexOf("{",a),d=e.indexOf("}",a);if(f<0&&d<0){c+=e.slice(a);break}if(d>0&&(d-1){Sys.Browser.agent=Sys.Browser.InternetExplorer;Sys.Browser.version=parseFloat(navigator.userAgent.match(/MSIE (\d+\.\d+)/)[1]);Sys.Browser.hasDebuggerStatement=true}else if(navigator.userAgent.indexOf(" Firefox/")>-1){Sys.Browser.agent=Sys.Browser.Firefox;Sys.Browser.version=parseFloat(navigator.userAgent.match(/Firefox\/(\d+\.\d+)/)[1]);Sys.Browser.name="Firefox";Sys.Browser.hasDebuggerStatement=true}else if(navigator.userAgent.indexOf(" Safari/")>-1){Sys.Browser.agent=Sys.Browser.Safari;Sys.Browser.version=parseFloat(navigator.userAgent.match(/Safari\/(\d+\.\d+)/)[1]);Sys.Browser.name="Safari"}else if(navigator.userAgent.indexOf("Opera/")>-1)Sys.Browser.agent=Sys.Browser.Opera;Type.registerNamespace("Sys.UI");Sys._Debug=function(){};Sys._Debug.prototype={_appendConsole:function(a){if(typeof Debug!=="undefined"&&Debug.writeln)Debug.writeln(a);if(window.console&&window.console.log)window.console.log(a);if(window.opera)window.opera.postError(a);if(window.debugService)window.debugService.trace(a)},_appendTrace:function(b){var a=document.getElementById("TraceConsole");if(a&&a.tagName.toUpperCase()==="TEXTAREA")a.value+=b+"\n"},assert:function(c,a,b){if(!c){a=b&&this.assert.caller?String.format(Sys.Res.assertFailedCaller,a,this.assert.caller):String.format(Sys.Res.assertFailed,a);if(confirm(String.format(Sys.Res.breakIntoDebugger,a)))this.fail(a)}},clearTrace:function(){var a=document.getElementById("TraceConsole");if(a&&a.tagName.toUpperCase()==="TEXTAREA")a.value=""},fail:function(message){this._appendConsole(message);if(Sys.Browser.hasDebuggerStatement)eval("debugger")},trace:function(a){this._appendConsole(a);this._appendTrace(a)},traceDump:function(a,b){var c=this._traceDump(a,b,true)},_traceDump:function(a,c,f,b,d){c=c?c:"traceDump";b=b?b:"";if(a===null){this.trace(b+c+": null");return}switch(typeof a){case"undefined":this.trace(b+c+": Undefined");break;case"number":case"string":case"boolean":this.trace(b+c+": "+a);break;default:if(Date.isInstanceOfType(a)||RegExp.isInstanceOfType(a)){this.trace(b+c+": "+a.toString());break}if(!d)d=[];else if(Array.contains(d,a)){this.trace(b+c+": ...");return}Array.add(d,a);if(a==window||a===document||window.HTMLElement&&a instanceof HTMLElement||typeof a.nodeName==="string"){var k=a.tagName?a.tagName:"DomElement";if(a.id)k+=" - "+a.id;this.trace(b+c+" {"+k+"}")}else{var i=Object.getTypeName(a);this.trace(b+c+(typeof i==="string"?" {"+i+"}":""));if(b===""||f){b+=" ";var e,j,l,g,h;if(Array.isInstanceOfType(a)){j=a.length;for(e=0;e=0;d--){var k=h[d].trim();b=a[k];if(typeof b!=="number")throw Error.argument("value",String.format(Sys.Res.enumInvalidValue,c.split(",")[d].trim(),this.__typeName));j|=b}return j}}function Sys$Enum$toString(c){if(typeof c==="undefined"||c===null)return this.__string;var d=this.prototype,a;if(!this.__flags||c===0){for(a in d)if(d[a]===c)return a}else{var b=this.__sortedValues;if(!b){b=[];for(a in d)b[b.length]={key:a,value:d[a]};b.sort(function(a,b){return a.value-b.value});this.__sortedValues=b}var e=[],g=c;for(a=b.length-1;a>=0;a--){var h=b[a],f=h.value;if(f===0)continue;if((f&c)===f){e[e.length]=h.key;g-=f;if(g===0)break}}if(e.length&&g===0)return e.reverse().join(", ")}return""}Type.prototype.registerEnum=function(c,b){for(var a in this.prototype)this[a]=this.prototype[a];this.__typeName=c;this.parse=Sys$Enum$parse;this.__string=this.toString();this.toString=Sys$Enum$toString;this.__flags=b;this.__enum=true};Type.isEnum=function(a){if(typeof a==="undefined"||a===null)return false;return!!a.__enum};Type.isFlags=function(a){if(typeof a==="undefined"||a===null)return false;return!!a.__flags};Sys.EventHandlerList=function(){this._list={}};Sys.EventHandlerList.prototype={addHandler:function(b,a){Array.add(this._getEvent(b,true),a)},removeHandler:function(c,b){var a=this._getEvent(c);if(!a)return;Array.remove(a,b)},getHandler:function(b){var a=this._getEvent(b);if(!a||a.length===0)return null;a=Array.clone(a);if(!a._handler)a._handler=function(c,d){for(var b=0,e=a.length;b=0;c--)$removeHandler(a,b,d[c].handler)}a._events=null}},$removeHandler=Sys.UI.DomEvent.removeHandler=function(a,e,f){var d=null,c=a._events[e],d=null;for(var b=0,g=c.length;b0)this._timeoutCookie=window.setTimeout(Function.createDelegate(this,this._scriptLoadTimeoutHandler),a*1000);this._loadScriptsInternal()},notifyScriptLoaded:function(){if(!this._loading)return;this._currentTask._notified++;if(Sys.Browser.agent===Sys.Browser.Safari)if(this._currentTask._notified===1)window.setTimeout(Function.createDelegate(this,function(){this._scriptLoadedHandler(this._currentTask.get_scriptElement(),true)}),0)},queueCustomScriptTag:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,a)},queueScriptBlock:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,{text:a})},queueScriptReference:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,{src:a})},_createScriptElement:function(c){var a=document.createElement("SCRIPT");a.type="text/javascript";for(var b in c)a[b]=c[b];return a},_loadScriptsInternal:function(){if(this._scriptsToLoad&&this._scriptsToLoad.length>0){var b=Array.dequeue(this._scriptsToLoad),a=this._createScriptElement(b);if(a.text&&Sys.Browser.agent===Sys.Browser.Safari){a.innerHTML=a.text;delete a.text}if(typeof b.src==="string"){this._currentTask=new Sys._ScriptLoaderTask(a,this._scriptLoadedDelegate);this._currentTask.execute()}else{document.getElementsByTagName("HEAD")[0].appendChild(a);Sys._ScriptLoader._clearScript(a);this._loadScriptsInternal()}}else{var c=this._allScriptsLoadedCallback;this._stopLoading();if(c)c(this)}},_raiseError:function(a){var c=this._scriptLoadFailedCallback,b=this._currentTask.get_scriptElement();this._stopLoading();if(c)c(this,b,a);else throw Sys._ScriptLoader._errorScriptLoadFailed(b.src,a)},_scriptLoadedHandler:function(a,b){if(b&&this._currentTask._notified)if(this._currentTask._notified>1)this._raiseError(true);else{Array.add(Sys._ScriptLoader._getLoadedScripts(),a.src);this._currentTask.dispose();this._currentTask=null;this._loadScriptsInternal()}else this._raiseError(false)},_scriptLoadTimeoutHandler:function(){var a=this._scriptLoadTimeoutCallback;this._stopLoading();if(a)a(this)},_stopLoading:function(){if(this._timeoutCookie){window.clearTimeout(this._timeoutCookie);this._timeoutCookie=null}if(this._currentTask){this._currentTask.dispose();this._currentTask=null}this._scriptsToLoad=null;this._loading=null;this._allScriptsLoadedCallback=null;this._scriptLoadFailedCallback=null;this._scriptLoadTimeoutCallback=null}};Sys._ScriptLoader.registerClass("Sys._ScriptLoader",null,Sys.IDisposable);Sys._ScriptLoader.getInstance=function(){var a=Sys._ScriptLoader._activeInstance;if(!a)a=Sys._ScriptLoader._activeInstance=new Sys._ScriptLoader;return a};Sys._ScriptLoader.isScriptLoaded=function(b){var a=document.createElement("script");a.src=b;return Array.contains(Sys._ScriptLoader._getLoadedScripts(),a.src)};Sys._ScriptLoader.readLoadedScripts=function(){if(!Sys._ScriptLoader._referencedScripts){var b=Sys._ScriptLoader._referencedScripts=[],c=document.getElementsByTagName("SCRIPT");for(i=c.length-1;i>=0;i--){var d=c[i],a=d.src;if(a.length)if(!Array.contains(b,a))Array.add(b,a)}}};Sys._ScriptLoader._clearScript=function(a){if(!Sys.Debug.isDebug)a.parentNode.removeChild(a)};Sys._ScriptLoader._errorScriptLoadFailed=function(b,d){var a;if(d)a=Sys.Res.scriptLoadMultipleCallbacks;else a=Sys.Res.scriptLoadFailed;var e="Sys.ScriptLoadFailedException: "+String.format(a,b),c=Error.create(e,{name:"Sys.ScriptLoadFailedException","scriptUrl":b});c.popStackFrame();return c};Sys._ScriptLoader._getLoadedScripts=function(){if(!Sys._ScriptLoader._referencedScripts){Sys._ScriptLoader._referencedScripts=[];Sys._ScriptLoader.readLoadedScripts()}return Sys._ScriptLoader._referencedScripts};Sys._ScriptLoaderTask=function(b,a){this._scriptElement=b;this._completedCallback=a;this._notified=0};Sys._ScriptLoaderTask.prototype={get_scriptElement:function(){return this._scriptElement},dispose:function(){if(this._disposed)return;this._disposed=true;this._removeScriptElementHandlers();Sys._ScriptLoader._clearScript(this._scriptElement);this._scriptElement=null},execute:function(){this._addScriptElementHandlers();document.getElementsByTagName("HEAD")[0].appendChild(this._scriptElement)},_addScriptElementHandlers:function(){this._scriptLoadDelegate=Function.createDelegate(this,this._scriptLoadHandler);if(Sys.Browser.agent!==Sys.Browser.InternetExplorer){this._scriptElement.readyState="loaded";$addHandler(this._scriptElement,"load",this._scriptLoadDelegate)}else $addHandler(this._scriptElement,"readystatechange",this._scriptLoadDelegate);this._scriptErrorDelegate=Function.createDelegate(this,this._scriptErrorHandler);$addHandler(this._scriptElement,"error",this._scriptErrorDelegate)},_removeScriptElementHandlers:function(){if(this._scriptLoadDelegate){var a=this.get_scriptElement();if(Sys.Browser.agent!==Sys.Browser.InternetExplorer)$removeHandler(a,"load",this._scriptLoadDelegate);else $removeHandler(a,"readystatechange",this._scriptLoadDelegate);$removeHandler(a,"error",this._scriptErrorDelegate);this._scriptErrorDelegate=null;this._scriptLoadDelegate=null}},_scriptErrorHandler:function(){if(this._disposed)return;this._completedCallback(this.get_scriptElement(),false)},_scriptLoadHandler:function(){if(this._disposed)return;var a=this.get_scriptElement();if(a.readyState!=="loaded"&&a.readyState!=="complete")return;var b=this;window.setTimeout(function(){b._completedCallback(a,true)},0)}};Sys._ScriptLoaderTask.registerClass("Sys._ScriptLoaderTask",null,Sys.IDisposable);Sys.ApplicationLoadEventArgs=function(b,a){Sys.ApplicationLoadEventArgs.initializeBase(this);this._components=b;this._isPartialLoad=a};Sys.ApplicationLoadEventArgs.prototype={get_components:function(){return this._components},get_isPartialLoad:function(){return this._isPartialLoad}};Sys.ApplicationLoadEventArgs.registerClass("Sys.ApplicationLoadEventArgs",Sys.EventArgs);Sys._Application=function(){Sys._Application.initializeBase(this);this._disposableObjects=[];this._components={};this._createdComponents=[];this._secondPassComponents=[];this._unloadHandlerDelegate=Function.createDelegate(this,this._unloadHandler);this._loadHandlerDelegate=Function.createDelegate(this,this._loadHandler);Sys.UI.DomEvent.addHandler(window,"unload",this._unloadHandlerDelegate);Sys.UI.DomEvent.addHandler(window,"load",this._loadHandlerDelegate)};Sys._Application.prototype={_creatingComponents:false,_disposing:false,get_isCreatingComponents:function(){return this._creatingComponents},add_load:function(a){this.get_events().addHandler("load",a)},remove_load:function(a){this.get_events().removeHandler("load",a)},add_init:function(a){if(this._initialized)a(this,Sys.EventArgs.Empty);else this.get_events().addHandler("init",a)},remove_init:function(a){this.get_events().removeHandler("init",a)},add_unload:function(a){this.get_events().addHandler("unload",a)},remove_unload:function(a){this.get_events().removeHandler("unload",a)},addComponent:function(a){this._components[a.get_id()]=a},beginCreateComponents:function(){this._creatingComponents=true},dispose:function(){if(!this._disposing){this._disposing=true;if(window.pageUnload)window.pageUnload(this,Sys.EventArgs.Empty);var c=this.get_events().getHandler("unload");if(c)c(this,Sys.EventArgs.Empty);var b=Array.clone(this._disposableObjects);for(var a=0,e=b.length;a0)this._timer=window.setTimeout(Function.createDelegate(this,this._onTimeout),d);this._xmlHttpRequest.send(c);this._started=true},getResponseHeader:function(b){var a;try{a=this._xmlHttpRequest.getResponseHeader(b)}catch(c){}if(!a)a="";return a},getAllResponseHeaders:function(){return this._xmlHttpRequest.getAllResponseHeaders()},get_responseData:function(){return this._xmlHttpRequest.responseText},get_statusCode:function(){return this._xmlHttpRequest.status},get_statusText:function(){return this._xmlHttpRequest.statusText},get_xml:function(){var a=this._xmlHttpRequest.responseXML;if(!a||!a.documentElement){a=new XMLDOM(this._xmlHttpRequest.responseText);if(!a||!a.documentElement)return null}else if(navigator.userAgent.indexOf("MSIE")!==-1)a.setProperty("SelectionLanguage","XPath");if(a.documentElement.namespaceURI==="http://www.mozilla.org/newlayout/xml/parsererror.xml"&&a.documentElement.tagName==="parsererror")return null;if(a.documentElement.firstChild&&a.documentElement.firstChild.tagName==="parsererror")return null;return a},abort:function(){if(this._aborted||this._responseAvailable||this._timedOut)return;this._aborted=true;this._clearTimer();if(this._xmlHttpRequest&&!this._responseAvailable){this._xmlHttpRequest.onreadystatechange=Function.emptyMethod;this._xmlHttpRequest.abort();this._xmlHttpRequest=null;var a=this._webRequest._get_eventHandlerList().getHandler("completed");if(a)a(this,Sys.EventArgs.Empty)}}};Sys.Net.XMLHttpExecutor.registerClass("Sys.Net.XMLHttpExecutor",Sys.Net.WebRequestExecutor);Sys.Net._WebRequestManager=function(){this._this=this;this._defaultTimeout=0;this._defaultExecutorType="Sys.Net.XMLHttpExecutor"};Sys.Net._WebRequestManager.prototype={add_invokingRequest:function(a){this._get_eventHandlerList().addHandler("invokingRequest",a)},remove_invokingRequest:function(a){this._get_eventHandlerList().removeHandler("invokingRequest",a)},add_completedRequest:function(a){this._get_eventHandlerList().addHandler("completedRequest",a)},remove_completedRequest:function(a){this._get_eventHandlerList().removeHandler("completedRequest",a)},_get_eventHandlerList:function(){if(!this._events)this._events=new Sys.EventHandlerList;return this._events},get_defaultTimeout:function(){return this._defaultTimeout},set_defaultTimeout:function(a){this._defaultTimeout=a},get_defaultExecutorType:function(){return this._defaultExecutorType},set_defaultExecutorType:function(a){this._defaultExecutorType=a},executeRequest:function(webRequest){var executor=webRequest.get_executor();if(!executor){var failed=false;try{var executorType=eval(this._defaultExecutorType);executor=new executorType}catch(a){failed=true}webRequest.set_executor(executor)}if(executor.get_aborted())return;var evArgs=new Sys.Net.NetworkRequestEventArgs(webRequest),handler=this._get_eventHandlerList().getHandler("invokingRequest");if(handler)handler(this,evArgs);if(!evArgs.get_cancel())executor.executeRequest()}};Sys.Net._WebRequestManager.registerClass("Sys.Net._WebRequestManager");Sys.Net.WebRequestManager=new Sys.Net._WebRequestManager;Sys.Net.NetworkRequestEventArgs=function(a){Sys.Net.NetworkRequestEventArgs.initializeBase(this);this._webRequest=a};Sys.Net.NetworkRequestEventArgs.prototype={get_webRequest:function(){return this._webRequest}};Sys.Net.NetworkRequestEventArgs.registerClass("Sys.Net.NetworkRequestEventArgs",Sys.CancelEventArgs);Sys.Net.WebRequest=function(){this._url="";this._headers={};this._body=null;this._userContext=null;this._httpVerb=null;this._executor=null;this._invokeCalled=false;this._timeout=0};Sys.Net.WebRequest.prototype={add_completed:function(a){this._get_eventHandlerList().addHandler("completed",a)},remove_completed:function(a){this._get_eventHandlerList().removeHandler("completed",a)},completed:function(b){var a=Sys.Net.WebRequestManager._get_eventHandlerList().getHandler("completedRequest");if(a)a(this._executor,b);a=this._get_eventHandlerList().getHandler("completed");if(a)a(this._executor,b)},_get_eventHandlerList:function(){if(!this._events)this._events=new Sys.EventHandlerList;return this._events},get_url:function(){return this._url},set_url:function(a){this._url=a},get_headers:function(){return this._headers},get_httpVerb:function(){if(this._httpVerb===null){if(this._body===null)return"GET";return"POST"}return this._httpVerb},set_httpVerb:function(a){this._httpVerb=a},get_body:function(){return this._body},set_body:function(a){this._body=a},get_userContext:function(){return this._userContext},set_userContext:function(a){this._userContext=a},get_executor:function(){return this._executor},set_executor:function(a){this._executor=a;this._executor._set_webRequest(this)},get_timeout:function(){if(this._timeout===0)return Sys.Net.WebRequestManager.get_defaultTimeout();return this._timeout},set_timeout:function(a){this._timeout=a},getResolvedUrl:function(){return Sys.Net.WebRequest._resolveUrl(this._url)},invoke:function(){Sys.Net.WebRequestManager.executeRequest(this);this._invokeCalled=true}};Sys.Net.WebRequest._resolveUrl=function(b,a){if(b&&b.indexOf("://")!==-1)return b;if(!a||a.length===0){var c=document.getElementsByTagName("base")[0];if(c&&c.href&&c.href.length>0)a=c.href;else a=document.URL}var d=a.indexOf("?");if(d!==-1)a=a.substr(0,d);a=a.substr(0,a.lastIndexOf("/")+1);if(!b||b.length===0)return a;if(b.charAt(0)==="/"){var e=a.indexOf("://"),g=a.indexOf("/",e+3);return a.substr(0,g)+b}else{var f=a.lastIndexOf("/");return a.substr(0,f+1)+b}};Sys.Net.WebRequest._createQueryString=function(d,b){if(!b)b=encodeURIComponent;var a=new Sys.StringBuilder,f=0;for(var c in d){var e=d[c];if(typeof e==="function")continue;var g=Sys.Serialization.JavaScriptSerializer.serialize(e);if(f!==0)a.append("&");a.append(c);a.append("=");a.append(b(g));f++}return a.toString()};Sys.Net.WebRequest._createUrl=function(a,b){if(!b)return a;var d=Sys.Net.WebRequest._createQueryString(b);if(d.length>0){var c="?";if(a&&a.indexOf("?")!==-1)c="&";return a+c+d}else return a};Sys.Net.WebRequest.registerClass("Sys.Net.WebRequest");Sys.Net.WebServiceProxy=function(){};Sys.Net.WebServiceProxy.prototype={set_timeout:function(a){this._timeout=a},get_timeout:function(){return this._timeout},set_defaultUserContext:function(a){this._userContext=a},get_defaultUserContext:function(){return this._userContext},set_defaultSucceededCallback:function(a){this._succeeded=a},get_defaultSucceededCallback:function(){return this._succeeded},set_defaultFailedCallback:function(a){this._failed=a},get_defaultFailedCallback:function(){return this._failed},set_path:function(a){this._path=a},get_path:function(){return this._path},_invoke:function(d,e,g,f,c,b,a){if(c===null||typeof c==="undefined")c=this.get_defaultSucceededCallback();if(b===null||typeof b==="undefined")b=this.get_defaultFailedCallback();if(a===null||typeof a==="undefined")a=this.get_defaultUserContext();return Sys.Net.WebServiceProxy.invoke(d,e,g,f,c,b,a,this.get_timeout())}};Sys.Net.WebServiceProxy.registerClass("Sys.Net.WebServiceProxy");Sys.Net.WebServiceProxy.invoke=function(k,a,j,d,i,c,f,h){var b=new Sys.Net.WebRequest;b.get_headers()["Content-Type"]="application/json; charset=utf-8";if(!d)d={};var g=d;if(!j||!g)g={};b.set_url(Sys.Net.WebRequest._createUrl(k+"/"+a,g));var e=null;if(!j){e=Sys.Serialization.JavaScriptSerializer.serialize(d);if(e==="{}")e=""}b.set_body(e);b.add_completed(l);if(h&&h>0)b.set_timeout(h);b.invoke();function l(d){if(d.get_responseAvailable()){var e=d.get_statusCode(),b=null;try{var j=d.getResponseHeader("Content-Type");if(j.startsWith("application/json"))b=d.get_object();else if(j.startsWith("text/xml"))b=d.get_xml();else b=d.get_responseData()}catch(m){}var k=d.getResponseHeader("jsonerror"),g=k==="true";if(g)b=new Sys.Net.WebServiceError(false,b.Message,b.StackTrace,b.ExceptionType);if(e<200||e>=300||g){if(c){if(!b||!g)b=new Sys.Net.WebServiceError(false,String.format(Sys.Res.webServiceFailedNoMsg,a),"","");b._statusCode=e;c(b,f,a)}}else if(i)i(b,f,a)}else{var h;if(d.get_timedOut())h=String.format(Sys.Res.webServiceTimedOut,a);else h=String.format(Sys.Res.webServiceFailedNoMsg,a);if(c)c(new Sys.Net.WebServiceError(d.get_timedOut(),h,"",""),f,a)}}return b};Sys.Net.WebServiceProxy._generateTypedConstructor=function(a){return function(b){if(b)for(var c in b)this[c]=b[c];this.__type=a}};Sys.Net.WebServiceError=function(c,d,b,a){this._timedOut=c;this._message=d;this._stackTrace=b;this._exceptionType=a;this._statusCode=-1};Sys.Net.WebServiceError.prototype={get_timedOut:function(){return this._timedOut},get_statusCode:function(){return this._statusCode},get_message:function(){return this._message},get_stackTrace:function(){return this._stackTrace},get_exceptionType:function(){return this._exceptionType}};Sys.Net.WebServiceError.registerClass("Sys.Net.WebServiceError");Type.registerNamespace("Sys.Services");Sys.Services._ProfileService=function(){Sys.Services._ProfileService.initializeBase(this);this.properties={}};Sys.Services._ProfileService.DefaultWebServicePath="";Sys.Services._ProfileService.prototype={_defaultFailedCallback:null,_defaultLoadCompletedCallback:null,_defaultSaveCompletedCallback:null,_path:"",_timeout:0,get_defaultFailedCallback:function(){return this._defaultFailedCallback},set_defaultFailedCallback:function(a){this._defaultFailedCallback=a},get_defaultLoadCompletedCallback:function(){return this._defaultLoadCompletedCallback},set_defaultLoadCompletedCallback:function(a){this._defaultLoadCompletedCallback=a},get_defaultSaveCompletedCallback:function(){return this._defaultSaveCompletedCallback},set_defaultSaveCompletedCallback:function(a){this._defaultSaveCompletedCallback=a},get_path:function(){return this._path},set_path:function(a){if(!a||!a.length)a="";this._path=a},get_timeout:function(){return this._timeout},set_timeout:function(a){this._timeout=a},load:function(b,d,e,f){var c={},a;if(!b)a="GetAllPropertiesForCurrentUser";else{a="GetPropertiesForCurrentUser";c={properties:this._clonePropertyNames(b)}}this._invoke(this._get_path(),a,false,c,Function.createDelegate(this,this._onLoadComplete),Function.createDelegate(this,this._onLoadFailed),[d,e,f])},save:function(d,a,c,e){var b=this._flattenProperties(d,this.properties);this._invoke(this._get_path(),"SetPropertiesForCurrentUser",false,{values:b},Function.createDelegate(this,this._onSaveComplete),Function.createDelegate(this,this._onSaveFailed),[a,c,e])},_clonePropertyNames:function(e){var c=[],d={};for(var b=0;b0)a.append(",");Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(b[c],a)}a.append("]")}else{if(Date.isInstanceOfType(b)){a.append('"\\/Date(');a.append(b.getTime());a.append(')\\/"');break}var e=[],i=0;for(var g in b){if(g.startsWith("$"))continue;e[i++]=g}if(h)e.sort();a.append("{");var j=false;for(c=0;c=" "){if(d==="\\"||d==='"')a.append("\\");a.append(d)}else switch(d){case"\b":a.append("\\b");break;case"\f":a.append("\\f");break;case"\n":a.append("\\n");break;case"\r":a.append("\\r");break;case"\t":a.append("\\t");break;default:a.append("\\u00");if(d.charCodeAt()<16)a.append("0");a.append(d.charCodeAt().toString(16))}}}else a.append(b);a.append('"');break;case"boolean":a.append(b.toString());break;default:a.append("null");break}};Sys.Serialization.JavaScriptSerializer.serialize=function(b){var a=new Sys.StringBuilder;Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(b,a,false);return a.toString()};Sys.Serialization.JavaScriptSerializer.deserialize=function(data){if(data.length===0)throw Error.argument("data",Sys.Res.cannotDeserializeEmptyString);try{var exp=data.replace(new RegExp('(^|[^\\\\])\\"\\\\/Date\\((-?[0-9]+)\\)\\\\/\\"',"g"),"$1new Date($2)");return eval("("+exp+")")}catch(a){throw Error.argument("data",Sys.Res.cannotDeserializeInvalidJson)}};Sys.CultureInfo=function(c,b,a){this.name=c;this.numberFormat=b;this.dateTimeFormat=a};Sys.CultureInfo.prototype={_getDateTimeFormats:function(){if(!this._dateTimeFormats){var a=this.dateTimeFormat;this._dateTimeFormats=[a.MonthDayPattern,a.YearMonthPattern,a.ShortDatePattern,a.ShortTimePattern,a.LongDatePattern,a.LongTimePattern,a.FullDateTimePattern,a.RFC1123Pattern,a.SortableDateTimePattern,a.UniversalSortableDateTimePattern]}return this._dateTimeFormats},_getMonthIndex:function(a){if(!this._upperMonths)this._upperMonths=this._toUpperArray(this.dateTimeFormat.MonthNames);return Array.indexOf(this._upperMonths,this._toUpper(a))},_getAbbrMonthIndex:function(a){if(!this._upperAbbrMonths)this._upperAbbrMonths=this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames);return Array.indexOf(this._upperMonths,this._toUpper(a))},_getDayIndex:function(a){if(!this._upperDays)this._upperDays=this._toUpperArray(this.dateTimeFormat.DayNames);return Array.indexOf(this._upperDays,this._toUpper(a))},_getAbbrDayIndex:function(a){if(!this._upperAbbrDays)this._upperAbbrDays=this._toUpperArray(this.dateTimeFormat.AbbreviatedDayNames);return Array.indexOf(this._upperAbbrDays,this._toUpper(a))},_toUpperArray:function(c){var b=[];for(var a=0,d=c.length;a=0)d.className=(a.substr(0,b)+" "+a.substring(b+c.length+1,a.length)).trim()};Sys.UI.DomElement.setLocation=function(b,c,d){var a=b.style;a.position="absolute";a.left=c+"px";a.top=d+"px"};Sys.UI.DomElement.toggleCssClass=function(b,a){if(Sys.UI.DomElement.containsCssClass(b,a))Sys.UI.DomElement.removeCssClass(b,a);else Sys.UI.DomElement.addCssClass(b,a)};Sys.UI.DomElement._getCurrentStyle=function(a){var b=(a.ownerDocument?a.ownerDocument:a.documentElement).defaultView;return b&&a!==b&&b.getComputedStyle?b.getComputedStyle(a,null):a.style};Sys.UI.Behavior=function(b){Sys.UI.Behavior.initializeBase(this);this._element=b;var a=b._behaviors;if(!a)b._behaviors=[this];else a[a.length]=this};Sys.UI.Behavior.prototype={_name:null,get_element:function(){return this._element},get_id:function(){var a=Sys.UI.Behavior.callBaseMethod(this,"get_id");if(a)return a;if(!this._element||!this._element.id)return"";return this._element.id+"$"+this.get_name()},get_name:function(){if(this._name)return this._name;var a=Object.getTypeName(this),b=a.lastIndexOf(".");if(b!=-1)a=a.substr(b+1);if(!this.get_isInitialized())this._name=a;return a},set_name:function(a){this._name=a},initialize:function(){Sys.UI.Behavior.callBaseMethod(this,"initialize");var a=this.get_name();if(a)this._element[a]=this},dispose:function(){Sys.UI.Behavior.callBaseMethod(this,"dispose");if(this._element){var a=this.get_name();if(a)this._element[a]=null;Array.remove(this._element._behaviors,this);delete this._element}}};Sys.UI.Behavior.registerClass("Sys.UI.Behavior",Sys.Component);Sys.UI.Behavior.getBehaviorByName=function(b,c){var a=b[c];return a&&Sys.UI.Behavior.isInstanceOfType(a)?a:null};Sys.UI.Behavior.getBehaviors=function(a){if(!a._behaviors)return[];return Array.clone(a._behaviors)};Sys.UI.Behavior.getBehaviorsByType=function(d,e){var a=d._behaviors,c=[];if(a)for(var b=0,f=a.length;b0&&location.port!=80?(":"+location.port):"")+"";var PathInfo=location.href.substr(WwwRoot.length+1).split("/");var QueryStringSplit=PathInfo[PathInfo.length-1].split("?");var QueryString="";if(QueryStringSplit.length>1) {PathInfo[PathInfo.length-1]=QueryStringSplit[0];QueryString=QueryStringSplit[1];} Querystring={};if(QueryString.length!=0){var qsCollection=QueryString.split('&');for(var i=0;idocument.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;} var windowWidth,windowHeight;if(self.innerHeight){windowWidth=self.innerWidth;windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;} if(yScrollexitTime) {return;}}} function addEvent(myevent,scripttoadd) {if(typeof myevent!="function") {return new Function(scripttoadd+";");} myevent=myevent.toString();myevent=myevent.substring(myevent.indexOf("{")+1,myevent.lastIndexOf("}"));return new Function(scripttoadd+"; "+myevent);} function addEventAfter(myevent,scripttoadd) {if(typeof myevent!="function") {return new Function(scripttoadd+";");} myevent=myevent.toString();myevent=myevent.substring(myevent.indexOf("{")+1,myevent.lastIndexOf("}"));return new Function(myevent+"; "+scripttoadd);} function jsRound(val,decimals) {factor=Math.pow(10,decimals);return(Math.round(val*factor))/factor;} function ApplyReadOnly(exceptBodyMatchExp,exceptActionBarMatchExp) {var divContent=document.getElementById('content');if(divContent==undefined) return;var list_select=divContent.getElementsByTagName('select');var count=list_select.length;for(var index_select=count-1;index_select>=0;index_select--) {if(!list_select[index_select].name.match(exceptBodyMatchExp)&&isReadOnlySensitiv(list_select[index_select])) {selectReplacement(list_select[index_select]);}} var list_ref=divContent.getElementsByTagName('a');var count=list_ref.length;for(var index_ref=count-1;index_ref>=0;index_ref--) {if(!list_ref[index_ref].name.match(exceptBodyMatchExp)&&isReadOnlySensitiv(list_ref[index_ref])&&list_ref[index_ref].firstChild!=null&&list_ref[index_ref].firstChild.nodeName=="IMG"&&list_ref[index_ref].firstChild.src.search("ico_del.gif")!=-1) {refReplacement(list_ref[index_ref]);}} var list_textarea=divContent.getElementsByTagName('textarea');var count=list_textarea.length;for(var index_textarea=count-1;index_textarea>=0;index_textarea--) {if(!list_textarea[index_textarea].name.match(exceptBodyMatchExp)&&isReadOnlySensitiv(list_textarea[index_textarea])) {textareaReplacement(list_textarea[index_textarea]);}} var list_input=divContent.getElementsByTagName('input');var count=list_input.length;for(var index_input=count-1;index_input>=0;index_input--) {if(!list_input[index_input].name.match(exceptBodyMatchExp)) {if(list_input[index_input].type=="text"&&isReadOnlySensitiv(list_input[index_input])) {textReplacement(list_input[index_input]);} else if(list_input[index_input].type=="checkbox"&&isReadOnlySensitiv(list_input[index_input])) {disabledObject(list_input[index_input]);} else if(list_input[index_input].type=="radio"&&isReadOnlySensitiv(list_input[index_input])) {disabledObject(list_input[index_input]);} else if(list_input[index_input].type=="file"&&isReadOnlySensitiv(list_input[index_input])) {disabledObject(list_input[index_input]);} else if(list_input[index_input].type=="button"&&!list_input[index_input].name.match(exceptActionBarMatchExp)&&isReadOnlySensitiv(list_input[index_input])) {buttonReplacement(list_input[index_input]);}}}} function isReadOnlySensitiv(obj) {if(obj.ReadOnlySensitiv==undefined||obj.ReadOnlySensitiv!="false") return true;return false;} function selectReplacement(obj) {var obj_font=document.createElement('font');obj_font.className='readonly';var texte="";if(obj.options.length>0) texte=obj.options[obj.selectedIndex].text;obj_font.innerHTML=texte;obj.parentNode.replaceChild(obj_font,obj);} function refReplacement(obj) {obj.removeChild(obj.firstChild);} function disabledObject(obj) {obj.disabled=true;} function textareaReplacement(obj) {var obj_font=document.createElement('font');obj_font.className='readonly';obj_font.innerHTML=obj.value.replace(/\n/g,"
");obj.parentNode.replaceChild(obj_font,obj);} function textReplacement(obj) {obj.readOnly=true;obj.className='readonly';} function buttonReplacement(obj) {obj.style.display='none';} function RefreshHistoryWorkerProcess(executor,eventArgs,args){if(!executor.get_responseAvailable()||!IsAuthenticated) return;var obj=document.getElementById(args+"0");var dropmenuobj=document.getElementById(args);dropmenuobj.innerHTML=executor.get_responseData();obj.style.left=document.getElementById("content").offsetWidth-dropmenuobj.offsetWidth;} var txt_page=[];function fillTextHidden(txt_page) {var node=document.getElementById("hidden_panel");var len=txt_page.length;for(var i=0;i";else k2000aff+=k2000lettre;} document.getElementById(id).innerHTML=k2000aff;if(k2000pos==k2000text.length) k2000increment=-1;if(k2000pos==0&&k2000increment==-1) k2000increment=1;k2000pos=k2000pos+k2000increment;timer=setTimeout("k2000effet('"+id+"')",30)} function jsStr(str) {return str.replace(/'/g,"");} function fIt(id) {try {document.getElementById(id).focus();} catch(e) {}} function sf(){} function quit(url,text) {if(confirm(text)) {window.location.replace(url);}} function confirmation(text) {return confirm(text);} function recup_resol(){EcranHaut=window.screen.height;EcranLarg=window.screen.width;couleur=window.screen.colorDepth;Ecran=EcranLarg+" x "+EcranHaut+" x "+couleur;document.mainForm.HTTP_RESOLUTION.value=Ecran;} function popup(url,name,left,top,width,height) {if(name==null) name="_blank";if(!left) var left=10;if(!top) var top=10;if(!width) var width=1;if(!height) var height=1;var mypopup=window.open(url,name,"width="+width+", height="+height+", alwaysRaised=yes, menubar=no, resizable=yes, screenX="+left+", screenY="+top+", left="+left+", top="+top+", scrollbars=yes, status=yes, titlebar=no, toolbar=no");window.onfocus=focusPopup;window.tmpPopup=mypopup;return mypopup;} function focusPopup() {try {if(!window.tmpPopup.closed) window.tmpPopup.focus();} catch(e){}} function refreshMainPage() {if(window.opener) window.opener.document.mainForm.submit();} function getMousePosition(e){document.mainForm.x.value=event.clientX+document.body.scrollLeft;document.mainForm.y.value=event.clientY+document.body.scrollTop;return true;} function adjustToModal(x) {var doc=document;if(x&&x.document) doc=x.document;var win=upperWindow;if(win&&doc) {win.jQuery.FrameDialog.reSize(doc);}} function adjustTo(x) {if(Mode=="modal.aspx") {adjustToModal(x);return;} if(x==null) return;if(x.style.width=="100%"&&x.style.width=="100%") {x.style.width="";x.style.height="";} document.body.style.width=window.screen.width-20+"px";document.body.style.height=window.screen.height-50+"px";document.getElementById("content").className="";x.style.width=x.offsetWidth+"px";x.style.height=x.offsetHeight+"px";if(document.all) {var innerWidth=x.offsetWidth+12;var windowWidth=window.screen.width-25 var innerHeight=x.offsetHeight+61;var windowHeight=window.screen.height-50} else {var innerWidth=x.offsetWidth+8;var windowWidth=window.screen.width-25 var innerHeight=x.offsetHeight+56;var windowHeight=window.screen.height-50} document.body.style.width="100%";document.body.style.height="100%";tryResizeTo(Math.min(innerWidth,windowWidth)+20,Math.min(innerHeight,windowHeight)+20,0);document.getElementById("content").className="content";x.style.width="100%";x.style.height="100%";} function tryResizeTo(width,height,countTryToResize) {if(!countTryToResize){countTryToResize=0;} try{window.resizeTo(width,height);} catch(e){if(countTryToResize<20){setTimeout("tryResizeTo("+width+", "+height+", "+(countTryToResize+=1)+")",50);}}} function FormatValue(value,scale,separator,decimalSeparator) {if(!separator){separator=",";separator=separator.replace(/ /g,' ');separator=separator.replace(/ /g,' ');} if(!decimalSeparator) decimalSeparator=".";var deci=Math.round(Math.pow(10,scale)*(Math.abs(value)-Math.floor(Math.abs(value))));var val=Math.floor(Math.abs(value));if((scale==0)) {val=Math.floor(Math.abs(value));deci=0;} else if(deci==Math.pow(10,scale)) {val=Math.floor(Math.abs(value)+Math.abs(deci/Math.pow(10,scale)));deci=0;} var val_format=val+"";var nb=val_format.length;for(var i=1;i<5;i++) {if(val>=Math.pow(10,(3*i))) {val_format=val_format.substring(0,nb-(3*i))+separator+val_format.substring(nb-(3*i));}} if(scale>0) {var decim="";for(var j=0;j<(scale-deci.toString().length);j++) {decim+="0";} deci=decim+deci.toString();val_format=val_format+decimalSeparator+deci;} if(parseFloat(value)<0) {val_format="-"+val_format;} return val_format;} function Nbr(val) {val=val.replace(/,/g,'');val=val.replace(/ /g,'');val=val.replace(/ /g,'');var re=new RegExp("\\ ","g");val=val.replace(re,'');val=val.replace(/\./g,'.');val=Number(val);return val;} function delButton(id,command) {return"";} function editButton(url) {if(url.lastIndexOf("?")>0) url=url+"&";else url=url+"?";return"";} function focusField(key) {var obj=document.mainForm.elements[key];obj.focus();if(typeof(obj.select)=="function") obj.select();} function initFields() {for(var key in Links) {if(window.opener&&!window.opener.closed&&window.opener.Links&&window.opener.Links[key]&&document.mainForm.elements[window.Links[key]]!=null&&document.mainForm.elements[window.Links[key]].value=='') {document.mainForm.elements[window.Links[key]].value=window.opener.document.mainForm.elements[window.opener.Links[key]].value;}}} function waitMode(obj) {} function abort(e) {if(typeof(e)=="undefined"){e=window.event;} if(typeof(e)=="undefined"){return false;} e.cancelBubble=true;e.returnValue=false;if(e.stopPropagation){e.stopPropagation();} if(e.preventDefault){e.preventDefault();} return false;} function parentNodeOf(node,nodeName) {if(node==null) return null;while(node.nodeName!=nodeName) {node=node.parentNode;if(!node) return null;} return node;} function previousSiblingOf(node,nodeName) {if(node==null) return null;while((node=node.previousSibling)!=null) {if(node.nodeName==nodeName) return node;} return node;} function nextSiblingOf(node,nodeName) {if(node==null) return null;while((node=node.nextSibling)!=null) {if(node.nodeName==nodeName) return node;} return node;} String.prototype.trim=function() {return this.replace(/(^\s*)|(\s*$)/g,'');} String.prototype.startsWith=function(prefix) {if(this.length/g,'>');} String.prototype.unescapeHTML=function(){return this.replace(/<\/?[^>]+>/gi,'').replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');} function displayFrame(id,resize,className,open,saveState,ctrlid,url) {if(Mode=="popup.aspx"||Mode=="modal.aspx") {adjustTo(document.getElementById('frame'));} var nodeFrame=document.getElementById(id);var nodeDisplay=document.getElementById("display"+id);var node=document.getElementById("frameimg_"+id);if(open!=null) nodeDisplay.value=!open;if(nodeDisplay.value=='false') {if(className) nodeDisplay.parentNode.className=className;nodeFrame.style.display='';if(node) node.src='/image/ico_frame_open.gif';nodeDisplay.value=true;} else {if(resize) nodeDisplay.parentNode.style.width=nodeFrame.offsetWidth;if(className) nodeDisplay.parentNode.className="frame_notitle";nodeFrame.style.display='none';if(node) node.src='/image/ico_frame_close.gif';nodeDisplay.value=false;} if(saveState){if(!ivCallMethod.StateFrameHandler){ivCallMethodHandler.prototype.StateFrameHandler=function(url,id,collapsed){this.invoke("/ajax.aspx/en/bas/state_control_manage?methodname=StateFrameHandler",{url:url,id:id,collapsed:collapsed},null,null,null);};} ivCallMethod.StateFrameHandler(url,ctrlid,nodeDisplay.value);} if(NS4){for(var _grid in __ivCtrl){if(__ivCtrl[_grid].isGrid&&__ivCtrl[_grid].overflow){ResizePowerGrid(true);break;}}} else ResizePowerGrid(true);} SetBackColorGrid=function(Grid,SelectedValues) {var _row=document.getElementById(Grid).tBodies[0].firstChild;var t=new Object();for(var d in SelectedValues) t[SelectedValues[d]]=true;var _attrKey=null;while((_row=_row.nextSibling)!=null) {if(_row.nodeName=='TR') if(t[_row.getAttribute('key')]==true) _row.className='item_selected';} delete t;} function manageFavorite(command,id) {if(command=='add'||command=='del'){var gridAjax=new ivAsyncRequest();gridAjax.OnEndResponse=OnRefreshFavorites;gridAjax.ModuleName="usr";gridAjax.PageName="favorites";if(Page.endsWith("#")) {localPage=Page.substr(0,Page.length-1);} else {localPage=Page;} if(command=='add') gridAjax.Url='/bare.aspx/en/usr/favorites/add?furl=/'+ Mode+"/"+Lang+"/"+Module+"/"+localPage+(PathInfo.length!=0?"/"+PathInfo.join("/"):"")+"&flbl="+__favoritesTitle;else if(command=='del') gridAjax.Url='/bare.aspx/en/usr/favorites/del?furl='+ Mode+"/"+Lang+"/"+Module+"/"+localPage+(PathInfo.length!=0?"/"+PathInfo.join("/"):"")+'&fid='+id;gridAjax.AsyncRequest();}} function OnRefreshFavorites(executor,eventArgs,args){if(!executor.get_responseAvailable()||!IsAuthenticated) return;var response=executor.get_object();refreshFavorites(response["ctn"],response["pageInFav"],response["addedPageId"]);} function refreshFavorites(ctn,pageInFav,addedPageId) {var favCtn=document.getElementById('favoritesMenuContent');if(favCtn) {favCtn.innerHTML=ctn;var favIcone=document.getElementById('favIco');if(favIcone) {var favAddLink=document.getElementById('favAddLink');if(pageInFav==false) {favIcone.src='/image/ico_favorite_add.gif';favAddLink.onclick=function(){manageFavorite('add');};} else {favIcone.src='/image/ico_favorite_off.gif';favAddLink.onclick=function(){manageFavorite('del',addedPageId);};}} if(addedPageId=='-1') {ivMessage.AddInfoMsg('maxFavoriteReach');}}} function favIconeonmouseover(img) {img.onmouseover=ivToolTip.fixedtooltip('rmvfavorite',this,event);} var __formDataInitial=null;function FormData(formBody){var form=theForm;var count=form.elements.length;for(var i=0;i/g,'>') s=s.replace(/\=0;j--){cssClass=document.styleSheets[j];var styles=cssClass.cssRules?cssClass.cssRules:cssClass.rules;for(i=styles.length-1;i>=0;i--){if(styles[i].selectorText==style&&styles[i].style[attr]!=""){return styles[i].style[attr];}}} return null;} function containsStyle(styleName){for(var j=document.styleSheets.length-1;j>=0;j--){cssClass=document.styleSheets[j];var styles=cssClass.cssRules?cssClass.cssRules:cssClass.rules;if(styles[j].selectorText==styleName) return true;} return false;} openPopup=function(url,data){if(data==null){popup(url);return false;} var formPostValues=document.createElement("FORM");formPostValues.name="formValuesToPost";formPostValues.id="formValuesToPost";formPostValues.target=("popupValuesToPost"+url).replace(/\W/gi,"_");formPostValues.method="post";formPostValues.name="selectorform";formPostValues.action=url;document.body.appendChild(formPostValues);for(var item in data){var input=document.createElement("INPUT");input.type="hidden";input.value=data[item];input.name=item;formPostValues.appendChild(input);} popup("",formPostValues.target);formPostValues.submit();document.body.removeChild(formPostValues);return false;} function UrlPrefixClientCookie() {try{document.cookie='UrlPrefixClientCookieNamewebsite_ivalua='+escape(window.top.document.location.href)+'; path=/';} catch(e) {}} function UrlPrefixDeleteClientCookie(){try{var now=new Date();document.cookie='UrlPrefixClientCookieNamewebsite_ivalua=;expires='+now.toGMTString()+'; path=/';} catch(e) {}} function getOrCreateAttribute(tag,attrName) {var aAtt=tag.attributes.getNamedItem(attrName);if(aAtt==undefined) {tag.setAttribute(attrName,'');return'';} else {return aAtt.value;}} function platformConfirm(txt) {return confirm(txt);} function ResizePowerGrid(resizelive,target){} function refreshOpener() {var opd=upperWindow.document;var parentLocation=opd.location;var queryString="";if(upperWindow.__ivTab&&upperWindow.__ivTab.tabID!=null){queryString=upperWindow.__ivTab.tabID+'selectedID='+upperWindow.__ivTab.current;} var newUrl=parentLocation.protocol+'//'+parentLocation.hostname+parentLocation.pathname+(queryString!=""?'?'+queryString:"");parentLocation.replace(newUrl);} function submitOpener(params) {var opd;if(window.opener) {opd=window.opener.document;} else {opd=this.parent.document;} var parentLocation=opd.location;var selectedTab='none';if(opd.mainForm.onsubmit()) {opd.mainForm.submit();}} function modalPopupReload(){var popupReload=GetCookie('modalPopupReload');if(popupReload!=null&&!isModal()) {var modalCookie=GetCookie('modalPopup');$(document).ready(function(){setTimeout('modalPopup2("'+modalCookie+'");',300);});modalPopupReloadDeleteCookie();}} function modalPopupFlagReload(url){if(url!=null) {var opts=new Object();opts['url']=url;modalPopupCookie(opts)} document.cookie='modalPopupReload='+escape('true')+'; path=/';} function modalPopupReloadDeleteCookie(){document.cookie='modalPopupReload=;expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/';} function modalPopup2(optsenstring){var opts=string2Object(optsenstring);opts['Reload']=true;modalPopup(opts);} var modal;function modalPopup(opts){if(!jQuery){alert('jQuery not installed!');return;} if(!$.fn.dialog){alert('jQuery UI not installed!');return;} if(!jQuery.FrameDialog){alert('FrameDialog not installed!');return;} if(opts['url']==null)return;var modal=isModal();if(modal!=null){opts['fuid']=modal;} if(opts['Reload']==null)modalPopupCookie(opts);modal=parent.jQuery.FrameDialog.create(opts).bind('dialogclose',function(event,ui){return false;});} function string2Object(astring) {var obj=new Object();if(astring==null)return obj;var tableau=astring.split(';');var i,temp;for(x in tableau){temp=tableau[x];if(temp.length==0)continue;i=temp.indexOf(';',0);if(i>0){temp=temp.substring(0,i);} if(temp.length>0){var pair=temp.split('£');if(pair.length==2){obj[pair[0]]=pair[1];}}} return obj;} function object2String(opts) {var temp='';for(x in opts){temp+=x+'£'+opts[x]+";";} return temp;} function getCookieVal(offset){var endstr=document.cookie.indexOf(";",offset);if(endstr==-1){endstr=document.cookie.length;} return unescape(document.cookie.substring(offset,endstr));} function GetCookie(name){var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i0)?', ':'')+(typeof a[i])+' '+aArgs[i]+':'+q+a[i]+q+'';} return'('+sArgs+')';} var scroolbar=75;var maxHeight=768;var maxWidth=1024-75;function resizeToMax(){window.resizeTo(maxHeight,maxWidth);alertSize();return false;} function alertSize(){var myWidth=0,myHeight=0;if(typeof(window.innerWidth)=='number'){myWidth=window.innerWidth;myHeight=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){myWidth=document.documentElement.clientWidth;myHeight=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){myWidth=document.body.clientWidth;myHeight=document.body.clientHeight;} var msg='Width = '+(myWidth+scroolbar)+' Height = '+myHeight;if(myHeight>maxHeight||myWidth>maxWidth){ivMessage.AddInfoMsg('msgwindowSize',msg);} else{ivMessage.clearMsg('msgwindowSize');} return false;} function addHidden(fieldname,fieldvalue,node) {var input=document.createElement('INPUT');input.type="hidden";input.name=fieldname;input.id=fieldname;input.value=fieldvalue;for(var i=0;i1){referrerStack.pop();href=referrerStack.pop().split('|##|')[0];sessionStorage.setItem("historyStack",referrerStack);location.href=href;}}} else{window.location.href="/bare.aspx/en/bas/history_manage?methodname=removeHistory"+"&referrer="+encodeURIComponent(location.href);}} var _referrerStack=null;History.call=function(item){if(window.sessionStorage){var storage=sessionStorage.getItem("historyStack");if(storage!=null&&storage!=""){var referrerStack=storage.split(',');if(referrerStack.length>item){location.href=referrerStack[item].split('|##|')[0];}} sessionStorage.setItem("historyItem",item);}} History.create=function(){if(window.sessionStorage){if(_referrerStack!=null){if(!ivCallMethod.SessionStorageNavigator){ivCallMethodHandler.prototype.SessionStorageNavigator=function(){this.invoke("/ajax.aspx/en/bas/history_manage?methodname=SessionStorageNavigator",null,null,null,null);};} ivCallMethod.SessionStorageNavigator();} var storage=sessionStorage.getItem("historyStack");if(storage!=null&&storage!=""){var referrerStack=storage.split(',');if(!(referrerStack.length==1&&referrerStack[0].split('|##|')[0]==location.href)&&referrerStack.length>0){var h=new Sys.StringBuilder();h.append('
 |
');$('.history').append($(h.toString()));}} this.add();} else{if(_referrerStack!=null&&!(_referrerStack.length==1&&_referrerStack[0][0]==location.href)&&_referrerStack.length>0){var h=new Sys.StringBuilder();h.append('
 |
');$('.history').append($(h.toString()));}}} History.empty=function(){if(window.sessionStorage){sessionStorage.setItem("historyStack","");}} History.add=function(){if(window.sessionStorage&&$("#REQUEST_METHOD").val()=="GET"){var ib=sessionStorage.getItem("historyItem");if(ib!=null&&ib!=""){sessionStorage.setItem("historyItem","");return;} var referrerStack=null;var title=$(".maintitle").text();if(title==""||title==null) return;var storage=sessionStorage.getItem("historyStack");if(storage!=null&&storage!="") referrerStack=storage.split(',');var historyPoint=location.href+"|##|"+title;if(referrerStack==null){referrerStack=[historyPoint];} else{var referrer=referrerStack[referrerStack.length-1].split('|##|');if(referrer[0]!=location.href){var href=location.href;var index=0;if((index=href.indexOf('?'))!=-1){href=href.substring(0,index);} var hrefReferrer=referrer[0];index=0;if((index=hrefReferrer.indexOf('?'))!=-1){hrefReferrer=hrefReferrer.substring(0,index);} if(hrefReferrer!=href){if(referrerStack.length>15) referrerStack.shift();referrerStack.push([historyPoint]);} else{referrerStack[referrerStack.length-1]=historyPoint;}}} sessionStorage.setItem("historyStack",referrerStack);}} function eventOnLoad(){try {History.create();} catch(e) {errorHandler(e.message,location.href);} try {initFields();} catch(e) {errorHandler(e.message,location.href);} try {modalPopupReload();} catch(e) {errorHandler(e.message,location.href);} try {switchTrace();} catch(e) {errorHandler(e.message,location.href);} try {if(Mode=="popup.aspx") adjustTo(document.getElementById("frame"));} catch(e) {errorHandler(e.message,location.href);} try {ValidatorOnLoad();} catch(e) {errorHandler(e.message,location.href);} window.onbeforeunload=eventOnBeforeUnload;} function eventOnUnload() {} function eventOnHelp() {} function eventOnClick() {} function eventOnBeforeUnload() {if(!CheckChangesOnUnload()){return"'You have attempted to leave this page. If you have made any changes to the fields without clicking the Save button, your changes will be lost.'";} if(Mode=="modal.aspx") modalLoading();else ivMessage.displayLoadMsg();} function eventOnSubmit() {} function __doPostBack(eventTarget,eventArgument){var theform;if(window.navigator.appName.toLowerCase().indexOf('netscape')>-1){theform=document.forms['mainForm'];} else{theform=document.mainForm;} theform.__EVENTTARGET.value=eventTarget;theform.__EVENTARGUMENT.value=eventArgument;if(theform.onsubmit()) theform.submit();} function isValidatePage(){var _xss=document.createElement("INPUT");_xss.id="__isSecurePage";_xss.name="__isSecurePage";_xss.type="hidden";_xss.value="true";document.forms["mainForm"].appendChild(_xss);} function hideTrace(){var mzm1=document.getElementById('__asptrace');var mzm2=document.getElementById('traceLink');if(document.getElementById('__asptrace')==null&&document.getElementById('traceLink')!=null) {document.getElementById('traceLink').style.display='none';}} function closeAllMenu(){if(!ivMenuHisto.menuIsUsing()){ivMenuHisto.closeMenu();} if(true===ivMenu.getMenuIsUsing()){ivMenu.hideMenu(null,2);}} function iecompattest(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;} function supScrollerLeft(){if(!document.getElementById('content')){return 0;} return document.getElementById('content').scrollLeft;} function supScrollerTop(){if(!document.getElementById('content')){return 0;} return document.getElementById('content').scrollTop;} function opacity(id,opacStart,opacEnd,millisec){var speed=Math.round(millisec/100);var timer=0;if(opacStart>opacEnd){for(i=opacStart;i>=opacEnd;i--){setTimeout("changeOpac("+i+",'"+id+"')",(timer*speed));timer++;}}else if(opacStart0){if(defautValue==""){defautValue=this.controlUIDsAsyncList;} else{defautValue+=","+this.controlUIDsAsyncList;} this.controlUIDsAsyncList=[];} if(this.controlUIDsAsyncWebPart!=null){if(defautValue==""){defautValue=this.controlUIDsAsyncWebPart;} else{defautValue+=","+this.controlUIDsAsyncWebPart;}} var queryString=[];var indexQueryString=this.Url.indexOf("?");if(this.FormMethod=="GET"&&indexQueryString!=-1){queryString.push(this.Url.substring(indexQueryString+1));} if(defautValue!=""){queryString.push("ivControlUIDsAsync="+defautValue);} if(this.TabID!=null) queryString.push("ivtabid="+this.TabID);if(this.Save) queryString.push("issavingajax=true");if(this.ModuleName!=null) queryString.push("asyncmodulename="+this.ModuleName);if(this.PageName!=null) queryString.push("asyncpagename="+this.PageName);if(__ivTab.hdnLoadedTab!=null) queryString.push("hdnLoadedTab="+__ivTab.hdnLoadedTab.value);if(this.FormMethod=="GET"){var url="";if(indexQueryString!=-1) url=this.Url.substring(0,indexQueryString);else url=this.Url;this.Request.set_url(url+(queryString.length==0?"":"?"+queryString.join("&")));} else{this.Request.set_url(this.Url);if(this.PostForm) this.Data=this.FormBody().toString()+(queryString.length==0?"":"&"+queryString.join("&")) +(this.Data!=null?this.Data:"");else if(this.Data!=null) this.Data+=(queryString.length==0?"":"&"+queryString.join("&"));else this.Data=(queryString.length==0?"":"&"+queryString.join("&"));this.Request.set_body(this.Data.replace(/\+/g,"%2B"));} if(this.UpdateProgressFullScreen){ivMessage.displayLoadMsg();} else{if(!this._init){this.AddUpdateProgress(this.UpdateProgressUID);for(var i=0;i0){var webpartconfig=_ivUpdatePanel._updatePanel[_ivUpdatePanel.updatePanelUIdFromClientID[webpart.attr("id")]];this.addQueryString("zonewidth",webpart.parents(".zone_layout:first").width());for(var info in webpartconfig.webpart){if(info=="url"){this.Url=webpartconfig.webpart[info];} else if(info=="querystring"||info=="editorstring"){this.QueryString+=webpartconfig.webpart[info];} else{this.addQueryString(info,webpartconfig.webpart[info]);}}}},getTemplateTab:function(container){if(__ivTab==null) return[];var templateTab=[];while(container){if(container.id){if(Array.contains(__ivTab.arrayLoadedTab,container.id)){templateTab.push(container.id);}} container=container.parentNode;} return templateTab;},hideProgress:function(){if(this.UpdateProgress!=null){for(var i=0;i

"){value="";} else{value=value.replace(new RegExp("_fckxhtmljob=\"[0-9]*\"","g"),"");}} else{value=document.getElementById(id+"___Frame").contentDocument.getElementById("xEditingArea").firstChild.contentDocument.body.innerHTML;}} return value;},AddUpdateProgress:function(UpdateProgressUID){if(UpdateProgressUID==null) return;if(typeof(UpdateProgressUID)=="string") this.UpdateProgress.push($get(UpdateProgressUID));else this.UpdateProgress.push(UpdateProgressUID);},onEndPostBack:function(executor,eventArgs){if(executor.get_responseAvailable()){var response=executor.get_responseData();this.hideProgress();if(response=="redirect"){__checkChangesOnUnload=false;var returnUrl=""+"/"+Mode+"/"+Lang+"/"+Module+"/"+Page+"/"+PathInfo.join("/");IsAuthenticated=false;window.document.location="/page.aspx/en/usr/login?ReturnUrl="+returnUrl.replace(new RegExp("/","g"),"%2f");return false;} else if(response.startsWith("error:")){var reply=response.substring(6);var delimiterIndex,len,type,message;var replyIndex=0;var parserErrorDetails=null;var delimitByLengthDelimiter='|';var error=[];var clearMessage=true;while(replyIndex0&&this.Args[0]=='callbackresult'&&executor.get_responseData().charAt(0)=="s"){if(this.OnEndResponse!=null){this.OnEndResponse(executor.get_responseData().substring(1),(this.Args.length>1?this.Args[1]:null));} return;} if(this.OnEndResponse!=null){this.OnEndResponse(executor,eventArgs,this.Args);}} this.Request=null;} else{}},eventHandlerList:function(){if(!this._events){this._events=new Sys.EventHandlerList();} return this._events;}};__webPartLoaded=[];ivUpdatePanel=function(){this._asyncPostBackControlClientIDs=null;this._updatePanelUIDs=null;this._updatePanel=null;this._updatePanelClientIDs=null;this._onFormElementClickHandler=null;this._onWindowUnloadHandler=null;this._onsubmit=null;this._form=null;this._postBackSettings=null;this._additionalInput=null;this._onFormSubmitHandler=null;this._originalDoPostBack=null;this.PanelToRefresh=null;this.isInitialized=false;this._loadedScripts=null;this.scriptElement=null;this.scriptsToExecute={};this.scriptsToLoad=[];this.scriptFromPage=[];this.hdnLoadedWebPart=null;this.updatePanelUIdFromClientID={};} ivUpdatePanel.prototype={initialize:function(formElement){if(this.isInitialized) return;this.isInitialized=true;this._form=formElement;this._form._initialAction=this._form.action;this._onsubmit=this._form.onsubmit;this._onFormSubmitHandler=Function.createDelegate(this,this.onFormSubmit);Sys.UI.DomEvent.addHandler(this._form,'submit',this._onFormSubmitHandler);this._onFormElementClickHandler=Function.createDelegate(this,this.onFormElementClick);Sys.UI.DomEvent.addHandler(this._form,'click',this._onFormElementClickHandler);this._onWindowUnloadHandler=Function.createDelegate(this,this.onWindowUnload);Sys.UI.DomEvent.addHandler(window,'unload',this._onWindowUnloadHandler);this._originalDoPostBack=window.__doPostBack;if(this._originalDoPostBack){window.__doPostBack=Function.createDelegate(this,this.doPostBack);}},updateControl:function(updatePanelUIDs,asyncPostBackControlUIDs){if(this._updatePanelUIDs==null) this._updatePanelUIDs=[];if(this._updatePanel==null) this._updatePanel={};var panel=null;if(this._updatePanelClientIDs==null) this._updatePanelClientIDs=[];var webPartToLoad={};var isLayout=false;for(var item in updatePanelUIDs){var node=$get(this.uniqueIDToClientID(item));if(!node) continue;if(!this._updatePanel[item]){this._updatePanelUIDs.push(item);this._updatePanelClientIDs.push(this.uniqueIDToClientID(item));this.updatePanelUIdFromClientID[this.uniqueIDToClientID(item)]=item;} panel=updatePanelUIDs[item];node.name=item;if(panel.webpart!=null&&!panel.inwebpart){isLayout=true;if(!panel.webpart.isloaded){webPartToLoad[item]=panel.webpart;} else{__webPartLoaded.push(panel.webpart.id);}} this._updatePanel[item]={progress:panel.progress,module:panel.module,page:panel.page,isWebPart:panel.webpart!=null,inwebpart:panel.inwebpart,webpart:(panel.inwebpart?_ivUpdatePanel._updatePanel[panel.webpart].webpart:panel.webpart)};} if(this._asyncPostBackControlClientIDs==null) this._asyncPostBackControlClientIDs={};for(var item in asyncPostBackControlUIDs){var clientID=this.uniqueIDToClientID(item);if(!this._asyncPostBackControlClientIDs[clientID]){this._asyncPostBackControlClientIDs[clientID]=asyncPostBackControlUIDs[item];}} if(isLayout) this.hdnWebPartLoaded(__webPartLoaded.join(","));this.initialize(theForm);this.loadInAsync(webPartToLoad);},hdnWebPartLoaded:function(value){if((this.hdnLoadedWebPart=$get("hdnLoadedWebPart"))==null){this.hdnLoadedWebPart=document.createElement("INPUT");this.hdnLoadedWebPart.type="hidden";this.hdnLoadedWebPart.id="hdnLoadedWebPart";this.hdnLoadedWebPart.name="hdnLoadedWebPart";document.forms["mainForm"].insertBefore(this.hdnLoadedWebPart,document.forms["mainForm"].firstChild);this.hdnLoadedWebPart.value=value;}},loadInAsync:function(webPartToLoad){for(var panel in webPartToLoad){var upAjax=new ivAsyncRequest();if(this._updatePanel[panel]){upAjax.ModuleName=this._updatePanel[panel].module;upAjax.PageName=this._updatePanel[panel].page;} upAjax.controlUIDsAsyncWebPart=panel;var webpart=$("#"+this.uniqueIDToClientID(panel));upAjax.requestWebPartSettings(webpart);upAjax.FormMethod="GET";upAjax.OnEndResponse=this.onEndResponse;this.PanelToRefresh=[];this.PanelToRefresh.push(panel);upAjax.Args=this;upAjax.addHeader("IV-AjaxControl","loadingpanel");var children=webpart.children(":first-child");if(children.size()>0){children.css("width",webpart.width());children.css("height",webpart.height());} upAjax.AsyncRequest();}},findPos:function(obj){var curleft=obj.offsetLeft||0;var curtop=obj.offsetTop||0;while(obj=obj.offsetParent){if(obj.id=="content") break;curleft+=obj.offsetLeft curtop+=obj.offsetTop} return{x:curleft,y:curtop};},loadingMessage:function(uniqueID){var panelOverlay=null;if(browseVersion<7){panelOverlay=$('
');} else{panelOverlay=$('
');} var node=$("#"+this.uniqueIDToClientID(uniqueID));var children=node.children(":first-child");if(children.size()==0) panelOverlay.appendTo(node);else panelOverlay.insertBefore(children);if(this._updatePanel[uniqueID].webpart){panelOverlay.css("width",node.width());panelOverlay.css("height",node.height());} else{panelOverlay.css("top",node.offset().top+$("#content").scrollTop()-(Mode=="popup.aspx"||Mode=="modal.aspx"?0:$("#headerContainer").height()));panelOverlay.css("left",node.offset().left+$("#content").scrollLeft());panelOverlay.css("width",node.width());panelOverlay.css("height",node.height());}},onWindowUnload:function(evt){this.finalize();},finalize:function(){if(this._form){Sys.UI.DomEvent.removeHandler(this._form,'submit',this._onFormSubmitHandler);Sys.UI.DomEvent.removeHandler(this._form,'click',this._onFormElementClickHandler);Sys.UI.DomEvent.removeHandler(window,'unload',this._onWindowUnloadHandler);} if(this._originalDoPostBack){window.__doPostBack=this._originalDoPostBack;this._originalDoPostBack=null;} this._form=null;this._updatePanelIDs=null;this._asyncPostBackControlClientIDs=null;this._updatePanelUIDs=null;this._updatePanelClientIDs=null;this._postBackSettings=null;this._additionalInput=null;this._updatePanel=null;},removerReference:function(list){var length=list.length;for(var item=0;item0) this._postBackSettings=this.getPostBackSettings(nearestUniqueIDMatch[0],eventTarget);else{var nearestUniqueIDMatch=this.findNearestElement(eventTarget);if(nearestUniqueIDMatch){this._postBackSettings=this.getPostBackSettings(nearestUniqueIDMatch,eventTarget);} else{this._postBackSettings=this.createPostBackSettings(false,null,null,null);}}} else{this._postBackSettings=this.getPostBackSettings(postBackElement,eventTarget);}} if(!this._postBackSettings.async){this._originalDoPostBack(eventTarget,eventArgument);return;} ivMessage.hideLoadMsg();form.__EVENTTARGET.value=eventTarget;form.__EVENTARGUMENT.value=eventArgument;this.onFormSubmit();},findNearestElement:function(uniqueID){while(uniqueID.length>0){var clientID=this.uniqueIDToClientID(uniqueID);var element=document.getElementById(clientID);if(element){return element;} var indexOfLastDollar=uniqueID.lastIndexOf('$');if(indexOfLastDollar===-1){return null;} uniqueID=uniqueID.substring(0,indexOfLastDollar);} return null;},createPostBackSettings:function(async,panelUID,sourceElement,control){return{async:async,panelUID:panelUID,sourceElement:sourceElement,control:control};},uniqueIDToClientID:function(uniqueID){return uniqueID.replace(/\$/g,'_').replace(/\:/g,'_');},decodeString:function(encodedValue){return encodedValue.replace(/\\\u00FF\\/g,"\u0000").replace(/\u00FF\u00FF/g,"\u00FF");},onFormSubmitCompleted:function(sender,eventArgs){this._processingRequest=true;var delimitByLengthDelimiter='|';if(sender.get_timedOut()||sender.get_aborted()) return;var errorMessage;var delta=[];var reply=sender.get_responseData();var delimiterIndex,len,type,id,content,display;var replyIndex=0;var parserErrorDetails=null;while(replyIndex=reply.length){break;} content=this.decodeString(reply.substr(replyIndex,len));replyIndex+=len;if(reply.charAt(replyIndex)!==delimitByLengthDelimiter){break;} replyIndex++;Array.add(delta,{type:type,display:display,id:id,content:content});} if(parserErrorDetails){return;} var random=Math.random();for(var item in delta){var deltaUpdatePanel=delta[item];if(deltaUpdatePanel.type=="redirect"){__checkChangesOnUnload=false;IsAuthenticated=false;window.document.location=deltaUpdatePanel.content;break;} else if(deltaUpdatePanel.type=="updatePanel"||deltaUpdatePanel.type=="updateTab"||deltaUpdatePanel.type=="updateActionBar"){var updatePanelElement=document.getElementById(deltaUpdatePanel.id);if(!updatePanelElement){continue;} if(deltaUpdatePanel.type=="updatePanel") updatePanelElement.style.display=display;this.updatePanel(updatePanelElement,deltaUpdatePanel.content,deltaUpdatePanel.display);if(this._updatePanel!=null&&this._updatePanel[updatePanelElement.name]&&this._updatePanel[updatePanelElement.name].isWebPart){__webPartLoaded.push(this._updatePanel[updatePanelElement.name].webpart.id);this.hdnLoadedWebPart.value=__webPartLoaded;$("#"+deltaUpdatePanel.id).parents(".webpart_css").find(".ph").each(function(){$(this).height("");});updatePanelElement.style.height="100%";}} else if(deltaUpdatePanel.type=="formEnctype") theForm.encoding=deltaUpdatePanel.content;else if(deltaUpdatePanel.type=="scriptToLoad"){this.scriptsToLoad.push(deltaUpdatePanel.content);} else if(deltaUpdatePanel.type=="scriptBlock"){if(!this.scriptsToExecute[random]) this.scriptsToExecute[random]=[];this.scriptsToExecute[random].push(deltaUpdatePanel.content);} else if(deltaUpdatePanel.type=="ConnectToPage"){window.location.href=deltaUpdatePanel.content;} else if(deltaUpdatePanel.type=="asyncRedirect"){var upAjax=new ivAsyncRequest();upAjax.FormMethod="GET";upAjax.OnEndResponse=this.onEndResponse;upAjax.Args=this;upAjax.addHeader("IV_AsyncRedirect","true");upAjax.Url=deltaUpdatePanel.content.replace(Mode,"ajax.aspx");upAjax.addQueryString("ivControlUIDsAsync",this.PanelToRefresh[0]);upAjax.AsyncRequest();return;} else if(deltaUpdatePanel.type=="editor"){$("#editor"+deltaUpdatePanel.id).find("div[class=webpart_editor]").each(function(){$(this).remove()});$(deltaUpdatePanel.content).insertBefore($("#editor"+deltaUpdatePanel.id).find("input[class=part_save_btn btn_class]"));}} this.loadScriptHandler(random);ValidatorOnLoad();},updatePanel:function(updatePanelElement,rendering,display){updatePanelElement.innerHTML=rendering;this.parseScript(rendering);},parseScript:function(strToParse){var reg="]*";var reg2=new RegExp(reg);var index=strToParse.search(reg);if(index!=-1){var len=index+reg2.exec(strToParse)[0].length;if(strToParse.charAt(len)!=">"){this.parseScript(strToParse.substring(len));} var indexEnd=strToParse.indexOf("<\/script>",len);if(indexEnd!=-1){try{this.scriptFromPage.push(strToParse.substring(len+1,indexEnd));this.parseScript(strToParse.substring(indexEnd));} catch(e){this.parseScript(strToParse.substring(len+1));}}}},executeScript:function(rendering){eval(rendering);},loadScriptHandler:function(random){if(this.scriptsToLoad.length!=0){this.loadScripts(this.scriptsToLoad.shift(),random);} else if(this.scriptFromPage.length!=0){this.executeScriptFromPage(random);} else{this.executeScriptHandler(random);}},executeScriptFromPage:function(r){while(this.scriptFromPage.length!=0){var t=this.scriptFromPage.shift();eval(t);} this.loadScriptHandler(r);},executeScriptHandler:function(r){if(this.scriptsToExecute[r]){while(this.scriptsToExecute[r].length!=0){this.executeScript(this.scriptsToExecute[r].shift());}}},loadScripts:function(scriptsUrl,random){if(this._loadedScripts==null){this._loadedScripts=[];} if(!Array.contains(this._loadedScripts,scriptsUrl)){Array.add(this._loadedScripts,scriptsUrl) var script=document.createElement("script");script.type="text/javascript";script.setAttribute("src",scriptsUrl);this.scriptElement=script;this._scriptLoadDelegate=Function.createDelegate(this,this.loadScriptComplete);this.random=random;if(Sys.Browser.agent!==Sys.Browser.InternetExplorer){script.readyState='loaded';$addHandler(this.scriptElement,'load',this._scriptLoadDelegate);} else{$addHandler(this.scriptElement,'readystatechange',this._scriptLoadDelegate);} document.getElementsByTagName('head')[0].appendChild(script);} else{this.loadScriptHandler(random);}},loadScriptComplete:function(r){r=this.random;if(this.scriptElement&&this.scriptElement.readyState!=="loaded"&&this.scriptElement.readyState!=="complete"){return;} this.loadScriptHandler(r);}} ivLoadTab=function(){this.Url=null;this.arrayLoadedTab=[];this.hdnLoadedTab=null;this.toLoad=[];this.tabLoading=null;this.hdnActivatedTab=null;this.current=null;this.tabID=null;} ivLoadTab.prototype=new ivUpdatePanel();ivLoadTab.prototype.initialize=function(loadedTab,selectedId,tabID){if(loadedTab!=null) this.arrayLoadedTab=loadedTab;else this.arrayLoadedTab=[];if(this.hdnLoadedTab==null){this.hdnLoadedTab=this.RenderHiddenField("hdnLoadedTab",this.arrayLoadedTab);} if(this.hdnActivatedTab==null){this.hdnActivatedTab=this.RenderHiddenField(tabID+"selectedID",selectedId);} this.current=selectedId;this.tabID=tabID;} ivLoadTab.prototype.RenderHiddenField=function(name,value){var hdn=null;if(!(hdn=document.getElementById(name+this.ClientID))){hdn=document.createElement("INPUT");hdn.type="hidden";hdn.id=name;hdn.name=name;hdn.value=value;hdn.setAttribute("ignorechangesonunload","true");document.forms["mainForm"].insertBefore(hdn,document.forms["mainForm"].firstChild);} return hdn;} ivLoadTab.prototype.LoadingOn=function(id,height){var panelLoading=document.createElement("DIV");var container=document.getElementById(id);container.style.display="";container.height="200";panelLoading.style.width="100%";panelLoading.style.height=(height?height:container.offsetHeight);panelLoading.style.top=0;panelLoading.style.left=0;panelLoading.style.zIndex=999;panelLoading.style.backgroundColor="#CCC";var imgOpac=document.createElement("IMG");imgOpac.src="/image/ico_loading_tab.gif";imgOpac.style.position="absolute";imgOpac.style.top="40%";imgOpac.style.left="50%";imgOpac.style.width="50px";imgOpac.style.height="50px";imgOpac.style.marginLeft="-25px";imgOpac.style.marginTop="-10px";imgOpac.border=0;panelLoading.appendChild(imgOpac);container.appendChild(panelLoading);} ivLoadTab.prototype.active=function(tab){if(typeof(tab)=="string"){tab=$get("part"+tab);} var height=$("#"+this.current).css('display','none').height();var tabcurrent=$("#part"+this.current);tabcurrent.addClass(tabcurrent.attr('originalcss')).removeClass("tab_selected");this.current=tab.id.substr(4,tab.id.length);$("#"+this.current).css('display','');tab.setAttribute("originalcss",tab.className);tab.className="tab_selected";if(tab.getAttribute("toload")=="false"){this.tabLoading=tab.id;this.loadTab(this.current,height);} else{this.hdnActivatedTab.value=this.current;this.updateStackReferrer();} if(Mode=="popup.aspx"){adjustTo(document.getElementById('frame'));}} ivLoadTab.prototype.loadTab=function(id,height,hdnSelectedId){if(Array.contains(this.arrayLoadedTab,id)) return;this.arrayLoadedTab.push(id);this.LoadingOn(id,height);var upAjax=new ivAsyncRequest();upAjax.FormMethod="GET";upAjax.OnEndResponse=this.onEndResponse;upAjax.Args=this;upAjax.addHeader("IV-AjaxControl","updatetab");if(this.Url==null||this.Url=="") upAjax.Url=theForm.action.replace(Mode,"ajax.aspx");else upAjax.Url=this.Url;if(upAjax.Url.indexOf("ivControlUIDsAsync="+id)==-1){upAjax.controlUIDsAsyncList=[];upAjax.controlUIDsAsyncList.push(id);} var webpart=$("#"+id).parents(".is_part:first");upAjax.requestWebPartSettings(webpart);upAjax.AsyncRequest();} ivLoadTab.prototype.onEndResponse=function(executor,eventArgs,args){args.hdnLoadedTab.value=args.arrayLoadedTab;$get(args.tabLoading).toload="true";args.hdnActivatedTab.value=args.current;args.updateStackReferrer();ivUpdatePanel.prototype.onEndResponse.apply(this,[executor,eventArgs,args]);} ivLoadTab.prototype.updateStackReferrer=function(){if(window.sessionStorage){var referrerStack=null;var storage=sessionStorage.getItem("historyStack");if(storage!=null&&storage!=""){referrerStack=storage.split(',');var referrer=referrerStack[referrerStack.length-1].split('|##|');var href=referrer[0];var title=referrer[1];var reg=new RegExp('([?&]'+this.tabID+'selectedID=)([^$]*[$]?)');if(reg.test(href)){href=href.replace(reg,"$1"+this.current);} else{href+=(href.indexOf('?')==-1?"?":"&")+this.tabID+'selectedID='+this.current;} referrerStack[referrerStack.length-1]=href+'|##|'+title;sessionStorage.setItem("historyStack",referrerStack);}} else if(IsAuthenticated){if(!ivCallMethod.UpdateHistoryStack){ivCallMethodHandler.prototype.UpdateHistoryStack=function(){this.invoke("/ajax.aspx/en/bas/history_manage?methodname=UpdateHistoryStack",{tabID:this.tabID,tabPageID:this.current},null,null,null);};} ivCallMethod.UpdateHistoryStack();}} var _ivUpdatePanel=new ivUpdatePanel();var __ivTab=new ivLoadTab();WebPartClose=function(node){var content=node.parentNode.parentNode.nextSibling;var isClosed=content.style.display=='none';if(isClosed){content.style.display='';node.src='/image/ico_frame_open.gif';} else{content.style.display='none';node.src='/image/ico_frame_close.gif';ResizePowerGrid(true);}} webPart={changeZone:false,url:null,zone:null,querystring:null,layouturl:null,layouttype:[],onEndResponse:function(executor,eventArgs,args){if(!executor.get_responseAvailable()||!IsAuthenticated) return;var response=executor.get_object();if(response.mode=="delete"){if(response.success){args.remove();}} else if(response.mode=="updateconfig"){var partId=args[2];if(response.newid!=null){partId=response.newid;args[1].attr("key",partId);args[1].prev().attr("key",partId);} if(response.title!=null){var n=args[1].parents("div[iswebpart=true]:first").find(".frame1_title:first");if(n.children(":first-child").is("img")){var img=n.children(":first-child");n.eq(0).text("");n.append(img).append($(" "+response.title+""));}} $get("pmsg"+partId).innerHTML="Enregistrement réussi";_ivUpdatePanel.refresh(args[1].attr("name"));} else if(response.mode=="columnsizes"){args[0].find("div[refresh=1]").each(function(){_ivUpdatePanel.refresh($(this).attr("name"));});args[1].find("div[refresh=1]").each(function(){_ivUpdatePanel.refresh($(this).attr("name"));});} else if(response.mode=="configurelayout"){if(args=="deletelayout"){var qs=Querystring;delete qs["mode"];delete qs["isbydefaultsettings"];if(__ivTab.tabID!=null) delete qs[__ivTab.tabID+"selectedID"];var isFirst=true;var queryString="";for(var str in qs){if(isFirst){queryString+="?";isFirst=false;} else queryString+="&";queryString+=str+"="+qs[str];} window.location.href=location.href.substring(0,location.href.indexOf("?"))+queryString;} else window.location.href=location.href;} else if(response.mode=="position"){if(response.newid!=null){var itemsZone=args;var itemsReceiveLength=itemsZone.length;for(var i=0;i").insertBefore($(document.forms["mainForm"].firstChild)).val(urlContainer+";"+indexZone+";"+selector.value);} else $get("hdnAddWebPart").value=urlContainer+";"+indexZone+";"+selector.value;},columnResizeHandler:function(zprev,znext){var columnSizes="";if(zprev.children(".zone_sortable").children().is("div[iswebpart=true]:first")){columnSizes="&columnsizes["+zprev.children(".zone_sortable").attr("index")+"]="+ Math.round(100*zprev.width()/zprev.parent().width()*100)/100;} if(znext.children(".zone_sortable").children().is("div[iswebpart=true]:first")){columnSizes+="&columnsizes["+znext.children(".zone_sortable").attr("index")+"]="+ Math.round(100*znext.width()/znext.parent().width()*100)/100;} var asyncRequest=new ivAsyncRequest();asyncRequest.OnEndResponse=this.onEndResponse;asyncRequest.Url=this.url;asyncRequest.Args=[zprev.children(".zone_sortable"),znext.children(".zone_sortable")];asyncRequest.Data="mode=columnsizes"+columnSizes;asyncRequest.AsyncRequest();},init:function(url,editing,isByDefaultSettings,layouturl){this.url=url+(url.indexOf("?")!=-1?"&":"?")+"isbydefaultsettings="+isByDefaultSettings;this.layouturl=layouturl;if(editing){$(".zone_sortable").sortable({connectWith:'.zone_sortable',handle:'.part_header',cursor:'crosshair',state:null,index:0,originalZone:null,frameZone:null,stop:function(sender,ui){if(this.originalZone!=null&&this.originalZone.hasClass("column_layout_moving")){this.originalZone.addClass("column_layout");this.originalZone.removeClass("column_layout_moving");this.originalZone=null;} if(this.frameZone!=null){this.frameZone.css("display","");this.frameZone=null;} if(webPart.changeZone){webPart.changeZone=false;if(BrowseIE) setTimeout("$get('"+webPart.zone+"').className = $get('"+webPart.zone+"').className;",0);webPart.zone=null;return;} if(BrowseIE) setTimeout("$get('"+this.id+"').className = $get('"+this.id+"').className;",0);var o=$(this);if(this.index==o.attr("index")&&this.state==o.sortable('serialize')){return;} webPart.updatePosition($(this));},receive:function(event,ui){webPart.updatePosition($(this));webPart.changeZone=true;webPart.zone=this.id;},start:function(event,ui){var o=$(this);this.state=o.sortable('serialize');this.index=o.attr("index");this.frameZone=ui.helper.find("table[id="+ui.helper.attr("frameid")+"]");if(this.frameZone.css("display")!="none") this.frameZone.css("display","none");else this.frameZone=null;ui.helper.css("height","100px");ui.helper.css("width","200px");ui.helper.css("webpart_css");ui.helper.css("left",event.clientX);this.originalZone=ui.helper.parents(".zone_css:first");if(this.originalZone.hasClass("column_layout")){this.originalZone.removeClass("column_layout");this.originalZone.addClass("column_layout_moving");}},change:function(event,ui){ui.placeholder.width(ui.placeholder.parents(".zone_css:first").width());}});$(".zone_gripper").each(function(){$(this).bind('mousedown',function(e){var moveHandler=function(e){var ini=e.clientX-e.data.y;var l1=ini+e.data.lprev;var l2=e.data.lnext-ini;if(l1<=200||l2<=200) return;zprev.width(l1);znext.width(l2);};var upHandler=function(e){jQuery('body').unbind('mousemove',moveHandler).unbind('mouseup',upHandler);webPart.columnResizeHandler(zprev,znext);};var zprev=$(this).prev();var znext=$(this).next();jQuery('body').bind('mousemove',{lprev:zprev.width(),lnext:znext.width(),y:e.clientX},moveHandler).bind('mouseup',upHandler);})});$(".zone_gripper").disableSelection();}},getconfig:function(container,prefixname){var custom=[];var data="";container.find(":[type!=radio][editorname]").each(function(){var name=$(this).attr("editorname");if(prefixname) name=prefixname+"["+name+"]";if($(this).attr("type")=="checkbox"){data+="&"+name+"="+$(this).is(":checked");} else if(__ivCtrl[$(this).attr("id")]&&__ivCtrl[$(this).attr("id")].isSelector){if($(this).val()!=""){var values=$(this).val().split(",");$.each(values,function(){data+="&"+name+"[]="+this;});}} else{var regex=new RegExp("&","g");data+="&"+name+"="+$(this).val().replace(regex,'%26');}});container.find(":[type=radio][editorname]:checked").each(function(){var name=$(this).attr("editorname");if(prefixname) name=prefixname+"["+name+"]";data+="&"+name+"="+$(this).val();});return data;},update:function(btn,partId){var editor=$("#editor"+partId);var data=this.getconfig(editor.children("table:first"),"config");var queryStringParameter=this.getconfig(editor.children("table:first").next());var webpartconfig=_ivUpdatePanel._updatePanel[editor.next().attr("name")];webpartconfig.webpart["editorstring"]=queryStringParameter;data+="&config[querystring]="+escape(queryStringParameter);data+="&path="+webpartconfig.webpart["path"];$get("pmsg"+partId).innerHTML="en cours de sauvegarde...";var asyncRequest=new ivAsyncRequest();asyncRequest.OnEndResponse=this.onEndResponse;asyncRequest.Url=this.url;asyncRequest.Args=[btn,editor.next(),partId];asyncRequest.Data="mode=updateconfig&part_id="+partId+data;asyncRequest.AsyncRequest();},editor:function(partId){menuId="editor"+partId;var menu=$("#"+menuId);if(!menu.attr("hasMenu")){menu.attr("hasMenu","true");var t=$('').attr("cellPadding","2").prependTo(menu);var tr=$('').appendTo(t);$('').appendTo(t);$('').appendTo(t);var input=$("").attr('id','cbmandatory'+partId).attr('type','checkbox').attr('editorname','mandatory').attr("ignorechangesonunload","true").appendTo($('').appendTo(t);var input=$("").attr('id','cbnoconnected'+partId).attr('type','checkbox').attr('editorname','noconnected').attr("ignorechangesonunload","true").appendTo($('']);b.push('
').appendTo(tr).text('Titre');var input=$('').attr('id','title').attr('type','text').attr('editorname','title').attr("ignorechangesonunload","true").val(menu.attr("title")).appendTo($('').appendTo(tr));var tr=$('
').appendTo(tr).text('Type de frame');var select=$("').appendTo(tr));var opt=$('
').appendTo(tr));if(menu.attr("mandatory")=="True") input.attr("checked","checked");$("
').appendTo(tr));if(menu.attr("noconnected")=="True") input.attr("checked","checked");$("
 '];b.push(['  
');var c=firstDayWeek;for(var i=0;i<7;++i){b.push('');} b.push('
');b.push(DAY_FirstLetter[c]);if(++c>6){c=0;} b.push('
');for(var w=0;w<6;++w){b.push("");for(var j=0;j<7;++j){b.push('');} b.push("");} b.push('

');b.push(' ');b.push(' ');b.push('

');var t=document.createElement("div");t.id="DatePicker";t.innerHTML=b.join('');document.body.appendChild(t);C=D.CAL={div:t,caption:t.getElementsByTagName("strong")[0],caption_year:t.getElementsByTagName("strong")[1],table:t.firstChild,days:t.firstChild.tBodies[0].getElementsByTagName("a"),daysname:t.firstChild.tBodies[0].getElementsByTagName("tbody")[0].getElementsByTagName("td")};var lf=t.firstChild.getElementsByTagName("a");lf[0].onclick=function(e){D.currentPicker.goToPrevMonth(e);return false;};lf[1].onclick=function(e){D.currentPicker.goToNextMonth(e);return false;};lf[2].onclick=function(e){D.currentPicker.goToPrevYear(e);return false;};lf[3].onclick=function(e){D.currentPicker.goToNextYear(e);return false;};} var p=o.el.getAbsolutePos();C.div.style.left=p.x+"px";C.div.style.top=p.y+"px";C.table._DatePicker=o;D.currentPicker=o;return C;},hideCal:function(){document.onclick=Function.EMPTY;var o=DatePicker.currentPicker;if(!o){return;} if(o.cal){if(o.shortcutManager){o.shortcutManager.disable();} if(MSIE){oframe.style.display="none";oframe=null;} o.cal.div.style.display="none";o.cal=null;}},resizeCal:function(){var o=DatePicker.currentPicker;if(!o){return;} if(!o.cal){return;} var p=o.el.getAbsolutePos();if(document.body.clientHeight+supScrollerTop()
').appendTo(form);this.container=$('#'+autocompleteElId);this.fixPosition();if(window.opera){this.el.keypress(function(e){me.onKeyPress(e);});}else{this.el.keydown(function(e){me.onKeyPress(e);});} this.el.keyup(function(e){me.onKeyUp(e);});this.el.blur(function(){if(me.options.text!=null&&($(this).val()==me.options.text||$(this).val()=='')){$(this).val(me.options.text);$(this).addClass("water_mark_text_autocompletion");} me.enableKillerFn();});this.el.focus(function(e){if(me.options.text!=null){var o=$(this);if(o.val()==me.options.text||o.val()==''){o.val('');o.removeClass("water_mark_text_autocompletion");} if(o.val()!=me.options.text){this.select();}} if(me.container.is(":visible")||(me.selector.Type=="single"&&me.selector.SelectedValues.length==1)) return;me.find(e,true);});if(this.selector.Type=="single"){this.el.change(function(){me.onChange();});this.lastSelectedValue=this.selector.SelectedValues;if(this.lastSelectedValue=="") this.lastSelectedValue=null;}},val:function(){if(this.el.val()!=this.options.text){return this.el.val();} return"";},fnFormatResult:function(value,data,currentValue){if(value==""||currentValue=="") return value;var pattern;if(this.options.sqlLikeBehavior=="End"){pattern='^('+currentValue.replace(this.reEscape,'\\$1')+')';} else if(this.options.sqlLikeBehavior=="Begin"){pattern='('+currentValue.replace(this.reEscape,'\\$1')+'$)';} else{pattern='('+currentValue.replace(this.reEscape,'\\$1')+')';} return value.replace(new RegExp(pattern,'gi'),'$1<\/strong>');},setOptions:function(options){var o=this.options;$.extend(o,options);if(o.lookup){this.isLocal=true;if($.isArray(o.lookup)){o.lookup={suggestions:o.lookup,data:[]};}} $('#'+this.mainContainerId).css({zIndex:o.zIndex});this.container.css({maxHeight:o.maxHeight+'px',width:o.width});},clearCache:function(){this.cachedResponse=[];this.badQueries=[];},disable:function(){this.disabled=true;},enable:function(){this.disabled=false;},fixPosition:function(e){var offset=this.el.offset();$('#'+this.mainContainerId).css({top:(offset.top+this.el.innerHeight())+'px',left:offset.left+'px',zIndex:9999});this.container.css({maxHeight:this.options.maxHeight+'px',width:this.options.width});},find:function(e,onfocus){if(this.disabled){return;} switch(e.keyCode){case 38:case 40:return;} if(this.onChangeInterval!=null) clearInterval(this.onChangeInterval);if(this.currentValue!==this.el.val()||onfocus){if(this.options.deferRequestBy>0){var me=this;this.onChangeInterval=setInterval(function(){me.onValueChange();},this.options.deferRequestBy);}else{this.onValueChange();}}},enableKillerFn:function(){var me=this;$(document).bind('click',me.killerFn);},disableKillerFn:function(){var me=this;$(document).unbind('click',me.killerFn);},killSuggestions:function(){this.hide();},onKeyPress:function(e){if(this.disabled||!this.enabled){switch(e.keyCode){case 8:case 46:case 40:break;default:return;}} switch(e.keyCode){case 27:this.el.val(this.currentValue);this.hide();break;case 9:case 13:case 39:if(this.selectedIndex===-1){this.hide();return;} this.select(this.selectedIndex);if(e.keyCode===9){return;} break;case 38:this.moveUp();break;case 40:this.moveDown();break;default:return;} e.stopImmediatePropagation();e.preventDefault();},onKeyUp:function(e){this.find(e);},onChange:function(e){if(this.lastSelectedValue&&this.selector.SelectedValues.length==0){this.lastSelectedValue=null;this.selector.OnChange();}},onValueChange:function(){if(this.onChangeInterval!=null) clearInterval(this.onChangeInterval);this.currentValue=this.el.val();var q=this.getQuery(this.currentValue);this.selectedIndex=-1;if(this.selector&&this.selector.Type=="single"&&this.selector.SelectedValues.length!==0){this.selector.removeall(this.selector.SelectedValues);} if(q.length0&&(this.response[0][this.options.complement]!=undefined);} var dataKeyName=this.selector.DataValueField;var dataTextName=this.selector.DataTextField;if(dataTextName.endsWith("_$$")) dataTextName=dataTextName.substring(0,dataTextName.length-3);for(i=0;i'+this.fnFormatResult(s,id,v)+ (c?"
"+c+"
":"")+'');div.mouseover(mOver(i));div.click(mClick(i));this.container.append(div);} if(5<=i){this.container.append($('
autocomplete_max_items
'));} if($.browser.msie){if(this.container.height()>this.options.maxHeight){this.container.css({"height":this.options.maxHeight+'px'});} else{this.container.css({"height":''});}} if(this.container.width()<200) this.container.width('200px');$('#'+this.mainContainerId).css({top:(this.el.offset().top+this.el.innerHeight())+'px',left:this.el.offset().left+'px'});this.container.show();},processResponse:function(response,args){if(!$.isArray(response)){response=[];} args[0].cachedResponse[args[1]]=response;if(response.length===0){args[0].badQueries.push(args[1]);} if(args[1]===args[0].getQuery(args[0].currentValue)){args[0].response=response;args[0].suggest();}},activate:function(index){var divs,activeItem;divs=this.container.children();if(this.selectedIndex!==-1&&divs.length>this.selectedIndex){if($(divs.get(this.selectedIndex)).attr('class')!='autocomplete_selected_light'){$(divs.get(this.selectedIndex)).attr('class','');} else{$(divs.get(this.selectedIndex)).attr('class','autocomplete_selected');}} this.selectedIndex=index;if(this.selectedIndex!==-1&&divs.length>this.selectedIndex){activeItem=divs.get(this.selectedIndex);if($(activeItem).attr('class')!='autocomplete_selected') $(activeItem).attr('class','selected');else $(activeItem).attr('class','autocomplete_selected_light');} return activeItem;},deactivate:function(div,index){div.className='';if(this.selectedIndex===index){this.selectedIndex=-1;}},select:function(i){var selectedValue,f;selectedValue=this.suggestions[i];if(selectedValue){if(this.selector){if(!this.data[i]) {alert("bad DataValueField");return;} this.selector.add(this.data[i],selectedValue);if(this.selector.Type=="single"){this.el.val(selectedValue);this.lastSelectedValue=selectedValue;this.currentValue=selectedValue;}} else{this.el.val(selectedValue);} if(this.options.autoSubmit){f=this.el.parents('form');if(f.length>0){f.get(0).submit();}} if(this.selector&&this.selector.Type=="single") this.ignoreValueChange=true;$(this.container.children().get(i)).attr('class','autocomplete_selected_light');this.hide();}},moveUp:function(){if(this.selectedIndex===-1){return;} if(this.selectedIndex===0){this.container.children().get(0).className='';this.selectedIndex=-1;this.el.val(this.currentValue);return;} this.adjustScroll(this.selectedIndex-1);},moveDown:function(){if(this.container.is(":visible")){if(this.selectedIndex===(this.suggestions.length-1)){return;} this.adjustScroll(this.selectedIndex+1);} else{this.container.show();this.enabled=true;}},adjustScroll:function(i){var activeItem,offsetTop,upperBound,lowerBound;activeItem=this.activate(i);offsetTop=activeItem.offsetTop;upperBound=this.container.scrollTop();lowerBound=upperBound+this.options.maxHeight-25;if(offsetToplowerBound){this.container.scrollTop(offsetTop-this.options.maxHeight+25);}},onSelect:function(i){var me,onSelect,getValue,s,d;me=this;onSelect=me.options.onSelect;getValue=function(value){var del,currVal,arr;del=me.options.delimiter;if(!del){return value;} currVal=me.currentValue;arr=currVal.split(del);if(arr.length===1){return value;} return currVal.substr(0,currVal.length-arr[arr.length-1].length)+value;};s=me.suggestions[i];d=me.data[i];me.el.val(getValue(s));if($.isFunction(onSelect)){onSelect(s,d);}},defaultText:function(text){this.hasDefaultText=true;var fld_current=this.el;if(this.el.val()==''){this.el.addClass("water_mark_text_autocompletion");this.el.val(text);} this.el.parents("form").each(function(){$(this).submit(function(){if(fld_current.val()==text){fld_current.val('');}});});}};}(jQuery));function AutoCompletion(id,selectorID,objectType){this.id=id;this.txt=document.getElementById(this.id);this.ClientID=this.id;this.tableName=objectType;this.row_top=5;this.tempindexres=0;this.valueCurrent="";this.lastText=this.txt.value;this.type=__ivCtrl[selectorID].Type;this.completion_container_id="c"+this.ClientID;this.completion_container=document.getElementById(this.completion_container_id);this.ddlCompletion=null;this.single=(this.type.toLowerCase()=="single"?true:false);this.arrayResult=new Object();this.start=0;this.selectList=false;this.visibleList=false;this.Prefix=null;this.PrefixList=null;this.URL=null;this.oldValue=null;this.Submit=null;this.Selector=__ivCtrl[selectorID];this.countLast=(this.single&&this.Selector.SelectedValues.length==1?1:-1);if(this.single&&this.Selector.SelectedValues.length==1&&this.Selector.label==null) this.Selector.label=this.txt.value;if(this.type.toLowerCase()=="single"){this.Selector.SelectorID=this.id;this.Selector.Grid.ShowHeader=false;} __ivCtrl[selectorID].Selector=this;this.validateRequest=true;this.FilterCtx=null;this.onchange="";this.lastTextUser="";this.lastValueUser="";if(this.single&&this.Selector.SelectedValues.length==1) this.lastValueUser=this.Selector.SelectedValues;__ivac[this.id]=this;this._onWindowUnloadHandler=null;this._onFocus=null;this._onKeyup=null;this._onKeydown=null;this._onBlur=null;this.deleting=false;this.lastselectedvalue=null;this._onChange=null;this.hasDefaultText=false;this.methodName=null;this.Selector.controltowarning=this.ClientID;this.Selector.targetToWarning=this.txt;} AutoCompletion.prototype={defaultValue:function(text){this.hasDefaultText=true;var fld_current=this.txt;var txt=$("#"+this.id);if(this.txt.value==''){txt.addClass("water_mark_text_autocompletion");this.txt.value=text;}else{} txt.focus(function(){if(this.value==text||this.value==''){this.value='';$(this).removeClass("water_mark_text_autocompletion");} if(this.value!=this.defaultValue){this.select();}});txt.blur(function(){if(this.value==text||this.value==''){this.value=text;$(this).addClass("water_mark_text_autocompletion");}});txt.parents("form").each(function(){$(this).submit(function(){if(fld_current.value==text){fld_current.value='';}});});},init:function(o){this._onWindowUnloadHandler=Function.createDelegate(this,this.finalize);Sys.UI.DomEvent.addHandler(window,'unload',this._onWindowUnloadHandler);this._onFocus=Function.createDelegate(this,this.onFocus);this._onKeyup=Function.createDelegate(this,this.onKeyup);this._onKeydown=Function.createDelegate(this,this.onKeydown);this._onBlur=Function.createDelegate(this,this.onBlur);if(this.single){this._onChange=Function.createDelegate(this,this.onChange);$addHandlers(this.txt,{change:this._onChange},this);} $addHandlers(this.txt,{keyup:this._onKeyup,focus:this._onFocus,keydown:this._onKeydown,blur:this.onBlur},this);},onChange:function(e){if(this.lastselectedvalue==null&&this.Selector.SelectedValues.length==0){this.lastselectedvalue=null;this.Selector.OnChange();}},onFocus:function(e){if(this.single&&this.Selector.SelectedValues.length==1) return;this.searchResult(this,e.target.value,e,true);},onKeyup:function(e){this.searchResult(this,e.target.value,e);},onKeydown:function(e){this.searchListHandleKeyDown(this,e.target.value,e);},onBlur:function(e){var objCompletion=__ivac[this.ClientID];objCompletion.hideResult(objCompletion.completion_container_id);},mouseOverHandler:function(e){ivToolTip.fixedtooltip((this.Selector._toolTip==null?"":""+this.Selector._toolTip),this.txt,e,null,this.txt);},finalize:function(){Sys.UI.DomEvent.removeHandler(window,'unload',this._onWindowUnloadHandler);Sys.UI.DomEvent.removeHandler(this.txt,'focus',this._onFocus);Sys.UI.DomEvent.removeHandler(this.txt,'keyup',this._onKeyup);Sys.UI.DomEvent.removeHandler(this.txt,'keydown',this._onKeydown);Sys.UI.DomEvent.removeHandler(this.txt,'blur',this._onBlur);if(this.single){Sys.UI.DomEvent.removeHandler(this.txt,'blur',this._onChange);this._onChange=null;} this._onFocus=null;this._onKeyup=null;this._onKeydown=null;this._onBlur=null;this.Selector.Selector=null;this.Selector=null;__ivac[this.id]=null;},hideResult:function(nodeID){setTimeout("__ivac['"+this.ClientID+"'].hideResultTimeout('"+nodeID+"');",100);},hideResultTimeout:function(nodeID){document.getElementById(nodeID).style.visibility="hidden";},setDataFieldValue:function(node,valueSelect,textSelect,e){var _eventKeycode;if(window.event)_eventKeycode=window.event.keyCode;else if(e)_eventKeycode=e.which;else return false;if(valueSelect=="01lkad") return;this.AddItemSelect(valueSelect,textSelect);},searchListHandleKeyDown:function(node,valueNode,e){var _eventKeycode;if(window.event)_eventKeycode=window.event.keyCode;else if(e)_eventKeycode=e.which;else return false;this.selectList=false;if(this.ddlCompletion){if(_eventKeycode==40){this.visibleList=true;if(!this.single) this.completion_container.style.visibility="visible";if(this.tempindexres1) this.ddlCompletion[--this.tempindexres].selected=true;} else{this.visibleList=false;} if(this.tempindexres>0&&(_eventKeycode==39||_eventKeycode==13||_eventKeycode==9)){this.AddItemSelect(this.ddlCompletion[this.ddlCompletion.selectedIndex].value,this.ddlCompletion[this.ddlCompletion.selectedIndex].text);this.selectList=true;if(_eventKeycode==9) return;if(window.event)window.stopEvent(event);else if(e)window.stopEvent(e);}}},formatURI:function(strSearch){if(encodeURIComponent) return encodeURIComponent(strSearch);if(escape) return escape(strSearch)},searchResult:function(node,valueNode,e,force){if(!force&&this.selectList) return;var _eventKeycode;if(window.event)_eventKeycode=window.event.keyCode;else if(e)_eventKeycode=e.which;else return false;this.deleting=false;if(this.single){if(_eventKeycode==8||_eventKeycode==46){this.deleting=true;if(this.Selector.SelectedValues.length==1){if(this.lastTextUser!=""){this.lastText=this.lastTextUser;this.countLast=-1;valueNode=this.lastTextUser;} this.Selector.removeall(this.Selector.SelectedValues);} else if(this.Selector.SelectedValues.length==0){if(this.Selector.label!=this.txt.value){if(this.lastTextUser!=""&&this.txt.value.startsWith(this.lastTextUser)){this.txt.value=(this.Prefix==null?"":this.Prefix)+this.lastTextUser;this.lastText=this.lastTextUser;return;}} else{if(this.lastValueUser!=""){this.AddItemSelect(this.lastValueUser,this.Selector.label);return;}}}}} if((this.single&&(_eventKeycode==40||_eventKeycode==38))||(_eventKeycode==39||_eventKeycode==37)) return;if(this.single){if(this.Selector.SelectedValues.length!=0&&this.lastText!=""&&this.lastText!=this.txt.value){this.Selector.removeall(this.Selector.SelectedValues);}} if(_eventKeycode!=40&&_eventKeycode!=38&&_eventKeycode!=39&&_eventKeycode!=13) this.tempindexres=0;var newValue=valueNode;this.oldValue=newValue;if(this.Prefix!=null&&!valueNode.startsWith(this.Prefix)){this.Prefix=null;this.tableName=null;this.hideResult(this.completion_container_id);return;} valueNode=valueNode.toLowerCase();if(this.PrefixList!=null&&this.Prefix==null&&!this.PrefixList[valueNode]){for(var i=0;ivalueNode.length||(this.Prefix!=valueNode&&this.Prefix.length==valueNode.length))){if(!this.PrefixList[this.Prefix]||!this.PrefixList[valueNode]){this.Prefix=null;this.tableName=null;this.hideResult(this.completion_container_id);return;} if(this.Prefix!=valueNode) this.Prefix=valueNode;this.tableName=this.PrefixList[this.Prefix][0];if(!this.PrefixList[this.Prefix][1]) return;newValue="";} if(this.arrayResult[valueNode]||(valueNode==""&&this.arrayResult["null01lkad"])||(valueNode==this.Prefix&&this.arrayResult[this.Prefix+"null01lkad"])) {if(this.PrefixList!=null){if(this.Prefix==null&&this.PrefixList[valueNode]){this.Prefix=valueNode;} if(this.tableName==null) this.tableName=this.PrefixList[this.Prefix][0];if(!this.PrefixList[this.Prefix][1]) return;} if(valueNode==""||valueNode==this.Prefix) this.searchArrayGet(this.arrayResult[this.PrefixList!=null&&this.Prefix!=null?this.Prefix+"null01lkad":"null01lkad"],"no");else this.searchArrayGet(this.arrayResult[valueNode],"no");this.lastTextUser=this.txt.value;} else {if((this.PrefixList==null||(this.Prefix!=null||this.PrefixList[newValue.toLowerCase()]))&&newValue.length>=this.start) {if(newValue.indexOf(this.lastText,0)!=-1&&(this.countLast==0||this.countLast==1)) return;this.lastTextUser=this.txt.value;if(this.PrefixList!=null){if(this.Prefix==null){newValue=newValue.toLowerCase();this.Prefix=newValue;if(this.arrayResult[this.Prefix+"null01lkad"]){this.searchArrayGet(this.arrayResult[this.Prefix+"null01lkad"],"no");return;} newValue="";} else newValue=this.FormatValue(newValue.substring(this.Prefix.length));this.tableName=this.PrefixList[this.Prefix][0];if(!this.PrefixList[this.Prefix][1]) return;} else{newValue=this.FormatValue(newValue);} var XMLPost="data=<"+this.tableName+" field='"+this.ClientID+"' row_top='"+this.row_top+"' prefix='"+(this.Prefix!=null?this.Prefix:"")+"'>"+newValue+"";var gridAjax=new ivAsyncRequest();gridAjax.ValidateRequest=this.validateRequest;gridAjax.OnEndResponse=this.OnEndResponse;gridAjax.Args=this;gridAjax.Url=this.URL+(this.Selector.queryString!=null?"?"+this.Selector.queryString:"");gridAjax.Data=XMLPost;gridAjax.AsyncRequest();}}},getPrefix:function(){var value=this.txt.value;if(this.PrefixList!=null&&this.Prefix==null&&!this.PrefixList[value]){for(var i=0;i","g");value=value.replace(re1,"{¤plus¤}");value=value.replace(re2,"{¤$¤}");value=value.replace(re3,"{¤$¤}lt;");value=value.replace(re4,"{¤$¤}gt;");return value;},CacheResult:function(arrayResultat){if(this.valueCurrent==""){this.arrayResult[this.PrefixList!=null&&this.Prefix!=null?this.Prefix+"null01lkad":"null01lkad"]=arrayResultat;} else this.arrayResult[this.PrefixList!=null&&this.Prefix!=null?this.Prefix+this.valueCurrent:this.valueCurrent]=arrayResultat;},CacheFlush:function(){this.arrayResult=new Object();this.lastText=null;},onCallback:function(response,args){args[0].valueCurrent=args[1];if(args[0].single){if(response.length>1){args[0].lastTextUser=args[0].valueCurrent;args[0].lastText=args[0].valueCurrent;} else if(response.length==1) args[0].lastValueUser=response[0][args[0].Selector.DataValueField];} args[0].searchArrayGet(response);},OnEndResponse:function(executor,eventArgs,args){if(executor.get_responseAvailable()&&IsAuthenticated){var response=executor.get_object();args.valueCurrent=response["valueCurrent"];if(args.single){if(response["DataSource"].length>1){args.lastTextUser=args.valueCurrent;args.lastText=args.valueCurrent;} else if(response["DataSource"].length==1) args.lastValueUser=response["DataSource"][0][args.Selector.DataValueField];} args.searchArrayGet(response["DataSource"]);}},searchArrayGet:function(searchArrayResult,cache){if(this.visibleList) return;var _nodeTxt=document.getElementById(this.id);if(searchArrayResult==null){this.completion_container.innerHTML="";this.lastText=this.valueCurrent;return;} if(cache!="no") this.CacheResult(searchArrayResult);this.countLast=searchArrayResult.length;if(this.countLast==1&&this.single&&!this.deleting){this.completion_container.innerHTML="";this.AddItemSelect(searchArrayResult[0][this.Selector.DataValueField],searchArrayResult[0][this.Selector.DataTextField]);return;} var _HTMLSelectMultiple=new HTMLSelectMultiple("_"+this.id);_HTMLSelectMultiple.dataSource=searchArrayResult;_HTMLSelectMultiple.SelectorClientID=this.ClientID;_HTMLSelectMultiple.onclick=function(e){if(this.selectedIndex==-1)return;__ivac[this.getAttribute("selectorid")].setDataFieldValue(_nodeTxt,this[this.selectedIndex].value,this[this.selectedIndex].text,e);return true;};_HTMLSelectMultiple.SelectedValues=this.Selector.SelectedValues;_HTMLSelectMultiple.DataValueField=this.Selector.DataValueField;_HTMLSelectMultiple.DataTextField=this.Selector.DataTextField;_HTMLSelectMultiple.onkeydown=function(e){if(this.selectedIndex==0) return;var _eventKeycode;if(window.event)_eventKeycode=window.event.keyCode;else if(e)_eventKeycode=e.which;else return false;if(_eventKeycode==39||_eventKeycode==13||_eventKeycode==9) {var _autoCompletion=__ivac[this.getAttribute("selectorid")];_autoCompletion.visibleList=false;if(this.selectedIndex!=-1) _autoCompletion.AddItemSelect(this[this.selectedIndex].value,this[this.selectedIndex].text);_autoCompletion.selectList=true;if(_eventKeycode==9) return;if(window.event)window.stopEvent(event);else if(e)window.stopEvent(e);}};if(this.countLast>=this.row_top) _HTMLSelectMultiple.DefaultText="-- The [1] first results --".replace("[1]",this.countLast);else _HTMLSelectMultiple.DefaultText="-- [1] result(s) --".replace("[1]",this.countLast);this.completion_container.innerHTML="";if(this.countLast!=0){this.completion_container.style.visibility="visible";this.completion_container.appendChild(_HTMLSelectMultiple.renderControl());this.ddlCompletion=_HTMLSelectMultiple.selectCtrl;this.ddlCompletion.onfocus=function(e){this.style.visibility="visible";};this.ddlCompletion.onblur=function(e){this.style.visibility="hidden";};} this.lastText=_nodeTxt.value;},AddItemSelect:function(valueSelect,txtSelect,type){if(this.single&&this.Selector){this.Selector.ShowColumnDelete=false;this.Selector.ShowColumnText=false;} if(this.Prefix!=null) txtSelect=this.Prefix+txtSelect;if(this.single){if(this.Selector.SelectedValues.length!=0) this.Selector.removeall(this.Selector.SelectedValues);this.txt.value=txtSelect;this.ddlCompletion=null;} this.lastText=txtSelect;if(this.single){this.lastselectedvalue=valueSelect;this.Selector.add(valueSelect,txtSelect);this.lastValueUser=this.Selector.SelectedValues.toString();this.completion_container.innerHTML="";} else{this.Selector.add(valueSelect,(this.Selector.ShortStringBegin!=0||this.Selector.ShortStringEnd!=0?ivFormat.ShortString(txtSelect,this.Selector.ShortStringBegin,this.Selector.ShortStringEnd):txtSelect));this.ddlCompletion.options[this.ddlCompletion.options.selectedIndex].style.backgroundColor=GetStyleAttribute(".item_selected","backgroundColor");this.completion_container.style.visibility="hidden";}},onKeyEnter:function(e){press(this.Submit,e);},keyEnterHandler:function(id){if(id!=null){this.Submit=id;$addHandlers(this.txt,{keydown:Function.createDelegate(this,this.onKeyEnter)},this);}}} function HTMLSelectMultiple(id) {this.id=id;this.name=id;this.dataSource="";this.onkeydown="";this.onchange="";this.onclick="";this.selectedValue="";this.star=true;this.selectCtrl=null;this.ReadOnlySensitiv=true;this.DefaultText=null;this.SelectedValue=null;this.SelectorClientID=null;this.DataValueField=null;this.DataTextField=null;} HTMLSelectMultiple.prototype={name:function(){return this.name=name;},size:function(){return this.size=size;},width:function(w){return w},selectedValue:function(){return this.selectedValue;},renderControl:function() {var _select=document.createElement("SELECT");this.selectCtrl=_select;_select.id=this.name;_select.tabIndex=1;_select.name=this.name;_select.onkeydown=this.onkeydown;_select.onchange=this.onchange;_select.size=7;_select.width='230';_select.onclick=this.onclick;_select.ReadOnlySensitiv=this.ReadOnlySensitiv;_select.setAttribute("selectorid",this.SelectorClientID);_select.style.zIndex=999999;if(this.DefaultText!=null) {var _optionSelect=document.createElement("OPTION");_optionSelect.value="01lkad";_optionSelect.appendChild(document.createTextNode(this.DefaultText));_select.appendChild(_optionSelect);} for(var iselect in this.dataSource) {var _optionSelect=document.createElement("OPTION");_optionSelect.value=this.dataSource[iselect][this.DataValueField];if(ivArray.containItemArray(_optionSelect.value,this.SelectedValues)) _optionSelect.style.backgroundColor="#ADD8E6";_optionSelect.appendChild(document.createTextNode(this.dataSource[iselect][this.DataTextField]));_select.appendChild(_optionSelect);} return _select;}} var __numberRegExpDouble=null;var __numberRegExpInteger=null;var __numberRegExpUDouble=null;var __numberRegExpUInteger=null;var __numberRegExpMoney=null;function TxtBox(clientid) {this.ClientID=clientid;__ivCtrl[clientid]=this;this.Control=document.getElementById(clientid);if(!this.Control)return;this.controltovalidate=clientid;this.controltowarning=null;this.isvalid=true;this.DataType=null;this.valuetocompare=null;this.controltocompare=null;this.operatorvalue=null;this.operator=null;this.clientvalidationfunction=null;this.validationexpression=null;this.initialvalue="";this.minimumvalue=null;this.maximumvalue=null;this.enabled=null;this.controlhookup=null;this.century=null;this.cutoffyear=null;this.compareerrormessage=null;this.rangeerrormessage=null;this.groupchar=null;this.digits=null;this.decimalchar=null;this.dateorder="dmy";this.cutoffyear="2029";this.century="2000";this.hasValidateOnEvent=false;this.Validators=null;this.evaluationfunction=null;this.errormessage=this.Control.getAttribute("errormessage");this.timeAssociated=null;var isItIncludedInATabHere=$("#"+clientid).parents(".validator_tab_tofind:first");if(isItIncludedInATabHere!=null) {this.tabId=isItIncludedInATabHere.attr("id");} else {this.tabId=null;} this.frameId=null;this.validationGroup=null;} TxtBox.prototype={Date:function(){if(!this.Control)return;if(this.Validators==null) this.Validators=[];this.DataType="Date";if(this.Control.maxLength==0||this.Control.maxLength>50){this.Control.maxLength=10;} if(this.Control.style.width==0){if(this.Control.maxLength>12) this.Control.style.width="74px";else this.Control.style.width="64px";} if(!this.contains(Enum.ValidatorType.DataType)){this.Validators.push({validatorType:Enum.ValidatorType.DataType,evaluationfunction:isDate,errormessage:this.errormessage,isvalid:true,validationGroup:this.validationGroup});this.AddToValidate();var btnCalendar=$('').attr('id',this.ClientID+"btn").attr('href',"javascript:void();").attr('isicocalendar',"true");$('').attr('align','absmiddle').attr('src',"/image/ico_calendar.gif").attr('border','2').attr('class','btn_calendar').appendTo(btnCalendar);btnCalendar.insertAfter($(this.Control));InstanceDatePicker(this.ClientID,"False",this.ClientID+"btn","True");}},ShortDate:function(){if(!this.Control)return;if(this.Validators==null) this.Validators=[];this.DataType="ShortDate";if(this.Control.style.width==0) this.Control.style.width="48px";if(!this.contains(Enum.ValidatorType.DataType)){this.Validators.push({validatorType:Enum.ValidatorType.DataType,evaluationfunction:isDate,validationexpression:"^\\s*(0[1-9]|[1-2][0-9]|3[0-1])([-./]?)(0[1-9]|1[0-2])\\s*$",errormessage:this.errormessage,isvalid:true,validationGroup:this.validationGroup});this.AddToValidate();}},Time:function(){if(!this.Control)return;if(this.Validators==null) this.Validators=[];this.DataType="DateTime";if(this.Control.style.width==0) this.Control.style.width="64px";if(this.Control.maxLength==0) this.Control.maxLength=10;if(!this.contains(Enum.ValidatorType.DataType)){this.Validators.push({validatorType:Enum.ValidatorType.DataType,evaluationfunction:RegularExpressionValidatorEvaluateIsValid,validationexpression:"(^\s*([0-9][:]|0[0-9]|1[0-9]|2[0-3])((([:]?)([0-9][: ]|[0-5][0-9]))(([:]?)([0-9][:]|[0-5][0-9]))?)?\s*$)",errormessage:this.errormessage,isvalid:true,validationGroup:this.validationGroup});this.AddToValidate();}},Double:function(){if(!this.Control)return;if(this.Validators==null) this.Validators=[];this.DataType="Double";if(this.Control.style.width==0) this.Control.style.width="56px";if(this.Control.maxLength==0) this.Control.maxLength=20;if(!this.contains(Enum.ValidatorType.DataType)){this.Validators.push({validatorType:Enum.ValidatorType.DataType,evaluationfunction:RegularExpressionValidatorEvaluateIsValid,validationexpression:(__numberRegExpDouble==null?'^\\s*([-\\+])?(\\d+)([\\s|,]{1}\\d{3})*([\\.]{1}(\\d+))?\\s*$':__numberRegExpDouble),errormessage:this.errormessage,isvalid:true,validationGroup:this.validationGroup});this.AddToValidate();}},Integer:function(){if(!this.Control)return;if(this.Validators==null) this.Validators=[];this.DataType="Integer";if(this.Control.style.width==0) this.Control.style.width="56px";if(this.Control.maxLength==0) this.Control.maxLength=14;if(!this.contains(Enum.ValidatorType.DataType)){this.Validators.push({validatorType:Enum.ValidatorType.DataType,evaluationfunction:RegularExpressionValidatorEvaluateIsValid,validationexpression:(__numberRegExpInteger==null?'^\\s*([-\\+])?(\\d+)([\\s|,]{1}\\d{3})*\\s*$':__numberRegExpInteger),errormessage:this.errormessage,isvalid:true,validationGroup:this.validationGroup});this.AddToValidate();}},UDouble:function(){if(!this.Control)return;if(this.Validators==null) this.Validators=[];this.DataType="UDouble";if(this.Control.style.width==0) this.Control.style.width="56px";if(this.Control.maxLength==0) this.Control.maxLength=20;if(!this.contains(Enum.ValidatorType.DataType)){this.Validators.push({validatorType:Enum.ValidatorType.DataType,evaluationfunction:RegularExpressionValidatorEvaluateIsValid,validationexpression:(__numberRegExpUDouble==null?'^\\s*(\\d+)([\\s|,]{1}\\d{3})*([\\.]{1}(\\d+))?\\s*$':__numberRegExpUDouble),errormessage:this.errormessage,isvalid:true,validationGroup:this.validationGroup});this.AddToValidate();}},UInteger:function(){if(!this.Control)return;if(this.Validators==null) this.Validators=[];this.DataType="UInteger";if(this.Control.style.width==0) this.Control.style.width="56px";if(this.Control.maxLength==0) this.Control.maxLength=14;if(!this.contains(Enum.ValidatorType.DataType)){this.Validators.push({validatorType:Enum.ValidatorType.DataType,evaluationfunction:RegularExpressionValidatorEvaluateIsValid,validationexpression:(__numberRegExpUInteger==null?'^\\s*(\\d+)([\\s|,]{1}\\d{3})*\\s*$':__numberRegExpUInteger),errormessage:this.errormessage,isvalid:true,validationGroup:this.validationGroup});this.AddToValidate();}},Email:function(){if(!this.Control)return;if(this.Validators==null) this.Validators=[];this.DataType="Email";if(this.Control.maxLength==0) this.Control.maxLength=128;if(!this.contains(Enum.ValidatorType.DataType)){this.Validators.push({validatorType:Enum.ValidatorType.DataType,evaluationfunction:RegularExpressionValidatorEvaluateIsValid,validationexpression:"([_a-zA-Z0-9-]+(\\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)+)",errormessage:this.errormessage,isvalid:true,validationGroup:this.validationGroup});this.AddToValidate();}},EmailList:function(){if(!this.Control)return;if(this.Validators==null) this.Validators=[];this.DataType="EmailList";if(!this.contains(Enum.ValidatorType.DataType)){this.Validators.push({validatorType:Enum.ValidatorType.DataType,evaluationfunction:RegularExpressionValidatorEvaluateIsValid,validationexpression:"((([_a-zA-Z0-9-]+(\\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)+)(;|,)?)*)",errormessage:this.errormessage,isvalid:true,validationGroup:this.validationGroup});this.AddToValidate();}},String:function(){if(!this.Control)return;if(this.Validators==null) this.Validators=[];this.DataType="String";if(!this.contains(Enum.ValidatorType.DataType)){this.Validators.push({validatorType:Enum.ValidatorType.DataType,evaluationfunction:RegularExpressionValidatorEvaluateIsValid,validationexpression:"([a-zA-Z0-9-àäâéèëêìïîòöôùüûÿ@_ ]*)",errormessage:this.errormessage,isvalid:true,validationGroup:this.validationGroup});this.AddToValidate();}},Money:function(){if(!this.Control)return;if(this.Validators==null) this.Validators=[];this.DataType="Money";this.Control.style.textAlign="right";if(!this.contains(Enum.ValidatorType.DataType)){this.Validators.push({validatorType:Enum.ValidatorType.DataType,evaluationfunction:RegularExpressionValidatorEvaluateIsValid,validationexpression:(__numberRegExpMoney==null?'^\\s*([-\\+])?(\\d+)([\\s|,]{1}\\d{3})*([\\.]{1}(\\d{1,2}))?\\s*$':__numberRegExpMoney),errormessage:this.errormessage,isvalid:true,validationGroup:this.validationGroup});this.AddToValidate();}},RegExpression:function(regExpression){if(!this.Control)return;if(this.Validators==null) this.Validators=[];if(!this.contains(Enum.ValidatorType.DataType)){this.Validators.push({validatorType:Enum.ValidatorType.DataType,evaluationfunction:RegularExpressionValidatorEvaluateIsValid,validationexpression:regExpression,errormessage:this.errormessage,isvalid:true,validationGroup:this.validationGroup});this.AddToValidate();}},CallBackFunction:function(callBackFunction){if(!this.Control)return;if(this.Validators==null) this.Validators=[];if(!this.contains(Enum.ValidatorType.DataType)){this.Validators.push({validatorType:Enum.ValidatorType.DataType,evaluationfunction:callBackFunction,validationexpression:null,errormessage:this.errormessage,isvalid:true,validationGroup:this.validationGroup});this.AddToValidate();}},RequiredField:function(inline){if(!this.Control)return;if(this.Validators==null) this.Validators=[];if(!this.contains(Enum.ValidatorType.RequiredField)){this.Validators.push({validatorType:Enum.ValidatorType.RequiredField,evaluationfunction:RequiredFieldValidatorEvaluateIsValid,validationexpression:null,errormessage:this.errormessage,isvalid:true,validationGroup:this.validationGroup});var c=$(this.Control);if(inline){var container=$("").css("white-space","nowrap");container.insertBefore(c);var d=null;if(this.DataType=="Date") d=c.next();c.appendTo(container);if(d!=null) d.appendTo(container);$("").addClass("star").text("*").appendTo(c.parent());} else{$("").addClass("star").text("*").insertAfter((this.DataType=="Date"?c.next():c));} this.AddToValidate();}},Compare:function(){if(!this.Control)return;if(this.Validators==null) this.Validators=[];if(!this.contains(Enum.ValidatorType.Compare)){this.Validators.push({validatorType:Enum.ValidatorType.Compare,evaluationfunction:CompareValidatorEvaluateIsValid,validationexpression:null,errormessage:this.Control.getAttribute("compareerrormsg"),isvalid:true,validationGroup:this.validationGroup});this.AddToValidate();} if(this.controltocompare!=null&&this.controltocompare!='') this.controlhookup=this.controltocompare;this.compareerrormessage=this.Control.getAttribute("compareerrormsg");},Range:function(MinimumValue,MaximumValue){if(!this.Control)return;if(this.Validators==null) this.Validators=[];if(!this.contains(Enum.ValidatorType.Range)){this.Validators.push({validatorType:Enum.ValidatorType.Range,evaluationfunction:RangeValidatorEvaluateIsValid,validationexpression:null,errormessage:this.Control.getAttribute("rangeerrormsg"),isvalid:true,validationGroup:this.validationGroup});this.AddToValidate();} this.minimumvalue=MinimumValue;this.maximumvalue=MaximumValue;this.rangeerrormessage=this.Control.getAttribute("rangeerrormsg");},Focus:function(){this.Control.focus();this.Control.focus();},SetFrameId:function(frameId){if(frameId!=null){if(!this.Control)return;Page_FrameValidator[this.ClientID]=frameId;this.frameId=frameId;}},AddToValidate:function(){if(!this.Control)return;if(!Array.contains(__ivCtrlToValidate,this.ClientID)) __ivCtrlToValidate.push(this.ClientID);ValidateOnEvent(this.Control,this);},RemoveOnValidate:function(validatorType){if(typeof(validatorType)=="number"){if(Array.contains(__ivCtrlToValidate,this.ClientID)){for(var item in this.Validators){if(this.Validators[item].validatorType==validatorType){Array.removeAt(this.Validators,item);var c=$(this.Control);if(validatorType==Enum.ValidatorType.RequiredField){var star=c.next(".star:first");if(star.length==1){star.remove();}} if(validatorType==Enum.ValidatorType.DataType&&this.DataType=="Date"){var calendar=c.parent().children("A[isicocalendar=true]");if(calendar.length==1){calendar.remove();}} c.css('borderColor','');c.css('borderWidth','');c.css('borderStyle','');break;}}}} else Array.remove(__ivCtrlToValidate,this.ClientID);},contains:function(validatorType){for(var item in this.Validators){if(this.Validators[item].validatorType==validatorType) return true;} return false;},$get:function(){this.Control=$get(this.ClientID);return this.Control;},val:function(){var value=ValidatorTrim(this.Control.value);if(value=="") return"";if(this.DataType=="Date"){var hh=0,mm=0,ss=0;if(this.timeAssociated&&__ivCtrl[this.timeAssociated].isvalid){var strtime=__ivCtrl[this.timeAssociated].val();if(strtime!=""){var time=strtime.split(':');if(time.length>0) hh=time.shift();if(time.length>0) mm=time.shift();if(time.length>0) ss=time.shift();}} var date=ConvertToDate(value);if(date!=null) return new Date(date.getFullYear(),date.getMonth(),date.getDate(),hh,mm,ss);else return null;} return ConvertTo(value,this.DataType,this);}} Enum.ValidatorType=function(){};Enum.ValidatorType.prototype={DataType:0,Range:1,RequiredField:2,Compare:3} Enum.ValidatorType.registerEnum("Enum.ValidatorType",false);function containItemArray(value,arrayref) {for(var _item in arrayref) {if(arrayref[_item]==value) {return true;}} return false;} function GetClientID(uniqueID){if(uniqueID!=null){while(uniqueID.indexOf(":")>=0){uniqueID=uniqueID.replace(":","_");} return uniqueID;} return uniqueID;} function SelectorControl(ClientID,PostName,objectType,typeSelector,type,selectorID,numberColumn,gridLines,dataValueField,dataTextField,align){__id=GetClientID(PostName);this.key=__id;this.ClientID=ClientID;this.Control=document.getElementById(this.ClientID);__ivCtrl[this.key]=this;this.PostName=PostName;var value=$("#"+this.key).val();if(value) this.SelectedValues=value.split(",");else this.SelectedValues=new Array();this.ObjectType=objectType;this.Grid=new Grid(ClientID);this.Type=type;this.ShowColumnDelete=true;this.ShowColumnText=true;this.Columns=numberColumn;this.SelectorID=(selectorID==null?ClientID:selectorID);this.SelectorControl=document.getElementById(this.SelectorID);this.isSelector=true;this.ShowHeader=false;this.value=null;this.label=null;this.isGrid=(this.Grid&&this.Grid.table&&this.Grid.table.nodeName=="TABLE");var isItIncludedInATabHere=$("#"+ClientID).parents(".validator_tab_tofind:first");if(isItIncludedInATabHere!=null) {this.tabId=isItIncludedInATabHere.attr("id");} else {this.tabId=null;} this.Validators=null;this.isvalid=true;this.evaluationfunction=null;this.onchange="";this.controltovalidate=ClientID;this.initialvalue="";this.frameId=null;this.indexDelete=0;this.indexText=1;this.TypeSelector=typeSelector;this.Selector=this;this.AutoPostBack=false;this.IgnoreValidateEvent=true;this.requiredField=false;this.closeAfterSelection=false;this.shortBegin=0;this.shortEnd=0;this.autoSelect=false;this.queryString=null;this.popupUrl=null;this.DataValueField=dataValueField;this.DataTextField=dataTextField;this.filtercontext=null;this.elementToWarning=null;this.gridLines=gridLines;this.initControl();this.onclick="";this.context={};this.targetClick=null;this.QueryString={};this.validationGroup=null;this.causesValidation=false;this.targetToWarning=this.SelectorControl;this._toolTip=null;this._mouseover=null;this.keepState=false;this.complement=false;this.maxvalues=10;this.maxitemsenabled=false;this.footer=null;this.footerNb=null;this.align=align;this.clickHandler=null;this.parentNodeStar=null;this.OnInit();} SelectorControl.prototype={initControl:function(){if(this.Control&&!this.gridLines){this.Control.cellSpacing=0;}},OnInit:function(){if((this.TypeSelector=="DropDownList"||this.TypeSelector=="topdown")&&this.SelectorControl&&this.addChangeHandler){Sys.UI.DomEvent.addHandler(this.SelectorControl,'change',Function.createDelegate(this,this.addChangeHandler));}},addChangeHandler:function(evt){var target=evt.target;if(this.Type.toLowerCase()!="single") this.add(target.value,target.options[target.options.selectedIndex].text,target);else{if(this.causesValidation&&!ClientValidate(this.PostName,true,this.validationGroup)){if(this.TypeSelector=="DropDownList"||this.TypeSelector=="topdown"){target.value=this.SelectedValues;} return false;} this.addonly(target.value,target.options[target.options.selectedIndex].text,target);if(this.requiredField){this.isvalid=this.SelectedValues.length!=0;ValidatorUpdateDisplay(this);}}},hasHeader:function(){this.ShowHeader=true;if(this.Grid) this.Grid.ShowHeader=true;},addValue:function(value){if(value!="") this.SelectedValues.push(value);$("#"+this.key).val(this.SelectedValues);},removeOneValue:function(value){ivArray.removeItemArray(value,this.SelectedValues);$("#"+this.key).val(this.SelectedValues);this.footerDisplay();},removeAllValues:function(){this.SelectedValues=[];$("#"+this.key).val("");},footerDisplay:function(){var nb_item=this.SelectedValues.length;if(!this.maxitemsenabled||(nb_item<=this.maxvalues&&this.footer==null)) return 0;if(this.footer==null){this.footer=$("#"+this.key+'footer');if(!this.footer){this.footer=undefined;return 0;} this.footer.css("display","block");this.footerNb=$("#"+this.key+'footerNb');} this.footerNb.html(' ( '+nb_item+' )');return 1;},add:function(value,label,obj,ignoreChangeEvent){if(this.causesValidation&&!ClientValidate(this.PostName,true,this.validationGroup)){if(this.TypeSelector=="Checkbox") abort(label);else if(obj&&(this.TypeSelector=="DropDownList"||this.TypeSelector=="topdown")) obj.value=this.SelectedValues;else if(this.TypeSelector=="txtbox"&&this.Type.toLowerCase()=="single"&&this.Selector!=null&&this.Selector.txt!=null){this.Selector.txt.value="";} return false;} if(this.requiredField){this.isvalid=true;ValidatorUpdateDisplay(this);} if(this.Type.toLowerCase()=="single"&&(this.TypeSelector=="topdown"||this.TypeSelector=="Checkbox")){this.addonly(value,label,obj);if(this.TypeSelector=="topdown") this.topdown(this.valueOf,this.label);return;} if(this.TypeSelector=="Checkbox"){this.value=value.value;this.label=value.label;} else{this.value=value;this.label=label;} if(this.TypeSelector=="Checkbox"){if(value.checked) this.addValue(this.value);else this.removeOneValue(this.value);if(!ignoreChangeEvent) this.OnChange();return;} if(this.TypeSelector=="txtbox"&&this.label!=null) this.txtbox(this.valueOf,this.label);else if(this.TypeSelector=="topdown") this.topdown(this.valueOf,this.label);if(ivArray.containItemArray(this.value,this.SelectedValues)) {if(obj) obj.value='';return;} if(this.Type.toLowerCase()=='single'){if(!this.isGrid) return;this.Grid.remove();this.SelectedValues=[];} this.addValue(this.value);if(this.footerDisplay()==1) {return;} if(!this.isGrid) return;var _row=new Rows();if(this.ShowHeader) this.Grid.Rows.insert(1,_row);else this.Grid.Rows.insert(0,_row);_row.row.className='item_selected';_row.row.setAttribute("key",this.value);for(var i=0;i"+this._toolTip),this.Control,e,null,this.targetToWarning);},addEvent:function(popupUrl,target){if(this.SelectorControl){this.popupUrl=popupUrl;this.targetClick=(target?document.getElementById(target):this.SelectorControl);this.clickHandler=Function.createDelegate(this,this.onClickEllipsis);Sys.UI.DomEvent.addHandler(this.targetClick,'click',this.clickHandler);}},Click:function(js){var args=[];if(typeof(js)=="function"){for(var arg=0;arg=this.table.tBodies[0].childNodes.length) this.add(r);else this.table.tBodies[0].insertBefore(r.row,this.table.rows[1]);}},initializeRow:function(){for(var i=0;i0){if(this.ShowHeader&&this.table.rows.length>0) _header=this.table.rows[0].cloneNode(true);this.table.removeChild(this.table.tBodies[0]);} this.table.appendChild(document.createElement("TBODY"));if(_header!==null) this.table.tBodies[0].appendChild(_header);},removeAt:function(index){this.table.deleteRow(index);if(this.table.rows.length>0) {var colspan=this.table.rows[0].cells[0].colSpan;var i=0;for(i=1;i").addClass("star").text("*").appendTo(c.parent());this.AddToValidate();}},warningFrame:function(){var c=$(this.Control);if(!c.parent().attr("frameisdefined")){var container=$("").css("white-space","nowrap");container.insertBefore(c);$("").css("padding","1px").attr("frameisdefined","true").append(c).appendTo(container);} return c.parent();},isError:function(){this.isvalid=false;var c=this.warningFrame();if(document.all) c.css("border","2px solid red");else $(this.Control).css("border","2px solid red");},contains:function(validatorType){for(var item in this.Validators){if(this.Validators[item].validatorType==validatorType) return true;} return false;},$get:function(){this.Control=$get(this.ClientID);return this.Control;},val:function(){return this.Control.value;}} function RadioBtn(clientid) {this.ClientID=clientid;__ivCtrl[clientid]=this;this.Control=document.getElementById(clientid);if(!this.Control)return;this.controltovalidate=clientid;this.controltowarning=null;this.isvalid=true;this.initialvalue="";this.Validators=null;this.evaluationfunction=null;this.errormessage=this.Control.getAttribute("errormessage");this.tabId=null;var isItIncludedInATabHere=$("#"+clientid).parents(".validator_tab_tofind:first");if(isItIncludedInATabHere!=null) {this.tabId=isItIncludedInATabHere.attr("id");} else {this.tabId=null;} this.frameId=null;this.validationGroup=null;} RadioBtn.prototype={AddToValidate:function(){if(!Array.contains(__ivCtrlToValidate,this.ClientID)) __ivCtrlToValidate.push(this.ClientID);},RemoveOnValidate:function(validatorType){if(validatorType){if(Array.contains(__ivCtrlToValidate,this.ClientID)){for(var item in this.Validators){if(this.Validators[item].validatorType==validatorType){Array.removeAt(this.Validators,item);break;}}}} else Array.remove(__ivCtrlToValidate,this.ClientID);},RequiredField:function(errormsg){if(this.Validators==null) this.Validators=[];if(this.frameId!=null) Page_FrameValidator[this.ClientID]=this.frameId;if(!this.contains(Enum.ValidatorType.RequiredField)){this.Validators.push({validatorType:Enum.ValidatorType.RequiredField,evaluationfunction:RequiredFieldValidatorEvaluateIsValid,validationexpression:null,errormessage:(errormsg?errormsg+": mandatory":(this.errormessage==null?"":this.errormessage+": ")+"mandatory"),isvalid:true,validationGroup:this.validationGroup});var star=document.createElement("SPAN");star.className="star";star.appendChild(document.createTextNode("*"));this.Control.parentNode.appendChild(star);this.AddToValidate();}},contains:function(validatorType){for(var item in this.Validators){if(this.Validators[item].validatorType==validatorType) return true;} return false;},$get:function(){this.Control=$get(this.ClientID);return this.Control;},val:function(){return this.Control.checked;}} var _paramsGridAjax={};var browseVersion=parseInt(navigator.appVersion.split("MSIE")[1]);try{if(!BrowseIE&&!containsStyle(".PowerGridClass td:last-child")){document.styleSheets[0].insertRule(".PowerGridClass td:last-child {padding-right: 20px;}",0)}} catch(e){} function cellIndex(node) {if(node==null) return-1;var i=0;while((node=node.previousSibling)!=null) {i++;} return i;} function HeightAllGrid(container){var _scrollHeightContent=$get("content").scrollHeight;var _heightContent=$get("content").offsetHeight;if(_scrollHeightContent>_heightContent){var _heightAllGrid=initResizeGrid(container);var msgline=document.getElementById("msgline");if(msgline!=null) {_heightContent-=msgline.offsetHeight;} fixeHeightGrid(container,_scrollHeightContent,_heightContent,_heightAllGrid);} else if(BrowseIE){resizeGridNoScroll(container);} window.onresize=OnResizePowerGrid;} function resizeGridNoScroll(containerGrid) {if(containerGrid!=null) {for(var i=0;i0) HeightAllGrid(container);}} function ResizeIEPowerGrid(){var container=[];for(var _grid in __ivCtrl){if(__ivCtrl[_grid].isGrid&&__ivCtrl[_grid].Resize){if(BrowseIE&&browseVersion<7&&__ivCtrl[_grid].containerHeaderGrid){__ivCtrl[_grid].containerHeaderGrid.childNodes[0].style.width=0;} GridToResize(_grid,container);}} if(container.length>0) HeightAllGrid(container);for(var _grid in __ivCtrl){if(__ivCtrl[_grid].isGrid&&__ivCtrl[_grid].Resize){if(__ivCtrl[_grid].containerHeaderGrid&&__ivCtrl[_grid].containerGrid.scrollHeight==__ivCtrl[_grid].containerGrid.offsetHeight){__ivCtrl[_grid].containerHeaderGrid.style.display="none";} else if(document.documentMode){}}}} function GridToResize(_grid,container){if(__ivCtrl[_grid].container!=null&&__ivCtrl[_grid].container.length>0){var isEnabled=false;for(var j=__ivCtrl[_grid].container.length-1;j>=0;j--){var id=__ivCtrl[_grid].container[j];if(id.startsWith("part")) id=id.substr(4);var containerNode=$get(id);if(containerNode&&containerNode.style.display=="none"){isEnabled=false;break;} else isEnabled=true;} if(isEnabled) container.push(_grid);} else{container.push(_grid);} __ivCtrl[_grid].containerGrid.style.height="100%";} function PowerGrid(clientid,id,uniqueID,ModuleName,PageName,sortExpression,sortDirection,ajax,resize,rowCount,pageIndex,allowPaging,pageSize) {this.ClientID=clientid;this.id=id;this.ModuleName=ModuleName;this.PageName=PageName;this.HideColumns=false;this.Height=0;this.HeightMin=0;this.scroll=false;this.NewPageIndex=pageIndex+1;this.ColumnsCount=0;this.RowCount=rowCount;this.PageClientValidate=false;this.PageAjax=null;this.overflow=resize;this.hiddenPagination=null;this.hdnSortExpression=null;this.hdnSortDirection=null;this.OrderBy=sortExpression;this.SortDirection=(sortDirection==""?"Ascending":sortDirection);this.Resize=resize;this.PagerStyle=null;this.FilterValue=null;this.UniqueID=uniqueID;this.HideColumnsAjaxUrl=null;this.AllowPaging=allowPaging;this.ContextMenu=null;this.DataContextMenu=null;this.table=$("#"+clientid);this.isBinding=false;this.menuInstance=null;this.ColumnMenu=null;this.pageSize=pageSize;var isItIncludedInATabHere=this.table.parents(".validator_tab_tofind:first");if(isItIncludedInATabHere!=null) {this.tabId=isItIncludedInATabHere.attr("id");} else {this.tabId=null;} this.UpdateProgress=null;this.panelLoading=null;this.panelLoadingImg=null;this.PageIndex=pageIndex;this.isGrid=true;this.IgnoreChangesOnUnload=true;this.Ajax=ajax;this.dataKeys=null;this.cb={};this.SelectorAssociated=null;this.itemsSelected=0;this.InitializeHiddenField();this.initializeObject();this.LoadImageLoading();this._documentClick=null;this.container=null;this.showmoreitems=false;this.webpart=null;this.dataTextKeyCollection=null;} PowerGrid.prototype={LoadImageLoading:function(){var panelLoading=document.createElement("DIV");panelLoading.id="p"+this.ClientID;panelLoading.style.display="none";panelLoading.style.width="100%";panelLoading.style.position="absolute";panelLoading.style.top=0;panelLoading.style.left=0;panelLoading.style.zIndex=999;panelLoading.style.backgroundColor="#000";panelLoading.style.opacity=0.2;panelLoading.style.MozOpacity="20%";panelLoading.style.filter="alpha(opacity=20)";var frmLoading=document.createElement("IFRAME");frmLoading.style.backgroundColor="#000";frmLoading.style.MozOpacity="20%";frmLoading.style.opacity=0.2;frmLoading.style.filter="alpha(opacity=20)";frmLoading.src="/image/spacer.gif";frmLoading.width="100%";frmLoading.frameBorder=0;frmLoading.scrolling="no";panelLoading.appendChild(frmLoading);if(this.Container) this.Container.appendChild(panelLoading);this.panelLoading=panelLoading;var panelLoadingImg=document.createElement("DIV");panelLoadingImg.style.display="none";panelLoadingImg.border=1;panelLoadingImg.style.width="100%";panelLoadingImg.style.position="absolute";panelLoadingImg.style.top=0;panelLoadingImg.style.left=0;panelLoadingImg.style.zIndex=1000;var imgOpac=document.createElement("IMG");imgOpac.src="/image/ico_loading_grid.gif";imgOpac.style.position="absolute";imgOpac.style.top="40%";imgOpac.style.left="50%";imgOpac.style.width="50px";imgOpac.style.height="50px";imgOpac.style.marginLeft="-10px";imgOpac.style.marginTop="-10px";imgOpac.border=0;panelLoadingImg.appendChild(imgOpac);if(this.Container) this.Container.appendChild(panelLoadingImg);this.panelLoadingImg=panelLoadingImg;},dispose:function(){delete this.grid;delete this.Header;delete this.containerGrid;delete this.Container;delete this.containerHeaderGrid;delete this.ColumnMenu;if(this._documentClick!=null) Sys.UI.DomEvent.removeHandler(document,'click',this._documentClick);},initializeObject:function(){this.grid=document.getElementById(this.ClientID);if(this.grid) {this.table=$("#"+this.ClientID);this.Header=this.grid.rows[0];this.containerGrid=this.grid.parentNode;this.Container=this.grid.parentNode.parentNode;this.ColumnMenu=document.getElementById("col"+this.ClientID);this.grid.style.borderCollapse="separate";if(this.overflow){this.Container.appendChild(document.createElement("DIV"));var divHeader=document.createElement("DIV");divHeader.style.zIndex=3;divHeader.style.visibility="hidden";divHeader.style.position="absolute";this.Container.insertBefore(divHeader,this.containerGrid);this.bind();} if(Querystring["isselector"]=="true"&&Querystring["object"]){this.SelectorAssociated=upperWindow.__ivCtrl[Querystring["object"]];this.selectedBackColor();}}},slider:function(){$("
").attr("container",this.ClientID).appendTo($("#sl"+this.ClientID));$("#slider"+this.ClientID).slider({step:15,max:90,min:15,change:function(event,ui){__ivCtrl[this.container].GoToPageOfGrid(0,__ivCtrl[this.container].NewPageIndex,ui.value,null,"PageSize");},value:this.pageSize});this.showMoreItems();$('   ').appendTo($("#mi"+this.ClientID));var select=$('