
(function()
{var a=window.navigator.userAgent;WL.browser={ie:false,firefox:false,safari:false,opera:false,v:0};if(a.indexOf("MSIE")>=0)
{if(a.indexOf("Win64")==-1)
{WL.browser.v=parseInt(a.split("MSIE")[1]);if(WL.browser.v>=6)WL.browser.ie=true;}}
else if(a.indexOf("Firefox")>=0)
{var b=a.split("Firefox/")[1].split("."),c=parseInt(b[0]);if(c>=2)WL.browser.firefox=true;else
{var d=parseInt(b[1]);if(c==1&&d>=5)WL.browser.firefox=true;}}
else if(a.indexOf("Safari")>=0)WL.browser.safari=true;else if(a.indexOf("Opera")>=0)WL.browser.opera=true;})();WL.browser.option={};WL.browser.option.rtlTableScrollOnRight=!WL.browser.safari;WL.browser.option.cssPositionFixed=!(WL.browser.ie&&(WL.browser.v<7||(document.compatMode&&document.compatMode=="BackCompat")));Function.prototype.bind=function(o){var f=this;return function(){return f.apply(o,arguments);}}
Function.prototype.bindWA=function(o){var f=this;var a=[];for(var i=1;i<arguments.length;++i)a.push(arguments[i]);return function(){var p=[];for(var i=0;i<arguments.length;++i)p.push(arguments[i]);return f.apply(o,a.concat(p));}}
Function.prototype.raise=function(ctx,timeout)
{var m=this.bind(ctx);return function(){if(m.__raiseCookie)window.clearTimeout(m.__raiseCookie);var a=arguments;m.__raiseCookie=window.setTimeout(function(){m.apply(ctx,a);m.__raiseCookie=null;},timeout||0);};}
Array.prototype.clear=function(){this.splice(0,this.length);}
Array.prototype.insert=function(index,item){this.splice(index,0,item);}
Array.prototype.indexOf=function(item){for(var i=0;i<this.length;++i)if(this[i]==item)return i;return-1;}
Array.prototype.remove=function(item){for(var i=0;i<this.length;++i)if(this[i]==item){this.splice(i,1);return;}}
Array.prototype.removeAt=function(index){this[index]=null;this.splice(index,1);}
Array.prototype.removeIf=function(remover){for(var i=this.length-1;i>=0;i--)if(remover(this[i]))this.splice(i,1);}
Array.prototype.findIndex=function(finder){for(var i=0;i<this.length;++i)if(finder(this[i]))return i;return-1;}
Array.prototype.find=function(finder){var i=this.findIndex(finder);return i!=-1?this[i]:null;}
Array.prototype.replace=function(item,newitem){for(var i=0;i<this.length;++i)if(this[i]==item){this[i]=newitem;return;}}
Array.prototype.replaceIf=function(replacer,newitem){for(var i=0;i<this.length;++i)if(replacer(this[i])){this[i]=newitem;return;}}
Array.prototype.clone=function(){var ar=[];for(var i=0;i<this.length;++i)ar.push(this[i]);return ar;}
Array.prototype.binarySearch=function(value,comparer){var l=0,r=this.length-1,m;if(comparer!=null){var res;while(l<=r){m=(l+r)>>1;res=comparer(this[m],value);if(res==0)return m;if(res<0)l=m+1;else r=m-1;}}else{while(l<=r){m=(l+r)>>1;if(this[m]==value)return m;if(this[m]<value)l=m+1;else r=m-1;}}return~l;}
Array.prototype.equals=function(ar,comparer){if(this.length!=ar.length)return false;if(comparer!=null){for(var i=0;this.length;++i)if(comparer(this[i],ar[i])!=0)return false;}else{for(var i=0;this.length;++i)if(this[i]!=ar[i])return false;}return true;}
String.empty="";String.isNullOrEmpty=function(s){return s!=null&&s.length>0;}
String.format=function(f){var a=arguments;return f.replace(/{(\d+)}/ig,function($0,$1){return(a[Number($1)+1]);});}
String.prototype.trim=function(c){if(c==null)c=' ';var i,f,t;for(i=0;i<this.length;++i)if(this.charAt(i)!=c)break;f=i;for(i=this.length-1;i>=0;i--)if(this.charAt(i)!=c)break;t=i;if(f>t)return"";return this.substring(f,t+1);}
String.prototype.trimLeft=function(c){if(c==null)c=' ';var i,f,t;t=this.length-1;for(i=0;i<this.length;++i)if(this.charAt(i)!=c)break;f=i;return this.substring(f,t+1);}
String.prototype.trimRight=function(c){if(c==null)c=' ';var i,f,t;f=0;for(i=this.length-1;i>=0;i--)if(this.charAt(i)!=c)break;t=i;if(f>t)return"";return this.substring(f,t+1);}
String.prototype.escapeXML=function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;");}
String.prototype.unescapeXML=function(){return this.replace(/&apos;/g,"'").replace(/&quot;/g,"\"").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&");}
String.prototype.escapeHTML=function(){return this.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/\u00A0/g,"&nbsp;");}
String.prototype.unescapeHTML=function(){return this.replace(/&nbsp;/g,"\u00A0").replace(/&gt;/gm,">").replace(/&lt;/gm,"<").replace(/&amp;/gm,"&");}
Math.middle=function(v1,v2,v3){return v2<v3?(v2<v1?(v3<v1?v3:v1):v2):(v3<v1?(v2<v1?v2:v1):v3);}
Number.prototype.toHexString=function(n){var r=this.toString(16);n-=r.length;if(n<=0)return r;var a=[];while(n--)a.push("0");a.push(r);return a.join("");}
Number.prototype.format=function(n){var c=parseInt(n);var o=this.toString();var d=o.length-c;if(d>0)return o;var a=[];while(d++<0)a.push(0);a.push(o);return a.join("");}
Number.prototype.NaN0=function(){return isNaN(this)?0:this;}
Number.prototype.toMoney=function(fraction){return WL.Utils.floatToString(this,fraction!=null?fraction:CultureInfo.Currency.decimalDigits,true,true,CultureInfo.Currency.groupSeparator,CultureInfo.Currency.decimalSeparator);}
Number.fromMoney=function(s){return parseFloat(s.split(CultureInfo.Currency.groupSeparator).join('').replace(CultureInfo.Currency.decimalSeparator,'.'));}
WL.using=function(namespace,use_as)
{if(typeof(use_as)=='undefined'||use_as==null)
use_as=window;for(var p in namespace)use_as[p]=namespace[p];}
WL.expandClass=function(t,i){if(typeof(i)=="function")i.call(t,t.prototype);else for(var p in i)t.prototype[p]=i[p];}
WL.Class=function(bc,c,i){var l=function(){};l.prototype=bc.prototype;var cc=c;cc.base=new l();cc.prototype=new l();WL.expandClass(cc,i);cc.prototype.constructor=cc;return cc;}
WL.JSObject=function(t,obj){var o=new t();for(var p in obj)o[p]=obj[p];return o;}
if(typeof(window.showModalDialog)!="undefined")
{WL.__showModalDialog=function(sURL,vArguments,sFeatures,returner)
{var ret=window.showModalDialog(sURL,vArguments,sFeatures);if(returner!=null)
returner(ret);}
WL.returnValue=function(value)
{window.returnValue=value;}
WL.getModalDialogFeatures=function(width,height,scroll,resizable)
{var features=["dialogWidth:",width?width+"px":"auto",";dialogHeight:",height?height+"px":"auto",";scroll:",scroll?"yes":"no",";resizable:",resizable?"yes":"no",";status:yes;help:no"];return features.join('');}}
else
{WL.__showModalDialog=function(sURL,vArguments,sFeatures,returner)
{var opener=window.self;var w=window.open(sURL,"_blank",sFeatures);w.dialogArguments=vArguments;var w_focus=function(){w.focus();};var handler=function()
{if(w.closed&&!w.removed)
{w.removed=true;window.removeEventListener("focus",handler,true);var value=undefined;if(window.__returnValue)
{value=window.__returnValue;window.__returnValue=null;}
if(returner!=null)
returner(value);}
window.blur();};window.addEventListener("focus",handler,true);w.addEventListener("blur",w_focus,true);}
WL.returnValue=function(value)
{top.opener.__returnValue=value;}
WL.getModalDialogFeatures=function(width,height,scroll,resizable)
{var left=width?((window.screen.availWidth-width)/2).NaN0():0;var top=height?((window.screen.availHeight-height)/2).NaN0():0;return String.format("modal=yes,channelmode=no,directories=no,fullscreen=no{0}{1}{2}{3},scrollbars={4},resizable={5},titlebar=no,toolbar=no,location=no,menubar=no,status=no",top>0?",top="+top:"",left>0?",left="+left:"",height?",height="+height:"",width?",width="+width:"",scroll!=false?"yes":"no",resizable!=false?"yes":"no");}}
WL.getWindowFeatures=function(width,height,top,left,location,resizable)
{return String.format("channelmode=no,directories=no,fullscreen=no{0}{1}{2}{3},location={4},menubar=yes,resizable={5},scrollbars=yes,status=yes,titlebar=yes,toolbar=yes",height?",height="+height:"",left!=null?",left="+left:"",width?",width="+width:"",top!=null?",top="+top:"",location==true?"yes":"no",resizable!=false?"yes":"no");}
if(typeof(document.addEventListener)!="undefined")
{WL.attachListener=function(element,name,handler)
{element.addEventListener(name,handler,false);}
WL.detachListener=function(element,name,handler)
{element.removeEventListener(name,handler,false);}
WL.getEvent=function(e){return e;}
WL.returnEvent=function(e,result,cancelBubble)
{if(cancelBubble)
{e.stopPropagation();e.preventDefault();}
e.returnValue=result;return result;}}
else
{WL.attachListener=function(element,name,handler)
{element.attachEvent("on"+name,handler);}
WL.detachListener=function(element,name,handler)
{element.detachEvent("on"+name,handler);}
WL.getEvent=function(e)
{if(window.event)e=window.event;if(e&&!e.target)
e.target=e.srcElement;return e;}
WL.returnEvent=function(e,result,cancelBubble)
{window.event.returnValue=result;if(cancelBubble!=null)
window.event.cancelBubble=cancelBubble;return result;}}
if(WL.browser.ie)
{WL.currentStyle=function(obj){return obj.currentStyle;}
WL.createNamedElement=function(type,name){return document.createElement('<'+type+' name="'+name+'">');}}
else
{WL.currentStyle=function(obj){return window.getComputedStyle(obj,null);}
WL.createNamedElement=function(type,name){var el=document.createElement(type);el.setAttribute("name",name);return el;}}
var _uIDs=0;WL.uniqueID=function(el){if(!el.id)el.id="_uid"+_uIDs++;return el.id;}
WL.showModalDialog=function(sURL,vArguments,sFeatures,returner)
{if(WL.xmlCallback)
WL.xmlCallback.updateWindowStatus(true);if(vArguments==null)vArguments={};vArguments.window_opener=window.window_opener;vArguments.opener=window.self;if(sFeatures==null)
sFeatures=WL.getModalDialogFeatures(null,null,false,true);WL.__showModalDialog(sURL,vArguments,sFeatures,returner);vArguments.window_opener=null;vArguments.opener=null;}
WL.windowOpen=function(sURL,sName,sFeatures,bReplace)
{WL.Utils.assert(!window.window_opener,"window.window_opener is null");var w;try
{if(window.window_opener)
{w=window.window_opener.open(sURL,sName,sFeatures,bReplace);w.window_opener=window.window_opener;w.opener=window.self;}
else
{w=window.open(sURL,sName,sFeatures,bReplace);w.window_opener=window.self;}}
catch(e){}
return w;}
WL.navigate=function(url){if(url.toLowerCase().indexOf(WL.LogoutPage)==0)window.logout_alert=true;WL._closeMethod(function(){window.location.href=url;});}
WL.windowClose=function(){WL._closeMethod(function(){window.close();});}
WL.login=function(){WL.navigate(String.format("{0}?redirect={1}",WL.LogoutPage,encodeURIComponent(window.location.pathname+window.location.search)));}
WL.logoutStatic=function()
{var close_method=function(){window.location.href=String.format("{0}?redirect={1}",WL.LogoutPage,encodeURIComponent(window.location.pathname+window.location.search));}
if(!window.logout_alert){window.logout_alert=true;WL.alertCallback=close_method;WL.alert(WL.LogoutMsg);}
else close_method();}
WL.logoutPopup=function()
{var close_method=function()
{if(window.opener!=null&&window.opener.closed==false&&window.opener.logout!=null)
{window.opener.logout_alert=true;window.opener.logout();}
window.close();}
if(!window.logout_alert){window.logout_alert=true;WL.alertCallback=close_method;WL.alert(WL.LogoutMsg);}
else close_method();}
WL.onstartup=[];WL._startup=function(){for(var i=0;i<WL.onstartup.length;++i)WL.onstartup[i]();WL.onstartup.clear();}
WL.onclose=[];WL._closeMethod=function(method)
{if(window.window_closing)return;window.window_closing=true;for(var i=0;i<WL.onclose.length;++i)
{try{WL.onclose[i]();}
catch(e){}}
WL.onclose.clear();var closeMethod=function()
{window.window_opener=null;window.opener=null;method();}
if(WL.xmlCallback!=null&&(WL.xmlCallback.getQueueLength()>0||WL.xmlCallback.getLateQueueLength()>0))
{var request=new ServerAPI.Request(WL.Guids.Api.WebGeneral,"Ping");window.xmlCallback.doWebRequest(request,this,closeMethod,closeMethod,false);}
else closeMethod();}
WL.R=[];WL.S=function(rid){return WL.R[rid]||"";}
WL.SHTML=function(rid){return WL.R[rid]||"";}