var cssFile="styles/EAPDefault.css";var nameDelim=":";var eapUtilVer=662;BrowserScan();function BrowserScan(){var a=navigator.userAgent.toLowerCase();window.is_opera=(a.indexOf("opera")>=0);window.is_opera9=(a.indexOf("opera/9")>=0);window.is_ie=(typeof(document.all)=="object"&&!window.is_opera);window.ie_ver=(!window.is_ie)?0:(window.XMLHttpRequest)?7:6;window.is_ff=(a.indexOf("firefox")>=0);window.is_mozilla=(a.indexOf("mozilla")>=0);window.is_chrome=(a.indexOf("chrome")>=0);window.is_safari=(!window.is_chrome&&a.indexOf("safari")>=0);window.is_safari4=(window.is_safari&&a.indexOf("applewebkit/4")>=0);window.is_webkit=(a.indexOf("applewebkit")>=0);window.is_ipad=(navigator.userAgent.match(/iPad/i))}function IsIE(){return(is_ie)}function IEVer(){return(window.ie_ver)}function IsOpera(){return(window.is_opera)}function IsOpera9(){return(window.is_opera9)}function IsFirefox(){return(window.is_ff)}function IsMozilla(){return(window.is_mozilla)}function IsSafari(){return(window.is_safari)}function IsSafariPre5(){return(window.is_safari4)}function IsAppleWebKit(){return(window.is_webkit)}function IsChrome(){return(window.is_chrome)}function IsIPad(){return window.is_ipad}function SetCssClass(b,a){if(b){b.setAttribute(IsIE()?"className":"class",a)}}function GetCssClass(a){return((a)?a.getAttribute(IsIE()?"className":"class"):"")}function ReplaceCssClass(b,a,d){var e=GetCssClass(b);if(e==a){e=d}else{e=(e)?" "+e+" ":"";if(e.indexOf(" "+a+" ")>=0){e=" "+Trim(StrReplace(e," "+a+" "," "),true,true)+" "}if(e.indexOf(" "+d+" ")<0){e+=d}e=Trim(e,true,true)}SetCssClass(b,e)}function HasCssClass(b,a){return((" "+GetCssClass(b)+" ").indexOf(" "+a+" ")>=0)}function RemoveCssClass(b,a){var d=GetCssClass(b);if(d==a){SetCssClass(b,"")}else{d=" "+d+" ";if(d.indexOf(" "+a+" ")>=0){d=StrReplace(d," "+a+" "," ");SetCssClass(b,Trim(d,true,true))}}}function IsString(a){return(typeof a=="string")}function GetElement(a,b){if(!b){b=window}return(a!=null&&typeof a=="string")?b.document.getElementById(a):a}function IsVisible(d){var c=false;if(typeof d=="string"){d=(d!="")?document.getElementById(d):null}var a=ElementType(d);if(a=="tbody"||a=="html"||a=="body"){c=true}else{if(!d||a=="hidden"){c=false}else{if(d.offsetWidth>0||(IsAppleWebKit()&&(a=="dbginfo"||a=="tr"||a=="a"))){var b=d.style;c=(!b||(b.visibility!="hidden"&&b.display!="none"))}}}return(c)}function IsEnabled(a){if(!a){return false}if(a.disabled){return false}if(IsSafari()){if(a.readOnly){return false}}else{if(a.getAttribute&&(a.getAttribute("disabled")||a.getAttribute("readonly"))){return false}}return true}function IsVisibleAndEnabled(e){var d=IsAppleWebKit();var c=(!e)?true:(d)?e.disabled:e.getAttribute("disabled");var b=(!e)?true:(d)?e.readOnly:e.getAttribute("readonly");var a=ElementType(e);if(a=="tbody"||a=="html"||a=="body"){return true}else{if(!e||!IsVisible(e)||e.disabled||c||b){return false}else{if(!e.parentElement){return true}else{return IsVisibleAndEnabled(e.parentElement)}}}}function UrlDecode(a){if(a){return decodeURIComponent(a.replace(/\+/g," "))}else{return(a)}}function IsKeyArrow(a){return(a>=37&&a<=40)}function IsKeyCtrl(a){return(a<32||IsKeyArrow(a))}function AddListener(c,a,b){if(c.addEventListener){c.addEventListener(a,b,true)}else{if(c.attachEvent){if(a=="focus"){a="focusin"}a="on"+a;c.attachEvent(a,b)}}}function RemoveListener(c,a,b){if(c.removeEventListener){c.removeEventListener(a,b,true)}else{if(c.detachEvent){if(a=="focus"){a="focusin"}a="on"+a;c.detachEvent(a,b)}}}function Trim(b,c,a){if(arguments.length==1){c=true;a=true}if(b){if(c){b=b.trimLeft()}if(a){b=b.trimRight()}}return(b)}String.prototype.trim=function(){return this.trimLeft().trimRight()};String.prototype.trimLeft=function(){return this.replace(/^\s*/,"")};String.prototype.trimRight=function(){return this.replace(/\s*$/,"")};String.prototype.reverse=function(){return this.split("").reverse().join("")};function FixDigits(b,a){b="0"+b;b=b.substr(b.length-a);return(b)}function GetFormElements(){var a=null;var b=document.forms[0];if(b){a=b.elements}return(a)}function ThrowError(b,c,a){throw new Error(b,a+"\r\n"+c)}function bndLkupTxtFromBtn(a){var b=/_btn$/;return a.id.replace(b,"_txt")}function bndLkupBtnFromTxt(a){return a.id.replace(/_txt$/,"_btn")}function bndLkupBase(a){return a.id.replace(/_txt$/,"").replace(/_tbl$/,"").replace(/_btn$/,"")}function bndLkupTable(a){return FindParent(a,"table")}function IsBndLkup(d){var c=false;var b=ElementType(d);var a=d.name;if(!a){a=""}var f=a.indexOf("$")>0?"$":":";var e=a.split(f);if(b=="image"){c=(e[e.length-1]=="btn")}else{if(b=="text"){c=(e[e.length-1]=="txt")}else{if(b=="table"){c=(d.getAttribute("use")=="bndlkup")}}}return(c)}function baseName(a,c){var b=a.id.lastIndexOf(c);return a.id.substr(0,b)}function SetTip(b,a){if(b){if(a){b.title=a}else{b.removeAttribute("title")}}}function resolvePageInstanceValues(f,g){var b="";var e=g.split(";");var c;for(c=0;c<e.length;c++){var d=Trim(e[c],true,true);if(d.indexOf("=")>0){b+=d+";"}else{var a=GetSiblingValue(f,d);if(a==null){a=""}b+=d+":"+a+";"}}if(b.length>0){b=b.substring(0,b.length-1)}return b}function bndLkupCal(b,e,a,g,d,c){if(!b){b=window.event}var h=bndLkupTxtFromBtn(e);if(!a){a="m/d/yyyy"}a=a.replace(/[+]/,"");a=a.replace(/dd/,"d");a=a.replace(/M/g,"m");if(g){var f=g.split("|");MONTHS=new Array(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11]);WEEKS=new Array(f[12],f[13],f[14],f[15],f[16],f[17],f[18]);DATELONG=f[19];DATESHORT=f[20]}popCal(document.getElementById(h),"DATEFORMAT="+a,b.clientX,b.clientY,d,c)}function menuShow(f,c,a){var d=document.getElementById(c);d.style.position="absolute";if(a){d.style.top=f.offsetTop;d.style.left=event.x}else{var i=event.y-10;var h=event.x-10;d.style.top=i;d.style.left=h}d.style.display="inline";d.focus();try{var g;for(var b=0;b<d.all.length;b++){g=d.all(b);if(g.tagName.toLowerCase()=="tr"){g.className="moremenu";g.onmouseover=menuOver;g.onmouseout=menuOut}}g=d.all(b)}catch(g){}}function cancelMenu(a){if(window.event.keyCode==27){a.style.display="none";this.onmouseover=null;this.onmouseout=null}}function menuOver(){this.className="moremenuActive"}function menuOut(){this.className="moremenu"}function menuToggle(c,a){var b=document.getElementById(a);if(b.style.display=="none"){b.style.display="inline";c.innerHTML=c.innerHTML.replace(/arrow-plus.gif/,"arrow-minus.gif")}else{b.style.display="none";c.innerHTML=c.innerHTML.replace(/arrow-minus.gif/,"arrow-plus.gif")}return false}function menuPost(b,d,c){var a=document.getElementById(d);if(c){a.value=b.id}else{a.value=b.value}a.click();return false}function getLeft(e,b){var a=0;var d=IsOpera()&&!IsOpera9();var f=IsAppleWebKit();if(e){var c=e;do{if(c.offsetLeft){a+=c.offsetLeft}if(f&&c.clientLeft){a+=c.clientLeft}if(d){a-=c.scrollLeft}c=c.offsetParent}while(c&&(!b||!IsParentOf(b,c)));if(!d){c=e;do{if(c.scrollLeft){a-=c.scrollLeft}c=c.parentNode}while(c&&(!b||!IsParentOf(b,c)))}}if(!b&&document.body&&document.body.scrollLeft){a+=document.body.scrollLeft}return(a)}function GetStaticTopRecursive(e,b){var f=0;if(!e){null}else{if(e.staticTop){f=e.staticTop}else{var d=IsOpera()&&!IsOpera9();var c=e;var a=0;if(c.offsetParent){f+=GetStaticTop(c.offsetParent,b);a+=c.offsetParent.staticLeft}if(c.offsetTop){f+=c.offsetTop}if(d){f-=c.scrollTop}c.staticTop=f;if(c.offsetLeft){a+=c.offsetLeft}if(d){a-=c.scrollLeft}c.staticLeft=a}}return(f)}function GetStaticTop(c){var d=0;if(c){var b=c;var a=0;while(!b.staticTop&&b.offsetParent){b.offsetParent.backLink=b;b=b.offsetParent}if(b.staticTop){d=b.staticTop;a=b.staticLeft}else{if(b.offsetTop){d+=b.offsetTop}if(b.offsetLeft){a+=b.offsetLeft}b.staticTop=d;b.staticLeft=a}while(b.backLink){b=b.backLink;b.offsetParent.backLink=null;if(b.offsetTop){d+=b.offsetTop}if(b.offsetLeft){a+=b.offsetLeft}b.staticTop=d;b.staticLeft=a}}return(d)}function GetStaticLeft(e,b){var a=0;if(!e){null}else{if(e.staticLeft){a=e.staticLeft}else{var d=IsOpera()&&!IsOpera9();var c=e;if(c.offsetParent&&(!b||!IsParentOf(b,c))){a+=GetStaticLeft(c.offsetParent,b)}if(c.offsetLeft){a+=c.offsetLeft}if(d){a-=c.scrollLeft}c.staticLeft=a}}if(document.body&&document.body.scrollLeft){a+=document.body.scrollLeft}return(a)}function getTop(d,a){var f=0;var c=IsOpera()&&!IsOpera9();var e=IsAppleWebKit();if(d){var b=d;do{if(b.offsetTop){f+=b.offsetTop}if(e&&b.clientTop){f+=b.clientTop}if(c){f-=b.scrollTop}b=b.offsetParent}while(b&&(!a||!IsParentOf(a,b)));if(!c){b=d;do{if(b.scrollTop){f-=b.scrollTop}b=b.parentNode}while(b&&(!a||!IsParentOf(a,b)))}}if(!a&&document.body&&document.body.scrollTop){f+=document.body.scrollTop}return(f)}function GetRight(d){var b=getLeft(d)+d.offsetWidth;if(d.childNodes){var c;for(c=0;c<d.childNodes.length;c++){var a=GetRight(d.childNodes[c]);if(a>b){b=a}}}return(b)}function getCoord(e,b,a){var f=e;var d=0;var c=0;if(b){d=b}if(a){c=a}if(e.offsetParent){d+=e.offsetLeft;c+=e.offsetTop;while(e=e.offsetParent){d+=(e.offsetLeft-e.scrollLeft);c+=(e.offsetTop-e.scrollTop);if(IsAppleWebKit()){if(e.clientLeft){d+=e.clientLeft}if(e.clientTop){c+=e.clientTop}}}}return{left:d,top:c,width:f.offsetWidth,height:f.offsetHeight}}function GetEventKey(a){if(!a){a=window.event}if(a){var b=(a.keyCode)?a.keyCode:((a.charCode)?a.charCode:((a.which)?a.which:0));return b}}function IsEditKeyPress(a){if(!IsFirefox()){return false}else{var b=a.keyCode;return(b==46||b==8||(b>=37&&b<=40))}}function dumpAttrs(c){var b="";var a;for(a=0;a<c.attributes.length;a++){b+=c.attributes[a].name+"="+c.attributes[a].value+";   "}alert(b)}function findFrame(a,d){var c=null;if(!d){c=findFrame(a.toLowerCase(),window.top)}else{var b;for(b=0;b<d.frames.length;b++){if(IsAccessibleFrame(d.frames[b])){if(d.frames[b].name.toLowerCase()==a){c=d.frames[b]}else{c=findFrame(a,d.frames[b])}if(c){break}}}}return(c)}function IsAccessibleFrame(a){try{var c=a.document.location.href;return(true)}catch(b){return(false)}}function notifyMopChange(a){var b=findFrame("toolbar");if(b&&b.updateTab){b.updateTab(a)}}function ElementType(c,b){var a=(c)?c.tagName:"";if(a){a=a.toLowerCase()}if(a&&a=="input"&&c.type){a=c.type.toLowerCase()}if(!b&&(a=="email"||a=="tel"||a=="url"||a=="number"||a=="search")){a="text"}return(a)}function IndexOfNode(b){var a=0;while(b.previousSibling!=null){b=b.previousSibling;a++}return(a)}function InitDetailFocus(b){var j=null;if(window.parent.initSF){window.parent.initSF=false}else{if(window.bodyLoading){window.delayedDetailFocus=function(){InitDetailFocus(b)}}else{if(b){j=document.getElementById(b)}else{var i;var a;var d=GetFormElements();var h=10000000;for(i=0;i<d.length;i++){a=d[i];if(a.tabIndex!=null&&a.tabIndex<h&&!a.getAttribute("nofocus")&&CanGetFocus(a)){j=a;h=a.tabIndex}}var e=document.getElementsByTagName("table");var c=e.length;for(i=0;i<c;i++){a=e[i];a=SetLkupFocus(a);if(a&&a.tabIndex!=null&&a.tabIndex<h){j=a;h=a.tabIndex}}}}}if(j){var g=parent.document;var f=(g&&g.body)?g.body.scrollTop:-1;SetFocus(j);if(f==0){window.setTimeout(function(){if(g.body.scrollTop!=0){g.body.scrollTop=0}},1)}}}function SetLkupFocus(d){var c=null;if(IsBndLkup(d)){var a=document.getElementById(bndLkupBase(d)+"_txt");var b=document.getElementById(bndLkupBase(d)+"_btn");if(CanGetFocus(a)){c=a}else{if(b){c=b}}}return(c)}function vsplitInit(){}function vsplitResize(b,a){}function vsplitResizeStart(b,c,a,d){if(!b){b=window.event}c.resizePanel=document.getElementById(a);if(c.resizePanel==null){ThrowError(1001,"EAPUtils::vsplitResizeStart","VSplitter AssociatedControlID '"+a+"' not found on page.")}c.panelOrigWidth=c.resizePanel.offsetWidth;c.startX=b.screenX;window.vsplitter=c;DragInit(c,vsplitOnResize,vsplitOnResizeEnd,true);return CancelBubble(b)}function vsplitOnResize(a){if(!a){a=window.event}var b=window.vsplitter;var c=b.panelOrigWidth+(a.screenX-b.startX);if(c>25&&c<100000){b.resizePanel.style.width=c+"px"}return CancelBubble(a)}function vsplitOnResizeEnd(b){var d=window.vsplitter;DragTerm(d,vsplitOnResize,vsplitOnResizeEnd,true);var a=d.getAttribute("pref");var c=d.resizePanel.offsetWidth;if(a&&c>10){AjaxPrefSet(a,c)}if(window.resize){window.resize()}else{if(window.onresize){window.onresize()}}}function ClearItem(c,b){c=GetElement(c);var a=ElementType(c);if(b||IsEnabled(c)){if(a=="text"||a=="select"||a=="hidden"){c.value=""}else{if(a=="checkbox"){c.checked=false}else{if(a=="img"&&c.getAttribute("use")=="tristate"){TriStateClear(c)}}}}}function ClearNode(b,c){if(!b){return}ClearItem(b,c);var a;for(a=0;a<b.childNodes.length;a++){ClearNode(b.childNodes[a],c)}}function ClearChildren(a){var a=GetElement(a);if(a){ClearNode(a)}else{ThrowError(1002,"EAPUtils::ClearChildren"," parent node not found on page.")}}function popupMenu(b,a){if(!b){b=window.event}var e=GetEventTarget(b);var d=getLeft(e);var c=getTop(e)+e.offsetHeight;BubHideTooltip(b);if(window.fwButtonHide){fwButtonHide()}return(popupDiv(b,a,"","",d,c))}function popupDiv(k,a,d,l,b,m){if(!k){k=window.event}var c=null;var j=document.getElementById(a);var q=18;var e;var s;var u;if(!j){alert("div not found")}if(j&&window.createPopup){j.style.position="absolute";j.style.top=-5000;j.style.display="";c=window.createPopup();var v=c.document;window.pop=c;v.open();v.writeln("<html>");v.writeln("<head>");v.writeln('<link rel="stylesheet" href="'+cssFile+'" />');if(window.cssCustom){v.writeln('<link rel="stylesheet" href="'+window.cssCustom+'" />')}v.writeln("</head>");v.writeln('<body class="'+d+'" style="overflow:hidden;border:none;margin:0">');v.writeln("</body>");v.writeln("</html>");v.close();var f=v.body;var p=j.innerHTML;f.innerHTML='<div id="'+a+'" class="'+d+'">'+p+"</div>";if(b==0&&m==0){b=event.x;m=event.y}j.style.display="inline";var r=v.getElementById(a);u=r.childNodes[0];s=j.offsetHeight;e=j.offsetWidth;if(j.childNodes[0].childNodes.length>q){var g;s=0;for(g=0;g<q;g++){s+=j.childNodes[0].childNodes[g].offsetHeight}e=e+20;u.style.overflow="auto";u.style.height=s;u.style.width=e}c.show(b,m,1,1,document.body);window.popX=b;window.popY=m;window.setTimeout(function(){c.show(b,m,e,s,document.body)},1);j.style.display="none";c.document.opener=window}else{if(j){j.style.display="inline";if(b==0&&m==0){b=k.clientX;m=k.clientY}u=j.childNodes[0];while(u&&(!u.tagName||u.tagName.toLowerCase()!="div")){u=u.nextSibling}e=j.offsetWidth;s=0;if(u){var o=0;var t=u.childNodes[0];while(t){if(t&&t.tagName&&t.tagName.toLowerCase()=="div"){if(o<q){s+=t.offsetHeight}o++}t=t.nextSibling}if(o>q){u.style.height=s;u.style.overflow="auto";if(!u.style.width){u.style.width=e+20}}}var i=WindowWidth(window);if(e>600){e=200}if(b+e>i){b=i-e-5}j.style.left=b;j.style.top=m;j.onkeydown=PopupKey;j.onmouseover=PopupMouseMove;if(document.body.addEventListener){document.body.addEventListener("keydown",PopupKey,false);document.body.addEventListener("mouseover",PopupMouseMove,false)}window.popDiv=j;window.popDivParent=GetEventTarget(k)}}return(c)}function ToolbarClick(b,c){var d=b.id.substr(0,b.id.length-c.length);var a=document.getElementById(d);if(a&&a.click){a.click()}else{if(a&&a.onclick){a.onclick()}}}function MenuClose(b,a){if(!window.createPopup){var c=document.getElementById(a);if(c){c.style.display="none"}}}function divmenuToggle(e,g){var d=(window.createPopup)?window.pop:window;var c=d.document.getElementById(g);if(c){var f=d.document.getElementById(e);if(f){var a=d.document.getElementById(g+"sign");var b=("block"==c.style.display);if(b){c.style.display="none";if(a){a.src="images/plus.gif"}}else{c.style.display="block";if(a){a.src="images/minus.gif"}}if(d.show){d.show(window.popX,window.popY,f.offsetWidth,f.offsetHeight,window.document.body);d.show(window.popX,window.popY,f.offsetWidth,f.offsetHeight,window.document.body)}}}}function divmenuAct(a){if(!a){a=window.event}var b=FindParent(GetEventTarget(a),"div",true);if(b&&!b.getAttribute("disabled")&&!HasCssClass(b,"divnocmd")){window.parent.ReplaceCssClass(b,"x","divmenuact")}}function divmenuDeact(a){if(!a){a=window.event}var b=FindParent(GetEventTarget(a),"div",true);if(b&&!b.getAttribute("disabled")&&!HasCssClass(b,"divnocmd")){window.parent.RemoveCssClass(b,"divmenuact")}}function divmenuPost(b,e,d,c){var a=GetElement(e);if(d!=null&&d.length>0){if(!confirm(d)){return false}}if(a){if(!c){c=b.getAttribute("command")}a.value=c;OnClick(a)}return false}function popupWindow(k,a,s,p,l,n,b,q){var f=null;try{var j=document.getElementById(a);j.style.position="absolute";j.style.top=-1000;j.style.left=-1000;j.style.display="";var i="menubar=0,resizable=0,scrollbars=0,titlebar=0";var c=parseInt(j.offsetHeight,10)+20;var h=j.offsetWidth;h+=20;var d=k.clientX;var m=k.clientY;if(h+d>screen.width){d=screen.width-h-20}if(c+m>screen.height){m=screen.height-c-10}i+=",height="+c;i+=",width="+h;i+=",left="+d;i+=",top="+m;var g="blank.htm";f=window.open(g,s,i,true);if(f.inUse){f.close();f=window.open(g,s,i,true)}var r=f.document;r.open();r.writeln("<html>");r.writeln("<head>");r.writeln('<link rel="stylesheet" href="'+cssFile+'" />');if(p){r.writeln("<title>"+p+"</title>")}r.writeln("</head>");if(q){r.writeln('<body onload="'+q+'">')}else{r.writeln("<body>")}r.write('<div id="'+j.id+'">'+j.innerHTML+"</div>");if(n){r.writeln("<script>");r.writeln(n);r.writeln("<\/script>")}if(b){AddSelfCloseScript(r)}r.writeln("</body>");r.writeln("</html>");r.close();if(b){f.originalLoc=window.document.location.href;f.setInterval("CloseIfNoOpener();",2000)}f.inUse=true}catch(o){alert("Problem in popupWindow(): "+o.description)}return(f)}function togglerToggle(k,e,i,j){if(!k){k=window.event}var b=document.getElementById(i);var d=document.getElementById(e.id+"_state");var g=FindParent(e,"table");if(!b){ThrowError(1003,"EAPUtils::togglerToggle","Toggler AssociatedControlID '"+i+"' not found on page.")}CancelBubble(k);var f=(0!=(j&1));var h=(0!=(j&2));var a=(f)?(b.style.height!="1px"&&b.style.display!="none"):(b.style.display=="");if(a){if(b.offsetHeight<=0){f=false}if(f){if(!b.origHgt){b.origHgt=b.offsetHeight}b.style.height="1px";b.style.overflow="hidden"}else{b.style.display="none"}e.src="images/plus.gif";ReplaceCssClass(g,"x","np");if(d){d.value="0"}}else{if(f&&b.origHgt){b.style.height=b.origHgt+"px"}else{b.style.display=""}e.src="images/minus.gif";RemoveCssClass(g,"np");if(d){d.value="1"}}if(b.onresize){b.onresize()}a=!a;var l=e.getAttribute("pref");if(l){AjaxPrefSet(l,(a)?"1":"0")}if(false){if(window.resize){window.resize()}else{if(window.onresize){window.onresize()}}}else{window.setTimeout("if (window.resize) window.resize(); else if (window.onresize) window.onresize();",10);window.setTimeout("if (window.resize) window.resize(); else if (window.onresize) window.onresize();",100)}if(h){var c=FindParent(e,"div");c.style.display="none"}}function togglerInit(c){var a=document.getElementById(c);var b=document.getElementById(c+"_state");if(a&&b&&b.value=="0"){if(a.click){a.click()}else{if(a.onclick){a.onclick()}}}}function validationFixup(){var d;var a=new Array();var c=window.orig_validators;var b=event.srcElement.virtualForm;if(!c){window.orig_validators=Page_Validators;c=window.orig_validators}for(d=0;d<c.length;d++){var e=document.getElementById(c[d].controltovalidate);if(e&&e.virtualForm==b){a.push(c[d])}}Page_Validators=a}function validationIntercept(){if(typeof(Page_ClientValidate)=="function"){if(!window.orig_Page_ClientValidate){window.orig_Page_ClientValidate=Page_ClientValidate}Page_ClientValidate=function(){validationFixup();window.orig_Page_ClientValidate()}}}function cloneWindow(h,d,e){var j=d.document;var k;var i="";j.open();j.writeln("<html>");j.writeln("<head>");j.writeln(i);j.writeln("</head>");j.writeln("<body>");j.writeln('<div style="display:none">');var a=document.getElementsByTagName("form")[0];var c="<form";c+=' id="'+a.id+'"';c+=' name="'+a.name+'"';c+=' method="'+a.method+'"';c+=' action="'+a.action+'"';c+=">";j.writeln(c);var g=h.document.forms[0].elements;var b=false;var f;for(k=0;k<g.length;k++){f=ElementType(g[k]);if(f!="fieldset"){j.writeln(OuterHTML(g[k]));if(f=="image"){b=true}}}if(!b){g=h.document.getElementsByTagName("input");for(k=0;k<g.length;k++){if(ElementType(g[k])=="image"){j.writeln(OuterHTML(g[k]))}}}if(e){j.writeln(e)}j.writeln("</form>");j.writeln("</div>");j.writeln("</body>");j.writeln("</html>");j.close();CopyDocVals(d.document,h.document.getElementsByTagName("input"));CopyDocVals(d.document,h.document.getElementsByTagName("option"));CopyDocVals(d.document,h.document.getElementsByTagName("textarea"))}function CopyDocVals(d,b){var c;var e;var f;var a;for(c=0;c<b.length;c++){e=b[c];if(e.id){f=d.getElementById(e.id);if(f){a=ElementType(f);if(a=="text"||a=="hidden"||a=="textarea"){f.value=e.value}else{if(a=="checkbox"){f.checked=e.checked}else{if(a=="option"){f.selected=e.selected}}}}}}}function menuResponseToNewWin(a,d,b,f){if(f!=null&&f.length>0){if(!confirm(f)){return false}}var c=window.open("blank.htm","_blank",b);window.cloneWindow(window,c);var e=c.document.getElementById(a);e.value=d;e.click()}function OffsetBottom(b){var a=0;var c=GetElement(b);if(c){a=getTop(c)+c.offsetHeight}return(a)}function OffsetRight(b){var a=0;var c=GetElement(b);if(c){a=getLeft(c)+c.offsetWidth}return(a)}function CalcHeight(a){return(a)?(CalcBottom(a)-a.offsetTop):0}function CalcBottom(b){var d=0;if(!b.childNodes||b.childNodes.length==0){d=OffsetBottom(b)}else{var a;for(a=0;a<b.childNodes.length;a++){var c=CalcBottom(b.childNodes[a]);if(c>d){d=c}}}return(d)}function DelayedAlert(a){window.setTimeout("alert('"+a+"');",50)}function PressedCR(b,a){if(!b){b=window}if(!a){a=b.event}return(a.keyCode!=null&&a.keyCode==13)}function PressedEsc(b,a){if(!b){b=window}if(!a){a=b.event}return(a.keyCode==27)}function HandleVirtualFormKey(a,f,c){if(!a){a=window.event}var d;var b;var e;if(a.keyCode==13){var g=GetEventTarget(a);if(ElementType(g)!="textarea"){b=document.getElementsByTagName("input");for(d=0;d<b.length;d++){e=b[d];if(ElementType(e)=="submit"&&IsParentOf(e,f)&&(!c||e.getAttribute("default"))){DoClick(e);CancelBubble(a);break}}return false}}else{if(a.keyCode==27){b=document.getElementsByTagName("input");for(d=0;d<b.length;d++){e=b[d];if(ElementType(e)=="reset"&&IsParentOf(e,f)&&!c||e.getAttribute("cancel")){DoClick(e);a.cancelBubble=true;if(a.stopPropagation){a.stopPropagation()}break}}return false}}}function CanGetFocus(b){var a=ElementType(b);return((a=="text"||a=="select"||a=="checkbox"||a=="textarea"||(a=="image"&&IsBndLkup(b)))&&IsVisibleAndEnabled(b))}function VerifyFunc(name){if(eval("window."+name)==null){ThrowError(1004,"EAPUtils::VerifyFunc","Expected function not found: "+name)}}function ResizeWin(d,b,a,c){if(c){d.resizeTo(b+(b-GetClientWidth(d)),a+(a-GetClientHeight(d)))}else{d.resizeTo(b,a);window.setTimeout(function(){ResizeWin(d,b,a,true)},33)}}function SizeWinToCtrl(n,g,k,p,q,f,m){if(!k){k=window}var c=k.document.getElementById(n);if(!c){return}if(!p){k.sizingToFit=true;window.setTimeout(function(){SizeWinToCtrl(n,g,k,1)},1)}else{if(p==1){if(window.pageHeight){q=window.pageHeight}else{q=OffsetBottom(c.id)+40;q+=16;if(IsAppleWebKit()){q+=15}else{if(!IsIE()){q+=10}}}if(window.pageWidth){f=window.pageWidth}else{f=GetClientWidth(k)+12;if(g){if(IsIE()){f=c.offsetWidth+20}else{f=FarRight(c)+20;f+=30}}}m=false;if(q>screen.height-50){q=screen.height-150;m=true}if(f>screen.width-50){f=screen.width-150;m=true}if(m){f+=16}var o=WinTop(k)+q;var a=WinLeft(k)+f;if(o>screen.height||a>screen.width){var j=(o>screen.height)?screen.height-o:0;var d=(a>screen.width)?screen.width-a:0;k.moveBy(d,j)}window.setTimeout(function(){SizeWinToCtrl(n,g,k,2,q,f,m)},1)}else{if(p==2){k.resizeTo(f,q);window.setTimeout(function(){SizeWinToCtrl(n,g,k,3,q,f,m)},1)}else{if(p==3){try{var i=q-GetClientHeight(k);var h;if(IsIE()){h=i-40}else{if(IsChrome()){h=0}else{h=i-60}}q+=h;if(h!=0){k.resizeTo(f,q)}k.origWidth=WindowWidth(k);k.origHeight=WindowHeight(k);window.setTimeout(function(){SizeWinToCtrl(n,g,k,4,q,f,m)},1)}catch(l){alert(l.description)}}else{if(p==4){c.style.overflow="auto";document.body.scrollTop=0;document.body.scrollLeft=0;document.body.style.overflow="hidden";if(!window.fullPageResize){SizeCtrlToWin(n,k);AddListener(k,"resize",function(){if(!k.sizingToFit){SizeCtrlToWin(n,k)}})}k.sizingToFit=false}}}}}}function SizeCtrlToWin(a,c){if(!c){c=window}var b=c.document.getElementById(a);if(b){b.style.height=(GetClientHeight(c))+"px";b.style.width=(GetClientWidth(c))+"px"}}function FarRight(e,d){var a=0;if(e&&IsVisible(e)){a=GetStaticLeft(e)+e.offsetWidth;if(ElementType(e)=="a"&&e.offsetWidth>100){a-=e.offsetWidth+100}if(ElementType(e)!="select"){var c;var b;for(c=0;c<e.childNodes.length;c++){b=FarRight(e.childNodes[c],true);if(b>a){a=b}}}}return(a)}function FindForm(a){return document.forms[0]}function AddHiddenInput(a,b,d){var e=a.ownerDocument;var c=e.getElementById(b);if(!c){c=e.createElement("input");c.type="hidden";c.id=b;c.name=b;a.appendChild(c)}c.value=d;return(c)}function OpenWindow(b,f,a,e,d,c){var h=window.open("blank.htm",b,f,true);if(h){h.focus();var g=h.document;g.open();g.writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >');g.writeln("<html>");g.writeln("<head>");g.writeln('<link rel="stylesheet" href="'+cssFile+'" />');if(a){g.writeln("<title>"+a+"</title>")}g.writeln("</head>");if(d){g.writeln("<body onload=\"InitDetailFocus('"+d+"');\">")}else{g.writeln("<body>")}g.write(e);if(c){AddSelfCloseScript(g)}g.writeln("</body>");g.writeln("</html>");g.close();if(c){h.originalLoc=window.document.location.href;h.setInterval("CloseIfNoOpener();",2000)}}return(h)}function PrettyPrompt(b,a){if(parent.showModalDialog){return parent.showModalDialog("prettyprompt.htm",b,"dialogHeight:150px;status:0")}else{return parent.prompt(b,a)}}function SaveFlt(a,c,b,d){var e="";if(c&&!c.id){c.id="mnu_"+b}if(b){e+="&ctl="+b}if(c){e+="&btn="+c.id}if(d){e+="&mnu="+d}if(c){e+="&cmd="+c.getAttribute("command")}FetchDivWidget(a,"fltsvprompt","svflt",e,null)}function SaveFltClick(a){var f=false;var i=GetElementValue("svflt_nm");var g=FindForm(window);if(i&&g){var c=JsonReq("ssval","cat=flt&test=unique&name="+encodeURIComponent(i),null,2);if(!c.pass){if(c.errMsg){alert(c.errMsg)}else{if(c.okCancelMsg){c.pass=confirm(c.okCancelMsg)}}}if(c.pass){var d=GetElementValue("svflt_desc");var h=GetElementValue("svflt_share");var e="\u00b6";var b=i+e+d+e+((h)?"0x00000001":"0x00000000");AddHiddenInput(g,a,b);f=true}}return(f)}function FormKeyHandler(e,d,c){if(!c){c=window}if(PressedEsc(c)){var b=c.document.getElementById(e);if(b){b.click()}}else{if(PressedCR(c)){var a=c.document.getElementById(d);if(a){a.click()}}}}function ManageList(e,b,a){if(!a){RestoreValue(e.id)}var d="menubar=0,resizable=1,scrollbars=0,titlebar=0,width=300,height=350";d+=",left="+getLeft(e)+",top="+getTop(e);var c="ManagePicklist.aspx?pick="+b+"&cbo="+e.id+"&multi="+a;window.open(c,"managepick",d,true)}function RestoreValue(a){var e=document.getElementById(a);if(e){var d;var b=e.lastValue;for(d=0;d<e.options.length;d++){var c=e.options[d];if(c.value==b){e.selectedIndex=d;break}}}}function TACheckLen(b,c,a){if(!b){b=window.event}return(c.value.length<a||IsEditKeyPress(b))}function TACheckPaste(b,a){window.setTimeout("TAFixLen('"+b.id+"',"+a+");",20)}function TAFixLen(c,a){var b=document.getElementById(c);if(b.value.length>a){b.value=b.value.substring(0,a)}}function OpenPopupWindow(b,a,c){if(!c||c==""){c="_blank"}window.open(b,c,a,false).focus();if(window.event!=null){window.event.cancelBubble=true}}function GetRowKey(a){return(a)?a.rowKey:window.rowKey}function BtnLive(b,c,a){c="e8e8e8";a="solid 1px gray";b.origBackgroundColor="d0d0d0";b.style.backgroundColor=c;b.origBorder="solid 1px d0d0d0";b.style.border=a;b.onmouseout=BtnDead}function BtnDead(a){a=window.event.srcElement;a.style.backgroundColor=a.origBackgroundColor;a.style.border=a.origBorder}function FindCtrl(e,k,j){var b=null;var h=document.getElementsByTagName(e);var c=h.length;var n;var d=100000;var m=100000;for(n=0;n<c;n++){var g=h[n];var i=getTop(g);var f=getLeft(g);var a=i+g.offsetHeight;var l=f+g.offsetWidth;if(k>=f&&k<=l&&j>=i&&j<=a){if(g.offsetWidth<d&&g.offsetHeight<m){b=g;d=g.offsetWidth;m=g.offsetHeight}}}return(b)}function SetString(s,name,value){value=""+value;value=value.replace(/%/g,"%25").replace(/=/g,"%3D").replace(/;/g,"%3B");if(!s||s.length<1){s=";"}if(s.substr(0,1)!=";"){s=";"+s}if(s.indexOf(";"+name+"=")>=0){var replace=";"+name+"="+value+";";var expr="s.replace(/;"+name+"=[^;]*;/, replace)";return eval(expr)}else{return s+name+"="+value+";"}}function FindParent(c,a,d){var b=null;if(a){a=a.toLowerCase()}if(c&&d&&c.tagName&&c.tagName.toLowerCase()==a){b=c}else{if(c){c=c.parentNode;while(c&&c.tagName&&c.tagName.toLowerCase()!=a){c=c.parentNode}if(c&&c.tagName&&c.tagName.toLowerCase()==a){b=c}}}return(b)}function IsParentOf(b,a){while(b!=a&&b&&b.parentNode!=null){b=b.parentNode}return(b==a)}var _emptyTags={IMG:true,BR:true,INPUT:true,META:true,LINK:true,PARAM:true,HR:true};function InnerHTML(b){var a;if(b.innerText){a=b.innerText}else{if(b.textContent){a=b.textContent}}return(a)}function OuterHTML(c){if(c.outerHTML&&!IsAppleWebKit()){return c.outerHTML}else{var a=c.attributes;var e="<"+c.tagName;var b;var d=(ElementType(c)=="checkbox");for(b=0;b<a.length;b++){e+=" "+a[b].name+'="'+a[b].value+'"';d=(d&&a[b].name.toLowerCase()!="checked")}if(_emptyTags[c.tagName.toUpperCase()]){if(d&&c.checked){e+=' checked=""'}e+=" />"}else{e+=">"+c.innerHTML+"</"+c.tagName+">"}return(e)}}function EventOffsetX(a,b){return(a.offsetX)?a.offsetX:a.pageX-getLeft(b)}function EventOffsetY(a,b){return(a.offsetY)?a.offsetY:a.pageY-getTop(b)}function GetEventTarget(a){var b=null;if(a){if(a.srcElement){b=a.srcElement}else{b=a.target}if(!b.tagName){b=b.parentNode}}return(b)}function PopupKey(a){if(!a){a=window.event}if(a.keyCode==27){PopupClose(a)}}function PopupClose(a){var b=window.popDiv;if(b){b.style.display="none";if(document.body.removeEventListener){document.body.removeEventListener("keydown",PopupKey,false);document.body.removeEventListener("mouseover",PopupMouseMove,false)}}}function PopupMouseMove(a){var b=window.popDiv;if(b){var d=GetEventTarget(a);var c=200;if(d==window.popDivParent||IsParentOf(d,b)){if(b.timerClose){window.clearTimeout(b.timerClose);b.timerClose=null}}else{if(!b.timerClose){b.timerClose=window.setTimeout(function(){if(b.timerClose){window.clearTimeout(b.timerClose);b.timerClose=null}PopupClose()},c)}}}}function GetClientHeight(b){var a;if(!b){b=window}if(b.innerHeight){a=b.innerHeight}else{if(b.document&&b.document.documentElement&&b.document.documentElement.clientHeight){a=b.document.documentElement.clientHeight}else{if(b.document&&b.document.body){a=b.document.body.clientHeight}}}return(a)}function GetClientWidth(b){var a;if(!b){b=window}if(b.innerWidth){a=b.innerWidth}else{if(b.document&&b.document.documentElement&&b.document.documentElement.clientWidth){a=b.document.documentElement.clientWidth}else{if(b.document&&b.document.body){a=b.document.body.clientWidth}}}return(a)}function GetClientBottom(b){if(!b){b=window}var a=GetClientHeight(b);if(b.document.body&&b.document.body.scrollTop){a+=b.document.body.scrollTop}return(a)}function GetClientRight(b){if(!b){b=window}var a=GetClientWidth(b);if(b.document.body&&b.document.body.scrollLeft){a+=b.document.body.scrollLeft}return(a)}function CtrlClientWidth(a){return(!a)?0:(a.clientWidth)?a.clientWidth:a.offsetWidth}function CtrlClientHeight(a){return(!a)?0:(a.clientHeight)?a.clientHeight:a.offsetHeight}function WinTop(a){if(!a){a=window}if(a.screenTop){return(a.screenTop)}else{return(a.screenY)}}function WinLeft(a){if(!a){a=window}if(a.screenLeft){return(a.screenLeft)}else{return(a.screenX)}}function StrReplace(b,c,a){var d=new RegExp(c,"g");return(b)?b.replace(d,a):b}function DeUnicode(a){if(a){a=StrReplace(a,String.fromCharCode(160)," ")}return(a)}function CursorInsert(c,e,b){var f;var a;if(c.setSelectionRange){f=c.selectionStart;a=c.selectionEnd;c.value=c.value.substring(0,f)+e+c.value.substring(a,c.value.length);if(b){if(IsFirefox()){a=f+e.length;c.setSelectionRange(f,a);c.focus()}else{c.selectionStart=f;c.selectionEnd=f+e.length}}}else{if(c.selectionStart!=null){f=c.selectionStart;a=c.selectionEnd;c.value=c.value.substring(0,f)+e+c.value.substring(a,c.value.length);if(b){c.selectionStart=f;c.selectionEnd=f+e.length}}else{if(document.selection){c.focus();var d=document.selection.createRange();d.text=e;if(b){d.moveStart("character",-e.length);d.select()}}else{c.value+=e}}}}function ArrayIndexOf(b,d){var a=-1;var c;for(c=0;c<b.length;c++){if(b[c]==d){a=c;break}}return(a)}function StringToFloat(c,b){var d=(b&&b.length>0)?b.substr(0,1):".";var a=(b&&b.length>1)?b.substr(1,1):",";a=DeUnicode(a);c=DeUnicode(c);c=StrReplace(c,"\\"+a,"");c=StrReplace(c,"\\"+d,".");c=c.replace(/^\s*/,"");c=c.replace(/\s*$/,"");if(c==null||c==""){c=0}return(c)}function StringToInt(d,b,c){var a=(b&&b.length>1)?b.substr(1,1):",";if(!d){d=""}d=StrReplace(d,"\\"+a,"");d=d.replace(/^\s*/,"");d=d.replace(/\s*$/,"");if(d&&d.indexOf("(")==0&&d.indexOf(")")==d.length-1){d="-"+d.substr(1,d.length-2)}return(!c)?(d):(IsInt(d))?parseInt(d):0}function IsInt(a){return(a.toString()==parseInt(a).toString())}function DaysInMonth(c,b){var d;var a=new Array(31,28,31,30,31,30,31,31,30,31,30,31);if(c==2&&b%4==0&&(b%100!=0||b%400==0)){d=29}else{if(c>=1&&c<=12){d=a[c-1]}}return(d)}function StringToDate(w,F){var g=null;if(w&&IsString(w)){w=w.trim()}if(!w||w==null||w==""){return w}var E=false;var p=false;var n=true;var a="MM/dd/yyyy";var f="HH:mm:ss";var G="/";var i=":";var L=false;var q=false;var r=F;var I=(r.indexOf("+")>=0);if(I){r=r.replace(/\+/g,"");w=w.replace(/ \(.*/,"")}if(w&&IsString(w)&&w.length>=10&&w.substr(0,10).match(/^\d{4}-\d\d-\d\d/)){r="yyyy-MM-dd"}if(r){var c=r.search(/[Mdyg]/);var u=r.search(/[hHmsfFtz]/);var x=r.search(/[Mdyg][^Mdyg]*$/g);var C=r.search(/[hHmsfFtz][^hHmsfFtz]*$/g);E=(u<0);p=(c<0);n=E||(!p&&(c<u));if(!p){a=r.substring(c,x+1);G=a.match(/[^Mdyg]/)}if(!E){f=r.substring(u,C+1);i=f.match(/[^hHmsfFtz]/);L=TimeIs24Hr(r)}}w=Trim(w,true,true);var l="";var h="";if(E){l=w}else{if(p){var A=w.split(" ");if(A.length==1){h=w;q=(h.search(/[pP]/)>=0)}else{h=A[0];q=(A[1].search(/[pP]/)>=0)}}else{var s=w.split(" ");if(s.length==2){if(n){l=s[0];h=s[1]}else{h=s[0];l=s[1]}}else{if(s.length==1){l=s[0]}else{if(s.length==3&&!L){if(n){l=s[0];h=s[1];q=(s[2].search(/[pP]/)>=0)}else{h=s[0];q=(s[1].search(/[pP]/)>=0);l=s[2]}}}}}}var v=0;var b=0;var e=0;var t=0;var K=0;var B=0;var y=true;if(l){if(l.indexOf(G)<0){var z=l.search(/[./-]/);if(z>0){G=l.charAt(z)}}var k=l.split(G);var o=a.indexOf("M");var J=a.indexOf("d");var d=a.indexOf("y");var H=0;var m=1;var j=2;if(J<0){J=10}if(o<0){o=10}if(d<0){d=10}if(o<J){H=(o<d)?0:1;m=(J<d)?1:2;j=(d<o)?0:(d<J)?1:2}else{H=(o<d)?1:2;m=(J<d)?0:1;j=(d<J)?0:(d<o)?1:2}if(k.length>m){v=parseInt(k[m],10)}if(k.length>H){b=ParseMonth(k[H])}e=(k.length>j)?parseInt(k[j],10):(new Date()).getFullYear();if(e<50){e=parseInt(e,10)+parseInt(2000,10)}else{if(e<100){e=parseInt(e,10)+1900}}y=y&&(e>=1753&&e<10000);y=y&&(b>=1&&b<=12);y=y&&(v>=1&&v<=DaysInMonth(b,e))}if(y&&h){var D=h.split(i);y=y&&ValidateInt(D[0]);if(D.length>1){D[1]=D[1].replace(/[aApPmM]/g,"");y=y&&ValidateInt(D[1])}if(D.length>2){D[2]=D[2].replace(/[aApPmM]/g,"");y=y&&ValidateInt(D[2])}if(y){t=parseInt(D[0],10);K=parseInt(D[1],10);B=(D.length>2)?parseInt(D[2],10):0;if(!L){if(t==12&&!q){t=0}else{if(q&&t!=12){t+=12}}}else{if(t==24){t=0}}y=y&&(t>=0&&t<24);y=y&&(K>=0&&K<60);y=y&&(B>=0&&B<60)}}if(!y&&p&&w&&w.indexOf(" ")>0){return StringToDate(w.substr(w.indexOf(" ")),F)}if(y){var M;g="";if(!p){b=FixDigits(b,2);v=FixDigits(v,2);g=e+"-"+b+"-"+v}if(!E){t=FixDigits(t,2);K=FixDigits(K,2);B=FixDigits(B,2);M=t+":"+K+":"+B}if(p){g=M}else{if(!E){g=g+" "+M}}}else{}return(g)}function ParseMonth(c){var a=parseInt(c,10);if(isNaN(a)&&window.dt_months){var b;a=0;c=c.toLowerCase();for(b=1;b<dt_months.length;b++){if(dt_months[b].toLowerCase().indexOf(c)==0){a=(b<=12)?b:b-12;break}}}return(a)}function CurrencyToFloat(d,b){if(IsNullOrWhitepace(d)){return("")}var a=(b&&b.length>2)?b.substr(2,1):"$";var g=(b&&b.length>3)?b.substr(3,1):"+";var f=false;d=d.replace(/^\s*/,"");d=d.replace(/\s*$/,"");if(d&&d.indexOf("(")==0&&d.indexOf(")")==d.length-1){d=d.substr(1,d.length-2);f=true}if(g=="+"||g=="0"||g=="2"){var c=d.indexOf(a);if(c>0&&d.match(/^-/)){d=d.substr(1);d=d.replace(/^\s*/,"");c=d.indexOf(a);f=true}if(c==0){d=d.substr(c+1);d=d.replace(/^\s*/,"")}}else{var e=d.lastIndexOf(a);if(e==d.length-a.length){d=d.substring(0,e);d=d.replace(/\s*$/,"")}}if(f){d="-"+d}d=d.replace(/^\s*/,"");return StringToFloat(d,b)}function PercentToFloat(c,b,a){c=c.replace(/\s*%$/g,"");c=parseFloat(StringToFloat(c,a));if(b){c/=b}return(c)}function FloatToCurrency(e,c,a){if(IsNullOrWhitepace(e)){return("")}var b=(c&&c.length>2)?c.substr(2,1):"$";var g=(c&&c.length>3)?c.substr(3,1):"+";var d=(a&&a.match(/^[cC]\d$/))?a.substr(1,1):"2";e=FloatToString(e,c,d);var f=false;if(!IsNullOrWhitepace(e)&&e.match(/^-/)){e=e.substr(1);f=true}if(g=="-"||g=="1"||g=="3"){e=(g==3)?e+" "+b:e+b}else{e=(g==2)?b+" "+e:b+e}if(f){e="("+e+")"}return(e)}function IntToString(d,c,a){var b=(c&&c.length>1)?c.substr(1,1):",";if(d!=null&&d!=""){d=parseInt(d);d=d.toString()}if(a&&a.indexOf("n")==0){d=AddFloatGroupers(d,b)}return(d)}function IsNullOrWhitepace(a){return(a==null||(IsString(a)&&Trim(a).length==0))}function FloatToString(b,h,c){if(IsNullOrWhitepace(b)){return("")}var d=(h&&h.length>0)?h.substr(0,1):".";var i=(h&&h.length>1)?h.substr(1,1):",";var a=(c&&c.match(/^\d$/))?parseInt(c,10):-1;if(b!=null){b=parseFloat(b)}if(a>0){b=b.toFixed(a)}b=b.toString();var e=b.split(".");var g=e[0];var f=(e.length>1)?e[1]:"";if(a>0&&a<6){if(a>FractDigits(b)){f+="0000000000"}f=f.substr(0,a)}g=AddFloatGroupers(g,i);b=g;if(f){b+=d+f}return(b)}function AddFloatGroupers(b,c){var a="";var d;while(b>=1000){d="000"+(b%1000);a=c+d.substr(d.length-3)+a;b=Math.floor(b/1000)}return(b+a)}function FloatToPercent(c,b,a){c=FloatToString(c,b,a);c+=" %";return(c)}function DateToString(a,l){var o=a;if(a&&a!=null&&a!=""){var f=(l&&l.search(/[Mdyg]/)<0&&l.search(/[hHmsfFtz]/)>=0);var j=a.split(" ");var c=j[0].split("-");var m=parseInt(c[2],10);var i=parseInt(c[1],10);var k=parseInt(c[0],10);var b=(f)?j[0].split(":"):(j.length>=2)?j[1].split(":"):null;var d=(b)?parseInt(b[0].replace(/^0/,""),10):0;var e=(b&&b.length>=2)?parseInt(b[1],10):0;var g=(b&&b.length>=3)?parseInt(b[2],10):0;var n=d;if(l){var h="am";l=l.replace(/\+/g,"");if(l.match(/t/)){if(d==0){d=12}else{if(d>=12){if(d>12){d-=12}h="pm"}}}o=l;o=o.replace(/yyyy/,k);o=o.replace(/yy/,FixDigits(k%100,2));o=o.replace(/dd/,FixDigits(m,2));o=o.replace(/d/,m);o=o.replace(/hh/,FixDigits(d,2));o=o.replace(/h/,d);o=o.replace(/HH/,FixDigits(n,2));o=o.replace(/H/,n);o=o.replace(/mm/,FixDigits(e,2));o=o.replace(/m/,e);o=o.replace(/ss/,FixDigits(g,2));o=o.replace(/s/,g);o=o.replace(/tt/,h);o=o.replace(/t/,h.substr(0,1));if(o&&o.indexOf("MMM")>=0&&window.dt_months&&i>=1&&i<=12){o=o.replace(/MMMM/,dt_months[i]);o=o.replace(/MMM/,dt_months[i+12])}else{o=o.replace(/MM+/,FixDigits(i,2));o=o.replace(/M/,i)}}else{o=i+"/"+m+"/"+k}}else{o=""}return(o)}function ValidateInt(e,c,a,b){var d=true;if(e!=null&&e!=""){e=StringToInt(e,b);d=e.match(/^[+-]?\d+$/);if(d&&c){d=parseInt(e,10)>=parseInt(c,10)}if(d&&a){d=parseInt(a,10)>=parseInt(e,10)}}return(d)}function ValidateFloat(f,d,a,c){var e=true;if(f&&f.indexOf("(")==0&&f.indexOf(")")==f.length-1){f="-"+f.substr(1,f.length-2)}if(f!=null&&f!=""){f=StringToFloat(f,c);var b=f.match(/^(([+-]?\d+(\.\d*)?)|([+-]?(\d*\.)?\d+))$/);e=(b!=null&&b.length>0&&b[0].length>0);if(e&&d){e=parseFloat(f)>=parseFloat(d)}if(e&&a){e=parseFloat(a)>=parseFloat(f)}}return(e)}function ValidatePercent(e,c,a,b){var d=true;if(e!=null&&e!=""){e=e.replace(/\s*%$/g,"");d=ValidateFloat(e,c,a,b);if(d&&c){d=parseFloat(e)>=parseFloat(c)}if(d&&a){d=parseFloat(a)>=parseFloat(e)}}return(d)}function ValidateDate(e,c,a,b){var f=true;if(e&&e!=null&&e!=""){var d=StringToDate(e,b);f=(d!=null&&d!="");if(f&&c){f=(d>=StringToDate(c,b))}if(f&&a){f=(StringToDate(a,b)>=d)}}return(f)}function ValidateCurrency(e,c,a,b){var d=CurrencyToFloat(e,b);var g=ValidateFloat(d);if(g&&c){g=(parseFloat(d)>=CurrencyToFloat(c))}if(g&&a){g=(CurrencyToFloat(a)>=parseFloat(d))}return(g)}function ValidateEmail(h,g,a,b){if(a){var c=g;var e=h.split(";");var d;for(d=0;d<e.length;d++){if(!ValidateEmail(e[d],g,false,b)){c=false;break}}return(c)}else{if(h==null||h.length==0){return(g)}else{h=Trim(h);if(b&&h.search(/^[^<]*<[^>]*>$/i)==0){h=Trim(h.substring(h.indexOf("<")+1,h.indexOf(">")))}var f=/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])$/i;return(0==h.search(f))}}}function ValidateText(d,b,a){var c=true;if(d!=null&&d!=""){if(c&&b){c=(d>=b)}if(c&&a){c=(a>=d)}}return(c)}function CurrencyLocale(b,a){if(b&&b.getAttribute){var c=b.getAttribute("loc");if(c){a=c}}return(a)}function ResolveExpr(c,f){var e;if(f.indexOf("[")<0){e=f}else{var g=f.split("[");var d;e=g[0];for(d=1;d<g.length;d++){var a=g[d].indexOf("]");var b=g[d].substring(0,a);e+=GetSiblingValue(c,b);e+=g[d].substr(a+1)}}return(e)}function GetFieldKey(d){var b="";if(d){var c=d.getAttribute("lkup");if(c){b=c}else{if(d.name){var f=d.name.indexOf("$")>0?"$":":";var e=d.name.split(f);var a;a=e.length-1;b=e[a]}else{if(d.getAttribute("use")=="radio"){b=GetFieldKey(FindRadio(d))}}}}return(b)}function FindRadio(c){if(!c||ElementType(c)=="radio"){return(c)}else{if(c.childNodes.length<1){return(null)}else{var a=c.childNodes;var b;for(b=0;b<a.length;b++){c=FindRadio(a[b]);if(c){break}}return(c)}}}function GetFieldPrefix(d){var c="";if(!d){}else{if(!d.name&&d.getAttribute("use")=="radio"){c=GetFieldPrefix(FindRadio(d))}else{if(d.name){var f=d.name.indexOf("$")>0?"$":":";var e=d.name.split(f);var a;if(e.length>=2&&(e[e.length-1]=="txt"||e[e.length-1]=="btn"||e[e.length-1]=="clr")){a=e.length-2}else{a=e.length-1}for(var b=0;b<a;b++){c+=e[b]+"_"}}}}return(c)}function GetDetailSibling(d,a){var b=null;var c=GetFieldPrefix(d);var e=c+a;b=document.getElementById(e);if(!b){b=document.getElementById(e+"_txt")}return(b)}function FieldRef(a){var b=new Object();if(a){b.flags=a.match(/^[$'`#<&?@^+*]*/)[0];b.id=a.substr(b.flags.length)}return(b)}function GetDetailSiblingValue(f,c){var e=FieldRef(c);var d=GetDetailSibling(f,e.id);var g;if(d){var b=ElementType(d);var a=(e&&e.flags)?e.flags:"";if(a.indexOf("$")>=0&&b=="select"){g=GetSelectText(d)}else{if(a.indexOf("#")>=0&&b=="text"){g=GetCtrlNum(d)}else{if(b=="checkbox"){g=d.checked?true:false}else{g=d.value}}}}return(g)}function GetCtrlNum(b){var d=b.value;var a=b.getAttribute("dtyp");var c=b.getAttribute("loc");switch(a){case"int":d=StringToInt(d,c);break;case"float":d=StringToFloat(d,c);break;case"per":d=PercentToFloat(d,1,c);break;case"cur":d=CurrencyToFloat(d,c);break}return(d)}function AssociatedLabel(f){var e=null;var a=document.getElementsByTagName("label");var d=a.length;var c;var b=f.id;if(IsBndLkup(f)){f=FindParent(f,"table");b=f.id.replace(/_tbl$/,"")}for(c=0;c<d;c++){if(a[c].htmlFor==b){e=a[c];break}}return(e)}function GetOwnerWin(b){var d=b.ownerDocument;var c=d.parentWindow;if(!c){c=d.defaultView}if((!c||c.screenTop==null)&&IsSafari()){if(!d.parWin){var a=function(f){f.document.parWin=f;for(var e=0;e<f.frames.length;e++){a(f.frames[e])}};a(window.top)}c=d.parWin}return(c)}function dumpProps(c,b){for(var a in c){var d;if(b){d=b+"."+a+"\n"+c[a]}else{d=a+"\n"+c[a]}if(!confirm(d)){return}if(typeof c[a]=="object"){if(b){dumpProps(c[a],b+"."+a)}else{dumpProps(c[a],a)}}}}function ErrorDesc(a){if(a.description){return a.description}else{if(a.message&&IsOpera()){var b=a.message.indexOf("Backtrace:");return(b>=0)?a.message.substr(0,b):a.message}else{if(a.message){return a.message}}}}function RegExErr(b,f,a,c){try{return(!b)?false:(b.match(f,a))?false:" "}catch(d){return((c&1)?"\n\n"+ErrorDesc(d):ErrorDesc(d))}}function GetValidationValue(a){var d;var h=ElementType(a);var f=(h=="select");var c=(f&&a.getAttribute("Multiple"));var e=(h=="checkbox");var b=(h=="table"&&a.getAttribute("use")=="radio");var k=(h=="span"&&a.getAttribute("use")=="dur");var j=(h=="div"&&a.getAttribute("use")=="webcam");if(a==null){d=null}else{if(c){d=GetListText(a,false)}else{if(f){var i=a.selectedIndex;if(i>=0){d=a.options[i].value}}else{if(b){d=RadioButtonVal(a)}else{if(k){d=TimeDurationVal(a)}else{if(e){d=(a.checked)?1:0}else{if(j){var g=GetElement(a.id+"_img");if(g&&g.src){var l=g.getAttribute("wm");if(!l||l!=g.src.reverse().replace(/[\\/].*/,"").reverse()){d=g.src}}}else{d=a.value;var l=a.getAttribute("wm");if(l&&l==a.value){d=""}}}}}}}}return(d)}function ApplyValidation(c,d,a){if(c!=null){var b=AssociatedLabel(c);if(d){if(!c.validInit){c.validInit=true;c.origTitle=c.title;if(b){b.origTitle=c.title}}ReplaceCssClass(c,"detailerr","detailerr");SetTip(c,d);if(b){SetTip(b,d);ReplaceCssClass(b,"detailerr","detailerr")}if(!a){window.setTimeout(function(){SetFocus(c);alert(d)},10)}}else{ReplaceCssClass(c,"detailerr","");SetTip(c,c.origTitle);if(b){ReplaceCssClass(b,"detailerr","");SetTip(b,b.origTitle)}}}return(!d)}function PerformValidation(evt,item,fnName,silent,full,virtForm){if(!evt){evt=window.event}var msg="";var win=null;var fn=null;var ctrl=GetElement(item);if(!ctrl&&IsString(item)){ctrl=document.getElementById(item+"_txt")}if(ctrl){var virtFormCtrl=ctrl.getAttribute("virtualForm");if(typeof virtForm=="undefined"||!virtForm){virtForm=""}if(typeof virtFormCtrl=="undefined"||!virtFormCtrl){virtFormCtrl=""}if((""+virtForm)!=(""+virtFormCtrl)){null}else{win=GetOwnerWin(ctrl)}if(win){fn=win.eval("window."+fnName)}}if(win&&fn){var val=GetValidationValue(ctrl);msg=fn(ctrl,val,full);ApplyValidation(ctrl,msg,silent)}if(win&&!silent&&(!win.ValidateAll||!win.ValidateAll())){if(win.RowCalc){win.RowCalc(GetFieldPrefix(ctrl))}}return(msg)}function RadioButtonSel(f){f=GetElement(f);var a=null;var b=window.document.getElementsByTagName("input");var e=b.length;var c;for(c=0;c<e;c++){var d=b[c];if(d.type.toLowerCase()=="radio"&&d.id.substr(0,f.id.length)==f.id&&d.checked){a=d;break}}return(a)}function RadioButtonVal(b){var a=RadioButtonSel(b);return(a)?a.value:null}function RadioButtonText(d){var b=RadioButtonSel(d);var a;if(b){var c=FindLabelFor(b);if(c){a=GetCellText(c)}}return(a)}function RadioSetByText(g,a){g=GetElement(g);var b=document.getElementsByName(g.id);var c=b.length;for(var d=0;d<c;d++){var e=b[d];if(ElementType(e)=="radio"){var f=FindLabelFor(e);if(f&&GetCellText(f)==a){e.checked=true;break}}}}function RadioSetByValue(f,g,a){f=GetElement(f);var b=document.getElementsByName(f.id);var c=b.length;for(var d=0;d<c;d++){var e=b[d];if(ElementType(e)=="radio"&&e.value==g){e.checked=true;OnChange(e,a);OnClick(e);break}}}function RadioItemOpts(c){var a=RadioButtonSel(c);var b=(a&&a.parentNode)?a.parentNode.getAttribute("itemopts"):"";return(b)?b:""}function TimeDurationVal(e){var g="";var f=e.getAttribute("loc");var c=e.firstChild;var a=ElementType(c);if(a=="select"){var d=c.value;var b=(c.nextSibling!=null)?c.nextSibling.value:0;if((d!=null&&d!="")||(b!=null&&b!="")){d=(d!=null&&d!="")?parseInt(d,10):0;b=(b!=null&&b!="")?parseInt(b,10):0;g=d+(b/60);g=FloatToString(g,f,"2")}}else{if(a=="text"){g=c.value}}return(g)}function GetListText(c,a){var d="";var b;for(b=0;b<c.options.length;b++){if(!a||c.options[b].selected){d+=";"+c.options[b].text}}return(d.length>0)?d.substr(1):d;return(d)}function GetSelectText(c){var a;var b=c.selectedIndex;if(b>=0){a=c.options[b].text}return(a)}function SetSelectText(c,b){var a;for(a=0;a<c.options.length;a++){if(c.options[a].text==b){c.options[a].selected=true;break}}}function CboText(a){return a.options[a.selectedIndex].text}function CboValue(a){return a.options[a.selectedIndex].value}function ClearSelect(a){a.options.length=0;while(a.childNodes.length>0){a.removeChild(a.childNodes[0])}}function TimePickerVal(c){var b=document.getElementById(c.id.replace(/_tbl$/,"_hr"));var a=document.getElementById(c.id.replace(/_tbl$/,"_min"));var d="";b=GetSelectText(b);a=GetSelectText(a);if((b!=null&&b!="")||(a!=null&&a!="")){if(b!=null&&b!=""&&(a==null||a=="")){a="00"}d=""+b+":"+a}return(d)}function SetFocus(b,d,a){if(!a){window.setTimeout(function(){SetFocus(b,d,1)},1);return}var c=GetElement(b);if(c&&CanGetFocus(c)){if(c.focus){c.focus()}else{if(c.onfocus){c.onfocus()}}if(d){if(c.select){c.select()}else{if(c.onselect){c.onselect()}}}}}function SetFocusButton(c,b){if(!b){window.setTimeout(function(){SetFocusButton(c,1)},1);return}var d=GetElement(c);var a=ElementType(d);if(d&&(a=="button"||a=="submit"||a=="reset")){if(d.focus){d.focus()}else{if(d.onfocus){d.onfocus()}}}}function SetFocusFirst(d,f,c){var e=GetElement(d);if(e){var a;for(a=0;a<e.childNodes.length;a++){var b=e.childNodes[a];if(CanGetFocus(b)){SetFocus(b,f);return(true)}else{if(c&&SetFocusFirst(b,f,c)){return(true)}}}}return(false)}function GetCellText(b){var a="";if(b){var c=ElementType(b);if(c=="checkbox"){a=(b.checked)?"1":"0"}else{if(c=="textbox"||c=="hidden"){a=b.value}else{if(b.innerText){a=b.innerText}else{if(b.textContent){a=b.textContent}else{if(b.childNodes&&b.childNodes.length>0&&b.childNodes[0].innerHTML){a=b.childNodes[0].innerHTML}else{a=b.innerHTML}}}}}}return(a)}function SetCellText(a,b){if(a){if(a.innerText){a.innerText=b}else{if(a.childNodes&&a.childNodes.length>0&&a.childNodes[0].innerHTML){a.childNodes[0].innerHTML=b}else{a.innerHTML=b}}}}function InnerTextSet(a,b){if(a){if(a.innerText){a.innerText=b}else{if(a.textContent){a.textContent=b}else{if(a.childNodes&&a.childNodes.length>0&&a.childNodes[0].innerHTML){a.childNodes[0].innerHTML=b}else{a.innerHTML=b}}}}}function InnerTextGet(b){var a;if(b.innerText){a=b.innerText}else{if(b.textContent){a=b.textContent}}return(a)}function GetValue(c){var d;if(c){var a=ElementType(c);if(a=="text"||a=="hidden"||a=="textarea"){d=c.value}else{if(a=="checkbox"){d=c.checked}else{if(a=="select"){var b=c.selectedIndex;if(b>=0){d=c.options[b].value}}else{if(a=="td"){d=GetCellText(c)}}}}}return(d)}function FieldValue(a){var b=GetElement(a);if(!b&&a&&typeof a=="string"){b=GetElement(a+"_txt");if(!IsBndLkup(b)){b=null}}return GetValue(b)}function GetElementValue(a){return GetValue(GetElement(a))}function GetText(d){var a;var b=ElementType(d);if(b=="text"){a=d.value}else{if(b=="select"){var c=d.selectedIndex;if(c>=0){a=d.options[c].text}}else{a=GetCellText(d)}}return(a)}function GetNum(a){var b=GetText(a);if(b==null||b==""){b=0}else{if(b.toLowerCase()=="true"){b=1}else{if(b.toLowerCase()=="false"){b=0}}}return(b)}function SetValue(d,e,c){var a=ElementType(d);if(a=="text"||a=="hidden"){d.value=e;if(c){OnChange(d)}}else{if(a=="select"){var b;for(b=0;b<d.options.length;b++){if(d.options[b].value==e){d.selectedIndex=b;break}}}else{if(a=="td"){SetCellText(d,e)}else{if(a=="div"&&d.getAttribute("use")=="fileup"){SetValue(GetElement(d.id+"_txt"),e,true)}}}}}function IsSet(a){var c=false;if(a){var b=ElementType(a);if(b=="checkbox"){c=(a.checked)}else{if(b=="text"||b=="hidden"){c=(a.value!=null&&a.value!="")}else{if(a.innerText){c=(a.innerText&&a.innerText!=null)}else{if(a.textContent){c=(a.textContent&&a.textContent!=null)}else{if(a.childNodes&&a.childNodes.length>0&&a.childNodes[0].innerHTML){c=(a.childNodes[0].innerHTML&&a.childNodes[0].innerHTML!="")}else{c=(a.innerHTML&&a.innerHTML!="")}}}}}}return(c)}var gBaseDt=new Date(2001,0,1,0,0,0);function Timestamp(){return""+(new Date()-gBaseDt)}function RefreshDoc(d){var b=document.location.href.split("#");var c=b[0];c=UpsertUrl(c,"act","rfsh");c=UpsertUrl(c,"uts",Timestamp());if(window.ActiveSubform){var a=window.ActiveSubform();if(a){c=UpsertUrl(c,"asf",a)}}if(window.rowKey){c=UpsertUrl(c,"ark",window.rowKey)}if(d){c=d(c)}if(b.length>1){c+="#"+b[1]}document.location.replace(c)}function UpsertUrl(c,a,e){var b="&"+a+"=";var d="?"+a+"=";if(c.indexOf(d)>0){c=c.replace(new RegExp("\\"+d+"[^&]*"),d+e)}else{if(c.indexOf(b)>0){c=c.replace(new RegExp(b+"[^&]*"),b+e)}else{c+=b+e}}return(c)}function SetPgCmd(d){var a="eappgcmd";var b=GetElement(a);if(!b){var c=document.forms[0];b=AddHiddenInput(c,a)}b.value=d}function DependencyCascade(g,a,c){var f=GetFieldPrefix(a);var d=a.getAttribute("depends");var i=d.split(";");var h;DependencyClear(a);for(h=0;h<i.length;h++){var e=f+i[h];var b=document.getElementById(e);if(b){ApplyDiscrim(b,c)}}}function DependencyClear(g,b){var f=GetFieldPrefix(g);var h=g.getAttribute("depends");if(b){if(g.options){g.options.length=0;while(g.childNodes.length>0){g.removeChild(g.childNodes[0])}}g.value="";if(g.getAttribute("dynlock")){g.disabled=true}}if(h){var e=h.split(";");var c;for(c=0;c<e.length;c++){var a=f+e[c];var d=document.getElementById(a);if(d){DependencyClear(d,true)}}}}function ApplyDiscrim(b,c){var a=b.getAttribute("discrim");if(a){a=ResolveExpr(b,a);if(a){window.status=c;Discrim(b.getAttribute("pickid"),a,b,DiscrimReturned)}}}function Discrim(b,d,c,a){var e="name="+b+"&discrim="+d+"&ctrl="+c.id;AjaxReq("discrim",e,a)}function DiscrimReturned(m,p){var f=m;var h=f.indexOf(";");var c=f.substr(0,h);var g=document.getElementById(c);f=f.substr(h+1);window.status="";if(g){var l;AddOption(g,"","");g.selectedIndex=0;var o=new Array();var i=null;var b=f.split(";");var a;for(l=0;l<b.length;l++){var n=b[l].split("=");var d=n[0];var e=n[1];var j=(d&&d.indexOf(":")>0)?d.split(":")[0]:null;if(j){d=d.split(":")[1]}else{j=i}if(!d||!e){a=null}else{if(j){var k=o[j];if(k==null){k=document.createElement("optgroup");k.label=j;o[j]=k;i=j;g.appendChild(k)}a=document.createElement("option");if(IsIE()){a.innerText=e}else{a.text=e}a.value=d;k.appendChild(a)}else{a=AddOption(g,e,d)}}if(a&&e==p){a.selected=true}}if(g.getAttribute("dynlock")){g.disabled=false}}}var asbMaxLen=10;function asbOnKeyPress(a){if(!a){a=window.event}var b=GetEventKey(a);return((b==13&&window.g_bCancelSubmit)||b==27)?CancelBubble(a):true}function asbOnKeyDown(d,c){if(!d){d=window.event}var f=document.getElementById(c);f.textBoxId=GetEventTarget(d).id;var b=GetEventKey(d);if(b==38){asbMoveUp();return CancelBubble(d)}else{if(b==40){asbMoveDown();return CancelBubble(d)}else{if(b==27){asbHideDiv(c,1);window.g_bCancelSubmit=false}else{if(b==13){if(IsVisible(c)){var e=false;if(asbListLen(f)==1){asbApplyIfSingleEntry(f);e=true}else{if(f.selected){asbApplySelection(f.id,f.textBoxId,f.selected.id);e=true}}if(e){CancelBubble(d)}window.g_bCancelSubmit=true}else{window.g_bCancelSubmit=false}}else{if(b==9){asbApplyIfSingleEntry(f)}else{var a=document.getElementById(f.textBoxId);a.dirty=true;a.found=false}}}}}return true}function asbOnKeyUp(m,k,a,l){var b=document.getElementById(k);b.textBoxId=GetEventTarget(m).id;var g=document.getElementById(b.textBoxId);var d=GetEventKey(m);if(!IsVisible(g)){return}if(d!=38&&d!=40&&d!=13&&d!=27&&d!=9){var j=asbGetTextBoxValue(k);var f=true;if(b.key==l&&b.lastText&&j&&j.indexOf(b.lastText)==0){if(asbListLen(b)<=asbMaxLen){var c=asbFilterList(b,j);b.style.visibility="";f=(c<=0)}}if(f){if(b.suggestTimeout){window.clearTimeout(b.suggestTimeout)}b.mapper=a;b.key=l;b.isActive=true;var h=g.getAttribute("picklist");var i=g.getAttribute("pick");if(h){var e=(b.sequence)?parseInt(b.sequence,10)+1:1;b.sequence=e;b.pick=h;b.suggestTimeout=window.setTimeout(function(){asbAutoSuggestPick(e,k)},150)}else{if(i){b.suggestTimeout=window.setTimeout(function(){asbAutoSuggest(k,i)},350)}else{b.suggestTimeout=window.setTimeout(function(){asbAutoSuggest(k)},350)}}}b.lastText=j}}function asbAutoSuggest(a,b){var d=document.getElementById(a);var c=asbGetTextBoxValue(a);if(c&&c.length>0){asbGetDataFromServer(c,a,d.mapper,d.key,b)}else{asbHideDiv(a)}}function asbGetTextBoxValue(b){var c=document.getElementById(b);var a=document.getElementById(c.textBoxId);return((a)?a.value:"")}function asbTRACE(a){}function asbGetDataFromServer(d,m,a,n,j){var e=new XHConn();if(e){var b=document.getElementById(m);var i=document.getElementById(b.textBoxId);var h="req=suggest";var g=(b.sequence)?parseInt(b.sequence,10)+1:1;h+="&div="+m;h+="&text="+d;h+="&id="+b.textBoxId;h+="&seq="+g;var f=i.getAttribute("pss");if(f){h+="&pss="+encodeURI(f);var o=i.getAttribute("db");if(o){h+="&db="+o}}else{if(j){h+="&pick="+encodeURI(i.getAttribute("pick"))}else{var p=i.getAttribute("HostMap");var k=i.getAttribute("FindFltFlds");var c=i.getAttribute("HostKey");var l=i.getAttribute("HostFlv");if(p){h+="&FindMap="+p}if(c){h+="&HostKey="+c}if(l){h+="&HostFlv="+l}if(k){h+="&FindFltVals="+resolvePageInstanceValues(i,k)}}}b.sequence=g;e.connect("Handler.ashx","GET",h,asbSuggestionReturned)}}function asbSuggestionReturned(a){asbHandleResponse(a.responseText)}function asbHandleResponse(a){var b="asbMenu";if(a&&a.length>0){var e=a.indexOf(";");var c=a.substr(0,e);a=a.substr(e+1);var d=document.getElementById(b);if(d.sequence==c&&d.isActive){asbShowDiv(b,a)}}else{asbHideDiv(b)}}function asbShowDiv(h,c){var f=document.getElementById(h);var d=document.getElementById(f.textBoxId);asbHideDiv(h);f.selected=null;var g;f.style.visibility="hidden";f.style.display="";g="<div id='"+h+"_content' style='z-index:9050; position:absolute;'>";g+=c;g+="</div>";if(IsIE()){g+="<iframe id='"+h+"_iframe' src='blank.htm' frameborder='0' scrolling='no'></iframe>"}else{g+="<div id='"+h+"_iframe'></div>"}f.innerHTML=g;var e=document.getElementById(h+"_content");var j=document.getElementById(h+"_iframe");SetCssClass(e,"asbMenu");SetCssClass(f,"asbMenuBase");f.style.top=(getTop(d,f)+d.offsetHeight+1)+"px";f.style.left=getLeft(d,f)+"px";e.style.height=e.offsetHeight+"px";j.style.height=e.offsetHeight+"px";f.style.visibility="visible";var a;if(IsIE()){a=d.offsetWidth}else{a=GetRight(e)-getLeft(e);if(a<d.offsetWidth){a=d.offsetWidth;var b=GetStyle(e,"padding-left").replace(/px/,"");var i=GetStyle(e,"padding-right").replace(/px/,"");if(b){a-=b}if(i){a-=i}}}f.style.width=a;e.style.width=a;j.style.width=a;d.menu=f}function asbHideDiv(a,b){if(b){window.setTimeout(function(){asbHideDiv(a)},b)}else{var c=document.getElementById(a);c.style.width=null;c.style.display="none"}}function asbOnMouseOver(a,b,c){asbSelItem(a,c)}function asbSelItem(a,c){if(c){var b=document.getElementById(c);var d=document.getElementById(a);if(d.selected){SetCssClass(d.selected,"asbMenuItem")}if(b){SetCssClass(b,"asbSelMenuItem");d.selected=b}}}function asbOnMouseClick(a,b,c){asbApplySelection(a,b,c)}function asbApplySelection(j,b,h){var a=document.getElementById(j);var e=document.getElementById(b);var l=document.getElementById(h);var d=l.getAttribute("toCopy");if(d){d=d.split(";");var k;var f=GetFieldPrefix(e);for(k=0;k<d.length;k++){var i=d[k];var c=l.getAttribute("asb_"+i);i=f+i;var g=document.getElementById(i);if(g){asbSetValue(g,c)}}}asbSetValue(e,GetCellText(l));if(a.suggestTimeout){window.clearTimeout(a.suggestTimeout)}a.suggestTimeout=null;asbHideDiv(j)}function asbSetValue(f,h){var d=ElementType(f);var g=false;if(d=="select"){var e;var c=-1;for(e=0;e<f.options.length;e++){var b=f.options[e].text;if(h&&b&&h.toLowerCase()==b.toLowerCase()){f.value=h;g=true;break}else{if(!b||b==""){c=e}}}if(!g&&c>=0){f.selectedIndex=c;g=true}}else{if(d=="text"||d=="hidden"){f.value=h;g=true}}if(g){f.found=true;OnChange(f);if(f.cell){var a=f.cell;ListEditDone2(f,a,false,false);window.setTimeout(function(){ListEditStart(a,null)},1)}}}function asbMoveDown(){var a="asbMenu";var d=document.getElementById(a);var c=d.selected;var b=null;if(c){b=c.nextSibling}else{if(d.childNodes.length>0){b=d.childNodes[0].childNodes[0]}}if(b){asbSelItem(a,b.id)}}function asbListLen(b){var a=0;if(b&&b.childNodes&&b.childNodes[0]&&b.childNodes[0].childNodes){a=b.childNodes[0].childNodes.length}return(a)}function asbFilterList(g,d){var f=0;if(g&&g.childNodes&&g.childNodes[0]&&g.childNodes[0].childNodes){var a=g.childNodes[0].childNodes;var c;d=d.toLowerCase();for(c=a.length-1;c>=0;c--){var e=a[c];var b=GetCellText(e);if(b&&b.toLowerCase().indexOf(d)!=0){e.parentNode.removeChild(e)}else{f++}}}return(f)}function asbMoveUp(){var a="asbMenu";var d=document.getElementById(a);var c=d.selected;var b=null;if(c){b=c.previousSibling}if(b){asbSelItem(a,b.id)}}function asbOnBlur(a){var b=document.getElementById(a);b.isActive=false;asbHideDiv(a,200)}function asbApplyIfSingleEntry(d){if(asbListLen(d)==1){var c=asbGetTextBoxValue(d.id);var b=d.childNodes[0].childNodes[0];var a=GetCellText(b);if(c.indexOf("?")==0){c=c.substring(1)}if(c){c=c.toLowerCase()}if(a){a=a.toLowerCase()}if(c&&c.length>0&&a.indexOf(c)==0){asbApplySelection(d.id,d.textBoxId,b.id)}}}function asbAutoSuggestPick(h,f){var b=asbGetTextBoxValue(f).toLowerCase();if(!b||b.length==0){asbHideDiv(f);return}var a=document.getElementById(f);var e=a.pick.split(";");var g;var d="";var c=new Array();var i;if(b.indexOf("?")==0){b=b.substring(1)}for(g=0;g<e.length;g++){i=e[g];if(i&&i.length>0&&i.toLowerCase().indexOf(b)==0){c.push(i)}}c.sort(sortCaseInsensitive);for(g=0;g<c.length&&g<asbMaxLen;g++){d+=asbBuildSuggestionHtml(g,f,a.textBoxId,c[g],0,true)}if(c.length>asbMaxLen){d+=asbBuildSuggestionHtml(asbMaxLen,f,a.textBoxId,"(more)",0,false)}if(c.length>0){d=h+";"+d}asbHandleResponse(d)}function asbBuildSuggestionHtml(g,a,b,k,j,h){var f="";if(h){var c="asb_"+g;var e="asb_"+g;var i="asbOnMouseClick('"+a+"','"+b+"','"+c+"');";var d="asbOnMouseOver('"+a+"','"+b+"','"+c+"');";f+='<div class="mapper asbMenuItem" id="'+c+'"';f+=' name="'+e+'"';f+=' onclick="'+i+'"';f+=' onmouseover="'+d+'"';f+=">"+k+"</div>"}else{f='<div class="mapper asbMenuItem" style="cursor:auto">'+k+"</div>"}return(f)}function GetElementById(g,a,c){var f=document.getElementById(g);if(!f&&a&&!IsIE()&&c){var b=document.getElementsByTagName(c);var e=b.length;var d;g=g.toLowerCase();for(d=0;d<e;d++){if(b[d].id&&b[d].id.toLowerCase()==g){f=b[d];break}}}return(f)}function CboTaInit(a){if(!a){a=window.event}var b=GetEventTarget(a);b.keys="";if(!b.taSetUp){b.onkeydown=CboTaDown;b.onkeypress=CboTaPress;b.onkeyup=CboTaUp;b.onchange=CboTaChange;b.onblur=CboTaChange;b.taSetUp=true}}function CboTaDown(a,f){if(!a){a=window.event}var b=GetEventKey(a);var d=GetEventTarget(a);var e=false;if(b==8){var c=d.keys;if(c.length>0){d.keys=c.substr(0,c.length-1)}e=true}else{if(b==13){OnChange(d)}}if(false){a.cancelBubble=true;a.returnValue=false;if(a.stopPropagation){a.stopPropagation()}if(a.preventDefault){a.preventDefault()}}return(!e)}function CboTaPress(a,d){if(!a){a=window.event}var b=GetEventKey(a);var c=GetEventTarget(a);var e=false;if(!c){alert("no cbo")}if(b==8){e=true}else{if(!IsKeyCtrl(b)){c.keys+=String.fromCharCode(b);e=true}}if(e){a.cancelBubble=true;a.returnValue=false;if(a.stopPropagation){a.stopPropagation()}if(a.preventDefault){a.preventDefault()}}return(!e)}function CboTaUp(a,f,d){if(!a){a=window.event}var b=GetEventKey(a);var c=GetEventTarget(a);var e=c.getAttribute("dynval");if(!IsKeyCtrl(b)||b==8){CboTaSelect(c,e);CancelBubble(a);return(false)}}function CboTaChange(a){if(!a){a=window.event}var b=GetEventTarget(a);b.keys="";if(b.selectedIndex!=0&&b.options.length>1&&b.options[0].text.indexOf("*")==0){b.remove(0)}}function CboTaSelect(g,h){var f=false;var d;var b=-1;var e=g.keys.toLowerCase();for(d=0;d<g.options.length;d++){if(g.options[d].text.toLowerCase().indexOf(e)==0){b=d;f=true;break}}if(f){var a=g.options[b].text;window.status=a.substr(0,e.length)}else{if(h){var c=null;if(g.options.length>0&&g.options[0].text.indexOf("*")==0){c=g.options[0]}else{c=AddOption(g,"","",0)}c.text="*"+g.keys;c.value=c.text;b=0;f=true;if(g.options.length>1&&g.options[1].text.indexOf("*")==0){g.remove(1)}}}if(f&&b!=g.selectedIndex){g.selectedIndex=b}return(f)}function DevLog(e,d,g,f,b){if(window.XHConn){var a=new XHConn();if(a){var c="req=devlog&msg="+e;if(g){c+="&src="+d}if(g){c+="&id="+g}if(g){c+="&lev="+f}if(g){c+="&cat="+b}a.connect("Handler.ashx","GET",c,null)}}}function AjaxButtonClick(j,a,g){var f=false;if(!j){j=window.event}if(window.XHConn){var d=new XHConn();if(d){var c=a.getAttribute("mop");var h=a.getAttribute("flavor");var i=a.getAttribute("key");var b=a.getAttribute("rowKey");if(!b){b=""+GetOwnerWin(a).rowKey}if(b){var e="act=abclk";if(c){e+="&mop="+c}if(h){e+="&flavor="+h}if(b){e+="&rowKey="+b}if(i){e+="&key="+i}if(g){e+="&"+g}if(ElementType(a)=="a"){a.style.paddingLeft="2px";window.setTimeout("var c = document.getElementById('"+a.id+"'); if (c) { c.style.paddingLeft = ''; }",75)}JsonReq("btnclk",e,AjaxBtnClickRsp,0);f=true;if(j){j.cancelBubble=true;j.defaultValue=false;if(j.stopPropagation){j.stopPropagation()}if(j.preventDefault){j.preventDefault()}}}}}return(f)}function AjaxBtnClickRsp(a){if(a.__type=="error"){alert(a.message)}else{if(a.__type=="btnclk"&&a.message){alert(a.message)}}}function RowAjaxRequest(d,f,a,e,b){var c="reqnm="+a+"&map="+d+"&rowKey="+f;if(e){c+="&"+e}JsonReq("mapreq",c,b,0)}function AjaxValueFields(c,f){var e="";if(f){var d=f.split(";");var b;for(b=0;b<f.length;b++){var a=d[b];if(a){e+="&fld:"+a+"="+encodeURIComponent(GetSiblingValue(c,a))}}}return(e)}function AjaxCommandClick(k,a,i,h){var g=false;if(!k){k=window.event}if(window.XHConn&&a){var e=new XHConn();if(e){var c=a.getAttribute("mop");var j=a.getAttribute("flavor");var d=a.getAttribute("cmd");var b=a.getAttribute("rowKey");if(!b){b=""+window.rowKey}if(b){var f="act=acclk&req=cmdclk";if(c){f+="&mop="+c}if(j){f+="&flavor="+j}if(b){f+="&rowKey="+b}if(d){f+="&cmd="+d}if(i){f+=i}f+="&ajaxdt="+Timestamp();if(ElementType(a)=="a"){a.style.paddingLeft="2px";window.setTimeout("var c = document.getElementById('"+a.id+"'); if (c) { c.style.paddingLeft = ''; }",75)}e.connect("Handler.ashx","GET",f,h);g=true;if(k){k.cancelBubble=true;k.defaultValue=false;if(k.stopPropagation){k.stopPropagation()}if(k.preventDefault){k.preventDefault()}}}}}return(g)}function AjaxReq(c,e,a){var b=new XHConn();if(b){var d="act=areq&req="+c+"&ajaxdt="+Timestamp();if(e&&e!=""){d+="&"+e}b.getString("Handler.ashx",d,a)}}function AjaxLookup(b,d,c,a){AjaxReq("lkup","type="+b+"&id="+d+"&info="+c,a);window.status="Retrieving information from server..."}function AjaxPrefSet(a,d,e,b){var c="nm="+a+"&val="+d;if(e){c+="&op="+e}AjaxReq("setprf",c,b)}function AjaxPrefOpSet(b,a,c){if(c=="-"){AjaxPrefSet(b,"-"+a,"add")}else{AjaxPrefSet(b,a,"remove")}}function ClearCache(a){AjaxReq("clrpg","mop="+a)}function JsonReq(f,h,c,a){var b;var e=new XHConn();if(e){var g="req="+f;var d=(0!=(a&2));if(0==(a&1)){g+="&ajaxdt="+Timestamp()}if(h&&h!=""){g+="&"+h}b=e.getObject("Handler.ashx",g,c,d)}return(b)}function DebugKeyUp(h){if(!h){h=window.event}var c=false;var a=GetEventTarget(h);var g=GetEventKey(h);if(g==120&&IsOpera()){g=119}if(a&&g==119){var b="";var k=GetCssClass(a);var e=FindLabelFor(a);var j=GetCellText(e).replace(/:/g,"");var f=GetFieldKey(a).replace(/^fbf_/,"");b+="id ----------> "+a.id;if(f){b+="\nkey ---------> "+f}b+="\nlabel -------> "+j;b+="\nclass -------> "+k;b+="\ntag ---------> "+ElementType(a);var i;for(i=0;i<a.attributes.length;i++){var d=a.attributes[i];if(d.name.match(/^dbg.*/i)){var l=d.name.substr(3)+" ";while(l.length<12){l+="-"}b+="\n"+l+"> "+d.value}}alert(b);h.cancelBubble=true;h.defaultValue=false;if(h.stopPropagation){h.stopPropagation()}if(h.preventDefault){h.preventDefault()}c=true}return(c)}function DebugPage(i){if(!i){i=window.event}var f=GetEventTarget(i);var s=GetEventKey(i);var r="";if(s==120&&IsOpera()){s=119}if(f&&s==119){var c="";var o="";var g;c+=DebugFmtMsgHtml("DateTime","Page",new Date(),0);var p=document.getElementsByTagName("dbginfo");var d=p.length;for(g=0;g<d;g++){var n=p[g];var u=n.getAttribute("name");var t=n.getAttribute("value");var e=n.getAttribute("cat");var j=n.getAttribute("lev");var m=n.getAttribute("list");if(j&&j>0){o+=DebugFmtMsgHtml(u,e,t,j,m)}else{c+=DebugFmtMsgHtml(u,e,t,j,m)}if(u=="MOP"){r=t}}c+=DebugFmtMsgHtml("RowKey","Mapper",window.rowKey);if(o&&o.length>0){c='<div class="dbgwarn">'+o+"</div>\r\n"+c}var b=window.document.location.href;var h=b.split("?");c+=DebugFmtMsgHtml("Page","URL",h[0]);if(h.length>1){var k=h[1].split("&");for(g=0;g<k.length;g++){var l=k[g].split("=");u=l[0];t=(l.length>1)?l[1]:"";c+=DebugFmtMsgHtml(u,"URL",t)}}var a=window.open("blank.htm","_blank","toolbar=no,scrollbars=yes");if(a!=null){var q=a.document;q.open();q.writeln("<html>\r\n<head><title>Debug Information: "+r+'</title>\r\n<link href="'+cssFile+'" rel="stylesheet" type="text/css" />\r\n</head>\r\n<body class="dbgwin" onkeydown="Esc(event);">\r\n');q.writeln(c);q.writeln("<script>function Esc(evt) { if (!evt) evt = window.event; if (evt.keyCode == 27) window.close(); }<\/script>");q.writeln("</body>\r\n</html>");q.close()}}}function DebugPane(h,j){if(!h){h=window.event}var e=false;var f=GetEventTarget(h);var p=GetEventKey(h);if(p==120&&IsOpera()){p=119}if(f&&p==119){var b="";var a=FindParent(j,"table").getAttribute("pan");b+="Pane --------> "+a;var o=document.getElementsByTagName("dbginfo");var c=o.length;for(var g=0;g<c;g++){var n=o[g];var r=n.getAttribute("name");var q=n.getAttribute("value");var d=n.getAttribute("cat");var m=n.getAttribute("list");if(d=="Pane"&&r==a&&m){var i=m.split(";");b+="\nCaption -----> "+q;for(var l=0;l<i.length;l++){var k=i[l].split(":");b+="\n"+k[0]+" --------> "+k[1]}break}}alert(b);CancelBubble(h);e=true}return(e)}function DebugFmtMsg(a,h,b,c,f){var i="--";var k="";if(h){a=h+":"+a}var d=20-a.length;i+=StrRepeat("-",d);k+=a+" "+i+"> "+b+"\n";if(f){var g=f.split(";");var e;for(e=0;e<g.length;e++){k+="..... "+Trim(g[e],true,true)+"\n"}}if(c&&c>0){var j;if(c>=32){j="CRITICAL:"}else{if(c>=16){j="ERROR:"}else{if(c>=8){j="SEVERE WARNING:"}else{if(c>=4){j="WARNING:"}else{if(c>=2){j="MILD WARNING:"}else{if(c>=1){j="INFO:"}}}}}}k=j+" "+k}return(k)}function DebugFmtMsgHtml(b,h,c,d,f){var j="";b=escapeHTML(b);c=escapeHTML(c);if(h){b=h+":"+b}b="<strong>"+b+":&nbsp;</strong>";if(h=="Timing"){j+=b+'<span style="color: Blue; font-weight: Bold">'+c+"</span>"}else{j+=b+c}if(f){var g=f.split(";");var e;for(e=0;e<g.length;e++){var a=g[e];if(a.match(/^Timing:/)){a=a.replace(/^Timing:/,'Timing:<span style="color: Blue; font-weight: Bold">')+"</span>"}j+="<br />..... "+Trim(a,true,true)+"\r\n"}}if(d&&d>0){var i;if(d>=32){i="CRITICAL:"}else{if(d>=16){i="ERROR:"}else{if(d>=8){i="SEVERE WARNING:"}else{if(d>=4){i="WARNING:"}else{if(d>=2){i="MILD WARNING:"}else{if(d>=1){i="INFO:"}}}}}}j=i+" "+j}return("<div>"+j+"</div>")}function StrRepeat(c,d){var b="";var a;for(a=0;a<d;a++){b+=c}return(b)}function FindLabelFor(e){var d;e=GetElement(e);if(e){var a=document.body.getElementsByTagName("label");var c=a.length;var f=e.id;var b;if(IsBndLkup(e)){f=bndLkupBase(e)}for(b=0;b<c;b++){if(f==a[b].htmlFor){d=a[b];break}}}return(d)}function DoClick(c,a,d){if(!d){d=window}if(a){var b=GetElement(c,d);if(b){if(b.click){b.click()}else{if(b.onclick){b.onclick()}}}}else{if(c){d.setTimeout(function(){DoClick(c,true,d)},1)}}}function CookieGetVal(b){var a=document.cookie.indexOf(";",b);if(a==-1){a=document.cookie.length}return decodeURIComponent(document.cookie.substring(b,a))}function CookieGet(d){var b=d+"=";var f=b.length;var a=document.cookie.length;var e=0;while(e<a){var c=e+f;if(document.cookie.substring(e,c)==b){return CookieGetVal(c)}e=document.cookie.indexOf(" ",e)+1;if(e==0){break}}return null}function CookieRemove(a){document.cookie=a+"=deleteMe; expires=Thu, 2 Aug 2001 20:47:11 UTC; path=/"}function CloseWhenOpenerCloses(a){if(window.opener){if(a){window.originalLoc=window.opener.document.location.href}else{window.originalLoc=null}window.setInterval("if (!OpenerOk()) window.close();",2000)}}function OpenerOk(){var a=(window.opener&&!window.opener.closed);if(a){try{var c=window.opener.document.location.href;if(window.originalLoc&&c!=window.originalLoc){a=false}}catch(b){a=false}}return(a)}function AddSelfCloseScript(a){a.writeln("<script>");a.writeln("function CloseIfNoOpener()");a.writeln("{");a.writeln("	if (!window.opener || window.opener.closed)");a.writeln("	{");a.writeln("		window.close();");a.writeln("	}");a.writeln("	else");a.writeln("	{");a.writeln("		try { if (window.originalLoc != window.opener.document.location.href) window.close(); } catch(e) { window.close(); }");a.writeln("	}");a.writeln("}");a.writeln("<\/script>")}function wmFocus(a,b){if(b.value==b.getAttribute("wm")){if(!b.getAttribute("readonly")){b.value="";ReplaceCssClass(b,"wm","")}b.onchange=wmChange}}function wmChange(a){wmBlur(null,this)}function wmBlur(a,b){if(IsBndLkup(b)){if(ElementType(b)=="table"){b=document.getElementById(b.id.replace(/_tbl$/,"_txt"))}else{b=document.getElementById(b.id.replace(/_btn$/,"_txt"))}}if(!b.value){b.value=b.getAttribute("wm");ReplaceCssClass(b,"wm","wm")}else{if(b.value!=b.getAttribute("wm")){ReplaceCssClass(b,"wm","")}}}function LockedWidgetOpener(b,a){if(a&&a.getAttribute("readonly")){var d=bndLkupBtnFromTxt(a);if(!d){null}else{if(b.type=="click"){DoClick(document.getElementById(d))}else{if(b.type=="keydown"){var c=GetEventKey(b);if(c==32||c==13){DoClick(document.getElementById(d))}}}}}}var Mouse={};Mouse.doc=document;Mouse.MouseMoveHandler=function(a){if(!a){a=window.event}Mouse.x=((Mouse.doc.body&&Mouse.doc.body.scrollLeft)||0)+a.clientX;Mouse.y=((Mouse.doc.body&&Mouse.doc.body.scrollTop)||0)+a.clientY;Mouse.currentTarget=a.target||a.srcElement;return true};if(Mouse.doc.attachEvent){Mouse.doc.attachEvent("onmousemove",Mouse.MouseMoveHandler)}else{if(Mouse.doc.addEventListener){Mouse.doc.addEventListener("mousemove",Mouse.MouseMoveHandler,false)}}function AddOption(f,a,g,b){var c=null;if(b==null){b=f.options.length}if(IsSafari()){c=new Option(a,g);if(b!=f.options.length){var d;for(d=f.options.length;d>b&&d>0;d--){var e=f.options[d-1];f.options[d-1]=c;f.options[d]=e}}else{f.options[b]=c}}else{c=document.createElement("OPTION");c.text=a;c.value=g;f.options.add(c,b)}return(c)}function RefreshParent(b){var c=null;if(window.opener){c=window.opener}else{if(b.frameElement){var a=b.frameElement.ownerDocument;if(a){c=a.parentWindow;if(!c){c=a.defaultView}}}}if(c&&c.RefreshPage){c.RefreshPage()}}function RefreshOpenerPage(b){try{if(opener&&opener.RefreshPage){opener.RefreshPage(b)}}catch(a){}}function CancelBubble(a){if(!a){a=window.event}if(a){a.cancelBubble=true;a.defaultValue=false;if(a.stopPropagation){a.stopPropagation()}if(a.preventDefault){a.preventDefault()}}return(false)}function IsPageDirty(c){var e=false;var a=document.getElementsByTagName("input");var b=a.length;var d;for(d=0;d<b;d++){e=IsCtrlDirty(a[d],c)||e}a=document.getElementsByTagName("textarea");for(d=0;d<b;d++){e=IsCtrlDirty(a[d],c)||e}a=document.getElementsByTagName("select");for(d=0;d<b;d++){e=IsCtrlDirty(a[d],c)||e}return(e)}function IsCtrlDirty(f,c){var e=false;var b=ElementType(f);var a=f.getAttribute("orig");var d=f.getAttribute("nodirty");if(a!=null){null}else{if(b=="checkbox"){a=f.parentNode.getAttribute("orig");d=f.parentNode.getAttribute("nodirty")}else{if(b=="radio"){var g=FindParent(f,"table");if(g){a=g.getAttribute("orig");d=g.getAttribute("nodirty")}}}}if(a!=null&&d!="1"){if(b=="text"){e=(f.value!=a)}else{if(b=="select"){e=(f.value!=a)}else{if(b=="checkbox"){e=(a!="0"&&!f.checked)||(a=="0"&&f.checked)}else{if(b=="textarea"){e=(f.value!=a)}else{if(b=="radio"&&f.checked){e=(f.value!=a);f=FindParent(f,"table")}}}}}if(c){if(e){ReplaceCssClass(f,"","editedlist")}else{RemoveCssClass(f,"editedlist")}}}return(e)}function MapNav(a,c,d){var b=true;if(IsPageDirty(true)&&!confirm(d)){b=false;if(ElementType(c)=="radio"){ResetRadio(c)}else{c.value=c.getAttribute("orig")}}return(b)}function ResetRadio(e){var d=FindParent(e,"table");if(d){var f=d.getAttribute("orig");var b=document.getElementsByTagName("input");var g=b.length;var c;for(c=0;c<g;c++){var a=b[c];if(ElementType(a)=="radio"&&IsParentOf(a,d)&&a.value==f){a.checked=true}}}}function sortCaseInsensitive(d,c){d=""+d.toLowerCase();c=""+c.toLowerCase();if(d>c){return 1}else{if(d<c){return -1}else{return 0}}}function GetStyle(a,b){var c="";if(document.defaultView&&document.defaultView.getComputedStyle){c=document.defaultView.getComputedStyle(a,"").getPropertyValue(b)}else{if(a.currentStyle){b=b.replace(/\-(\w)/g,function(d,e){return e.toUpperCase()});c=a.currentStyle[b]}}return(c)}function OpenInNewWindow(b,d,a,c){if(!b){b=window.event}var f=GetEventTarget(b);if(b.shiftKey||b.altKey||b.ctrlKey||b.metaKey){return true}if(ElementType(f)!="a"){f=FindParent(f,"a")}if(f){var e=WindowOpenFeatures(d,a,c);var g=window.open(f.getAttribute("href"),f.getAttribute("target"),e);if(g){if(g.focus){g.focus()}return false}return true}}function WindowOpenFeatures(b,a,d){var e="";var c=true;e+=",menubar="+((0!=(b&4))?"1":"0");e+=",resizable="+((0!=(b&8))?"1":"0");e+=",scrollbars="+((0!=(b&16))?"1":"0");e+=",status="+((0!=(b&32))?"1":"0");e+=",toolbar="+((0!=(b&64))?"1":"0");e+=",fullscreen="+((0!=(b&128))?"1":"0");if(a>0){e+=",height="+a}if(d>0){e+=",width="+d}if(0!=(b&256)){e+=",top=' + window.event.y + ',left=' + window.event.x";c=false}else{if(0!=(b&1)){e+=",top="+((screen.height-a)/2)}if(0!=(b&2)){e+=",left="+((screen.width-d)/2)}else{if(0!=(b&512)){e+=",left="+((screen.width-d))}}}if(e.Length>0){e=e.substring(1)}e="'"+e;if(c){e+="'"}return(e)}function SetOpacity(a,b){a.style.filter="alpha(opacity:"+b+")";a.style.KHTMLOpacity=b/100;a.style.MozOpacity=b/100;a.style.opacity=b/100}function RemoveOpacity(a){a.style.filter="";a.style.KHTMLOpacity="";a.style.MozOpacity="";a.style.opacity=""}function IFrameDoc(a){var b=a.contentWindow.document;if(!b){b=a.contentDocument}return(b)}function FindFrame(b){var d=null;var e=window;while(d==null&&e!=null){var a=e.frames;for(var c=0;a!=null&&c<a.length;c++){if(a[c].name==b){d=a[c];break}}e=(e==e.parent)?null:e.parent}return(d)}function StyleRule(d){var e=null;if(document.styleSheets){var a;if(document.styleSheets[0].cssRules){a=document.styleSheets[0].cssRules}else{if(document.styleSheets[0].rules){a=document.styleSheets[0].rules}}if(a){var b;d=d.toLowerCase();for(b=0;b<a.length;b++){var c=a[b];if(c.selectorText.toLowerCase()==d){e=c;break}}}}return(e)}function BubAddInfoIcons(d){var c=0;var b;var a=0;b=document.getElementsByTagName("input");c+=b.length;a+=BubAddInfoItems(b,d);b=document.getElementsByTagName("a");c+=b.length;a+=BubAddInfoItems(b,d);b=document.getElementsByTagName("img");c+=b.length;a+=BubAddInfoItems(b,d)}function BubAddInfoItems(a,e){var b=0;var c;for(c=0;c<a.length;c++){var d=a[c];if(d.getAttribute("hlp")&&IsVisible(d)&&BubAddInfo(d,e)){b++}else{}}return(b)}function BubAddInfo(e,d){var b=false;var c=e.getAttribute("hlp");if(c=="t"){c=e.title}var a=BubCreateEl("img","");var g=GetStaticTop(e)+e.offsetHeight;var f=GetStaticLeft(e)+8;g=g-g%4;a.style.position="absolute";a.style.left=f;a.style.top=g;a.style.zIndex=100000;a.src="images/BubInfo.gif";AddDocEl(a);SetTip(a,c);b=true;return(b)}function BubCreateEl(b,f,e){if(!e){e=document}var a=e.createElement(b);SetCssClass(a,f);a.style.display="block";return(a)}function CreateShim(){var a=document.createElement("iframe");a.src="blank.htm";SetCssClass(a,"shim");a.role="shim";document.body.appendChild(a);return(a)}function WindowWidth(a){if(a.innerWidth){return(a.innerWidth)}else{if(a.document.body&&a.document.body.offsetWidth){return(a.document.body.offsetWidth)}else{return(0)}}}function WindowHeight(a){if(a.innerHeight){return(a.innerHeight)}else{if(a.document.body&&a.document.body.offsetHeight){return(a.document.body.offsetHeight)}else{return(0)}}}function BubEnableTooltips(b,a,f){if(!f){window.setTimeout(function(){BubEnableTooltips(b,a,true)},1);return}if(!document.getElementById||!document.getElementsByTagName){return}var i=BubCreate(200);i.id="btc";i.style.display="none";window.tipTextNode=document.createTextNode("tip");FindRole(i,"content").appendChild(window.tipTextNode);var c=new Date().getTime();var j;var e=0;var k=0;var d=0;var l=0;var h="";j=document.getElementsByTagName("input");k=j.length;e=BubEnableItems(j,a);l+=k;d+=e;h+="INPUT: "+e+"/"+k;j=document.getElementsByTagName("a");k=j.length;e=BubEnableItems(j,a);l+=k;d+=e;h+=", A: "+e+"/"+k;j=document.getElementsByTagName("img");k=j.length;e=BubEnableItems(j,a);l+=k;d+=e;h+=", IMG: "+e+"/"+k;j=document.getElementsByTagName("textarea");k=j.length;e=BubEnableItems(j,a);l+=k;d+=e;h+=", TEXTAREA: "+e+"/"+k;j=document.getElementsByTagName("select");k=j.length;e=BubEnableItems(j,a);l+=k;d+=e;h+=", SELECT: "+e+"/"+k;var g=new Date().getTime();h+=" --> "+d+"/"+l+" ("+(g-c)+"ms)";RegDebugInfo("BubbleTips",h,"Script")}function BubEnableItems(b,e){var c=0;var a=b.length;var d;for(d=0;d<a;d++){if(BubPrepare(b[d],e)){c++}}return(c)}function BubPrepare(c,d){var e=false;var b=(d&&d.indexOf("t")>=0)?c.getAttribute("tt"):c.getAttribute("title");var a=ElementType(c);if(!b){if(a=="checkbox"){c.parentNode.tipPos=c.nextSibling;e=BubPrepare(c.parentNode,d);RemoveTip(c.parentNode)}else{if(a=="radio"){b=(d&&d.indexOf("t")>=0)?c.parentNode.getAttribute("tt"):c.parentNode.getAttribute("title");if(b){e=BubPrepare(c.parentNode,d);RemoveTip(FindParent(c,"table"));b=null}else{e=BubPrepare(FindParent(c,"table"),d)}}}}if(b&&b.length>0){RemoveTip(c);c.tipText=b;if(a=="a"&&ElementType(c.firstChild)=="span"&&c.firstChild.getAttribute("title")==b){RemoveTip(c.firstChild)}if(c.disabled&&ElementType(c.parentNode)=="a"&&(""+c.getAttribute("tipopt")).indexOf("d")>=0){c.tipText=null;c=(IsIE())?c.parentNode:AddOverlay(c);c.tipText=b}if(c.onmouseover){c.omo=c.onmouseover}c.onmouseover=BubShowTooltip;c.onmouseout=BubHideTooltip;e=true}return(e)}function AddOverlay(a){var b=document.createElement("div");b.style.position="absolute";b.style.width=a.offsetWidth;b.style.height=a.offsetHeight;b.style.top=getTop(a);b.style.left=getLeft(a);b.style.zIndex=1000000;if(a.offsetWidth==0){window.setTimeout(function(){b.style.width=a.offsetWidth;b.style.height=a.offsetHeight},1)}SetCssClass(a,"disimgx");a.parentNode.appendChild(b);return(b)}function RemoveTip(a){a.removeAttribute("title");a.removeAttribute("tt")}function BubShowTooltip(g,i,c){if(!g){g=window.event}if(!i){i=this}if(!c){if(i.omo&&i.omo(g)==false){return}if(window.bubOpen){window.clearTimeout(window.bubOpen);window.bubOpen=null}window.bubOpen=window.setTimeout(function(){BubShowTooltip(null,i,true)},250);return false}var f=document.getElementById("btc");if(f){if(i){var a=""+i.getAttribute("tipOpt");var h=(a.indexOf("L")>=0)?!IsVisibleAndEnabled(i):!IsVisible(i);if(h){SetTip(i,i.tipText);return}}var d=(i&&i.tipText)?i.tipText:"";window.tipTextNode.data=d;f.style.left=5000;f.style.display="";if(window.bubClose){window.clearTimeout(window.bubClose);window.bubClose=null}var e=Math.max(d.length/15,5);window.bubClose=window.setTimeout(function(){f.style.display="none"},e*1000);var b=BubLocate(i,f);BubAdjust(f,b)}}function BubPerm(e,a){e=GetElement(e);if(e){var c=BubCreate(200);var d=FindRole(c,"content");c.parentNode.removeChild(c);e.appendChild(c);e.style.whiteSpace="normal";var f=document.createTextNode((a)?a:e.getAttribute("tipText"));d.appendChild(f);c.style.zIndex=100001;c.style.position="absolute";c.style.marginLeft=-38;c.style.marginTop=e.offsetHeight-5;c.style.display="inline";var b=BubCreateEl("img","",document);b.src="images/del_x_icon.gif";b.style.display="inline";b.style.align="right";b.style.marginLeft="5px";b.style.verticalAlign="bottom";b.onclick=function(){this.parentNode.parentNode.style.display="none"};b.zIndex=100000000;d.appendChild(b);var g=FindRole(c,"shim");if(g){g.parentNode.removeChild(g)}}}function BubHideTooltip(){var a=document.getElementById("btc");if(window.bubOpen){window.clearTimeout(window.bubOpen);window.bubOpen=null}if(a){a.style.display="none"}}function BubLocate(m,k){if(m.tipPos){m=m.tipPos}var e=0;var f=getLeft(m);var o=getTop(m);var l=m.offsetWidth;var b=m.offsetHeight;var c=(IsAppleWebKit()&&ElementType(m)=="a"&&m.firstChild!=null&&l==0);if(c){f=getLeft(m.firstChild);o=getTop(m.firstChild);l=m.firstChild.offsetWidth;b=m.firstChild.offsetHeight}if(l==0){l=m.parentNode.offsetWidth}else{if(m.offsetParent.offsetWidth<l){l=m.offsetParent.offsetWidth}}if(b==0){b=m.parentNode.offsetHeight}else{if(m.offsetParent.offsetHeight<b){b=m.offsetParent.offsetHeight}}var a=false&&IsID();if(a){o+=window.popY;k.style.zIndex=4000000000}var j=f+l-40;var h=o+b+1;var d=WindowWidth(window);var g=WindowHeight(window);if(a){f+=window.popX;f+=WindowWidth(window.pop);j=f}var n=(document&&document.body)?document.body.scrollLeft:0;if(j<0){j=1}else{if(j+k.offsetWidth-n>d){j=f-k.offsetWidth+40;if(j+k.offsetWidth-n>d){j=d-k.offsetWidth-1}e|=1}}var i=(document&&document.body)?document.body.scrollTop:0;if(h<0){h=1;e|=2}else{if(h+k.offsetHeight-i>g&&o-k.offsetHeight>=0){h=o-k.offsetHeight;e|=2}}if(j<0&&0!=(e&1)){j=f;e&=~1}if(h<0){h=0}k.style.left=j+"px";k.style.top=h+"px";return(e)}function BubAdjust(c,b){var a=c.baseCss;if((b&3)==3){a+="fhv"}else{if(b&1){a+="fh"}else{if(b&2){a+="fv"}}}if(GetCssClass(c)!=a){SetCssClass(c,a)}var d=FindRole(c,"shim");if(d){d.style.display="";d.style.height=c.offsetHeight;d.style.width=c.offsetWidth}}function BubCreate(g){var i=document.createElement("div");var e=(g>300&&WindowWidth(window)>=400)?"4":"2";AddDocEl(i,document);SetCssClass(i,"rp"+e);i.style.display="none";i.style.position="absolute";i.baseCss="tt"+e;var f=BubCreateEl("span",i.baseCss,document);var d=BubCreateEl("span","top",document);f.appendChild(d);var c=BubCreateEl("span","mid",document);c.role="content";f.appendChild(c);var a=BubCreateEl("span","bottom",document);f.appendChild(a);i.appendChild(f);if(IsIE()){var h=CreateShim();h.style.position="absolute";h.style.left=0;h.style.top=0;i.appendChild(h)}return(i)}function AddDocEl(c,d,a){if(!d){d=document}if(IsIE()&&d.readyState!="complete"){var b=50;if(!a){a=0}else{if(a>2){b=1000}else{if(a>1){b=500}else{if(a>0){b=100}}}}if(a<5){window.setTimeout(function(){AddDocEl(c,d,a+1)},b)}}else{d.getElementsByTagName("body")[0].appendChild(c)}}function RegDebugInfo(d,e,b,c){var a=document.createElement("dbginfo");a.setAttribute("name",d);a.setAttribute("value",e);a.setAttribute("cat",b);if(c){a.setAttribute("lev",c)}AddDocEl(a)}function XHConn(){var xmlhttp,bComplete=false;try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){try{xmlhttp=new XMLHttpRequest()}catch(e){xmlhttp=false}}}if(!xmlhttp){return null}this.invoke=function(sURL,sMethod,sVars,fnDone,bSync){if(!xmlhttp){throw new Error(10001,"No XMLHttp available.")}var rsp=null;var bAsync=(bSync==null||bSync!=true);bComplete=false;sMethod=sMethod.toUpperCase();if(sMethod=="GET"){xmlhttp.open(sMethod,sURL+"?"+sVars,bAsync);sVars=""}else{xmlhttp.open(sMethod,sURL,bAsync);xmlhttp.setRequestHeader("Method","POST "+sURL+" HTTP/1.1");xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}xmlhttp.onreadystatechange=function(){if(!bSync&&xmlhttp.readyState==4&&!bComplete&&fnDone){bComplete=true;fnDone(xmlhttp)}};xmlhttp.send(sVars);if(bSync&&fnDone){bComplete=true;rsp=fnDone(xmlhttp)}return(rsp)};this.connect=function(sURL,sMethod,sVars,fnDone,bSync){try{this.invoke(sURL,sMethod,sVars,fnDone,bSync)}catch(z){return false}return true};this.getString=function(sURL,sVars,fnDone){if(!xmlhttp){return false}bComplete=false;try{xmlhttp.open("GET",sURL+"?"+sVars,true);sVars="";xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&!bComplete){bComplete=true;if(fnDone){fnDone(xmlhttp.responseText)}}};xmlhttp.send(sVars)}catch(z){return false}return true};this.getObject=function(sURL,sVars,fnDone,sync){if(!xmlhttp){throw new Error(10001,"No XMLHttp available.")}var rsp=null;bComplete=false;try{xmlhttp.open("GET",sURL+"?"+sVars,!sync);sVars="";xmlhttp.onreadystatechange=function(){if(!sync&&xmlhttp.readyState==4&&!bComplete){bComplete=true;if(fnDone){fnDone(eval("("+xmlhttp.responseText+")"))}}};xmlhttp.send(sVars);if(sync){bComplete=true;rsp=eval("("+xmlhttp.responseText+")");if(fnDone){rsp=fnDone(rsp)}}return(rsp)}catch(z){return false}return true};return this}function Trace(c){var b=window.document.location;var a=true;if(a){if(b!=window.top.logLastLoc){c+="\n-------------- "+b;window.top.logLastLoc=b}if(window.top.logMsg){window.top.logMsg=c+"\n"+window.top.logMsg}else{window.top.logMsg=c}}else{if(window.top.logMsg){window.top.logMsg+="\n"}if(b!=window.top.logLastLoc){if(window.top.logMsg){window.top.logMsg+="-------------- "+b+"\n"}else{window.top.logMsg="-------------- "+b+"\n"}window.top.logLastLoc=b}window.top.logMsg=""+window.top.logMsg+c}if(window.top.logTimeout){window.top.clearTimeout(window.top.logTimeout)}window.top.logTimeout=window.top.setTimeout(function(){TraceUpdate()},30)}function TraceUpdate(){var c=400;var b=WindowOpenFeatures(520,600,c);var e=window.top.open("blank.htm","logwin",b,false);if(!e){alert("no winLog");return}var a=(e.document)?e.document.getElementById("txt"):null;if(!a){var d=e.document;d.title="Trace";d.open();d.writeln("<html>");d.writeln("<head>");d.writeln("</head>");d.writeln('<body style="overflow:hidden;border:none;margin:0">');d.writeln('<input type="button" value="Clear" id="clr" onclick="document.getElementById(\'txt\').value = \'\'; opener.logMsg = \'\';" style="" />');d.writeln('<br/><textarea id="txt" style="height:100%;width:100%;white-space:pre;overflow:scroll" wrap="off"></textarea>');d.writeln("</body>");d.writeln("</html>");d.close();a=e.document.getElementById("txt")}if(a){a.value=window.top.logMsg;e.focus()}}function FieldIsReq(c){var a=false;if(c){var b=FindLabelFor(c);if(b){a=HasCssClass((ElementType(c)=="checkbox")?b.parentNode:b,"rqf")}else{a=HasCssClass(c,"rqf")}}return(a)}function ReqFieldToggle(a){ReqFieldSet(a,!FieldIsReq(document.getElementById(a)))}function ReqFieldSet(d,a){var c=document.getElementById(d);if(c){var b=FindLabelFor(c);if(b){if(a){ReplaceCssClass(b,"nrqf","rqf")}else{ReplaceCssClass(b,"rqf","nrqf");RemoveCssClass(c,"detailerr");RemoveCssClass(b,"detailerr");c.title=(c.origTitle)?c.origTitle:null;b.title=(b.origTitle)?b.origTitle:null}}}}function InitPosition(a){if(a){a.origLeft=getLeft(a);a.origTop=getTop(a);a.origHeight=a.offsetHeight;a.origWidth=a.offsetWidth}}function InitPositions(b){var a=document.getElementsByTagName(b);var d=a.length;var c;for(c=0;c<d;c++){var e=a[c];e=PositionableItem(e);InitPosition(e)}}function PositionableItem(a){while(a&&a.tagName!="DIV"&&(!a.style||a.style.position!="absolute")){a=a.parentNode}return(a)}function UpdatePosition(d,f,e,b,a){if(d&&d.origTop>=e){var c=d.origTop+a;if(c<d.origTop){c=d.origTop}d.style.top=c}}function UpdatePositions(b,c,g,f,d){var e=document.getElementsByTagName(b);var i=e.length;var h;for(h=0;h<i;h++){var a=e[h];a=PositionableItem(a);UpdatePosition(a,c,g,f,d)}}function RegisterItem(c){try{var b=(window.opener)?window.opener:window.top;if(b.regItems&&b.regItems.indexOf(";"+c+";")>=0){return(false)}else{if(b.regItems){b.regItems=";"+c+b.regItems}else{b.regItems=";"+c+";"}}}catch(a){}return(true)}function CtrlContains(b,a){return(b!=a&&getLeft(a)>=getLeft(b)&&getTop(a)>=getTop(b)&&OffsetRight(a)<=OffsetRight(b)&&OffsetBottom(a)<=OffsetBottom(b))}function FractDigits(d){var c=0;var b=""+d;if(b){b=b.replace(/0*$/,"");var a=b.indexOf(".");if(a>=0){c=b.length-a-1}}return(c)}function Mult(e,d){var k=""+(e*d);var f=k.indexOf(".");var j=FractDigits(k);if(f>=0&&j>0){var g=FractDigits(e);var h=FractDigits(d);var i=Math.pow(10,g+h);k=Math.round(Number(k)*i)/i}return(Number(k))}function PopupPost(evt,btn,features){if(!evt){evt=window.event}var content;var width=0;var height=0;if(features&2048){width=200;height=100}var opts=WindowOpenFeatures(features,height,width);var win=window.open("blank.htm","_blank",opts);window.cloneWindow(window,win,content);if(ElementType(btn)=="a"&&btn&&btn.href){theForm=win.document.getElementById(theForm.id);eval(btn.href);theForm=window.document.getElementById(theForm.id)}else{var btnClone=win.document.getElementById(btn.id);DoClick(btnClone,false,win)}return CancelBubble(evt)}function PostItCreate(b){var i=document;var c=document.createElement("DIV");window.document.forms[0].appendChild(c);var e=null;var k=null;if(IsIE()){e=CreateShim();e.style.zIndex=-1;e.style.position="absolute";e.style.top="-2";e.style.left="-2"}k=i.createElement("textarea");k.onblur=window.PostItBlur;k.setAttribute("nofocus","1");k.setAttribute("neverDirty","1");SetCssClass(k,"postit");c.style.overflow="hidden";k.txt="";c.appendChild(k);i=k.contentDocument;window.onresize=window.PostItResize;var f=null;var l=document.createElement("IMG");l.src="images/del_x_icon.gif";var j=window.postitHideTip;SetTip(l,(j)?j:"Click here to hide this note.");if(IsIE()){l.onclick=window.PostItHide}else{l.addEventListener("click",window.PostItHide,false)}SetCssClass(l,"actimg");var d=document.createElement("A");d.href="#";SetCssClass(d,"actimg");d.appendChild(l);l=d;var h=document.createElement("DIV");h.appendChild(l);SetCssClass(h,"postitban");var a=document.createElement("IMG");a.src="images/helpmini.gif";h.appendChild(a);var g=document.createElement("IMG");g.src="images/corner.gif";g.style.zIndex=1000;g.style.position="absolute";g.style.top=60-12;g.style.left=100-12;g.style.cursor="nw-resize";g.onmousedown=PostItSizeStart;j=window.postitResizeTip;SetTip(g,(j)?j:"Click and drag here to resize this note.");c.appendChild(g);c.rsz=g;c.style.height="60px";c.style.width="100px";SetCssClass(c,"postit");c.style.zIndex=1000;c.style.display="none";h.onmousedown=window.PostItMoveStart;c.onresize=PostItResize;if(f){f.onkeydown=window.PostItKeyDown}else{k.onkeydown=window.PostItKeyDown}if(e){c.appendChild(e);c.shim=e;e.style.width=c.style.width;e.style.height=c.style.height}c.insertBefore(h,k);c.tip=a;if(k){if(f){f.style.zIndex=100}}else{if(f){c.appendChild(f)}}c.editor=(k)?k:f;return(c)}function PostItNew(c,h,e,a,i,d,j,b){var f=PostItCreate(window.rowKey);if(f){var g=f.editor;g.setAttribute("mop",c);g.setAttribute("flavor",h);g.setAttribute("cmd",e);if(a){g.setAttribute("postid",a)}if(!i){i=Mouse.y+20}if(!d){d=Mouse.x-40}if(!j){j=60}if(!b){b=100}f.style.top=i;f.style.left=d;f.style.height=parseInt(j)+"px";f.style.width=b;f.style.display="block";g.style.height=parseInt(j)+"px"}return(f)}function PostItEnable(a){a.contentDocument.designMode="on";a.contentWindow.focus();a.contentDocument.addEventListener("blur",window.PostItBlur,false)}function PostItMoveStart(a){if(!a){a=window.event}var b=this;b=this.parentNode;b.moving=true;b.xStart=a.clientX;b.yStart=a.clientY;b.leftStart=b.offsetLeft;b.topStart=b.offsetTop;if(IsIE()){b.setCapture()}b.onmousemove=window.PostItMove;b.onmouseup=window.PostItMoveEnd}function PostItMove(a){if(!a){a=window.event}var b=this;if(b.moving){b.style.left=(b.leftStart+(a.clientX-b.xStart))+"px";b.style.top=(b.topStart+(a.clientY-b.yStart))+"px"}}function PostItMoveEnd(a){if(!a){a=window.event}this.moving=false;this.onmousemove=null;this.onmouseup=null;if(IsIE()){this.releaseCapture()}PostItSave(this.editor,"move")}function PostItSizeStart(a){if(!a){a=window.event}var b=this;var c=b.parentNode;b.resizing=true;b.xStart=a.clientX;b.yStart=a.clientY;b.leftStart=b.offsetLeft;b.topStart=b.offsetTop;if(IsIE()){b.setCapture()}c.xStart=a.clientX;c.yStart=a.clientY;c.widthStart=c.offsetWidth;c.heightStart=c.offsetHeight;b.onmousemove=window.PostItSize;b.onmouseup=window.PostItSizeEnd}function PostItSize(a){if(!a){a=window.event}var b=this;var c=b.parentNode;if(b.resizing){b.style.left=b.leftStart+(a.clientX-b.xStart);b.style.top=b.topStart+(a.clientY-b.yStart);c.style.width=c.widthStart+(a.clientX-c.xStart);c.style.height=c.heightStart+(a.clientY-c.yStart)}}function PostItSizeEnd(a){if(!a){a=window.event}var b=this;var c=b.parentNode;this.resizing=false;this.onmousemove=null;this.onmouseup=null;if(IsIE()){this.releaseCapture()}PostItSave(c.editor,"move")}function PostItKeyDown(a){if(!a){a=window.event}var b=GetEventKey(a);if(b==27){var c=GetEventTarget(a);PostItSetText(c.parentNode,c.txt);this.moving=false;if(IsIE()){this.releaseCapture()}this.blur();return false}else{if(b==13){if(!a.shiftKey){this.blur();return false}}}}function PostItBlur(a){if(this){var b=(this.tagName)?this.txt:this.txt;var c=(ElementType(this)=="textarea")?this.value:InnerTextGet(this);if(c!=b&&(b||c)){this.txt=c;PostItSave(this,"edit")}}}function PostItHide(a){if(!a){a=window.event}var b=this.parentNode.parentNode.parentNode;if(b){b.style.display="none";PostItSave(b.editor,"hide")}}function PostItSave(g,i){var e=g.parentNode;var f=g.txt;if(!e.id){e.id="p"+Timestamp()}var c=g.getAttribute("postid");var d="&pid="+e.id;if(c){d+="&id="+encodeURIComponent(c)}if(i){d+="&subcmd="+i}d+="&txt="+encodeURIComponent(f);var h=getTop(e);var b=getLeft(e);var a=document.getElementById("toolbar_toolbar");if(a){h=h-getTop(a);b=b-getLeft(a)}d+="&top="+h;d+="&left="+b;d+="&width="+e.offsetWidth;d+="&height="+e.offsetHeight;if(i=="hide"){AjaxCommandClick(null,g,d,null)}else{AjaxCommandClick(null,g,d,PostItSaveRsp);PostItSizing(e)}}function PostItSaveRsp(c){var a=c.responseText;if(a){var e=a.split("|");var b=e[0];var f=e[1];var d=document.getElementById(b);if(d){d.editor.setAttribute("postid",f)}}}function PostItResize(a){var b=this;if(b.shim){b.shim.style.width=b.offsetWidth+2+"px";b.shim.style.height=b.offsetHeight+2+"px"}else{if(b.editor){}else{}}}function PostItLoad(d,c,b,a){var f=false;if(window.XHConn&&d){var e=new XHConn();if(e){var g="req=postits";g+="&relid="+d;g+="&mop="+c;g+="&flavor="+b;g+="&noteKey="+a;g+="&ajaxdt="+Timestamp();e.connect("Handler.ashx","GET",g,PostItLoadRsp);f=true}}return(f)}function PostItLoadRsp(s){var a=s.responseText;if(!a){}else{if(a.indexOf("!err!")==0){alert(a.substr(5))}else{var i=a.split("|");var h;var k=i[0].split("~");var p=k[0];var c=k[1];for(h=1;h<i.length;h++){var b=i[h];if(b){var n=b.split("~");var r=n[0];var g=n[1];var t=n[2];var j=n[4];var l;var d;var o;var m;if(t){var e=t.split(",");if(e.length>=1){l=Number(e[0])}if(e.length>=2){d=Number(e[1])}if(e.length>=3){m=e[2]}if(e.length>=4){o=e[3]}}var f=document.getElementById("toolbar_toolbar");if(f){l=getTop(f)+l;d=getLeft(f)+d}var q=PostItNew(p,c,"postit",r,l,d,m,o);PostItSetText(q,UrlDecode(g));if(j){q.tip.title=UrlDecode(j)}else{q.tip.style.display="none"}}}}}}function PostItSizing(d){if(d&&d.style.display!="none"){var c=d.editor;if(c&&ElementType(c)=="textarea"){d.style.height=(c.scrollHeight+20)+"px";var b=d.offsetHeight-10;if(IsFirefox()||IsOpera()){b+=3}c.style.height=b+"px";var a=d.rsz;if(a){a.style.top=d.offsetHeight-12+"px";a.style.left=d.offsetWidth-12+"px"}}}}function PostItSetText(c,a){if(c){var b=c.editor;b.txt=a;if(ElementType(b)=="textarea"){b.value=a;PostItSizing(c)}else{if(c.shim){b.innerHTML=a}else{b.value=a}}if(c.shim){window.setTimeout(function(){PostItShim(c,5)},1)}}}function PostItShim(a,b){if(a&&a.shim&&a.shim.offsetHeight!=a.offsetHeight+2){a.shim.style.width=(a.offsetWidth+2)+"px";a.shim.style.height=(a.offsetHeight+2)+"px";if(b>0){window.setTimeout(function(){PostItShim(a,b-1)},100)}}}function NameFromPath(b,c){var a=b.substr(Math.max(b.lastIndexOf("/"),b.lastIndexOf("\\"))+1);if(c&&a){a=a.substr(0,a.lastIndexOf("."))}return(a)}function OnFileChg(c,f){var b=c.getAttribute("fdf");var d=c.getAttribute("ftf");var a=document.getElementById(d);if(b){var e=document.getElementById(b);if(!a.value||!e||e.value){a.value=NameFromPath(c.value,f)}if(e){e.value=NameFromPath(c.value)}}else{if(a){a.value=NameFromPath(c.value)}}}function FileFixPos(c,b,a){if(!a){window.setTimeout(function(){FileFixPos(c,b,1)},1);return}c=GetElement(c);b=GetElement(b);b.style.left="-1px";b.style.left=-(getLeft(b)-getLeft(c)+2)+"px";b.style.top="-1px";b.style.top=-(getTop(b)-getTop(c)+4)+"px"}function LogTiming(b){if(b){var a=new Date();RegDebugInfo("Browser",(a.getTime()-b)+"ms","Timing")}}function OnChange(b,a){if(b.change){b.change(a)}else{if(b.onchange){b.onchange(a)}}}function OnBlur(a){if(a){if(a.blur){a.blur()}else{if(a.onblur){a.onblur()}}}}function OnClick(a){if(a){if(a.click){a.click()}else{if(a.onclick){a.onclick()}}}}function TimeSep(a){return(a)?a.match(/[^hHmsfFtz]/):":"}function TimeIs24Hr(a){return(a)?(a.search(/H/)>=0):false}function TimeIsHrPadded(a){return(a)?a.match(/hh/i):false}function WinDepth(){var a=window;var b=0;while(a&&a!=a.parent&&b<20){b++;a=a.parent}return(b)}function SizeScrAbs(d,a,b){var c=document.getElementById(d);if(c){a=a-window.screenLeft;b=b-window.screenTop;if(a>=0){c.style.width=a+"px"}if(b>=0){c.style.height=b+"px"}}}function RateClk(n,a,f,k){if(!n){n=window.event}var i=GetEventTarget(n);var m=i.parentNode.getAttribute("attrs");m=(m)?parseInt(m,16):0;var b=(0!=(m&1));var j;var l;var o;var h;if(b){if(i.src.match(/.*x.gif$/i)){l=i.src;j=l.replace(/x.gif$/,".gif")}else{j=i.src;l=j.replace(/.gif$/,"x.gif")}h=function(p){return(!p.src.match(/.*x.gif$/i))}}else{o="rateoff";h=function(p){return(!HasCssClass(p,o))}}var d=i.getAttribute("v");var c=i.nextSibling;if(i==i.parentNode.firstChild&&(!c||!h(c))){if(!h(i)){if(j){i.src=j}if(o){RemoveCssClass(i,o)}}else{if(l){i.src=l}if(o){ReplaceCssClass(i,"",o)}d=""}}else{while(c){if(l){c.src=l}if(o){ReplaceCssClass(c,"",o)}c=c.nextSibling}while(i){if(j){i.src=j}if(o){RemoveCssClass(i,o)}i=i.previousSibling}}var e=new XHConn();if(e){var g="req=rate&map="+a+"&rk="+k+"&fld="+f+"&val="+d+"&ajaxdt"+Timestamp();e.getString("Handler.ashx",g,null)}}function SetBlinker(b,a){b=IsString(b)?window.document.getElementById(b):b;KillBlinker(b);if(a){b.blinker=window.setInterval(function(){if(HasCssClass(b,a)){RemoveCssClass(b,a)}else{ReplaceCssClass(b,"",a)}},500)}else{b.blinker=window.setInterval(function(){b.style.visibility=(b.style.visibility=="")?"hidden":""},500)}}function KillBlinker(a){if(a&&a.blinker){window.clearInterval(a.blinker)}}function StatusMsg(f,n,i,e,A){if(!e){e=window}if(A){window.setTimeout(function(){StatusMsg(f,n,i,e)},A);return}var B=e.document;var a;var o;var u=n&1;var z=n&2;var s=n&4;var q=n&8;var D=n&16;var g="images/AniProg.gif";var b;if(D){b=DivWigTop(i)}var x=B.getElementById("statmsg");if(!x){o=B.createElement("div");o.style.position="absolute";if(b){b.appendChild(o)}else{if(B.body){B.body.appendChild(o)}else{B.appendChild(o)}}var C=B.createElement("img");o.appendChild(C);x=B.createElement("nobr");x.id="statmsg";o.appendChild(x);x.img=C;SetCssClass(o,"statmsg");if(IsIE()&&B.body){a=CreateShim();a.style.position="absolute";a.style.top=-1;a.style.left=-1;a.style.zIndex=-1;o.appendChild(a);x.shim=a}}if(x){x.innerHTML=f;x.style.visibility="";x.img.src=g;x.img.style.display=(u)?"":"none";o=x.parentNode;var j=o.offsetWidth;var r=o.offsetHeight;var p;var m;if(b){p=(b.offsetWidth-j)/2;m=(b.offsetHeight-r)/3}else{p=(WindowWidth(e)-j)/2;m=(WindowHeight(e)-r)/5}if(document.body&&document.body.scrollTop){m+=document.body.scrollTop}o.style.left=p;o.style.top=m;a=x.shim;if(a){a.style.height=r;a.style.width=j}}if(x&&z&&i){SetCssClass(i,"disimgx");window.setTimeout(function(){i.disabled=true},1)}if(x&&s){SetBlinker(x)}if(x){e.setTimeout(function(){x.img.src=g;x.img.style.display=(u)?"":"none"},1)}if(q){var y=i;var v=null;while(y&&y!=y.parentNode){if(ElementType(y)=="div"){v=y}y=y.parentNode}if(v){if(IsIE()){var k;for(k=0;k<v.childNodes.length;k++){SetOpacity(v.childNodes[k],50)}}else{SetOpacity(v,50)}}}return(o)}function OpenWithStatusText(b,c,a){var e=open("blank.htm","_blank",c);var d=e.document;d.writeln("<head>");d.writeln('<link rel="stylesheet" href="'+cssFile+'" />');if(a){d.writeln("<title>"+a+"</title>")}d.writeln("</head>");d.writeln("<body>");if(a){d.writeln('<table align="center" style="height: 60%;"><tr><td>');d.writeln('<div class="statmsg" xstyle="margin: auto; text-align: center;">');d.writeln('<img src="images/AniProg.gif" /><nobr>'+a+"</nobr>");d.writeln("</div>");d.writeln("</td></tr></table>")}d.writeln("</body>");d.writeln("</html>");d.close();e.setTimeout(function(){d.location=b},50)}function FindContentFrame(b){var a=findFrame("content",b);if(!a&&b.parent!=b){a=FindContentFrame(b.parent)}return(a)}function CrumbSet(b,a){if(0!=(a&2)){}else{if(top.Crumbs&&FindContentFrame(window)==window){top.Crumbs(window,a)}}}function breadcrumb(g,a,d){this.href=g;this.text=a;this.pg=g.match(/^[^?]*/)[0];this.qps=new Object();var f=g.match(/[^?]*$/)[0].split("&");var c;var e="|";for(c=0;c<f.length;c++){if(f[c]){var b=f[c].split("=");if(b[0]!="uts"&&b[0]!="act"&&b[0]!="asf"&&b[0]!="ark"){this.qps[b[0]]=b[1];e+=f[c]+"|"}}}if(d&&d.RegDebugInfo){d.RegDebugInfo("Signature",e,"Breadcrumb",0)}this.matches=function(h){if(h.text!=this.text){return(false)}for(var i in this.qps){if(h.qps[i]!=this.qps[i]){return(false)}}return(true)}}function CrumbReg(c,a){var b=c.document.getElementById("crumb");if(b){var d="";d+="lnk="+encodeURIComponent(b.href);d+="&txt="+encodeURIComponent(GetCellText(b));d+="&flags="+a;JsonReq("crumb",d,CrumbRsp)}}function CrumbRsp(c){var d;var e;var a;var b=CrumbsGet();for(d=0;d<c.lnks.length&&d<20;d++){e=UpsertUrl(c.lnks[d],"act","crm"+d);a=c.txts[d];if(!e||!a){break}b.push(new breadcrumb(e,a))}CrumbsApply(window,0)}function CrumbsGet(){if(!window.breadcrumbs2){window.breadcrumbs2=new Array()}return(window.breadcrumbs2)}function CrumbsApply(f,b){var a=CrumbsGet();if(b&1){a.length=0}var d=f.document.getElementById("crumb");if(d){var c=new breadcrumb(d.href,GetCellText(d),f);var e;for(e=0;e<a.length;e++){if(c.matches(a[e])){a.length=e;break}}for(e=0;e<a.length;e++){CrumbAddToCap(f,a[e],e)}a.push(c)}}function CrumbAddToCap(f,a,e){var d=f.document.createElement("a");var c=f.document.getElementById("pageCaption");if(c&&a.href&&a.text){d.href=UpsertUrl(a.href,"act","crm"+e);SetCellText(d,a.text);c.parentNode.insertBefore(d,c);var b=f.document.createElement("img");b.src="images/CapSep.gif";c.parentNode.insertBefore(b,c);SetCssClass(b,"capsep")}}window.EAPDatasheetJSVer=1;function ClearRow(a,b){if(b){var c=FindParent(b,"tr");if(c){ClearNode(c)}}}function SelectAll(g,b){var c=(b)?b:document.getElementsByTagName("input");var d=c.length;for(var f=0;f<d;f++){var h=GetElement(c[f]);var a=h.type.toLowerCase();if(b||(a=="checkbox"&&h.name.indexOf("_sel_")==0)){h.checked=g.checked}}}function SelectCount(){var f=0;var b=document.getElementsByTagName("input");var c=b.length;for(var d=0;d<c;d++){var g=b[d];var a=g.type.toLowerCase();if(a=="checkbox"&&g.name.indexOf("_sel_")==0){if(g.checked){f++}}}return(f)}function FilterWidget(g,h,d,a,e){var c;var f=event.srcElement.name;f=f.substring(0,f.length-3)+"txt";var b=event.srcElement.parentElement.parentElement.all[f].value;c=g+"/Handler.ashx?req=fw&dm="+h+"&fld="+d+"&nm="+f+"&val="+b;window.open(c,"_blank","toolbar=no,scrollbars=no,resizable=yes,width="+e+",height="+a+",left="+(screen.width-e)/2+",top="+(screen.height-a)/2);event.returnValue=false;event.cancelBubble=true}function InitButton(a,b){}function BlinkButton(){if(IsIE()){window.event.srcElement.style.filter=window.event.srcElement.btnFlt}}function UnblinkButton(b){if(IsIE()){var a=document.getElementById(b);if(a){a.style.filter=""}}}function FilterButton(){if(IsIE()){window.event.srcElement.style.filter=window.event.srcElement.oldFilter}}function UnfilterButton(){if(IsIE()){window.event.srcElement.oldFilter=window.event.srcElement.style.filter;window.event.srcElement.style.filter=""}}function LivenButton(){if(IsIE()){window.event.srcElement.style.filter=window.event.srcElement.btnFlt}}function DeadenButton(){if(IsIE()){window.event.srcElement.style.filter=""}}function resizeItem(c,a){var b=document.getElementById(c);b.style.height=a}function hsplitInit(d,f,a,j){var i=document.getElementById(d);var h=document.getElementById(f);var b=document.getElementById(a);if(b==null){ThrowError(2001,"EAPDatasheet::hsplitInit","HorizontalSplitter AssociatedControlID '"+a+"' not found on page.")}i.resizePanel=b;i.pref=j;var g="none";if(h.value){b.style.height=h.value;g="known: "+h.value}else{if(window.sizingToFit){g="sizingToFit"}else{var e=GetClientHeight();var c=screen.height/4;if(c<80){c=80}if(e-c<b.offsetHeight){b.style.height=e*0.6;g="60%"}}}if(IsSafari()){window.vScroll=true}}function hsplitResizeStart(c,b,a,e){if(!c){c=window.event}if(b.resizePanel==null){ThrowError(2002,"EAPDatasheet::hsplitResizeStart","HorizontalSplitter AssociatedControlID '"+a+"' not found on page.")}b.posHolder=document.getElementById(e);b.panelOrigHeight=b.resizePanel.offsetHeight;b.startY=c.screenY;window.hsplitter=b;if(IsIE()){b.onmousemove=hsplitOnResize;b.onmouseup=hsplitOnResizeEnd;b.setCapture()}else{if(document.body.addEventListener){document.body.addEventListener("mousemove",hsplitOnResize,false);document.body.addEventListener("mouseup",hsplitOnResizeEnd,false);var d;for(d=0;d<window.frames.length;d++){window.frames[d].document.body.addEventListener("mousemove",hsplitOnResize,false);window.frames[d].document.body.addEventListener("mouseup",hsplitOnResizeEnd,false)}}}CancelBubble(c);return false}function hsplitOnResize(b){if(!b){b=window.event}var a=window.hsplitter;var c=a.panelOrigHeight+(b.screenY-a.startY);var d=GetClientHeight();var e=80;if(c>d-e){c=d-e}if(c>25&&c<100000){a.resizePanel.style.height=c}return CancelBubble(b)}function hsplitOnResizeEnd(b){var a=window.hsplitter;a.posHolder.value=a.resizePanel.offsetHeight;if(IsIE()){a.onmousemove=null;a.onmouseup=null;a.releaseCapture()}else{if(document.body.removeEventListener){document.body.removeEventListener("mousemove",hsplitOnResize,false);document.body.removeEventListener("mouseup",hsplitOnResizeEnd,false);var c;for(c=0;c<window.frames.length;c++){window.frames[c].document.body.removeEventListener("mousemove",hsplitOnResize,false);window.frames[c].document.body.removeEventListener("mouseup",hsplitOnResizeEnd,false)}}}hsplitPostSplit(a)}function hsplitMinMax(g,b){var e=window.hsplitter;if(!e){e=document.getElementById("hsplit")}var d=FindParent(b,"table");var h=d.offsetHeight;var a=h+60;var i=30;var c=i;var f=GetClientHeight();window.status=h;if(e.resizePanel.offsetHeight<50){c=f-a}if(c>25&&c<100000){e.resizePanel.style.height=c;hsplitPostSplit(e)}}function hsplitPostSplit(b){if(window.resize){window.resize()}else{if(window.onresize){window.onresize()}}var d=new XHConn();if(d){var a=b.pref;var c=b.resizePanel.offsetHeight;if(a){var e="req=setprf&nm="+a+"&val="+c+"&ajaxdt"+Timestamp();d.getString("Handler.ashx",e,null)}}}function lstTarget(d,b){var e=/(.+_r)(\d+)(_.*)$/;var a=d.id.replace(e,"$1@$2@$3").split("@");var c=a[0]+(parseInt(a[1],10)+b)+a[2];return document.getElementById(c)}function lstArrow(a){var b=null;if(window.event.keyCode==38){b=lstTarget(a,-1)}else{if(window.event.keyCode==40){b=lstTarget(a,1)}}if(b){b.focus()}}function InitFBFFocus(a){var b;var d;var f=false;var e=FindParent(a.parentNode,"tr");for(b=0;!f&&b<e.cells.length;b++){var g=e.cells[b];for(d=0;!f&&d<g.childNodes.length;d++){var c=g.childNodes[d];if(CanGetFocus(c)){if(c.focus){c.focus()}f=true}}}}function ImagePopup(b){var e=b.offsetLeft;var d=b.offsetTop;var a=window.createPopup();var c=a.document;window.pop=a;window.popTop=b.offsetTop;window.popLeft=b.offsetLeft;window.popBottom=b.offsetTop+b.parentElement.offsetHeight;window.popRight=b.offsetLeft+b.parentElement.offsetWidth;c.open();c.writeln("<html>");c.writeln("<head>");c.writeln('<link rel="stylesheet" href="'+cssFile+'" />');c.writeln("</head>");c.writeln('<body style="overflow:hidden;border:none;margin:0" onmouseleave="parent.ImageDelayedClose(event);" onmouseout="parent.ImageDelayedClose(event);" onmousemove="parent.ImageOnMove(event);">');c.writeln("</body>");c.writeln("</html>");c.close();c.body.innerHTML='<img src="'+b.src+'" align="left" valign="top" />';a.show(e,d,1,1,document.body);a.show(e,d,b.offsetWidth,b.offsetHeight,b);window.popX=e;window.popY=d}function ImageDelayedClose(){window.setTimeout("window.pop.hide();",50)}function ImageOnMove(a){if(a.x<window.popLeft-1||a.x>window.popRight+1||a.y<window.popTop-1||a.y>window.popBottom+1){window.pop.hide()}}function TryRowMove(h){if(!h){h=window.event}var g=GetEventKey(h);if(g==38||g==40){var f=window.last_tr.id;var j=f.lastIndexOf("_");var a=f.substr(0,j);var i=parseInt(f.substr(j+2),10);if(g==40){i+=1}else{if(g==38){i-=1}}var c=a+"_r"+(i);var e=document.getElementById(c);var b=FindParent(e,"div");var d=FindParent(b,"div");if(b&&d){if(getTop(e)<getTop(b)+d.scrollTop+e.offsetHeight){d.scrollTop-=e.offsetHeight}else{if(getTop(e)+e.offsetHeight>getTop(d)+d.offsetHeight+d.scrollTop-e.offsetHeight){d.scrollTop+=e.offsetHeight}}}if(e){e.withDelay=400;DoClick(e)}CancelBubble(h);return(false)}}function RowSel(b,h,c,d,g,f){tr=GetElement(b);if(window.last_tr){RemoveCssClass(window.last_tr,"rowcur")}ReplaceCssClass(tr,"","rowcur");window.initSF=true;if(!tr.trm){if(IsAppleWebKit()){AddListener(document,"keydown",function(){var i=GetEventTarget(event);if(i&&ElementType(i)=="body"){TryRowMove(event)}})}else{if(IsOpera()){AddListener(tr,"keypress",TryRowMove)}else{AddListener(tr,"keydown",TryRowMove)}}tr.trm=true}window.rowKey=h;window.rowDesc=g;window.rowDigest=c;window.last_tr=tr;var e=document.getElementById(f+"ark");if(e){e.value=h}if(window.NewRow){if(window.subTimer){window.clearTimeout(window.subTimer);window.subTimer=0}if(tr.withDelay){window.subTimer=window.setTimeout(function(){NewRow(h,c);window.subTimer=0},tr.withDelay);tr.withDelay=0}else{NewRow(h,c)}if(window.EnableSubTabs){window.EnableSubTabs(tr)}}if(d){SelectAll(false);var a=document.getElementById("_sel_"+h);if(a){a.checked=true}}}function ListEdit(b,a,d){var c=GetEventTarget(b);a.discrim=d;ListEditStart(a,c);if(b){CancelBubble(b)}}function ListEditStart(x,u){var n=x.getAttribute("editkey");var I=document.getElementById("divedit_"+n);var b=document.getElementById("edit_"+n);if(!b){b=document.getElementById("edit_"+n+"_tbl")}if(I&&b){b.key=n;var L=FindParent(x,"tr");var j=ElementType(b);var G=(j=="table"&&b.getAttribute("use")=="bndlkup");var k=(G)?GetElement(b.id.replace(/_tbl$/,"_txt")):null;var c=(j=="text")||(j=="textarea");var D=(j=="select");var p=(j=="checkbox");var A=(j=="span"&&b.getAttribute("use")=="dur");var F=(j=="table"&&b.getAttribute("use")=="time");var v=(G&&b.getAttribute("widget")=="time");var M=(j=="table"&&b.getAttribute("use")=="radio");var E=(false&&G&&b.getAttribute("widget")=="date");var r=true;SetCssClass(b,GetCssClass(x));var i=getTop(x);var h=getLeft(x);var d=x.offsetHeight;var a=x.offsetWidth;var C;var B;var g;if(G&&!IsIE()){i-=2;h-=1}if(IsIE()){if(c){i-=1;b.style.paddingTop="1px";d-=1}else{if(D){null}else{if(p){}}}}else{if(IsFirefox()){if(c){i-=1;h-=1;d+=1;a+=1;b.style.paddingTop="3px";b.style.paddingLeft="1px"}else{if(D||A){i-=1;d-=2;h-=1;if(!A){b.style.paddingTop="1px"}}else{if(p){}}}}else{if(IsSafari()){if(p){}else{if(!IsSafariPre5()||!D){if(L){i=getTop(L)}a+=1}}}else{if(IsChrome()){if(p){}else{if(!G){if(L){i=getTop(L)}}}}else{if(IsOpera()){I.style.paddingTop="1px";if(p){}else{h-=1;i-=1;if(!A){d+=2}a+=3}}}}}}I.style.visibility="hidden";I.style.display="block";I.style.top=i+"px";I.style.left=h+"px";I.style.height=d+"px";I.style.width=a+"px";I.style.visibility="visible";var o=x.id;if(c){b.value=GetCellText(x);x.editedClass="editedlist";b.setAttribute("autoComplete","off")}else{if(p){var q=x.childNodes[0].childNodes[0];o=q.id;if(!q.origStateSaved){var m=ElementType(u);q.origState=(m=="checkbox")?!q.checked:q.checked;q.origStateSaved=true}h=getLeft(q)-getLeft(I);i=getTop(q)-getTop(I);if(IsIE()){ReplaceCssClass(b,"xxx","ieeditchk")}else{if(!IsOpera()){h-=4;i-=3}}b.style.position="absolute";b.style.top=i+"px";b.style.left=h+"px";b.checked=q.checked;x.editedClass=GetCssClass(x)}else{if(D){x.editedClass="editedlist";C=Trim(GetCellText(x),false,true);if(IsIE()||IsFirefox()){b.style.height="";b.style.position="relative";b.style.top=((d-b.offsetHeight)/2)+"px"}b.selectedIndex=null;if(x.discrim){Discrim(b.getAttribute("pickid"),x.discrim,b,function(f){ListDiscrim(f,b,C)})}else{SetSelectText(b,C)}}else{if(A){SetFocusFirst(b);B=b.firstChild;g=b.firstChild.nextSibling;C=Trim(GetCellText(x),false,true);if(C==null||C==""){B.value="";g.value=""}else{var l=b.getAttribute("loc");var J=StringToFloat(C,l);var w=Math.floor(J);var t=J-w;B.value=Math.floor(J);var z=100;var K=-1;for(var y=0;y<g.options.length;y++){var e=Math.abs(t-parseInt(g.options[y].value)/60);if(e<z){z=e;K=y}}if(K>=0){g.options[K].selected=true}}SetupListEditEnd(b,x)}else{if(F){SetFocusFirst(b);B=document.getElementById(b.id.replace(/_tbl$/,"_hr"));g=document.getElementById(b.id.replace(/_tbl$/,"_min"));C=Trim(GetCellText(x),false,true);if(C==null||C==""){B.value="";g.value=""}else{var H=C.split(":");if(H.length>=2){SetSelectText(B,H[0]);SetSelectText(g,H[1])}}SetupListEditEnd(b,x)}else{if(v){k.cell=x;k.value=GetCellText(x);SetupListEditEnd(k,x,false);k.onWidgetClose=function(){ListEditDone(null)};r=false;k.editedClass="editedlist";SetCssClass(k,GetCssClass(x))}else{if(M){RadioSetByText(b,GetCellText(x));SetupListEditEnd(b,x,true)}else{if(E){if(false&&!k.cell){k.onchange=function(){InnerTextSet(this.cell,this.value)}}k.cell=x;k.value=GetCellText(x);SetupListEditEnd(k,x,false)}}}}}}}}CopyAttr(x,b,"loc");if(!b.init){b.init=true;AddListener(b,"keydown",ListKeyDown)}if(r){AddListener(b,"blur",ListEditDone)}if(document.body.addEventListener){document.body.addEventListener("scroll",ListEditDone,false)}if(window.listEditor){ListEditDone(null)}window.listEditor=b;b.cell=x;b.itemId=o;b.key=n;b.div=I;if(b.focus&&!A){b.focus()}if(c){if(b.select){b.select()}}}}function CopyAttr(b,c,a){if(b.getAttribute(a)){c.setAttribute(a,b.getAttribute(a))}}function ListDiscrim(a,c,b){ClearSelect(c);DiscrimReturned(a,b)}function SetupListEditEnd(d,a,b){if(document.fn){RemoveListener(document,"focus",document.fn)}if(document.fno){RemoveListener(document,"mousedown",document.fno)}var c=function(e){if(!e){e=window.event}if(!window.IsParentOf(GetEventTarget(e),d)){RemoveListener(document,"focus",document.fn);document.fn=null;if(document.fno){RemoveListener(document,"mousedown",document.fno);document.fno=null}ListEditDone2(d,a,false,true)}};document.fn=c;AddListener(document,"focus",c);if(IsOpera()||IsAppleWebKit()){document.fno=c;AddListener(document,"mousedown",c)}if(b&&!d.fnc){d.fnc=true;AddListener(d,"click",function(){ListEditDone2(d,a,false,true)})}}function ListKeyDown(j){if(!j){j=window.event}var h=j.keyCode;var a=j.shiftKey;if(j.keyCode==0){if(j.charCode==25){h=9}else{if(IsSafariPre5()){return CancelBubble(j)}}}var f=GetEventTarget(j);var k=(f&&f.menu&&IsVisible(f.menu));if(h==13){if(k){return false}OnBlur(f);return CancelBubble(j)}else{if(h==27){if(!k){ListEditDone(null,true)}return false}else{if(h==40||h==38||h==9){if(k){return false}var d=null;var i=0;var g=0;if(h==9){i=(a)?-1:1}else{g=(h==38)?-1:1}if(f&&f.cell){var b=ListMove(f.itemId,f.key,i,g);if(b){d=document.getElementById(b);if(d&&ElementType(d)!="td"){d=FindParent(d,"td")}}}if(!d||!IsVisible(d)){d=null}else{var c=FindParent(d,"div");var e=FindParent(c,"div");if(c&&e){if(getTop(d)<getTop(c)+e.scrollTop+15){e.scrollTop-=d.offsetHeight}else{if(getTop(d)+d.offsetHeight>getTop(e)+e.offsetHeight+e.scrollTop-15){e.scrollTop+=d.offsetHeight}}}else{window.status+="="}}if(d){ListEditDone(null);window.setTimeout(function(){ListEditStart(d,f)},1);return CancelBubble(j)}}}}}function SelectAndFocus(b){var a=document.getElementById(b);if(a){if(a.focus){a.focus()}if(a.select){a.select()}}}function FindEditTarget(c,f){var a=null;var e=FindParent(c.cell,"tr");var h=e.id;var d=null;var i=h.match(/\d+$/);if(i&&i.length>0){var b=i[i.length-1];var g=(f)?parseInt(b)+1:parseInt(b)-1;d=StrReplace(h,"_r"+b,"_r"+g)+"_"+c.key;a=document.getElementById(d)}return(a)}function ListEditDone(b,d){if(!b){b=window.event}var c=window.listEditor;if(b&&GetEventTarget(b)==c&&b.type=="scroll"){}else{if(c&&c.cell){var a=c.cell;window.listEditor=null;RemoveListener(c,"blur",ListEditDone);ListEditDone2(c,a,d,false)}}}function ListEditDone2(editor,cell,cancel,special){if(editor&&cell){var div=document.getElementById("div"+editor.id);var changed=false;var newVal;var newText;var s;if(!div){div=document.getElementById("div"+editor.id.replace(/_tbl$/,""))}var ctrlType=ElementType(editor);var isBndlkup=(ctrlType=="table"&&editor.getAttribute("use")=="bndlkup");var txt=(isBndlkup)?GetElement(editor.id.replace(/_tbl$/,"_txt")):null;var isTextbox=(ctrlType=="text"||ctrlType=="textarea"||ctrlType=="password");var isSelect=(ctrlType=="select");var isCheckbox=(ctrlType=="checkbox");var isDuration=(ctrlType=="span"&&editor.getAttribute("use")=="dur");var isTimeCbo=(ctrlType=="table"&&editor.getAttribute("use")=="time");var isTimePick=(isBndlkup&&editor.getAttribute("widget")=="time");var isRadio=(ctrlType=="table"&&editor.getAttribute("use")=="radio");var isDatePick=(false&&isBndlkup&&editor.getAttribute("widget")=="date");if(cancel){if(document.fn){RemoveListener(document,"focus",document.fn)}if(document.fno){RemoveListener(document,"mousedown",document.fno)}null}else{if(isTextbox){s=GetCellText(cell);if(s!=editor.value){OnChange(editor);changed=true;newVal=editor.value;newText=(newVal==null)?"":newVal}}else{if(isCheckbox){var chk=(cell.childNodes.length>0)?cell.childNodes[0].childNodes[0]:cell;if(chk.origState!=editor.checked||chk.changed){changed=true;chk.changed=true;newVal=(editor.checked)?"1":"0"}chk.checked=editor.checked}else{if(isSelect){s=GetCellText(cell);if(editor.selectedIndex>=0&&s!=editor.options[editor.selectedIndex].text){changed=true;newVal=editor.options[editor.selectedIndex].value;newText=editor.options[editor.selectedIndex].text}}else{if(isDuration){if(!special){return}newVal=TimeDurationVal(editor);if(newVal!=GetCellText(cell)){newText=newVal;changed=true}}else{if(isTimeCbo){if(!special){return}newVal=TimePickerVal(editor);if(newVal!=GetCellText(cell)){newText=newVal;changed=true}}else{if(isTimePick){newVal=txt.value;if(newVal!=GetCellText(cell)){newText=newVal;changed=true}}else{if(isRadio){if(!special){return}newText=RadioButtonText(editor);if(newText!=GetCellText(cell)){newVal=RadioButtonVal(editor);changed=true}}else{if(isDatePick){newVal=txt.value;if(newVal!=GetCellText(cell)){newText=newVal;changed=true}}}}}}}}}}if(changed){var msg;var fn=eval("window.validate_"+editor.key);if(fn){if(isSelect){msg=fn(cell,newVal,true)}else{msg=fn(cell,newText,true)}}if(msg){alert(msg)}else{if(ctrlType=="password"){SetCellText(cell,"*****")}else{if(ctrlType!="checkbox"){SetCellText(cell,newText)}}ListEditStore(cell,div.getAttribute("key"),newVal);ListEditCalc(cell);window.isDirty=true}}if(div){div.style.display="none"}}}function ListEditStore(a,c,e){var d=FindParent(a,"tr");var g=d.getAttribute("rowKey");var b=document.getElementById("edit_"+g);if(b){b.value=SetString(b.value,c,e);var f=document.getElementById("edited_rowkeys");if(f){if(!f.value){f.value=";"}if(f.value.indexOf(";"+g+";")<0){f.value+=g+";"}ReplaceCssClass(a,"editlist","editedlist")}}}function ListEditCalc(a){var b=ParentRow(a);if(b){RowCalc(b.id+"_")}}function ParentRow(a){var b=a;while(b&&ElementType(b)!="tr"){b=b.parentNode}return(b)}function MouseX(b){var a=b.clientX;if(document.body&&document.body.scrollLeft){a+=document.body.scrollLeft}return(a)}function SizerDrag(b){if(!b){b=window.event}var e=window.resizingDiv;var d=e.row1;var a=MouseX(b);e.style.left=a;var c=a-getLeft(d);if(c>3){d.style.width=c}return CancelBubble(b)}function SizerDragEnd(a){if(!a){a=window.event}var d=window.resizingDiv;DragTerm(d,SizerDrag,SizerDragEnd);d.style.display="none";d.td.style.cursor="";var c=new XHConn();if(c){var b=d.td.getAttribute("key");var e=d.td.map;var f="req=colsz&map="+e+"&fld="+b+"&wid="+d.td.offsetWidth+"&ajaxdt"+Timestamp();if(d.td.purp){f+="&purp="+d.td.purp}c.getString("Handler.ashx",f,null)}return CancelBubble(a)}function SizerInit(a){if(!a){a=window.event}var e=(a.srcElement)?a.srcElement:a.target;if(e.style.cursor!=""){var c=document.getElementById("resizer");if(c){c.style.display="";c.style.left=getLeft(e)+e.offsetWidth;c.style.top=getTop(e);c.style.height=e.offsetHeight;c.td=e;var b=IndexOfNode(e);var d=FindParent(e,"tbody");if(!d){d=FindParent(e,"table")}c.row1=d.childNodes[0].childNodes[b];c.setAttribute("key",e.getAttribute("key"));window.resizingDiv=c;DragInit(c,SizerDrag,SizerDragEnd);return CancelBubble(a)}}}function SizerTrack(b,e,c){if(!e.getAttribute("sizerSetup")){e.onmousedown=SizerInit;e.setAttribute("sizerSetup",1);var d=FindParent(e,"table");if(d){e.map=d.getAttribute("map");e.purp=d.getAttribute("purp")}}var a=MouseX(b);if(a>(getLeft(e)+e.offsetWidth)-7&&a<=getLeft(e)+e.offsetWidth){if(e.style.cursor==""){e.style.cursor="w-resize"}}else{if(e.style.cursor!=""){e.style.cursor=""}}return CancelBubble(b)}function ListMove(a,i,j,h){var e=null;var b=a.lastIndexOf("_"+i);if(b>0){var k=listkeys;var m=listrows;var g=a.substring(0,b);b=g.lastIndexOf("_");var d=g.substring(0,b);var l=g.substring(b+1);var c=ArrayIndexOf(k,i);var f=ArrayIndexOf(m,l);if(c>=0&&f>=0){if(j){c+=j;if(c<0){f--;c=k.length-1;if(f<0){f=m.length-1}}else{if(c>=k.length){f++;c=0;if(f>=m.length){f=0}}}}else{if(h){f+=h;if(f<0){f=0}else{if(f>=m.length){f=m.length-1}}}}if(c>=k.length){alert("key too big");return null}else{if(c<0){alert("key neg");return null}else{if(f>=m.length){alert("row too big");return null}else{if(f>=m.length){alert("row neg");return null}}}}i=k[c];l=m[f];e=d+"_"+l+"_"+i}}return(e)}function GetDatasheetSibling(b,a){var c=null;var d=FindParent(b,"tr");var e=d.id+"_"+a;c=document.getElementById(e);return(c)}function GetDatasheetSiblingValue(b,a){var d=null;var c=GetDatasheetSibling(b,a);if(c){d=GetCellText(c)}return(d)}function DatasheetFillDown(gridId){var fbfId=gridId+"_fbf";var kk;var rr;for(kk=0;kk<listkeys.length;kk++){var key=listkeys[kk];var fbf=GetElement(fbfId+"_fbf_"+key);if(!fbf){fbf=GetElement(fbfId+"_fbf_"+key+"_txt")}var val=(fbf)?fbf.value:null;var fbfopts=""+fbf.getAttribute("fbfopts");if(val&&val!=""&&fbfopts.indexOf("f")<0){var fnValidator=eval("window.validate_"+key);var editor=document.getElementById("edit_"+key);var editorType=ElementType(editor);var msg=null;for(rr=0;rr<listrows.length;rr++){var row=listrows[rr];var cell=document.getElementById(gridId+"_"+row+"_"+key);var css=GetCssClass(FindParent(cell,"td",true));if(css&&css.indexOf("edit")>=0){if(fnValidator){msg=fnValidator(cell,val)}if(!msg){window.listEditor=editor;editor.cell=cell;if(editorType=="text"){editor.value=val;ListEditDone(null,false)}else{if(editorType=="select"){var ii;val=val.toLowerCase();for(ii=0;ii<editor.options.length;ii++){if(editor.options[ii].text.toLowerCase()==val){editor.selectedIndex=ii;ListEditDone(null,false);break}}}else{if(editorType=="checkbox"){if(fbf.value=="1"){editor.checked=true}else{if(fbf.value=="0"){editor.checked=false}}ListEditDone(null,false)}}}}}}}}}function UpdateRowCount(a,c){var b=document.getElementById("ds_ajax_count");if(!b.cnt){b.cnt=-1;b.style.cursor="wait";AjaxLookup("lstcnt","",encodeURIComponent(c),RowCountResult)}}function RowCountResult(a){var b=document.getElementById("ds_ajax_count");if(a&&b){b.style.cursor="";if(a.indexOf("!")==0){var c=a.substr(1);b.cnt="";b.title=c;alert(c)}else{if(a.length>20){b.cnt="unknown";b.title="Unable to determine count due to filter complexity.";SetCellText(b,b.cnt)}else{b.cnt=a;b.title="";SetCellText(b,a)}}}window.status=""}function IsTextNode(a){return(a&&a.nodeType==3)}function CalcTextNodeWid(c){var b=c.parentNode;var a=document.createElement("span");b.removeChild(c);a.appendChild(c);b.appendChild(a);var d=a.offsetWidth;a.removeChild(c);b.removeChild(a);b.insertBefore(c,b.firstChild);return(d)}function NodeWidth(a){return(!a)?0:(IsTextNode(a))?CalcTextNodeWid(a):a.offsetWidth}function InitTip(b){if(!b){b=window.event}var a=GetEventTarget(b);if(a&&!a.ttt&&!a.title&&ElementType(a)=="td"){a.ttt=1;if(a.firstChild&&NodeWidth(a.firstChild)>a.offsetWidth&&(IsTextNode(a.firstChild)||IsVisible(a.firstChild))){a.title=GetCellText(a)}}}function ToggleStar(a,f,c,h){var b=f;var e=HasCssClass(b,"unpin")?1:0;if(e){RemoveCssClass(b,"unpin")}else{SetCssClass(b,"unpin")}var d=new XHConn();if(d){var g="req=togbkt&mop="+c+"&rk="+h+"&sel="+e+"&ajaxdt"+Timestamp();d.getString("Handler.ashx",g,StarRsp)}return CancelBubble(a)}function StarRsp(a){window.status=""}function StarClrAll(c){var g=document.getElementsByTagName("img");var b=g.length;var i;for(i=0;i<b;i++){var f=g[i];if(f.src&&f.src.indexOf("/Sticky16.gif")>=0){var h=GetCssClass(f);var a=(h&&h.indexOf("unpin")>=0)?1:0;if(!a){SetCssClass(f,"unpin")}}}var d=new XHConn();if(d){var e="req=clrbkt&mop="+c+"&ajaxdt"+Timestamp();d.getString("Handler.ashx",e,StarRsp)}}function TriStateTog(b,c){var a=document.getElementById(c.getAttribute("owner"));if(a){if(a.value=="1"){c.src="images/trino.gif";a.value="0"}else{if(a.value=="0"){c.src="images/trimaybe.gif";a.value=""}else{c.src="images/triyes.gif";a.value="1"}}}}function TriStateClear(b){var a=document.getElementById(b.getAttribute("owner"));if(a){b.src="images/trimaybe.gif";a.value=""}}var usePopup=1;function fwToggle(a,c){if(!usePopup||c.id!=window.fwShowing){fwHide()}var d=c.getAttribute("wid");if((c.getAttribute("picklist")||c.getAttribute("pick"))&&d!="txt"){var b=c.getAttribute("caption");if(c.getAttribute("pick")){fwrsToggleDiv(a,c,c.getAttribute("pick"),b)}else{fwrsToggle(a,c,c.getAttribute("picklist"),b)}}else{if(d&&d!="txt"){FltWidget(a,d,c,c.getAttribute("caption"))}else{FltWidget(a,"fwdiv",c,c.getAttribute("caption"))}}window.fwShowing=c.id}function fwHide(){fwrsHide(0);fwtxtHide(0)}function fwrsToggle(g,a,f,i){if(!g){g=window.event}var c=document.getElementById("fwrswidget");fwrsInit(c,f);if(c.style.display==""){fwrsHide(0)}else{var d=document.getElementById("fwrslist");var b=a;var h=document.getElementById("fwrscaption");d.options.length=0;h.innerHTML="&nbsp;"+i+'<span id="fillstat"></span>';c.txt_ctrl=b;if(usePopup){var j="<!-- Created by fwrsToggle() in FiterWidget.js -->\n";j+="function ShowInfo(evt, sel)\n";j+="{\n";j+="    var key = opener.GetEventKey(evt);\n";j+="    if (key == 119)\n";j+="    {\n";j+='        var msg = "Creator --------> FilterWidget.js::fwrsInit\\n";\n';j+='        msg += "Elements -------> " + sel.options.length + "\\n";\n';j+="        alert(msg);\n";j+="    }\n";j+="}\n";j+="function FillWidget(id)\n";j+="{\n";j+="   window.txtId = id;\n";j+='   opener.WidgetFill(window, document.getElementById("fwrslist"), id);\n';j+="}\n";j+="function CreateOpt(s)\n";j+="{\n";j+="   return new Option(s, s);\n";j+="}\n";j+="function PauseFill(id)\n";j+="{\n";j+="    if (window.filler)\n";j+="        { clearTimeout(window.filler); window.filler = null; }\n";j+="    else\n";j+='	     opener.WidgetResumeFill(window, document.getElementById("fwrslist"), id);\n';j+="}\n";j+="function FilterFill(txt, tim)\n";j+="{\n";j+="   if (tim)\n";j+="   {\n";j+='      opener.WidgetFill(window, document.getElementById("fwrslist"), window.txtId, txt.value);\n';j+="   }\n";j+="   else\n";j+="   {\n";j+="      if (txt.req) window.clearTimeout(txt.req);\n";j+="      if (window.filler) window.clearTimeout(window.filler);\n";j+="      txt.req = window.setTimeout(function() { FilterFill(txt, true); }, 350);\n";j+="   }\n";j+="}\n";var e=popupWindow(g,c.id,"filterwidget",i,"fwrslist",j,true,"FillWidget('"+a.id+"');");if(e&&e.focus){SetFocus(e,false)}e.fillId=a.id;e.arrValues=null;e.fillDone=false}else{c.style.left=g.clientX;c.style.top=g.clientY;c.style.display="";d.focus()}}}function PickGet(h,c,a,e,b,g){var i=e.getAttribute("picklist");if(i){h.arrValues=i.split(b)}else{if(!h.arrValues||g!=e.flt){var f=e.getAttribute("pick");if(f){e.seq=(e.seq)?1+e.seq:1;var d="pick="+f+"&seq="+e.seq+"&lim=250";if(g){d+="&text="+encodeURIComponent(g)}h.arrValues=null;AjaxReq("pick",d,function(j){var k=j.indexOf(";");if(k<0){k=j.length}var l=j.substr(0,k);if(l==e.seq){h.arrValues=j.substr(k).split(b);WidgetPickFill(h,c,h.arrValues,0,e,g)}})}}}return(h.arrValues)}function WidgetFill(h,i,a,g){var d=document.getElementById(a);var e=document.getElementById("fwrswidget");var b=e.getAttribute("delim");var f=PickGet(h,i,a,d,b,g);var c=h.document.getElementById("filler");if(c){c.innerHTML='<input type="image" src="images/fill.gif" border="0" onclick="PauseFill(\''+a+'\');" title="Click here to pause or continue filling the list." />'}if(f){WidgetPickFill(h,i,f,0,d,g)}}function WidgetResumeFill(c,b,d){var a=document.getElementById(d);WidgetPickFill(c,b,c.arrValues,b.options.length,a,a.flt)}function WidgetPickFill(j,k,h,l,f,i){if(h){var g=document.getElementById("fwrswidget");var e=j.document.getElementById("fillstat");var c=j.document.getElementById("filler");if(l==0){e.innerHTML="";e.style.display="";c.style.display=""}var b=f.value;var d=g.getAttribute("conj");var m=d+b+d;var o=m.toUpperCase();f.flt=i;if(l==0){if(k.options.length>0){k.value=k.options[0].value}k.options.length=0}for(var n=l;n<h.length;n++){var q=h[n];var a=j.CreateOpt(q);k.options[n]=a;a.removeAttribute("selected");if(b!=""&&q!=""){var p=(d+q+d).toUpperCase();if(o.indexOf(p)>=0){a.selected="1"}}if((n+1)%50==0){e.innerHTML="&nbsp;("+(n+1)+" of "+h.length+")";j.filler=j.setTimeout(function(){WidgetPickFill(j,k,h,n+1,f,i)},10);break}}if(n>=h.length){e.style.display="none";c.style.display="none";if(!IsIE()&&!j.resized){ResizeWin(j,k.offsetWidth+16,GetClientHeight(j));j.resized=true}}}}function fwrsHide(b,f){var d=null;if(!f){f=window}if(usePopup&&window.name=="filterwidget"){d=document.getElementById("fwrswidget")}else{d=document.getElementById("fwrswidget")}if(d&&b){var c=f.document.getElementById("fwrslist");var a;var e="";var g=d.getAttribute("conj");for(a=0;a<c.options.length;a++){if(c.options[a].selected){e+=g+c.options[a].value}}if(e.length>0){e=e.substr(g.length)}d.txt_ctrl.value=e}if(d&&d.txt_ctrl){SetFocus(d.txt_ctrl,false)}if(d){d.style.display="none"}if(usePopup&&f.name=="filterwidget"){f.close()}}function fwrsInit(c,a){if(!c.initialized){var b="<!-- Created by fwrsInit() in FiterWidget.js -->\n";b+='<table cellspacing="0" cellpadding="0" border="0" width="100%">\n';b+="<tr><td>\n";b+='<div class="fwcaption">\n';b+='<table cellspacing="0" cellpadding="0" border="0" class="fwwidget" style="width:100%"><tr style="width:100%;height:100%">\n';b+='<td width="100%"><div id="fwrscaption" class="fwcaption"></div></td>\n';if(!usePopup){b+='<td style="align:right;color:white;width:1em;xbackground-color:olive;font-size:12;cursor:hand" onclick="fwrsHide(0);"><b>X</b></td>'}b+='<td id="filler" style="height:100%"></td><td>&nbsp</td>\n';b+="</tr></table>\n";b+="</div>\n";b+="</td></tr>\n";b+="<tr><td>\n";if(usePopup){b+="<table>\n"}else{b+="<table onkeypress=\"fwrsKey('"+c.id+"');\">"}b+='<tr id="fwrsflt"><td colspan="2" width="100%">\n';b+="<table><tr>\n";b+='<td><nobr><span class="hint">Starts With:</span></nobr></td>';b+='<td style="width:100%"><input type="textbox" id="fwrstxt" style="width:100%" onkeyup="FilterFill(this);"/></td>\n';b+="</tr></table>\n";b+="</td></tr>\n";b+="<tr>";b+='<td colspan="2"><select id="fwrslist" onkeydown="ShowInfo(event, this);" class="mapper" size="12" multiple="true" style="width:100%"></select></td>';b+="</tr>\n";b+="<tr>";if(usePopup){b+='<td width="50%"><input type="submit" class="mapper" onclick="opener.fwrsHide(1, window);" value="OK" style="width:100%" /></td>';b+='<td width="50%"><input type="reset" class="mapper" onclick="opener.fwrsHide(0, window);" value="Cancel" style="width:100%" /></td>'}else{b+='<td width="50%"><input type="button" class="mapper" onclick="fwrsHide(1);" value="OK" style="width:100%" /></td>';b+='<td width="50%"><input type="button" class="mapper" onclick="fwrsHide(0);" value="Cancel" style="width:100%" /></td>'}b+="</tr>\n";b+="<tr>";b+='<td colspan="2" class="hint" style="width:100%">'+c.getAttribute("hint")+"</td>";b+="</tr>\n";b+="</table>\n";b+="</td></tr>\n";b+="</table>\n";c.innerHTML=b;c.initialized=true}var d=document.getElementById("fwrsflt");d.style.display=(a)?"none":""}function fwrsKey(b){var a=true;if(window.event.keyCode==27){fwrsHide(0)}else{if(window.event.keyCode==13){fwrsHide(1);a=false}}return(a)}function fwtxtToggle(j,e,m){if(!j){j=window.event}var f=document.getElementById("fwtxtwidget");fwtxtInit(f);var l=document.getElementById("fwtxtcaption");f.txt=e;l.innerHTML="&nbsp;"+m;var a=document.getElementById("fwtxtvalue");var i=""+e.value;var h=0;var d=i.toUpperCase();if(d.indexOf("STARTS WITH ")==0){i=i.substr(12);h=0}else{if(d.indexOf("=")==0){i=i.substr(1);h=1}else{if(d.indexOf("CONTAINS ")==0){i=i.substr(9);h=2}else{if(d.indexOf("ENDS WITH ")==0){i=i.substr(10);h=3}else{var c=e.getAttribute("fltdef");if(c&&c=="CONTAINS"){h=2}}}}}a.value=i;a.defaultValue=i;if(usePopup){var g=document.getElementsByName("searchtype");var b=g.length;var k;for(k=0;k<b;k++){g[k].checked=(k==h);g[k].defaultChecked=(k==h)}popupWindow(j,f.id,"filterwidget",m,a.id,"",true)}else{f.style.left=event.x;f.style.top=event.y;f.style.display="";a.focus()}}function fwtxtHide(d,g){var e=null;if(!g){g=window}if(usePopup&&window.name=="filterwidget"){e=document.getElementById("fwtxtwidget")}else{e=document.getElementById("fwtxtwidget")}var a=(e)?e.txt:null;if(e&&d){var f="";var h=g.document.getElementById("fwtxtvalue");var c=(usePopup)?g.document.getElementsByName("searchtype"):document.getElementsByName("searchtype");if(c[0].checked){f="STARTS WITH"}else{if(c[1].checked){f="="}else{if(c[2].checked){f="CONTAINS"}else{if(c[3].checked){f="ENDS WITH"}else{alert("none checked")}}}}var b=a.getAttribute("fltdef");if(!b){b="STARTS WITH"}f=(b==f)?h.value:f+" "+h.value;a.value=f}if(a){SetFocus(a,false)}if(e){e.style.display="none"}if(usePopup&&g.name=="filterwidget"){g.close()}}function fwtxtInit(b){if(!b.initialized){b.initialized=true;var a="<!-- Created by fwtxtInit() in FiterWidget.js -->\n";a+="<div>";if(IsSafari()){a+='<form id="theform">'}if(usePopup){a+='<table cellspacing="0" cellpadding="0" class="fwwidget" style="width:100%" ID="Table1"><tr style="width:100%"><td><div id="fwtxtcaption" class="fwcaption"></div></td></tr></table>';a+='<table class="fwwidget">'}else{a+='<table cellspacing="0" cellpadding="0" class="fwwidget" style="width:100%" ID="Table1"><tr style="width:100%"><td><div id="fwtxtcaption" class="fwcaption"></div></td><td style="align:right;color:white;width:1em;xbackground-color:olive;font-size:12;cursor:hand" onclick="fwtxtHide(0);"><b>X</b></td></tr></table>';a+='<table class="fwwidget" onkeypress="return fwtxtKey(\'fwtxtwidget\');">'}a+='<tr><td colspan="8"><input id="fwtxtvalue" autoComplete="false" name="fwtxtvalue" type="text" style="width:100%" /></td></tr>';a+="<tr>";a+='<td class="fwwidget"><input style="width:20px" type="radio" name="searchtype" checked="checked" ID="Radio1" VALUE="Radio1" /></td><td style="width:20%">Starts With</td>';a+='<td class="fwwidget"><input style="width:20px" type="radio" name="searchtype" ID="Radio2" VALUE="Radio2" /></td><td style="width:20%">Exact Match</td>';a+='<td class="fwwidget"><input style="width:20px" type="radio" name="searchtype" ID="Radio3" VALUE="Radio3" /></td><td style="width:20%">Contains</td>';a+='<td class="fwwidget"><input style="width:20px" type="radio" name="searchtype" ID="Radio4" VALUE="Radio3" /></td><td style="width:20%">Ends With</td>';a+="</tr>";a+="<tr>";if(usePopup){a+='<td colspan="2" style="xwidth:20%"><input type="submit" class="mapper" onclick="opener.fwtxtHide(1, window);" value="OK" ID="Button2" NAME="Button2" style="width:100%"/></td>';a+='<td colspan="2" style="xwidth:20%"><input type="reset" class="mapper" onclick="opener.fwtxtHide(0, window);" value="Cancel" ID="Button3" NAME="Button3" style="width:100%"/></td>'}else{a+='<td colspan="2" style="width:20%"><input type="button" class="mapper" onclick="fwtxtHide(1);" value="OK" ID="Button2" NAME="Button2" style="width:100%" /></td>';a+='<td colspan="2" style="width:20%"><input type="button" class="mapper" onclick="fwtxtHide(0);" value="Cancel" ID="Button3" NAME="Button3" style="width:100%"/></td>'}a+="</tr>";a+="</table>";if(IsSafari()){a+="</form>"}a+="</div>";b.innerHTML=a;b.initialized=true}}function fwtxtKey(b){var a=true;if(window.event.keyCode==27){fwtxtHide(0)}else{if(window.event.keyCode==13){fwtxtHide(1);a=false}}return(a)}function fwButtonShow(b,a){if(!b){b=window.event}var c=document.getElementById("fwbutton");if(c&&a&&(c.txt!=a||c.style.display!="")){var e=getLeft(a,c)+a.offsetWidth;var d=getTop(a,c);c.style.zIndex=1000;c.style.left=e;c.style.top=d;c.style.display="";c.style.left=e-c.offsetWidth;c.txt=a}}function fwButtonHide(){var a=document.getElementById("fwbutton");if(a){a.style.display="none"}}function fwKeys(a){if(!a){a=window.event}var d=true;var c=GetEventKey(a);if(c==13){var b=window.fbfbutton;if(!b){var e=FindDSRow(GetEventTarget(a));if(e){b=document.getElementById(e.id+"_FBF1")}if(!b){b=document.getElementById(e.id+"_FBF2")}}if(b){if(!DoClick(b)&&IsSafari()){b.click()}}d=false;CancelBubble(a)}else{if(c==116&&a.shiftKey){fwToggle(a,(a.srcElement)?a.srcElement:a.target);a.cancelBubble=true}}return(d)}function FindDSRow(a){var b=FindParent(a,"tr");if(b){var c=FindParent(b,"table");if(c&&c.getAttribute("use")!="ds"){b=FindDSRow(c)}}return(b)}function MultiSelect(a,d,c,b){MultiSelDiv(a,d,c,b)}function MultiSelWin(u,H,r,o){var J="c";var w="z";var g="s";var E="e";var C="<!-- Created by MultiSelect() in FiterWidget.js -->\n";var v=bndLkupTable(H);var F=v.getAttribute("hint");var m=v.getAttribute("delim");var e=(r.indexOf(J)>=0);var G=(r.indexOf(w)>=0);var L=(r.indexOf(g)>=0);var b=(r.indexOf(E)>=0);if(!m){m=";"}if(!F){F="Click while holding down the shift or control keys to select multiple items."}C+='<div id="outerContent" style="width="300px">\n';C+='<table width="100%" onkeydown="ShowInfo(event);">\n';C+="<tr>\n";var I="";if(G){I=' style="width:250px;height=200px"'}if(b){C+='<td colspan="3" width="100%">\n'}else{C+='<td colspan="2" width="100%">\n'}var l=bndLkupTable(H).getAttribute("picklist");var n=l.split(";");var j=document.getElementById(bndLkupTxtFromBtn(H));var z;var q;var t;if(e){C+='<div class="mapper" style="height:195px;width:100%;border-style:solid;border-width:1px;overflow:auto">\n';C+='<table class="mapper">\n';var K;q=m+j.value+m;q=q.toUpperCase();for(z=0;z<n.length;z++){t=n[z];if(t&&t.length>0){K="wcb"+z;C+='<tr><td width="100%"><input type="checkbox" value="'+t+'" id="'+K+'"';if(t.length>0&&q.indexOf(m+t.toUpperCase()+m)>=0){C+=' checked="checked"'}C+=" />";C+='<label for="'+K+'"><nobr>'+t+"</nobr></label>";C+="</td></tr>\n"}}t=j.value;if(t){var f=";"+l.toUpperCase()+";";var c=j.getAttribute("wm");n=t.split(m);for(z=0;z<n.length;z++){t=n[z];if(t&&t.length>0&&t!=c&&f.indexOf(m+t.toUpperCase()+m)<0){K="wcbmiss"+z;C+='<tr><td width="100%"><input type="checkbox" value="'+t+'" id="'+K+'"';C+=' checked="checked"';C+=" />";C+='<label for="'+K+'"><nobr><span class="disabled">'+t+"</span></nobr></label>";C+="</td></tr>\n"}}}C+="</table></div></td>\n"}else{C+="<select"+I+' id="list" class="mapper" size="8" onkeydown="opener.FormKeyHandler(\'cancel\',\'ok\',window);"';if(!L){C+=' multiple="true"'}C+=' style="width:100%">\n';q=m+j.value+m;q=q.toUpperCase();for(z=0;z<n.length;z++){t=n[z];if(t&&t.length>0){C+='<option value="'+t+'"';if(t.length>0&&q.indexOf(m+t.toUpperCase()+m)>=0){C+=' selected="selected"'}C+=">"+t+"</option>\n"}}C+="</select></td>\n"}var M=(b)?"33%":"50%";C+="</tr>\n";C+="<tr>\n";C+='<td width="'+M+'"><input class="mapper" style="width:100%" type="submit" onclick="SetValue(\''+H.id+"','"+m+'\'); window.close();" value="OK" name="ok" /></td>\n';C+='<td width="'+M+'"><input class="mapper" style="width:100%" type="reset" onclick="window.close();" value="Cancel" name="cancel" /></td>\n';if(b){C+='<td width="'+M+'"><input class="mapper" style="width:100%" type="button" onclick="opener.ManageList(opener.document.getElementById(\''+H.id+"'), '"+o+'\', 1);" value="Edit" name="edit" /></td>\n'}C+="</tr>\n";if(!e&&!L){var p=(b)?"3":"2";C+="<tr>";C+='<td colspan="'+p+'" class="hint" style="width:100%">'+F+"</td>";C+="</tr>\n"}C+="</table>\n";C+="</div>\n";C+="\n<script><!--\n";C+="function ShowInfo(evt)\n";C+="{\n";C+="    var key = opener.GetEventKey(evt);\n";C+="    if (key == 119)\n";C+="    {\n";C+='        var msg = "Creator --------> FilterWidget.js::MultiSelect\\n";\n';C+='        msg += "Elements -------> '+n.length+'\\n";\n';C+='        msg += "Options --------> '+r+'\\n";\n';C+="        alert(msg);\n";C+="    }\n";C+="}\n";if(e){C+="function SetValue(id, delim)\n";C+="{\n";C+="   var clause = '';\n";C+="   var els = document.getElementsByTagName('input');\n";C+="   for(var ii=0; ii<els.length; ii++)\n";C+="   {\n";C+="      if (els[ii].type.toLowerCase() == 'checkbox' && els[ii].checked)\n";C+="      {\n";C+="         clause += delim + els[ii].value;\n";C+="      }\n";C+="   }\n";C+="\n";C+="   if (clause.length > 0) clause = clause.substr(1);\n";C+="   var btn = opener.document.getElementById(id);\n";C+="   var txtID = opener.bndLkupTxtFromBtn(btn);\n";C+="   var txt = opener.document.getElementById(txtID);\n";C+="   txt.value = clause;\n";C+="   if (txt.change)\n";C+="      txt.change();\n";C+="   else if (txt.onchange)\n";C+="      txt.onchange();\n";C+="}\n"}else{C+="function SetValue(id, delim)\n";C+="{\n";C+="   var list = document.getElementById('list');\n";C+="   var clause = '';\n";C+="\n";C+="   for (ii=0; ii<list.options.length; ii++)\n";C+="   {\n";C+="      if (list.options[ii].selected)\n";C+="      {\n";C+="         clause += delim + list.options[ii].value;\n";C+="      }\n";C+="   }\n";C+="\n";C+="   if (clause.length > 0) clause = clause.substr(1);\n";C+="   var btn = opener.document.getElementById(id);\n";C+="   var txtID = opener.bndLkupTxtFromBtn(btn);\n";C+="   var txt = opener.document.getElementById(txtID);\n";C+="   txt.value = clause;\n";C+="   if (txt.change)\n";C+="      txt.change();\n";C+="   else if (txt.onchange)\n";C+="      txt.onchange();\n";C+="}\n"}C+="--><\/script>\n";if(!e){var B=(IsIE())?23:17;var A=(IsIE())?40:65;C+="\r\n\r\n<script>\r\n";C+='  window.setTimeout(\'var div=document.getElementById("outerContent"); window.resizeTo(div.offsetWidth+'+B+", div.offsetHeight+"+A+");', 100);";C+="  document.getElementById('list').focus();";C+="<\/script>\r\n"}var k;var a;var d;if(e){a=260;d=240}else{a=250;d=30}var h=u.clientX;var i=u.clientY;if(h+a>screen.width){h=screen.width-a-20}else{if(i+d>screen.height){i=screen.height-d-20}}if(h==0&&i==0){h=Mouse.x;i=Mouse.y}k="menubar=0,resizable=1,scrollbars=0,titlebar=0,width="+a+",height="+d;k+=",left="+h+",top="+i;var D=OpenWindow("mselwidget",k,bndLkupTable(H).caption,C,null,true);window.multiwin=D}function sfOver(a,b){SetCssClass(b,"subformbarActive")}function sfOut(a,b){if(!b.active){RemoveCssClass(b,"subformbarActive")}}function sfShow(j,d,e,c,h){var f=document.getElementById(e);var i=f.value;var g;var b=d.getAttribute("sf");CancelBubble(j);if(i&&i!=b){g=document.getElementById(i);if(g){g.style.display="none";if(g.btn){SetCssClass(g.btn,"");g.btn.active=false}}if(IsSafariPre5()){c=1}}g=document.getElementById(b);if(!d.hid){if(h&&window.rowKey!=g.rowKey){c=1}var a=sfTabBuildUrl(d,h,true);if(!g.getAttribute("lasturl")||c){UpdateUrl(g.id,a)}if(IsFirefox()){g.style.display="block";window.setTimeout('ForceVisibility("'+b+'");',1)}else{g.style.display=""}SetCssClass(d,"subformbarActive");d.active=true;g.btn=d;window.setTimeout(function(){f.value=b},1)}return(false)}function sfTabBuildUrl(d,a,c,b){var e=d.getAttribute("sf");var f=document.getElementById(e);if(!b){b=d.getAttribute("baseurl")}if(a){var g=window.rowKey;if(window.rowKey){b+="&if="+e;if(c){f.urlbase=b}b+="&rk="+g;if(c){f.rowKey=g}b+="&parval="+window.rowDigest;if(c){f.rowDigest=window.rowDigest}if(window.rowDesc){b+="&rd="+encodeURIComponent(window.rowDesc)}}}return(b)}function ForceVisibility(c,a){var b=document.getElementById(c);if(b){b.style.display=""}}function sfScroll(j,l,g,h){var i=0;var a=document.getElementById(l+i);var f="";var d=new Array();while(a){if(!a.hid){f+=";"+i;d.push(a)}i++;a=document.getElementById(l+i)}var c=(f!=window.tabSig)?0:window.tabFirst;var k;var e=c+g;var b=4;if(d.length-e<b){e=d.length-b}else{if(e<0){e=0}}for(k=0;k<d.length;k++){d[k].style.display=(k<e)?"none":""}window.tabSig=f;window.tabFirst=e;return(false)}function sfToggleOpen(c,b){var a=document.getElementById(b);if(!a){ThrowError(3001,"EAPSubform::sfToggleOpen","Toggler AssociatedControlID '"+b+"' not found on page.")}if(a.style.display==""){a.style.display="none";c.src="images/plus.gif"}else{a.style.display="";c.src="images/minus.gif"}}function sfTabRequery(f){var e=document.getElementById(f);if(e){var d=e.value;var b;var c=0;if(d){var a=document.getElementById(d);if(a){var g=window.rowKey;if(g!=a.rowKey){c=1}if(a.urlbase){b=a.urlbase;if(window.rowKey){b+="&rk="+window.rowKey;a.rowKey=g}if(window.rowDigest){b+="&parval="+window.rowDigest}if(window.rowDesc){b+="&rd="+encodeURIComponent(window.rowDesc)}}if(!a.getAttribute("lasturl")||c){UpdateUrl(a.id,b)}}}}}function sfExpRequery(f,e,c,b){var d=document.getElementById(f);if(d!=null){if(b){d.urlbase=b}else{b=d.urlbase}if(d.rowKey!=e){var a=b+"&rk="+e+"&parval="+c;d.rowKey=e;UpdateUrl(f,a)}}}function UpdateUrl(h,b,a){var d;var g=false;if(b){for(d=0;d<window.frames.length;d++){var c=window.frames[d].frameElement;if(c!=null&&c.id.toLowerCase()==h.toLowerCase()){var e=window.frames[d];e.document.location.replace(b);e.frameElement.setAttribute("lasturl",b);g=true;break}}if(!g&&!a){if(window.subTimeoutID){window.clearTimeout(window.subTimeoutID)}window.subTimeoutID=window.setTimeout(function(){UpdateUrl(h,b,true)},800)}}}function sfRequery(b){var a=document.getElementById(b);if(a){UpdateUrl(b,a.getAttribute("lasturl"))}}function sfTabExplicit(b){var a=b.href;var c=b.target;var d=window.parent.frames[c];if(d){d.document.location=a}}function sfTabMoveUp(a,d,c){if(!a){a=window.event}CancelBubble(a);if(!c){c="td"}var e=FindParent(d,c);var b=sfTabBuildUrl(e,true,false);if(b){b=b.replace(/&sub=/,"&fromsub=");b=b.replace(/&sda=/,"&xxsda=");b=UpsertUrl(b,"act","sfmu");window.document.location.href=b}}function sfOpenFirst(a,c){var b=document.getElementById(a);if(b){window.initSF=true;sfShow(null,b,c,0,1)}}function sfEnableTab(h,c,g,a){var d=document.getElementById(h);if(d){if(a&1){d.disabled=!c}else{d.style.display=(c)?"":"none";d.hid=!c}var e=d.getAttribute("sf");var f=document.getElementById(g);if(f.value==e){e=document.getElementById(e);if(e){var b=(c)?"":"none";if(b!=e.style.display){e.style.display=(c)?"":"none"}}}}}function LockField(h,b,i){var d=GetDetailSibling(h,b);if(!d){d=GetDetailSibling(h,b+"_txt")}if(d){var f=d.getAttribute("lkup");var c=null;var e=(ElementType(d)=="select");var k=null;if(f){c=GetDetailSibling(h,f+"_btn");if(c){k=GetDetailSibling(h,f+"_clr")}}if(i){ReplaceCssClass(d,"","lock");ReplaceCssClass(d,"","tnb");if(e){d.disabled=true}else{d.readOnly=true}if(c){c.disabled=true;if(k){k.disabled=true}}}else{RemoveCssClass(d,"tnb");if(c){c.disabled=false;if(k){k.disabled=false}var a=c.getAttribute("oc");if(a){c.onclick=new Function(a)}var g=FindParent(c,"tr");var j;for(j=0;j<g.childNodes.length;j++){if(g.childNodes[j].style){g.childNodes[j].style.display=""}}i=true}if(!i){RemoveCssClass(d,"lock");if(e){d.disabled=false}else{d.readOnly=false}}}}}function DelFilter(b,c,a,e){var d=c.id;setTimeout(function(){if(confirm((e)?e:"Are you sure you want to delete this filter?")){AjaxReq("delflt","fltid="+a);if(window.createPopup){c=document.getElementById(d)}var f=FindParent(c,"div");if(f){f.style.display="none"}}},1);CancelBubble(b);return(false)}function AlertInit(d,b,c,a){if(d>=15){window.alrt_none=c;window.alrt_popProb=a;window.setTimeout(function(){window.status=b;AjaxReq("alrtscn",null,AlertRsp);window.setInterval(function(){window.status=b;AjaxReq("alrtscn",null,AlertRsp)},d*1000)},3000)}}function AlertRsp(d){window.status="";if(!d||d==""||d==" "){window.status=window.alrt_none}else{if(d.match(/^[0123456789abcdef;]+/i)){var a=d.split(";");var c=WindowOpenFeatures(24,250,500);var f=100;var e=100;var b;var g=0;for(b=0;b<a.length;b++){if(window.open("Handler.ashx?req=nav&pop=0x00000001&mop=alerts!popup&pk="+a[b],"alert_"+a[b],c+",left="+e+",top="+f,true)){g++;e+=20;f+=20}}if(g==0&&a.length>0){window.status=window.alrt_popProb.replace(/\{0\}/,a.length-g)}}else{if(d.match(/^!err!/)){alert(d.replace(/^!err!/,""))}else{}}}}function tickInit(b,a){b=GetElement(b);if(b){if(b.timer){window.clearTimeout(b.timer)}b.timer=window.setInterval(function(){tickTock(b)},a)}}function tickAddDelim(b,a){b.appendChild(document.createTextNode("\u00A0"));b.appendChild(document.createTextNode("."));b.appendChild(document.createTextNode("."));b.appendChild(document.createTextNode("."));b.appendChild(document.createTextNode("\u00A0"))}function tickTock(c){var b=c.childNodes[0];var a=(b)?GetCellText(b):null;if(c.clearAll){while(c.childNodes.length>0){c.removeChild(c.childNodes[0])}c.cur="";c.clearAll=false;tickAddDelim(c,false);while(c.toAdd&&c.toAdd.length>0){c.appendChild(c.toAdd.shift());tickAddDelim(c,true)}}else{if(b&&ElementType(b)!="a"){c.removeChild(b)}else{if(!b){if(c.toAdd&&c.toAdd.length>0){c.appendChild(c.toAdd.shift());tickAddDelim(c,true)}}else{if(!a||a.length==0){c.removeChild(b);c.appendChild(b);SetCellText(b,c.cur);c.cur="";b=c.childNodes[0];if(ElementType(b)!="a"){c.removeChild(b)}tickAddDelim(c,true);if(c.toAdd&&c.toAdd.length>0){c.appendChild(c.toAdd.shift());tickAddDelim(c,true)}}else{c.cur=(c.cur)?c.cur+a.substr(0,1):a.substr(0,1);SetCellText(b,a.substr(1))}}}}}function tickAdd(d,b,c){if(!d.toAdd){d.toAdd=new Array()}var a=window.document.createElement("a");if(c&&c.length>0){a.href=c}else{a.onclick=function(){return false};a.href="#"}a.href=c;if(b){SetCellText(a,b.replace(/\s/g,"&nbsp;"))}d.toAdd.push(a)}function tickReset(d,a){d=GetElement(d);if(a&&a.length>0){var b=a.split(";");var c;for(c=0;c<b.length;c++){tickAdd(d,b[c],null)}}d.clearAll=true}function ClearFind(e,d){var c;d=d.split(";");for(c=0;c<d.length;c++){var b=d[c];if(b&&b.length>0){var a=GetDetailSibling(e,b);if(a){ClearNode(a,true);OnChange(a)}}}}function panMoveStart(b,e,a){e=FindParent(e,"table");if(panCanMove(e)){var d=b.clientX;var c=b.clientY;d+=document.body.scrollLeft;c+=document.body.scrollTop;window.pan=e;e.pernm=a;if(IsIE()){e.setCapture()}window.panTimer=window.setTimeout(function(){panMoveStartDelay(e,d,c)},200);e.onmouseup=panCancel;CancelBubble(b)}}function panCancel(a){if(window.panTimer){if(IsIE()&&window.pan){window.pan.releaseCapture()}window.clearTimeout(window.panTimer);window.panTimer=null;window.pan=null}}function panCanMove(a){var b=FindParent(a,"td");return(b&&(b.childNodes.length/2)>1)}function panMoveStartDelay(d,c,b){window.panTimer=null;d.onmouseup=null;window.pan=d;d.style.cursor="move";var e=FindParent(d,"div");if(IsIE()){e.disabled=true}else{SetOpacity(e,30)}if(IsIE()){d.onmousemove=panMove;d.onmouseup=panMoveEnd;d.setCapture()}else{document.onmousemove=panMove;document.onmouseup=panMoveEnd}var a=document.createElement("DIV");a.style.width="80px";a.style.height="40px";a.style.top=b-20;a.style.left=c-40;document.body.appendChild(a);SetCssClass(a,"cnsm");d.mvr=a}function panMove(a){if(!a){a=window.event}if(window.pan&&window.pan.mvr){window.pan.mvr.style.top=a.clientY-20+document.body.scrollTop;window.pan.mvr.style.left=a.clientX-40+document.body.scrollLeft}var b=panGetDropTgt(a.clientX,a.clientY);if(!b){panTargetChg(false)}else{if(window.cnsp!=b){window.cnsp=b;ReplaceCssClass(b,"","cnspd")}}}function panMoveEnd(a){var b=window.pan;var c=FindParent(b,"DIV");b.style.cursor=null;if(IsIE()){c.disabled=false;b.onmousemove=null;b.onmouseup=null;b.releaseCapture()}else{SetOpacity(c,100);document.onmousemove=null;document.onmouseup=null}if(window.cnsp){panDrop(window.pan,window.cnsp)}window.dropPos=null;panTargetChg(true);if(IsIE()){window.setTimeout(function(){RepaintAll("div","cnsh")},1)}}function panGetDropTgt(h,g){var c=null;var i;var b;if(!window.drops){var e=document.getElementsByTagName("div");var d=e.length;window.drops=new Array();for(i=0;i<d;i++){b=e[i];var j=GetCssClass(b);if(j&&j.match(/cnsp/)){window.drops.push(b)}}}var f=window.drops;var a=f.length;if(!window.dropPos){for(i=0;i<a;i++){b=f[i];b.top=getTop(b)-document.body.scrollTop;b.left=getLeft(b)-document.body.scrollLeft;b.bottom=b.top+b.offsetHeight;b.right=b.left+b.offsetWidth}window.dropPos=true}for(i=0;i<a;i++){b=f[i];if(h>=b.left&&h<=b.right&&g>=b.top&&g<=b.bottom){c=b;break}}return(c)}function panTargetChg(a){if(window.cnsp){RemoveCssClass(window.cnsp,"cnspd")}window.cnsp=null;if(a&&window.pan){if(window.pan.mvr){document.body.removeChild(window.pan.mvr);window.pan.mvr=null}window.pan=null}}function panDrop(c,e){var d=c.parentNode;var b=d.parentNode;var a=d.nextSibling;while(a&&ElementType(a)!="div"){a=a.nextSibling}if(a!=e){b.removeChild(d);if(a){b.removeChild(a)}if(e.nextSibling){e=e.nextSibling;e.parentNode.insertBefore(d,e);if(a){e.parentNode.insertBefore(a,e)}}else{e.parentNode.appendChild(d);e.parentNode.appendChild(a)}if(c.pernm){panPersist(c.pernm)}}}function panRowNum(d,c){var b=-1;var a;for(a=0;a<c.childNodes.length;a++){if(c.childNodes[a]==d){b=Math.ceil(a/2);break}}return(b)}function panPersist(g){var f=document.getElementsByTagName("table");var c=f.length;var i;var k="";for(i=0;i<c;i++){var e=f[i];var h=e.getAttribute("pan");if(h){var d=FindParent(e,"td");var a=e.parentNode;var b=d.cellIndex;var j=panRowNum(a,d);k+=h+"@"+b+","+j+";"}}AjaxPrefSet(g,k)}function togRows(e,d,a,b){var f=FindParent(d,"tr").nextSibling;var c=(f&&f.style.display!="none");d.src=(c)?"images/plus.gif":"images/minus.gif";while(f&&(HasCssClass(f,"mapper")||HasCssClass(f,"mapperalt")||HasCssClass(f,"ftr"))&&!HasCssClass(f,"agg")){f.style.display=(c)?"none":"";f=f.nextSibling}AjaxPrefSet(b,a,(c)?"add":"remove")}function OpenPrintableView(){var b="<html>\n<head>\n";if(document.getElementsByTagName!=null){var a=document.getElementsByTagName("head");if(a.length>0){b+=a[0].innerHTML}}b+='<link href="styles/EAPPrint.css" rel="stylesheet" type="text/css" />';b+="\n</head>\n<body>";b+=document.body.innerHTML;b+="\n</body>\n</html>";var c=window.open("","_blank");c.document.open();c.document.write(b);c.document.close();c.isPrintView=true}function ShowPrintable(){if(window.isPrintView&&window.isPrintView==true){window.print()}else{OpenPrintableView()}}function InitDirtyCheck(a){window.onbeforeunload=function(){if(!window.noDirtyCheck&&IsWinDirty()){return a}}}function IsWinDirty(d){if(!d){d=window}if(!d.isSaving){var a=d.document.getElementsByTagName("input");var b=a.length;var c;if(window.isDirty){return true}for(c=0;c<b;c++){if(IsDirty(a[c])){return true}}a=d.document.getElementsByTagName("option");b=a.length;for(c=0;c<b;c++){if(IsDirty(a[c])){return true}}a=d.document.getElementsByTagName("textarea");b=a.length;for(c=0;c<b;c++){if(IsDirty(a[c])){return true}}}return false}function IsDirty(c){var a=false;var b=ElementType(c);if(c.getAttribute("neverDirty")||(c&&c.parentNode&&c.parentNode.getAttribute("neverDirty"))){a=false}else{if(b=="text"){a=(c.defaultValue!=c.value)}else{if(b=="checkbox"||b=="radio"){a=(c.defaultChecked!=c.checked)}else{if(b=="select"){a=(c.defaultSelected!=c.selected)}else{if(b=="option"){if(c&&c.parentNode&&c.parentNode.parentNode&&c.parentNode.parentNode.getAttribute("neverDirty")){a=false}else{a=(c.defaultSelected!=c.selected)}}else{if(b=="textarea"){a=(c.defaultValue!=c.value)||IsHtmlEditorDirty(c)}}}}}}if(a){var d=(b=="option")?c.parentNode.id:c.id;RegDebugInfo("DirtyField",d,"Script",1)}return(a)}function AccessKeys(){var b=document.getElementsByTagName("input");var a=b.length;for(var d=0;d<a;d++){var e=b[d];if(ElementType(e)=="radio"){var c=e.parentNode;if(ElementType(c)=="span"&&c.getAttribute("accessKey")){e.setAttribute("accessKey",c.getAttribute("accessKey"));c.removeAttribute("accessKey")}}}}function LinkKeyPress(a){if(!a){a=window.event}var b=GetEventKey(a);if(b==32||b==13){var c=GetEventTarget(a);if(c){DoClick(c)}}}function FixupAnchors(){if(IsIE()){var a=document.getElementsByTagName("a");var c=a.length;for(var b=0;b<c;b++){AddListener(a[b],"keypress",LinkKeyPress)}}}function LinkBtnDis(b){var a=GetElement(b);if(a){a.removeAttribute("href")}}function FindRole(e,g){var d=null;var c;if(e&&e.childNodes){var a=e.childNodes;var b=a.length;for(c=0;c<a.length;c++){var f=a[c];if(f.role==g){d=f;break}d=FindRole(f,g);if(d){break}}}return(d)}function HovSmry(a,c,e){if(!a){a=window.event}if(window.hovSmry){window.clearTimeout(window.relHov);window.hovSmry=null}var d=GetEventTarget(a);if(d){d.ttt=1;d.removeAttribute("title")}window.hovSmry=window.setTimeout(function(){HovSmryEnd(a);HovSmryPop(d,c,e)},500);d.onmouseout=HovSmryEnd;var b=document.getElementById("hovsmry");if(!b){b=BubCreate(400);b.id="hovsmry";b.name="hovsmry";b.seq=0}return false}function HovSmryEnd(){if(window.hovSmry){window.clearTimeout(window.hovSmry);window.hovSmry=null}if(window.hovEnd){window.clearTimeout(window.hovEnd);window.hovEnd=null}var a=document.getElementById("hovsmry");if(a){a.style.display="none"}}function HovSmryCancelAll(){HovSmryEnd();var a=document.getElementById("hovsmry");if(a){a.seq++}}function HovSmryPop(d,b,c){var a=document.getElementById("hovsmry");if(a){a.tgt=d;a.seq++;if(d.hoverSmry){HovSmryRsp(""+a.seq+";"+d.hoverSmry)}else{AjaxReq("pgsum","mop="+b+"&type=hov&pk="+c+"&seq="+a.seq,HovSmryRsp)}}}function HovSmryRsp(a){if(a&&a.length>0){var b=a.indexOf(";");var d=(b>0)?parseInt(a.substr(0,b),10):-1;var c=document.getElementById("hovsmry");if(d==c.seq){if(window.hovEnd){window.clearTimeout(window.hovEnd)}window.hovEnd=window.setTimeout(HovSmryEnd,20000);var f=FindRole(c,"content");a=a.substr(b+1);if(a&&a.length>0&&a!="~"){if(!c.tgt.hoverSmry){c.tgt.hoverSmry=a}f.innerHTML=a;c.style.left=5000;c.style.top=5000;c.style.display="block";var e=BubLocate(c.tgt,c);BubAdjust(c,e);Repaint(c)}else{if(!c.tgt.hoverSmry){c.tgt.hoverSmry="~"}}}}}function ColFocus(a){a=GetElement(a);if(a){a.focus();a.style.backgroundColor="#ffff00";window.setTimeout(function(){a.style.backgroundColor=""},3000)}}function CreateLabel(a,c){var b=document.createElement("label");SetCellText(b,a);if(c){c=GetElement(c);if(c&&c.id){b.htmlFor=c.id}}return(b)}function CreateCheckbox(c,b){var a=document.createElement("input");a.type="checkbox";if(c){a.id=c}a.defaultChecked=b;return(a)}function CreateTextbox(c,b){var a=document.createElement("input");a.type="text";if(c){a.id=c}if(c){a.name=c}if(b){a.value=b}return(a)}function CreateButton(a,b){var c=document.createElement("input");c.type="button";c.value=a;if(b){c.onclick=b}return(c)}function ClearNodes(b){var a;for(a=0;b.childNodes&&a<b.childNodes.Length;a++){ClearNodes(b.childNodes[a])}while(b.childNodes&&b.childNodes.length>0){b.removeChild(b.childNodes[0])}}function CreateDivWidget(a,l,h){var f=document.getElementById(a);if(f!=null){ClearNodes(f.content);f.caption.innerHTML=l}else{f=document.createElement("div");f.id=a;document.body.appendChild(f);SetCssClass(f,"divwig");var j=document.createElement("div");f.appendChild(j);SetCssClass(j,"wigban");j.onmousedown=DivWidMoveStart;var n=document.createElement("span");var k="Click here to close";var b=CreateImgBtn((h)?h:"images/del16.gif",k,function(o){f.style.display="none";return CancelBubble(o)});n.innerHTML=l;SetCssClass(n,"wigcap");var e=document.createElement("table");var i=e.insertRow(-1);var c=i.insertCell(-1);c.appendChild(n);c.style.width="100%";i.style.width="100%";c.style.textAlign="center";c=i.insertCell(-1);c.style.width="100%";c.appendChild(b);c.style.width="20px";j.appendChild(e);j.style.width="100%";if(IsIE()){var d=CreateShim();d.style.position="absolute";d.style.left=-2;d.style.top=-2;d.style.zIndex=-1;d.style.height="100%";d.style.width="100%";window.setTimeout(function(){d.style.height=f.offsetHeight;d.style.width=f.offsetWidth},1);AddListener(f,"resize",function(){d.style.height=f.offsetHeight;d.style.width=f.offsetWidth});f.insertBefore(d,null)}var g=document.createElement("div");g.style.width="100%";var m=document.createElement("div");m.appendChild(g);SetCssClass(m,"wigcon");f.appendChild(m);f.content=g;f.banner=j;f.caption=n;f.btnClose=b}return(f)}function DivWidMoveStart(a){if(!a){a=window.event}var c=this.parentNode;c.xStart=a.clientX;c.yStart=a.clientY;c.leftStart=c.offsetLeft;c.topStart=c.offsetTop;if(IsIE()){c.setCapture()}if(document.body&&document.body.scrollTop){c.scrTop=document.body.scrollTop}window.divwid=c;AddListener(c,"mousemove",DivWidMove);AddListener(c,"mouseup",DivWidMoveEnd);if(document.body.addEventListener){AddListener(document.body,"mousemove",DivWidMove);var b=InnerIFrame(c.content);if(b&&!b.dmv){b.dmv=function(d){DivWidMove(d,true)};AddListener(IFrameDoc(b).body,"mousemove",b.dmv);AddListener(IFrameDoc(b).body,"mouseup",window.DivWidMoveEnd)}}return CancelBubble(a)}function InnerIFrame(c){var b=null;var a;for(a=0;a<c.childNodes.length;a++){if(ElementType(c.childNodes[a])=="iframe"){b=c.childNodes[a];break}}return(b)}function DivWidMove(a,e){if(!a){a=window.event}var b=window.divwid;if(document.body&&document.body.scrollTop&&b.scrTop!=document.body.scrollTop){DivWidMoveEnd(a);return}var d=b.leftStart+(a.clientX-b.xStart);var c=b.topStart+(a.clientY-b.yStart);if(e){d+=getLeft(b);c+=getTop(b)+b.banner.offsetHeight}if(d<0){d=0}if(c<0){c=0}b.style.left=d+"px";b.style.top=c+"px";if(b.onMove){b.onMove()}return CancelBubble(a)}function DivWidMoveEnd(a){if(!a){a=window.event}var c=window.divwid;RemoveListener(c,"mousemove",DivWidMove);RemoveListener(c,"mouseup",DivWidMoveEnd);if(document.body.addEventListener){RemoveListener(document.body,"mousemove",DivWidMove);var b=InnerIFrame(c.content);if(b&&b.dmv){RemoveListener(IFrameDoc(b).body,"mousemove",b.dmv);b.dmv=null}}if(IsIE()){c.releaseCapture()}if(c.onMoveEnd){c.onMoveEnd()}return CancelBubble(a)}function DivWigTop(a){var b=null;while(a&&a.parentNode!=a){if(ElementType(a)=="div"&&HasCssClass(a,"divwig")){b=a;break}a=a.parentNode}return(b)}function CreateImgBtn(c,d,e){var b=document.createElement("IMG");b.src=c;SetCssClass(b,"actimg");var a=document.createElement("A");AddListener(a,"click",e);a.href="#";SetCssClass(a,"actimg");SetTip(a,d);a.appendChild(b);b=a;return(b)}function CloseCol(b,g,c,e){b.parentNode.style.width="0";if(e=="-"){AjaxPrefSet("optfld:"+c,"-"+g,"add")}else{AjaxPrefSet("optfld:"+c,g,"remove")}if(!IsIE()){var a=FindParent(b,"th",true);var d=FindParent(a,"table",true);var h=a.cellIndex;var i;SetCssClass(a,"dshide");for(i=0;i<d.rows.length;i++){var f=d.rows[i].cells[h];if(f){SetCssClass(f,"dshide")}}}return false}function DisableCtrl(b){var a=ElementType(b);if(a=="a"){b.onclick=function(){return false};window.setTimeout(function(){b.style.color="silver"},1)}}function DragInit(e,a,d,f){AddListener(e,"mousemove",a);AddListener(e,"mouseup",d);if(IsIE()){e.setCapture()}else{if(document.body.addEventListener){AddListener(document.body,"mousemove",a);AddListener(document.body,"mouseup",d);if(f&&window.frames){var c;for(c=0;c<window.frames.length;c++){var b=window.frames[c].document.body;AddListener(b,"mousemove",a);AddListener(b,"mouseup",d)}}}}}function DragTerm(e,a,d,f){RemoveListener(e,"mousemove",a);RemoveListener(e,"mouseup",d);if(IsIE()){e.releaseCapture()}else{if(document.body.addEventListener){RemoveListener(document.body,"mousemove",a);RemoveListener(document.body,"mouseup",d);if(f){var c;for(c=0;c<window.frames.length;c++){var b=window.frames[c].document.body;RemoveListener(b,"mousemove",a);RemoveListener(b,"mouseup",d)}}}}}function WizSumResize(d){var a=d.style.getAttribute("max-height");if(a){var c;var b=0;a=a.replace(/px/,"");for(c=0;c<d.childNodes.length;c++){b+=d.childNodes[c].offsetHeight}if(b>a){d.style.setAttribute("height",a)}else{d.style.height=null}}}function PaneMaxHeight(a){if(MaxHeight(a)){RepaintConsole()}}function MaxHeight(b){b=GetElement(b);var d=false;var a=(b)?b.currentStyle.maxHeight:0;if(a){var c=b.offsetHeight;a=parseInt(a.replace(/px/,""));if(c>a&&a>0){b.style.height=a;d=true}else{b.style.height=null}}return(d)}function RepaintConsole(){Repaint(GetElement("contentTable"))}function Repaint(a){a.style.display="none";window.setTimeout(function(){a.style.display=""},1)}function RepaintAll(b,a){var d=document.getElementsByTagName(b);var c;for(c=0;c<d.length;c++){if(HasCssClass(d[c],a)){RepaintConsole(d[c])}}}function DisplayNone(a){a=GetElement(a);if(a){a.style.display="none"}}function DisplayToggle(a){a=GetElement(a);if(a){if(a.style.display=="none"){a.style.display=""}else{a.style.display="none"}}}function ElementEnable(c,a){c=GetElement(c);if(c){c.disabled=!a}}function FetchDivWidget(a,c,d,e,b){if(!d){d="wid"}if(!e){e=""}if(b){e+="&cap="+encodeURIComponent(b)}e+="&wid="+d;if(a){e+="&x="+a.clientX+"&y="+a.clientY}if(e&&e.indexOf("&")==0){e=e.substr(1)}JsonReq(c,e,FltWidgetContent)}function FltWidget(b,e,a,c){var h="";var f="fw";if(e.indexOf(":")){var g=e.split(":");e=g[0];f=g[1]}if(a){h+="id="+a.id}if(a){h+="&txt="+encodeURIComponent(a.value)}h+="&cap="+encodeURIComponent(c);h+="&wid="+f;if(b){h+="&x="+b.clientX+"&y="+b.clientY}var d=(a)?a.getAttribute("fltopts"):null;if(d){h+="&opts="+d}JsonReq(e,h,FltWidgetContent)}function FltWidgetContent(c){if(c.__type=="error"){alert(c.message)}else{var b=CreateDivWidget(c.WidgetId,"Filter");var a=c.Content;SetCellText(b.caption,c.Caption);b.content.innerHTML=a;SetTip(b.btnClose,c.CloseTip);if(c.DivOpts){if(c.DivOpts.indexOf("h")>=0){SetOpacity(b,1)}else{RemoveOpacity(b)}}b.style.width=(c.width)?c.width:300;PositionDiv(b,c.x,c.y);if(b.offsetHeight>WindowHeight(window)&&b.offsetHeight<=400){FitToWidget(b,DivWigTop(ParentIframe(window)),true)}SetFocusFirst(b.content,true,true)}}function FitToWidget(e,a,d){var c=ParentIframe(window);if(c&&a){var b=e.offsetHeight-c.offsetHeight;c.style.height=e.offsetHeight+"px";if(!d||IsIE()||IsOpera()){a.style.height=e.offsetHeight+"px"}else{a.style.height=(a.offsetHeight+b)+"px"}}}function ParentIframe(c){var b;var a;var d=c.parent.document.getElementsByTagName("iframe");for(a=0;a<d.length;a++){if(d[a].contentWindow==c){b=d[a];break}}return(b)}function PositionDiv(g,a,f){g.style.visibility="hidden";g.style.display="block";g.style.top=1+"px";g.style.left=1+"px";var c=a;var d=f;var b=g.offsetWidth;var e=g.offsetHeight;if(c+b>GetClientWidth()){c=GetClientWidth()-b}if(document.body&&document.body.scrollLeft){c+=document.body.scrollLeft}if(d+e>GetClientHeight()){d=GetClientHeight()-e}if(document.body&&document.body.scrollTop){d+=document.body.scrollTop}if(d<0){d=0}if(c<0){c=0}g.style.left=c;g.style.top=d;g.style.visibility="visible"}function CenterDiv(g,f,e){g.style.visibility="hidden";g.style.display="block";g.style.top=1+"px";g.style.left=1+"px";if(!f){f=2}if(!e){e=2}var b=g.offsetWidth;var d=g.offsetHeight;var a=(GetClientWidth()-b)/f;var c=(GetClientHeight()-d)/e;if(a+b>GetClientWidth()){a=GetClientWidth()-b}if(document.body&&document.body.scrollLeft){a+=document.body.scrollLeft}if(c+d>GetClientHeight()){c=GetClientHeight()-d}if(document.body&&document.body.scrollTop){c+=document.body.scrollTop}if(c<0){c=0}if(a<0){a=0}g.style.left=a;g.style.top=c;g.style.visibility="visible"}function fwrsToggleDiv(b,a,d,c){var f="";f+="id="+a.id;f+="&txt="+encodeURIComponent(a.value);f+="&pick="+d;f+="&cap="+encodeURIComponent(c);f+="&wid=fw";f+="&x="+b.clientX+"&y="+b.clientY;var e=a.getAttribute("widopt");if(e){f+="&opts="+e}JsonReq("fwpick",f,FltWidgetContent)}function FltWidgetPickContent(a){}function FWKeyUp(c,d,e){d=GetElement(d);var h=(d.last&&d.last!="")?d.last:c.defaultValue;var g=c.value;if(h){h=h.toLowerCase()}if(g){g=g.toLowerCase()}var b=d.options.length;var f=(b>0&&d.options[b-1].value.match(/^!more!*/));if(h&&h!=""&&g.indexOf(h)==0&&!f){var i;for(i=d.options.length-1;i>=0;i--){var a=d.options[i];if(a.text.toLowerCase().indexOf(g)!=0){d.removeChild(a)}}}else{var j=(d.seq)?d.seq+1:1;d.seq=j;if(d.req){window.clearTimeout(d.req)}d.req=window.setTimeout(function(){AjaxReq("pick","ver=3&pick="+e+"&text="+g+"&lim=100&seq="+j+"&lst="+d.id,FWPick)},250)}d.last=g}function FWPick(b){var h=b.split("|");var g=h[0].split(";");var e=g[1];var a=GetElement(g[2]);var c=g[3];if(e==a.seq){var d=h[1].split(";");var f;if(a.options.length>0){a.value=a.options[0].value;a.options.length=0}for(f=0;f<d.length;f++){AddOption(a,d[f])}if(c&&c.indexOf("m")>=0&&a.options.length>0){a.options[a.options.length-1].value="!more!"}}}function FWSet(a,d){var c;var b="";d=" "+d+" ";for(c=0;c<a.options.length;c++){if(a.options[c].selected){b+=d+a.options[c].text}}if(b.length>0){b=b.substring(d.length)}return(b)}function FWMore(b,a){window.setTimeout(function(){if(a.value.match(/^!more!*/)){a.style.cursor="wait";var c="id="+a.id;c+="&pick="+a.getAttribute("pick");c+="&skip="+a.options.length;if(a.last){c+="&text="+a.last}JsonReq("fwpickmore",c,FWMoreRsp)}},1)}function FWMoreRsp(a){if(a.count){var c=GetElement(a.id);var b;c.options.length--;for(b=0;b<a.count;b++){AddOption(c,a.txts[b],a.vals[b])}}c.style.cursor=""}function MultiSelDiv(i,a,b,g){var j=bndLkupTable(a).getAttribute("caption");var e=document.getElementById(bndLkupTxtFromBtn(a));var h=e.getAttribute("wm");var f=bndLkupTable(a);var c=f.getAttribute("delim");var d="";d+="id="+e.id;d+="&txt="+encodeURIComponent(e.value);d+="&pick="+g;d+="&opts="+b;d+="&cap="+encodeURIComponent(j);d+="&wid=msw";d+="&x="+i.clientX+"&y="+i.clientY;d+="&width=225px";if(c){d+="&delim="+c}if(h){d+="&wm="+encodeURIComponent(h)}JsonReq("msw",d,FltWidgetContent)}function MultiSelSet(d,h,b,e){var g="";var c;var f;if(e){for(f=0;f<1000;f++){c=document.getElementById(d+f);if(!c){break}if(c.checked){g+=h+c.value}}}else{var a=document.getElementById(d);for(f=0;f<a.options.length;f++){if(a.options[f].selected){g+=h+a.options[f].value}}}if(g.length>0){g=g.substr(1)}b=GetElement(b);if(b.value!=g){b.value=g;OnChange(b)}}function DateWidSet(f,e){var a=RadioButtonSel("dtflttype");if(a){var h=a.value;e=GetElement(e);if(h=="on"){e.value=GetElement("dtfw_dt_txt").value}else{if(h=="range"){var c=a.parentNode.getAttribute("pattern");e.value=c.replace(/%1/,GetElement("dtfw_from_txt").value).replace(/%2/,GetElement("dtfw_to_txt").value)}else{if(h=="count"){var g=GetElement("dtflt_ln");var d=GetElement("dtflt_cnt");var b=GetElement("dtflt_per");e.value=CboText(g)+" "+CboText(d)+" "+CboText(b)}else{if(h=="monyr"){e.value=CboValue(GetElement("dtflt_mon"))+" "+CboText(GetElement("dtflt_yr"))}else{e.value=h}}}}OnChange(e)}}function NumWidSet(d,c){var a=RadioButtonSel("numflttype");if(a){var e=a.value;var b=a.parentNode.getAttribute("pattern");c=GetElement(c);if(e=="="){c.value=GetElement("numfw_exact").value}else{if(e=="op"){c.value=CboValue(GetElement("numfw_op"))+" "+GetElement("numfw_comp").value}else{if(e=="range"){c.value=b.replace(/%1/,GetElement("numfw_from").value).replace(/%2/,GetElement("numfw_to").value)}else{if(e=="<>"){c.value="<> "+GetElement("numfw_not").value}else{if(e=="approx"){c.value=GetElement("numfw_approx").value+" +/- "+GetElement("numfw_margin").value+CboValue(GetElement("numfw_percent"))}else{if(e=="notnull"){c.value=b}else{if(e=="null"){c.value=b}else{c.value=e}}}}}}}OnChange(c)}}function OpenIWin(b,d,i,a,h){var f=CreateDivWidget(d,i,h);var g=f.content;var j=Mouse.y-20;var c=Mouse.x-20;if(document.body&&document.body.scrollTop){j-=document.body.scrollTop}if(document.body&&document.body.scrollLeft){c-=document.body.scrollLeft}f.style.top=j;f.style.left=c;f.style.width=300;f.style.display="block";f.style.height=200;var e=document.createElement("iframe");e.frameBorder="0";e.scrolling="no";g.appendChild(e);e.style.width="100%";e.style.height="100%";e.name=d;e.src=b+"&div=0x00000001";e.id="i"+d;e.widget=f;if(a&&a.indexOf("c")>=0){CenterDiv(f,2,2)}else{if(a&&a.indexOf("3")>=0){CenterDiv(f,2,3)}else{PositionDiv(f,f.offsetLeft,f.offsetTop)}}}function CloseIWin(){window.frameElement.widget.style.display="none"}function SizeIWinToCtrl(a){window.sizingToFit=true;ResizeIWin(GetElement(a))}function ResizeIWin(e,f){var c=FarRight(e)+30;var a=OffsetBottom(e.id);if(!f){f=window}if(!IsIE()){a+=0}if(a>screen.height-50){a=screen.height-150}if(c>screen.width/2){c=screen.width/2}var b=f.frameElement;var d=b.widget;d.style.width=c+"px";d.style.height=(a+d.banner.offsetHeight+5);if(IsIE()){b.style.height=a+0}else{if(IsSafari()||IsOpera()){b.style.height=a}else{b.style.height=(a+0)+"px"}}}function DivWidMove2(a){if(!a){a=window.event}var b=window.divwid;var d=b.leftStart+((a.clientX+getLeft(b))-b.xStart);var c=b.topStart+((a.clientY+getTop(b))-b.yStart);if(d<0){d=0}if(c<0){c=0}b.style.left=d+"px";b.style.top=c+"px";if(b.onMove){b.onMove()}return CancelBubble(a)}function DivWidMoveEnd2(a){if(!a){a=window.event}var b=window.divwid;RemoveListener(b,"mousemove",parent.DivWidMove);RemoveListener(b,"mouseup",parent.DivWidMoveEnd);if(document.body.addEventListener){RemoveListener(parent.document.body,"mousemove",parent.DivWidMove);RemoveListener(parent.document.body,"mouseup",parent.DivWidMoveEnd);RemoveListener(document.body,"mousemove",DivWidMove2);RemoveListener(document.body,"mouseup",DivWidMoveEnd2)}if(IsIE()){b.releaseCapture()}if(b.onMoveEnd){b.onMoveEnd()}return CancelBubble(a)}function appendCss(b){var a=document.createElement("link");a.setAttribute("rel","stylesheet");a.setAttribute("type","text/css");a.setAttribute("href",b);document.getElementsByTagName("head")[0].appendChild(a)}function FindDatasheet(){var b=document.getElementsByTagName("table");var a;for(a=0;a<b.length;a++){if(b[a].getAttribute("use")=="ds"){return b[a]}}}function DatasheetFields(){var c=FindDatasheet();var g=(!IsIE())?c.rows[0]:c.firstChild;var a;var i;var j;var h;var e=new Array();var d;if(ElementType(g)!="tr"){g=g.firstChild}var f=(!IsIE())?g.nextSibling:g.nextSibling.nextSibling;var b=(!IsIE())?g.cells.length:g.childNodes.length;for(i=0;i<b;i++){a=(!IsIE())?g.cells[i]:g.childNodes[i];h=a.getAttribute("key");j=InnerHTML(a);if(j&&j.search(/\S/)>=0&&h&&h.length>0){d=new Object();d.caption=j;d.key=h;d.sortId=(ElementType(a.firstChild)=="a")?a.firstChild.id:null;d.idx=i;d.fbfId=(!IsIE())?f.cells[i].firstChild.id:f.childNodes[i].firstChild.id;e.push(d)}}e.sort(captionSort);return(e)}function ColFocus2(b,c,d){var e=(c.fbfId)?c.fbfId:c.sortId;b.onclick=function(){ColFocus(e);d.style.display="none";return false}}function PopFlt2(a,c){a.onclick=function(d){if(!d){d=event}fwToggle(d,GetElement(c))};var b=GetElement(c);if(b){b.onchange=function(){UpdateFlt(c)}}}function UpdateFlt(c){var a=GetElement(c);var b=GetElement(c+"_xx");if(a&&b){b.value=a.value}}function captionSort(d,c){return sortCaseInsensitive(d.caption,c.caption)}function FlushNavBar(){AjaxReq("clrnb")}function ImmedSave(b,d,c){ReplaceCssClass(b,"","immedsv");var a=(b.seq)?b.seq+1:1;b.seq=a;if(b.req){window.clearTimeout(b.req)}b.req=window.setTimeout(function(){AjaxReq("immedsv","sig="+d+"&val="+c,function(e){ImmedSaveRsp(e,b,a)})},1000)}function ImmedSaveRsp(b,c,a){if(b&&b.indexOf("!err!")==0){alert(b.replace(/!err!/,""))}else{if(a==c.seq){ReplaceCssClass(c,"immedsv","")}}}function ImmedRoll(f,h,i){var b=h.getAttribute("cv");var c=h.getAttribute("pick");var d=c.split(";");var g;var e=-1;for(g=0;g<d.length;g++){if(d[g].indexOf(b+"=")==0){e=(g+1<d.length)?e=g+1:0;break}}if(e>=0){InnerTextSet(h,d[e].split("=")[1]);var a=d[e].split("=")[0];h.setAttribute("cv",a);ImmedSave(h,i,a)}}function ImmedDate(f,h,i,b,c,a,g){var e=GetElement("idphtb");var d=h.getAttribute("notset");if(!e){e=AddHiddenInput(h,"idphtb","")}e.value=InnerTextGet(h);e.onchange=function(){InnerTextSet(h,(!e.value||e.value=="")?d:e.value);ImmedSave(h,i,e.value)};bndLkupCal(f,e,b,c,a,g)}function NavBarBind(a){if(a){window.setTimeout(function(){NavBarBind(0)},a);return}if(nbexpids){var c;for(c=0;c<nbexpids.length;c++){var d=GetElement(nbexpids[c]);if(d){d=FindParent(d,"table")}if(d){var b=function(e){return function(){NavBarExpTog(e)}};d.setAttribute("prf",nbexpids[c].replace(/_/g,":"));AddListener(d,"click",b(d))}}}}function NavBarExpTog(c){var d=c.nextSibling;var a=(d&&ElementType(d)=="div"&&d.style.display!="none");var b=c.getAttribute("prf");AjaxPrefSet(b,(a)?"0":"1")}function IsHtmlEditorDirty(c){var a=(window.$find)?window.$find(c.id):null;var b=(a)?a.get_commandsManager():null;return(b&&b.getCommandsToUndo&&b.getCommandsToUndo().length>0)}function HtmlEditorTooLong(c,a){var b=(window.$find)?window.$find(c.id):null;return(b&&b.get_html().length>a)}function HtmlEditorLoad(c,a){var b=(window.$find)?window.$find(c):null;if(b){b.set_html(a)}}function PosInWin(d){var e=(document&&document.body)?document.body.scrollLeft:0;var a=d.offsetLeft;var f=d.offsetTop;var c=WindowWidth(window);var b=WindowHeight(window);if(a<0){a=0}else{if(a+d.offsetWidth-e>c){a=c-d.offsetWidth;if(a<0){pox=0}}}if(f<0){f=0}else{if(f+d.offsetHeight>b){f=b-d.offsetHeight;if(f<0){f=0}}}if(a!=d.offsetLeft){d.style.left=a+"px"}if(f!=d.offsetTop){d.style.top=f+"px"}}function ConOpts(b,a,c){HovSmryCancelAll();JsonReq(b,a+"&ver=1",function(d){ConOptRsp(d,c)},0)}function ConOptRsp(u,e){if(u&&u.__type=="error"){alert(u.message);return}var d=u.ver;var k=u.caption;var b=u.ok;var x=u.close;var r=u.mop;var o=u.items;var c=CreateDivWidget("optpanes",k);var s=c.content;SetTip(c.btnClose,x);c.style.top=Mouse.y-20;c.style.left=Mouse.x-20;c.style.width=250;c.style.display="block";window.setTimeout(function(){s.style.left="1"},1);var n=document.createElement("div");n.style.height=200;n.style.overflow="auto";n.style.margin="0 0 5px 0";s.appendChild(n);var m;var g=new Array();var f=document.createElement("table");n.appendChild(f);for(m=0;m<o.length;m++){var p=o[m];if(p){var q=p.split("|");var y=q[0];var v=(q.length>1)?q[1]:y;var h=(q.length>2)?parseInt(q[2]):0;var l=(0!=(h&1));var a=f.insertRow(-1);var j=a.insertCell(-1);var w=CreateCheckbox("itemchk_"+y,l);w.key=y;w.flags=h;j.appendChild(w);j=a.insertCell(-1);j.appendChild(CreateLabel(v,w));g.push(w)}}if(u.deviceFlags&&u.deviceFlags.indexOf("s")>=0&&f.offsetHeight>n.offsetHeight){SetCssClass(n,"ovflwind")}HovSmryCancelAll();n=document.createElement("div");var i=CreateButton((b)?b:"OK",function(){ConOptSave(u.pref,g,e);c.style.display="none"});SetCssClass(i,"mapper");i.style.width="33%";n.style.margin="5px";n.appendChild(i);i=CreateButton((u.cancel)?u.cancel:"Cancel",function(){c.style.display="none"});i.title=x;SetCssClass(i,"mapper");i.style.width="33%";i.style.marginLeft="5px";n.style.margin="5px";n.appendChild(i);s.appendChild(n);if(u.hint){n=document.createElement("div");var t=document.createElement("span");SetCssClass(t,"hint");n.style.margin="5px";t.appendChild(document.createTextNode(u.hint));n.appendChild(t);s.appendChild(n)}PosInWin(c)}function ConOptSave(e,b,d){var a="";var c;if(!d){d=window}for(c=0;c<b.length;c++){if(b[c].flags<2&&b[c].checked){a+=b[c].key+";"}else{if(b[c].flags>=2&&!b[c].checked){a+="-"+b[c].key+";"}}}AjaxPrefSet(e,a,null,d.ConOptRefresh)}function ConOptRefresh(){if(window.RefreshPage){window.RefreshPage()}}function PaneNavEl(b,c,f,e,g,d){if(!b){b=window.event}var a=FindParent(c,(d)?d:"li");if(a){a.style.display="none";AjaxPrefOpSet(f,e,g)}return CancelBubble(b)}function PaneHide(a,b,f,c,e){if(!a){a=window.event}var d=FindParent(b,"div");if(d){d.style.display="none";d=d.nextSibling;if(d&&HasCssClass(d,"cnsp")){d.style.display="none"}AjaxPrefOpSet("optpane:"+c,f,e)}return false}function TabHide(a,g,b,d,f){if(!a){a=window.event}var c=GetElement(g);if(c){c.style.display="none";var e=GetElement(c.getAttribute("sf"));if(e){e.style.display="none"}AjaxPrefOpSet("opttab:"+b,d,f)}return CancelBubble(a)}function RegPopWin(b,a){window.top.setInterval(function(){if(a&&b&&!a.opener){a.opener=b;a.document.body.style.backgroundColor="orange";b.document.body.style.backgroundColor="yellow"}},5000)}function IsDesignMode(){return(GetElement("toolbox")!=null)}function LogOpen(a,c,b){window.open("handler.ashx?req=pglog&thread="+a+"&start="+c+"&stop="+b,"DevLog")}function LogTrunc(){AjaxReq("logtrunc")}function SecureText(c,b,d,g,a){var h=c.id+"_dec";var f=h+"_btn";var j=GetElement(h);var i=GetElement(f);if(j&&i){j.style.display="";i.style.display="";if(j.timeout){window.setTimeout(function(){j.style.display="none";i.style.display="none"},j.timeout)}}else{var e="map="+b+"&fld="+d+"&rowKey="+g+"&id="+c.id;if(a){e+="&opts="+a}JsonReq("sectxt",e,ShowSecureText)}}function ShowSecureText(m){var a=GetElement(m.id);var b;if(m.__type=="error"){alert(m.message)}else{if(m.showInAlert){alert(m.value)}else{if(m.showInWidget){var d=CreateDivWidget(m.id+"_cryptwid",m.caption);d.content.innerHTML=m.value;b=GetElement(bndLkupTxtFromBtn(a));d.style.width=((b)?b.offsetWidth+20:120)+"px";var i=(a)?getLeft(a)+a.offsetWidth+10:Mouse.x;var h=(a)?getTop(a):Mouse.y;d.style.borderWidth="1px";PositionDiv(d,i,h);if(m.timeout){window.setTimeout(function(){d.style.display="none"},m.timeout*1000)}}else{if(a){b=GetElement(bndLkupTxtFromBtn(a));if(b){var l;var j;var k;var g=m.id+"_dec";var e=g+"_btn";if(m.opts&&m.opts.indexOf("L")>=0){k=a.parentNode;l=a.parentNode.nextSibling;SetCellText(l,m.value);j=c(a,k,e,"images/del16.gif",(IsIE())?k:null);j.onclick=function(n){SetCellText(l,"*****");j.style.display="none";return CancelBubble(n)}}else{k=bndLkupTable(a).parentNode;l=f(b,k,g,m.value,k);SetCssClass(l,"lock decrypted");if(m.css){ReplaceCssClass(l,"x",m.css)}l.setAttribute("neverDirty","1");j=c(a,k,e,"images/del16.gif",k);j.onclick=function(){l.style.display="none";j.style.display="none";return false}}if(m.timeout){l.timeout=m.timeout*1000;window.setTimeout(j.onclick,l.timeout)}}}}}}function f(p,o,r,q){var n=document.createElement("input");n.type="text";n.id=r;n.name=n.id;n.value=q;if(o){o.appendChild(n)}n.style.visibility="hidden";n.style.display="inline";n.style.position="absolute";n.style.left=getLeft(p,o)+((IsAppleWebKit())?-1:0)+"px";n.style.top=getTop(p,o)+((IsAppleWebKit())?-1:0)+"px";n.style.width=p.offsetWidth;n.style.height=p.offsetHeight;n.style.visibility="visible";n.readOnly=true;return(n)}function c(q,p,s,r,o){var n=document.createElement("input");n.type="image";n.id=s;n.name=n.id;n.src=r;if(p){p.appendChild(n)}n.style.visibility="hidden";n.style.display="inline";n.style.position="absolute";n.style.left=getLeft(q,o);n.style.top=getTop(q,o);n.style.width=q.offsetWidth;n.style.height=q.offsetHeight;n.style.visibility="visible";SetCssClass(n,"actimg");return(n)}}function ChgRowsPerPage(a){RefreshDoc(function(b){return UpsertUrl(b,"rpp",""+a)})}function escapeHTML(a){if(a&&IsString(a)){return a.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")}else{return a}}function QAnswer(d,g,i){d=GetElement(d);if(d){var b=(g&2);var c=d.id.replace(/\d*$/,"");var f;var h;for(h=0;h<10;h++){f=GetElement(c+h);if(!f){break}RemoveCssClass(f,"radpicon");SetCssClass(f,"radpicoff")}c=c.replace(/_b$/,"_txt");var a=GetElement(c);var e=d.getAttribute("val");a.value=e;if(i){AjaxReq("wizqa","sig="+i+"&val="+encodeURIComponent(e))}RemoveCssClass(d,"radpicoff");SetCssClass(d,"radpicon");if(window.OnAnswered){OnAnswered(d,g)}}}function PhotoSnap(d,c,e,a,b){c=GetElement(c);if(c){window._snaptop=document.body.scrollTop;window.webcam={onSave:function(f){PhotoUploaded(e,a,b,c);return true}};c.capture();c.save("Handler.ashx?req=svphoto&sig="+e+"&docid="+b)}}function PhotoUploaded(e,a,c,b){var d=DivWigTop(b);if(d){window.setTimeout(function(){d.style.display="none"},1)}DocUploaded(e,a,c,"i")}function DocUploaded(e,a,b,c){var d="sig="+e+"&baseId="+a+"&docid="+b;if(c){d+="&opts="+c}JsonReq("docup",d,UpdateData)}function UpdateData(b){document.body.scrollTop=window._snaptop;if(b.__type=="error"){alert(b.message)}else{var d;if(b.keys&&b.vals){for(d=0;d<b.keys.length;d++){var c=GetElement(b.keys[d]);var e=b.vals[d];if(c&&c.value!=e){SetValue(c,e)}}}var a=GetElement(b.srcKey);if(a){a.setAttribute("src",b.src+"&ts="+Timestamp());a.style.display=(b.src)?"":"none"}}}function ScanGet(){return document.getElementById("scanner")}function ScanInstalled(a){var b=false;try{b=(a&&a.HTTPPort)}catch(c){}return(b)}function ScanSelect(a){return a.SelectSource()}function ScanImage(d,a,b,f){var c=ScanGet();var e=DivWigTop(c);if(c&&!IsIE()&&!c.SelectSource&&c.getAttribute("IsTrial")=="1"){if(!f||f<10){f=(f)?f+1:1;window.setTimeout(function(){ScanImage(d,a,b,f)},1000);return}else{alert("giving up");return}}if(!c){}else{}if(c&&!ScanInstalled(c)){c.style.height="";c.style.width="";if(e){RemoveOpacity(e)}}else{c.baseId=a;c.docId=b;c.IfShowUI=false;c.IfDisableSourceAfterAcquire=true;if(ScanSelect(c)){if(IsIE()){AddListener(c,"PostTransfer",ScanAcquired)}c.AcquireImage()}else{if(e){window.setTimeout(function(){e.style.display="none"},1)}}}}function ScanAcquired(){var a=StatusMsg("Uploading...",3);a.style.display="";window.setTimeout(function(){ScanAcquired2(a)},1)}function ScanAcquired2(a){var b=ScanGet();var c=b.parentNode.getAttribute("sig");b.CloseSource();window.setTimeout(function(){ScanUpload(c,a)},1);return(false)}function ScanUpload(n,j){var l=ScanGet();var b=l.parentNode;var g=b.getAttribute("port");var m=b.getAttribute("host");var o=b.getAttribute("path");var h=b.getAttribute("ssl");var f=b.getAttribute("fmt");var a=b.getAttribute("mime");var d=b.getAttribute("ext");var i="req=scan&sig="+n+"&docid="+l.docId+"&mime="+a;var c=l.CurrentImageIndexInBuffer;l.HTTPPort=g;l.IfSSL=(h=="1")?true:false;l.SetCookie(document.cookie);l.HTTPUploadThroughPostEx(m,c,o+"?"+i,"scan."+d,f);if(j){j.style.display="none"}if(l.ErrorCode!=0){if(l.ErrorString&&l.ErrorString.indexOf("HTTP process error")==0){var e=l.HTTPPostResponseString;if(e&&e.indexOf("!err!")==0){alert(e.substr(5))}else{if(e&&e.indexOf("id=")==0){alert(l.ErrorString+" - "+e)}}}else{alert(l.ErrorString)}}else{DocUploaded(n,l.baseId,l.docId,"i")}var k=DivWigTop(l);if(k){window.setTimeout(function(){k.style.display="none"},1)}return(false)}function OrderItems(c,b){b=GetElement(b);if(false){b.value="";$("#"+$("#"+c).sortable("toArray").join(",#")).each(function(){b.value+=";"+$(this).attr("key")});if(b.value&&b.value.length>0){b.value=b.value.substr(1)}}else{var a=new Array();$("#"+$("#"+c).sortable("toArray").join(",#")).each(function(){a.push($(this).attr("key"))});b.value=a.join(";")}}function SetFoundVal(b,c,a){b=GetElement(b);if(b){SetValue(b,c,true);b.found=true;if(a&1){ReplaceCssClass(b,"","lock");if(ElementType(b)=="text"){b.disabled=true}else{b.readOnly=true}}}}function FavSave(b){var a=b.getAttribute("fc");JsonReq("fav","&cap="+a+"&qs="+encodeURIComponent(window.document.location),function(c){FavRsp(c,b.id)},0)}function FavRsp(a,b){if(!a){}else{if(a.__type=="error"){alert(a.message)}else{if(a.src){GetElement(b).src=a.src}}}}function ProperName(a){var h=new Array("I","II","III","IV","V","VI","VII","ali","d","da","de","del","den","der","dos","du","el","l","la","le","O","van","von");var f=new Array();var e=new RegExp("[-' ]","g");var d;for(d in h){f[h[d].toLowerCase()]=h[d]}a=(""+a).trim().toLowerCase();var g=a.match(e);var c=a.split(e);var b;a="";for(d in c){b=c[d].replace(/^(mac|mc)([^ ])([^ ])/,function(l,k,j,i){return k.toLowerCase()+j.toUpperCase()+i});a+=((f[b])?f[b]:b.substr(0,1).toUpperCase()+b.substr(1));if(d<c.length-1){a+=g[d]}}return a.trim().replace(/\s\s+/g," ")};
