function expandDropDownList(n){if(navigator.userAgent.indexOf("MSIE")>-1&&parseFloat(navigator.appVersion.split("MSIE")[1])>=7&&n!=null&&n.tagName=="SELECT"){var t=n.offsetWidth,i=n.style.zIndex;t>0&&(n.setAttribute("_position",n.style.position),n.style.position="absolute",n.style.width="",n.offsetWidth<=t?(n.style.width=t+"px",n.style.position=n.attributes._position.value.toString(),n.setAttribute("_position","")):(n.setAttribute("_width",t+"px"),n.style.zIndex=1e5,n.setAttribute("_zindex",i)))}return!0}function collapseDropDownList(n){return navigator.userAgent.indexOf("MSIE")>-1&&parseFloat(navigator.appVersion.split("MSIE")[1])>=7&&n!=null&&n.tagName=="SELECT"&&n.attributes._width!=null&&(n.style.width=n.attributes._width.value.toString(),n.style.zIndex=n.attributes._zindex.value.toString(),n.style.position=n.attributes._position.value.toString(),n.setAttribute("_width",""),n.setAttribute("_zindex",""),n.setAttribute("_position","")),!0}function resetValidationState(){window.Page_BlockSubmit=!1}function shiftHighlight(n,t){if(n==9||n==13)return!0;for(keyVal=String.fromCharCode(n),matchString=matchString+keyVal,elementCnt=t.length-1,i=elementCnt;i>0;i--)selectText=t.options[i].text.toLowerCase(),selectText.substr(0,matchString.length)==matchString.toLowerCase()&&(t.options[i].selected=!0);return clearTimeout(timerid),timerid=setTimeout('matchString = ""',mseconds),!1}function FormFocusFirst(n,t){if(n){var r=null;if(t!=null&&t!="")r=n.elements[t];else for(i=0;i<n.elements.length;i++)if(r=n.elements[i],!r.isDisabled&&(r.type=="text"||r.type=="textarea"||r.type=="select-one"||r.type=="checkbox"||r.type=="select-multiple"||r.type=="radio"))break;r==null||r.type=="hidden"||r.isDisabled||r.style.display=="none"||r.focus()}}function TabStrip_Next(n){n.selectedIndex<n.numTabs&&n.selectedIndex++}function TabStrip_Previous(n){n.selectedIndex>0&&n.selectedIndex--}function expandCollapseDiv(n,t,i,r,u,f){var e,o,s,h;document.all?(e=document.all[n],o=document.all[t],s=document.all.MultiChildAttributes):document.getElementById&&(e=document.getElementById(n),o=document.getElementById(t),s=document.getElementById("MultiChildAttributes"));e!=null&&o!=null&&($(e).parent("td").length>0&&$(e).parent("td").parent("tr").length>0&&(h=$(e).parent("td").parent("tr"),h.css("display")=="none"?h.css("display",""):h.css("display","none")),e.style.display=="none"?(e.style.display="inline",o.src=r,f!=null&&(o.alt=f)):(e.style.display="none",o.src=i,u!=null&&(o.alt=u)),s!=null&&(szAttribute="["+n+"]",szAttributes=s.value,e.style.display=="inline"?szAttributes.indexOf(szAttribute)<0&&(szAttributes+=szAttribute):szAttributes.indexOf(szAttribute)>=0&&(szAttributes=szAttributes.replace(szAttribute,"")),s.value=szAttributes))}function KeyPressMasked(n){typeof window.event!="undefined"&&n!=""&&(szChar=String.fromCharCode(window.event.keyCode),n=n.toLowerCase(),n=="currency"?(szChar<"0"||szChar>"9")&&"$,.-".indexOf(szChar)<0&&(window.event.keyCode=0):n=="date"?(szChar<"0"||szChar>"9")&&szChar!="/"&&(window.event.keyCode=0):n=="phone"?(szChar<"0"||szChar>"9")&&"()-/".indexOf(szChar)<0&&(window.event.keyCode=0):n=="integer"?(szChar<"0"||szChar>"9")&&szChar!="-"&&(window.event.keyCode=0):n=="float"?(szChar<"0"||szChar>"9")&&".-".indexOf(szChar)<0&&(window.event.keyCode=0):n=="alpha"&&(szChar<"a"||szChar>"z")&&(szChar<"A"||szChar>"Z")&&(window.event.keyCode=0))}function ListGridRowClicked(){szHref=event.srcRow.children[0].children[0].href;szHref=szHref.substr(szHref.indexOf("'")+1);szHref=szHref.substr(0,szHref.indexOf("'"));__doPostBack(szHref,"")}function ConfirmDelete(){return confirm("Are you sure you want to delete?")?!0:(typeof event!="undefined"&&event&&(event.returnValue=!1),!1)}function Confirm(n){return confirm(n)?!0:(typeof window.event!="undefined"&&event&&(event.returnValue=!1),!1)}function DeleteChildRow(n,t){ConfirmDelete()&&document.forms[0].MultiChildAttributes!=null&&(document.forms[0].MultiChildAttributes.value+="DCKey["+n+"]DCRKey["+t+"]",document.forms[0].submit())}function GetParentWindow(){var n=opener;return n==null&&(n=parent.aDialogs<2?parent:$("#iframe"+(parent.aDialogs.length-1),parent.document)[0].contentWindow),n}function ParentWindowRefresh(n){var t=GetParentWindow();if(t){if(window.document.URL.toLowerCase().indexOf("reloadparent=")>=0){t.location.reload(!0);return}if(window.document.URL.toLowerCase().indexOf("restart=")>=0){t.location.href="startpage.aspx";return}if(window.document.URL.toLowerCase().indexOf("redirect=")>=0){t.location.href=window.document.URL.substring(window.document.URL.indexOf("Redirect=")+9);return}if(window.document.URL.toLowerCase().indexOf("noreload=")>=0)return;try{if(t.__doPostBack){window.document.URL.indexOf("UpdateAll=")>=0?t.__doPostBack("ZZZZZZZZ",""):t.__doPostBack("XXXXXXXX","");return}}catch(i){}if(t.document.forms[0]){t.document.forms[0].submit();return}if(n!=""){t.location.assign(n);return}window.document.URL.indexOf("NoReload")<0&&t.location.reload(!1)}}function ImageSrcChange(n,t){var i=null,r;i=t!=null?t.target:window.event.srcElement;r=null;i.childNodes[0]!=null&&i[0].tagName=="IMG"?r=i[0]:i.parentNode!=null&&i.parentNode.childNodes[0]!=null&&i.parentNode.childNodes[0].tagName=="IMG"&&(r=i.parentNode.childNodes[0]);r!=null&&(r.src=n)}function TextLimit(n,t){n.value.length>t&&(n.value=n.value.substring(0,t),alert("your input has been truncated!"))}function checkField(n,t){if(InputMaskDelimiters="/",bDelimiter=!1,n.value!=""){for(var i=0;i<n.value.length;i++)if(cChar=n.value.charAt(i),InputMaskDelimiters.indexOf(cChar)>-1){bDelimiter=!0;break}bDelimiter||(n.value=reformatInputMask(n.value,t,InputMaskDelimiters))}return!0}function reformat(n){for(var i,r=0,u="",f=n.length,t=1;t<reformat.arguments.length;t++)r<=f&&(i=reformat.arguments[t],t%2==1?u+=i:(u+=n.substring(r,r+i),r+=i));return u}function stripCharsInBag(n,t){for(var u="",r,i=0;i<n.length;i++)r=n.charAt(i),t.indexOf(r)==-1&&(u+=r);return u}function reformatInputMask(cValue,cInputMask,InputMaskDelimiters){for(creformatFunction="reformat (cValue, ",nChar=0,i=0;i<cInputMask.length;i++)InputMaskDelimiters.indexOf(cInputMask.charAt(i))==-1?(nChar=nChar+1,i==0?creformatFunction=creformatFunction+"'', ":nConcatMask&&(creformatFunction=creformatFunction+"', "),nConcatMask=!1):(creformatFunction=i==0?creformatFunction+"'"+cInputMask.charAt(i):nChar==0?nConcatMask?creformatFunction+cInputMask.charAt(i):creformatFunction+"'"+cInputMask.charAt(i):nConcatMask?creformatFunction+cInputMask.charAt(i):creformatFunction+" "+nChar+", '"+cInputMask.charAt(i),nConcatMask=!0,nChar=0);return nChar>0&&(creformatFunction=creformatFunction+" "+nChar+", "),creformatFunction=creformatFunction.substring(0,creformatFunction.length-2),creformatFunction=creformatFunction+")",eval(creformatFunction)}function CheckCreditDebit(){if(oSrcElement=event.srcElement,iIndex=oSrcElement.name.indexOf("JDG"),iIndex=oSrcElement.name.indexOf("_",iIndex+1),iIndex=oSrcElement.name.indexOf("_",iIndex+1),oRowID=oSrcElement.name.substr(iIndex+1,1),oSrcElement.name.indexOf("JournalDataGrid")>=0&&oSrcElement.type=="text"&&(oSrcElement.name.indexOf("Debit")>=0||oSrcElement.name.indexOf("Credit")>=0)&&oSrcElement.value>0)for(oSrcElement.name.indexOf("Debit")>=0&&(Opposite="Credit"),oSrcElement.name.indexOf("Credit")>=0&&(Opposite="Debit"),i=0;i<document.forms[0].elements.length;i++)if(oElement=document.forms[0].elements[i],oElement.type=="text"&&oElement.name.indexOf("JournalDataGrid")>=0&&oElement.name.indexOf("JDG_"+Opposite+"_"+oRowID)>=0){document.forms[0].elements[i].disabled=!0;Opposite=="Credit"&&document.forms[0].elements[i+1].focus();Opposite=="Debit"&&document.forms[0].elements[i+2].focus();break}}function SetCookie(n,t){document.cookie=n+"="+escape(t)+"; expires=Fri, 31 Dec 2099 23:59:59 GMT;";var i=GetCookie(n)}function GetCookie(n){for(var r=null,u=document.cookie.split("; "),i,t=0;t<u.length;t++)i=u[t].split("="),n==i[0]&&(r=unescape(i[1]));return r}function DelCookie(n){date=new Date;document.cookie=n+"=; expires="+date.toGMTString()}function AutoSubmit(){$(".btn-autosubmit").is(":disabled")===!1&&$(".btn-autosubmit").length>0&&$(".btn-autosubmit").eq(0).click()}function OpenNewWindow_WithClose(n){close();openDialog(n,50,50)}function OpenNewWindow(n,t,i,r){n!=null&&n.toLowerCase().indexOf("md_dynamic_designer.aspx")>-1?openDialog(n,screen.availWidth-100,screen.availHeight-100):t||n&&n.indexOf("md_dynamic_formdesign.aspx")>-1?openDialog(n,500,500):openJQueryDialog(n,null,i,r)}function OpenNewWindowAlert(n,t){t!=""&&AlertDialog(t);openDialog(n,50,50)}function openJQueryDialog(n,t,i,r){var u,e,f,o,s;if(self!=top){top.openJQueryDialog(n,self,i,r);return}t==null&&(t=self);u=aDialogs.length+1;aDialogs.push(u);e=document.createElement("div");e.setAttribute("id","div"+u);e.setAttribute("title"," ");e.setAttribute("style","overflow: hidden;");document.body.appendChild(e);$("#div"+u).dialog({autoOpen:!0,resize:"auto",modal:!0,closeOnEscape:!0,open:function(){r&&($(this).closest(".ui-dialog").find(".ui-dialog-titlebar-close").hide(),$(this).closest(".ui-dialog").find(".ui-dialog-titlebar-min").hide())},close:function(){var n=aDialogs.pop();dialIframe=$("#iframe"+n,document)[0];dialIframe!=null&&(dialIframe.src="");dialDiv=$("#div"+n,document)[0];dialDiv!=null&&dialDiv.parentNode.removeChild(dialDiv);i&&top.location.reload()},resize:function(){dialIframe=$("#iframe"+u,document)[0];dialIframe!=null&&(dialIframe.style.height=this.style.height,dialIframe.style.width=this.style.width)},dragStart:function(){$("#iframe"+u,this).each(function(){$('<div class="ui-draggable-iframeFix" style="background: #FFF;"><\/div>').css({width:"100%",height:"100%",position:"absolute",opacity:"0",zIndex:1e3,overflowX:"hidden"}).css($(this).position()).appendTo($(this).offsetParent())})},dragStop:function(){$("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})},resizeStart:function(){$("#iframe"+u,this).each(function(){$('<div class="ui-draggable-iframeFix" style="background: #FFF;"><\/div>').css({width:"100%",height:"100%",position:"absolute",opacity:"0",zIndex:1e3,overflowX:"hidden"}).css($(this).position()).appendTo($(this).offsetParent())})},resizeStop:function(){$("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}}).parent().draggable("option",{containment:!1});f=document.createElement("iframe");f.setAttribute("id","iframe"+u);f.setAttribute("name","iframe"+u);f.setAttribute("scrolling","auto");f.setAttribute("frameBorder","0");n!=null&&f.setAttribute("src",n);f.setAttribute("style","display:none;padding:0;margin:0;");e.appendChild(f);o=-1;s=-1;$("#iframe"+u).on("load",function(){var f=30,h=270,n,c,i,r;try{n=this.contentWindow.document||this.contentDocument||this.document}catch(l){}if(n){try{c=n.body.getAttribute("onload").toString();c.indexOf("close()")>-1&&CloseWindow(e)}catch(a){}if(!n.loaded){n.loaded=!0;this.style.display="inline";typeof this.loaded!="undefined"&&this.loaded&&(this.style.height=h+"px",this.style.width=h+"px");i=n.documentElement.scrollWidth;r=n.documentElement.scrollHeight;i<n.body.scrollWidth&&(i=n.body.scrollWidth,r=n.body.scrollHeight);i>o&&window.innerWidth>h+f*2&&(i=i+f,o=i);r>s&&(r=r+f,s=r);typeof this.loaded!="undefined"&&this.loaded&&navigator.userAgent.indexOf("Opera")>-1&&(i=i-f);this.loaded=!0;this.style.height=r+"px";this.style.width=i+"px";try{this.contentWindow.opener=t}catch(l){}$("#div"+u).dialog("option","width",i);$("#div"+u).dialog("option","position","center");$("#div"+u).dialog("option","title",n.title)}}});$("#iframe"+u).on("unload",function(){try{this.contentWindow.opener=null}catch(n){}this.setAttribute("src","");this.style.height="270px";this.style.width="270px"})}function CloseWindow(n){if(self!=parent)top.CloseWindow(self);else if(n){var t=aDialogs[aDialogs.length-1];$("#div"+t).dialog("close")}else self==top&&close()}function openDialog(n,t,i){var r,u,f;DialogWindow=null;DialogWindow={};(!DialogWindow.win||DialogWindow.win&&DialogWindow.win.closed)&&(DialogWindow.url=n,DialogWindow.width=t,DialogWindow.height=i,dDate=new Date,DialogWindow.name=dDate.getMinutes().toString()+dDate.getSeconds(),DialogWindow.left=(screen.width-t)/2,DialogWindow.top=(screen.height-i)/2,r="left="+DialogWindow.left+",top="+DialogWindow.top+",resizable=yes,status=yes,scrollbars=yes,width="+DialogWindow.width+",height="+DialogWindow.height,DialogWindow.win=window.open(DialogWindow.url,DialogWindow.name,r),u=DialogWindow.left-DialogWindow.win.screenLeft,f=DialogWindow.top-DialogWindow.win.screenTop,SetCookie("WindowTopLeftOffset",f+","+u));DialogWindow.win.focus()}function openDialogAbsolute(n,t,i){if(DialogWindow=null,DialogWindow={},!DialogWindow.win||DialogWindow.win&&DialogWindow.win.closed){DialogWindow.url=n;DialogWindow.width=t;DialogWindow.height=i;DialogWindow.name=(new Date).getSeconds().toString();DialogWindow.left=(screen.width-t)/2;DialogWindow.top=(screen.height-i)/2;var r="left="+DialogWindow.left+",top="+DialogWindow.top+",resizable=yes,status=yes,scrollbars=yes,width="+DialogWindow.width+",height="+DialogWindow.height;DialogWindow.win=window.open(DialogWindow.url,DialogWindow.name,r)}DialogWindow.win.focus()}function CheckWindowCoorinatesTimer(){try{DialogWindow&&DialogWindow.win&&DialogWindow.win.screenTop&&(nTop=DialogWindow.win.screenTop,nLeft=DialogWindow.win.screenLeft,(nTop>screen.height||nLeft>screen.width)&&(nTop>screen.height&&(nTop=100),nLeft>screen.width&&(nLeft=100)))}catch(n){}}function WindowBlockEvents(){window.onfocus=WindowCheckModal}function WindowCheckModal(){DialogWindow!=null&&DialogWindow.win!=null&&typeof DialogWindow.win.closed!="unknown"&&(DialogWindow.win.closed||DialogWindow.win.focus())}function DialogBlockParent(){if(opener)try{opener.WindowBlockEvents()}catch(n){}}function SetWindowSize(n){window.top==window.self&&(n&&ResizeByCookie()||(w=document.documentElement.scrollWidth,h=document.documentElement.scrollHeight,document.body.scrollWidth>w&&(w=document.body.scrollWidth,h=document.body.scrollHeight),w+=40,h+=60,w>screen.width-50&&(w=screen.width-50),h>screen.height-50&&(h=screen.height-50),window.resizeTo(w,h),window.moveTo((screen.availWidth-w)/2,(screen.availHeight-h)/2),window.scrollTo(0,0)))}function ResizeByCookie(){var c=!1,f=GetCookieName(document.location.search),e,o,n,t,i,a,v,s,h,y,p;if(f==""&&(f=GetFileName(document.location.pathname)),f!=""&&(e=GetCookie(f),e!=null)){var r=0,u=0,l=GetCookie("WindowTopLeftOffset");l!=null&&(o=l.split(","),r=isNaN(parseInt(o[0]))?1:r,u=isNaN(parseInt(o[1]))?1:u,r>0&&(r=-30),u>0&&(u=-4));n=e.split(",");t=parseInt(n[0])+r;t=isNaN(t)?0:t;i=parseInt(n[1])+u;i=isNaN(i)?0:i;(t<0||t>window.screen.availHeight)&&(t=100);i<0&&(i=100);a=parseInt(n[2])-r*2;v=parseInt(n[3])-u*2;window.resizeTo(v,a);window.moveTo(i,t);navigator.appName=="Netscape"?(s=parseInt(n[3])-parseInt(window.outerWidth),h=parseInt(n[2])-parseInt(window.outerHeight)):(s=parseInt(n[3])-parseInt(document.body.offsetWidth),h=parseInt(n[2])-parseInt(document.body.offsetHeight));window.resizeBy(s,h);var y=window.screenLeft==undefined?window.screenX:window.screenLeft,p=window.screenTop==undefined?window.screenY:window.screenTop,w=i-parseInt(y),b=t-parseInt(p);window.moveBy(w,b);window.scrollTo(0,0);c=!0}return c}function GetCookieName(n){var t="";return n.indexOf("WizardKey=")>=0?t=n.substr(n.indexOf("WizardKey=")+10):n.indexOf("FormKey")>=0&&(t=n.substr(n.indexOf("FormKey=")+8)),t!=""&&t.indexOf("&")>=0&&(t=t.substring(0,t.indexOf("&"))),t}function GetFileName(n){var t="";for(n.indexOf(".")>=0&&(t=n.substr(0,n.indexOf(".")));t.indexOf("/")>=0;)t=t.substr(t.indexOf("/")+1);return t!=""&&(t="FORM_"+t),t}function BeforeUnloadWindow(){var n=GetCookieName(document.location.search),t;n==""&&(n=GetFileName(document.location.pathname));n!=""&&(t=navigator.appName=="Netscape"?window.screenY+","+window.screenX+","+window.outerHeight+","+window.outerWidth:window.screenTop+","+window.screenLeft+","+document.body.offsetHeight+","+document.body.offsetWidth,SetCookie(n,t))}function Report_Preview(n){openDialogAbsolute("ReportPreview.aspx?ReportKey="+n,800,600)}function Report_Run(n){Report_Run(n,null)}function Report_Run(n,t){Report_Run(n,t,null)}function Report_Run(n,t,i){Report_Run(n,t,i,null)}function Report_Run(n,t,i,r){var u="",f=document.getElementById("DDL"+n);f!=null&&(u=f.options[f.selectedIndex].value,r==null&&(r="0"),i==null?t=="True"?openDialogAbsolute("ReportStart.aspx?ReportKey="+n+"&OutputFormat="+u+"&bReportCentral=true&ReportSubscription="+r,200,200):t=="False"?openDialogAbsolute("ReportStart.aspx?ReportKey="+n+"&OutputFormat="+u+"&bReportCentral=true&ReportSubscription="+r,800,600):openDialogAbsolute("ReportStart.aspx?ReportKey="+n+"&OutputFormat="+u+"&bReportCentral=true&ReportSubscription="+r,200,200):openDialogAbsolute("ReportStart.aspx?ReportKey="+n+i+"&OutputFormat="+u+"&bReportCentral=true&ReportSubscription="+r,200,200))}function ConfirmDialog(szMessage,szButtonID,postbackOnCancel){window.confirm(szMessage)?(document.forms[0].action&&(document.forms[0].action+="&Confirm=ByPass"),(szButtonID==null||szButtonID=="")&&(szButtonID="ButtonSave"),oButton=eval("document.getElementById('"+szButtonID+"')"),oButton||(oButton=eval("document.forms[0]."+szButtonID)),oButton&&oButton.click()):postbackOnCancel&&__doPostBack("ConfirmDialogCancelEvent","")}function ClearConfirmByPass(){document.forms[0].action&&document.forms[0].action.indexOf("&Confirm=ByPass")>0&&(document.forms[0].action=document.forms[0].action.replace("&Confirm=ByPass",""))}function AlertDialog(n){window.alert(n)}function DropDownAddOption(n,t,i){n.options[n.length]=new Option(i==null?t:i,t)}function postBackDropDownListEdit(n){__doPostBack?__doPostBack(n,""):document.forms[0].submit()}function postBackDropDownListAdd(n,t){oDropDownList=document.getElementById(n);DropDownAddOption(oDropDownList,t,"Loading new item...");oDropDownList.options.selectedIndex=oDropDownList.options.length-1;__doPostBack?__doPostBack(n,""):document.forms[0].submit()}function ReplaceUrlHeaders(n,t){var i=new String;if(i=n,differenceUrl2P==".."&&(differenceUrl2P=""),differenceUrl4P=="../.."&&(differenceUrl4P=""),t!=null&&t.checked==!0){if(differenceUrlAnchor!="")while(i.indexOf(differenceUrlAnchor+"#",0)!=-1)i=i.replace(differenceUrlAnchor+"#","#");return i}if(differenceUrlAnchor!="")while(i.indexOf(differenceUrlAnchor,0)!=-1)i=i.replace(differenceUrlAnchor,"");if(differenceUrl1P!="")while(i.indexOf(differenceUrl1P,0)!=-1)i=i.replace(differenceUrl1P,"");if(differenceUrl2P!="")while(i.indexOf(differenceUrl2P,0)!=-1)i=i.replace(differenceUrl2P,"..");if(differenceUrl4P!="")while(i.indexOf(differenceUrl4P,0)!=-1)i=i.replace(differenceUrl4P,"../..");if(differenceUrl!="")while(i.indexOf(differenceUrl,0)!=-1)i=i.replace(differenceUrl,"");return i}function OnLoadGrabUrlDiff(n){var i=0,t=new String;n.document.body.innerHTML="<A href='/TxTTT.aspx'>Link<\/A>xxx0<A href='UxUUU.aspx'>Link<\/A>yyy0<A href='../VxVVV.aspx'>Link<\/A>zzz0<a href='../../WxWWW.aspx'>Link<\/a>www0<a href='#QxQQQ'>Link<\/a>";t=n.document.body.innerHTML;i=t.indexOf("/TxTTT.aspx");i>0&&(differenceUrl=t.substr(9,i-9));b=t.indexOf("xxx0");t=t.substr(b+4);i=t.indexOf("UxUUU.aspx");i>0&&(differenceUrl1P=t.substr(9,i-9));b=t.indexOf("yyy0");t=t.substr(b+4);i=t.indexOf("/VxVVV.aspx");i>0&&(differenceUrl2P=t.substr(9,i-9));b=t.indexOf("zzz0");t=t.substr(b+4);i=t.indexOf("/WxWWW.aspx");i>0&&(differenceUrl4P=t.substr(9,i-9));b=t.indexOf("www0");t=t.substr(b+4);i=t.indexOf("#QxQQQ");i>0&&(differenceUrlAnchor=t.substr(9,i-9))}function goback(){history.go(-1)}function open_window(n,t,i,r,u){settings="";settings+="toolbar=0, directories=0, menubar=0,";settings+=u!=null?" scrollbars=yes, resizable=1,":" scrollbars=0, resizable=0,";settings+="status=0, width="+i+", height="+r;close_window();var f=window.open(n,t,settings);f.focus()}function close_window(){new_win&&!new_win.closed&&new_win.close()}function arg_length(n,t,i){return t!=i?(document.write("function "+n+"called with "+t+" arguments, but expected "+i+"!"),0):1}function not_empty(n){return n!=null&&n!=""?1:n==null||n==""?0:void 0}function space(n,t){return not_empty(n)&&not_empty(t)?1:!not_empty(n)||!not_empty(t)?0:void 0}function StartProcess(n,t){var i;i="toolbar=no,directories=no,menubar=no,scrollbars=no,resizable=no,height=100,width=200";window.open("ProgressBar.aspx?id="+n+"&s="+t,"Progress",i)}function formatInput(n,t){var i,h,o,e,s,r,f,u;if(n!=null&&n.tagName=="INPUT"&&n.type=="text"&&t!=null){i=n.value;h=t.toLowerCase();switch(h){case"integer":if(f=i.length,i=i.replace(/[^0-9]/g,""),n.value!=i&&(n.value=i),i.length<f&&!confirm("The entered number contains invalid characters and they have been removed.\nPlease review the number and click OK to continue or Cancel to modify.")){try{n.focus()}catch(c){}return!1}break;case"float":if(f=i.length,i=i.replace(/[^0-9\.\,]/g,""),o=i.length,i=i.replace(/[^0-9\.]/g,""),i!=""){for(i.indexOf(".")<0&&(i+=".00"),r=i.split("."),i=r[0]+".",u=1;u<r.length;u++)i+=r[u];r=i.split("");r[0]&&r[0]=="."?r[0]="0.":r[r.length-1]&&r[r.length-1]=="."&&(r[r.length-1]=".00");i=r.join("")}if(n.value!=i&&(n.value=i),o<f&&!confirm("The entered number contains invalid characters and they have been removed.\nPlease review the number and click OK to continue or Cancel to modify.")){try{n.focus()}catch(c){}return!1}break;case"currency":if(f=i.length,i=i.replace(/[^0-9\.\$\,]/g,""),o=i.length,i=i.replace(/[^0-9\.]/g,""),i!=""){for(r=i.split("."),i=r[0]+".",u=1;u<r.length;u++)i+=r[u];i=""+Math.round(parseFloat(i)*100)/100;r=i.split("");r[0]&&r[0]=="."?r[0]="0.":r[r.length-1]&&r[r.length-1]=="."&&(r[r.length-1]=".00");i=r.join("");r=i.split(".");r[1]?r[1].length==0?r[1]="00":r[1].length==1&&(r[1]+="0"):r[1]="00";i=r.join(".");i="$"+i}if(n.value!=i&&(n.value=i),o<f&&!confirm("The entered currency value contains invalid characters and they have been removed.\nPlease review the value and click OK to continue or Cancel to modify.")){try{n.focus()}catch(c){}return!1}break;case"time":if(i=i.toLowerCase().replace(/[^0-9\:\a]/g,""),e="",i.indexOf("am")>0?e="am":i.indexOf("pm")>0&&(e="pm"),i=i.replace(/[^0-9\:]/g,""),r=i.split(":"),r.length!=2){if(i!=""){alert("The entered time is invalid and will be removed!\nPlease re-enter a valid time.");n.value="";try{n.focus()}catch(c){}return!1}}else{for(u=0;u<r.length;u++)r[u].length<2?(r[u]="00"+r[u],r[u]=r[u].substring(r[u].length-2)):r[u].length>2&&(r[u]=r[u].substring(0,2));e!=""?parseInt(r[0])>12&&(r[0]="12"):e==""&&parseInt(r[0])>23&&(r[0]="00");parseInt(r[1])>59&&(r[1]="00");i=r.join(":");e!=""&&(i+=" "+e);n.value!=i&&(n.value=i)}break;case"date":if(i=i.replace(/[^0-9\/]/g,""),i.length>10&&(i=i.substring(0,10)),r=i.split("/"),r.length!=3){if(i!=""){alert("The entered date is invalid and will be removed!\nPlease re-enter a valid date.");n.value="";try{n.focus()}catch(c){}return!1}}else{for(u=0;u<r.length;u++)r[u].length<2?(r[u]="00"+r[u],r[u]=r[u].substring(r[u].length-2)):u<2&&r[u].length>2?r[u]=r[u].substring(0,2):u==2&&r[u].length>4&&(r[u]=r[u].substring(0,4));parseInt(r[0])>12&&(r[0]="12");parseInt(r[1])>31&&(r[1]="31");i=r.join("/");n.value!=i&&(n.value=i)}break;case"phone":if(i=i.replace(/[^0-9]/g,""),f=i.length,i.length==10||i.length==11&&i.substring(0,1)=="1"){for(s=!1,i.substring(0,1)=="1"&&(s=!0,i=i.substring(1)),r=i.split(""),f=r.length,u=0;u<f;u++)switch(u){case 0:r[u]="("+r[u];break;case 2:r[u+1]!=null&&(r[u]+=") ");break;case 5:r[u+1]!=null&&(r[u]+="-")}i=r.join("");s&&(i="1 "+i)}if(i.length==7&&(i=i.substring(0,3)+"-"+i.substring(3)),f!=0&&(f<7||f>11&&i.substring(0,1)=="1"||f>10&&i.substring(0,1)!="1")){if(!confirm("The entered phone number does not seem valid.\nPlease review the number and click OK to continue or Cancel to modify.")){try{n.focus()}catch(c){}return!1}}else n.value!=i&&(n.value=i);break;case"alphanumeric":f=i.length;i=i.replace(/[^\w]/g,"");n.value!=i&&(n.value=i);f>i.length&&alert('Invalid or special characters have been removed from your entry.\nOnly alpha-numeric characters and underscores "_" (no spaces) are allowed.');break;case"initialuppercase":for(r=i.split(""),f=r.length,u=0;u<f;u++)u==0?r[u]=r[u].toUpperCase():r[u]==" "&&r[u+1]!=null&&(r[u+1]=r[u+1].toUpperCase());i=r.join("");n.value!=i&&(n.value=i);break;case"fulluppercase":i=i.toUpperCase();n.value!=i&&(n.value=i);break;case"fulllowercase":i=i.toLowerCase();n.value!=i&&(n.value=i)}}}function fadeOpacity(n,t,r,u){u==null&&(u=200);var e=Math.round(u/100),f=0;if(t>r)for(i=t;i>=r;i--)setTimeout("changeOpac("+i+",'"+n+"')",f*e),f++;else if(t<r)for(i=t;i<=r;i++)setTimeout("changeOpac("+i+",'"+n+"')",f*e),f++}function changeOpac(n,t){var i=document.getElementById(t).style;i!=null&&(n!=0&&i.display!="block"&&(i.display="block"),i.filter="alpha(opacity="+n+")",n==0&&i.display!="none"&&(i.display="none"))}function fadeHeight(n,t,r,u){u==null&&(u=250);var e=Math.round(u/100),f=0;if(t>r)for(i=t;i>=r;i--)setTimeout("changeHeight("+i+",'"+n+"')",f*e),f++;else if(t<r)for(i=t;i<=r;i++)setTimeout("changeHeight("+i+",'"+n+"')",f*e),f++}function changeHeight(n,t){var i=document.getElementById(t).style;i!=null&&(n!=0&&i.display!="block"&&(i.display="block"),i.height=n,n==0&&i.display!="none"&&(i.display="none"))}function fadeWidth(n,t,r,u){u==null&&(u=250);var e=Math.round(u/100),f=0;if(t>r)for(i=t;i>=r;i--)setTimeout("changeWidth("+i+",'"+n+"')",f*e),f++;else if(t<r)for(i=t;i<=r;i++)setTimeout("changeWidth("+i+",'"+n+"')",f*e),f++}function changeWidth(n,t){var i=document.getElementById(t).style;i!=null&&(n!=0&&i.display!="block"&&(i.display="block"),i.width=n,n==0&&i.display!="none"&&(i.display="none"))}function CheckForEnter(n,t){if(t=!t&&window.event?window.event:t,t){var i=0;if(i=t.which?t.which:t.keyCode,i==13&&(oButtonOrImage=document.getElementById(n),oButtonOrImage!=null))return t.keyCode=0,t.cancelBubble=!0,oButtonOrImage.click(),!1}return!0}function RTBCleanupMSWord(n){var o,u,s,f,i,h,e,r,t;if(n!=null&&n!=""&&(o=document.getElementById(n),o!=null)){for(u=o.contentWindow.document,s=u.getElementsByTagName("*"),f=0;f<s.length;f++){if(i=s[f],i.className.toLowerCase().indexOf("mso")>=0&&i.removeAttribute("className","",0),i.style.cssText.toLowerCase().indexOf("mso")>=0){for(h="",e=i.style.cssText.split(";"),r=0;r<e.length;r++)e[r].toLowerCase().indexOf("mso")<0&&(h+=e[r]+";");i.style.cssText=h}i.removeAttribute("lang","",0);i.removeAttribute("stylw","",0)}t=u.body.innerHTML;t=t.replace(/\r/g,"");t=t.replace(/\n/g,"");t=t.replace(/\t/g," ");t=t.replace(/<\\?\??xml[^>]>/gi,"");t=t.replace(/(\&lt\;)?\\?\??|\W?|\w?xml[^(\&gt\;)](\&gt\;)?/gi,"");t=t.replace(/<\/?\w+:[^>]*>/gi,"");t=t.replace(/<p>&nbsp;<\/p>/gi,"<br/><br/>");t=t.replace(/[ ]+/g," ");t=t.replace(/<(\/)?strong>/ig,"<$1b> ");t=t.replace(/<(\/)?em>/ig,"<$1i> ");t=t.replace(/[��]/gi,'"');t=t.replace(/[��]/gi,"'");t=t.replace(/^\s/i,"");t=t.replace(/\s$/i,"");t=t.replace(/<o:[pP]>&nbsp;<\/o:[pP]>/gi,"");t=t.replace(/<font>([^<>]+)<\/font>/gi,"$1");t=t.replace(/<span>([^<>]+)<\/span>/gi,"$1");try{t=t.replace(/<st1:.*?>/gi,"")}catch(c){t=t.replace(/<st1:.*>/gi,"")}u.body.innerHTML=t}}function SessionTimeoutWarningDisplay(n){n=n*6e4;setTimeout("SessionTimeoutConfirm()",n-12e4)}function SessionTimeoutConfirm(){OpenSessionDialog();bTimeout==null&&(bTimeout=!0);setTimeout("if(bTimeout){CloseSessionDialog();AutoAbandonSession();} else{setTimeout('bTimeout=true;SessionTimeoutConfirm();', 1200000);}",115e3)}function ShowSessionDialog(){$("#SessionDialog").dialog({autoOpen:!1,width:600,dialogClass:"confirm",buttons:{Ok:function(){CloseSessionDialog();bTimeout=!1;__doPostBack("XXXXXXXX","")},Cancel:function(){$(this).dialog("close")}}})}function OpenSessionDialog(){$("#SessionDialog").dialog("open")}function CloseSessionDialog(){$("#SessionDialog").dialog("close")}function AutoAbandonSession(){window.location.href="~/WelcomePage.aspx"}function NavigationWarningConfirm(){if(bConfirmNavAway==1)return"You have not saved!"}function DateTextOnFocus(n,t,i,r,u,f){return clearTimeout(timerid),utilitystring!=""&&(document.getElementById(utilitystring).offsetParent.style.zIndex=998,document.getElementById(utilitystring).style.display="none"),utilitystring=r,timerid=setTimeout("CalendarTypeAheadDisplay('"+n+"','"+t+"','"+i+"','"+r+"','"+u+"','"+f+"');",150),clearTimeout(timerid),!0}function DateTextOnKeyUp(n,t,i,r,u,f,e){return clearTimeout(timerid),document.getElementById(n).value.length>=0&&(timerid=setTimeout("CalendarRefresh('"+n+"','"+t+"','"+i+"','"+r+"','"+u+"','"+f+"','"+e+"');",150)),!0}function DateTextOnBlur(n,t,i,r,u,f){clearTimeout(timerid);timerid=setTimeout("CalendarHide('"+n+"','"+t+"','"+i+"','"+r+"','"+u+"','"+f+"');",150);timerid=setTimeout("CalendarHideWithParent('"+n+"','"+t+"','"+i+"','"+r+"','"+u+"','"+f+"');",150)}function CalendarHide(n,t,i,r){document.getElementById(r).style.display!="none"&&(document.getElementById(i).style.zIndex=998);navigator.appName!="Microsoft Internet Explorer"?fadeOpacity(r,100,0,0):fadeOpacity(r,100,0)}function CalendarHideWithParent(n,t,i,r){parent!=null&&parent.document.getElementById(r)!=null&&parent.document.getElementById(r).style.display!="none"&&(document.getElementById(i).style.zIndex=998);navigator.appName!="Microsoft Internet Explorer"?fadeOpacity(r,100,0,0):fadeOpacity(r,100,0)}function CalendarRefresh(n,t,i,r,u,f,e){document.getElementById(r).style!=null&&document.getElementById(u).style.display=="none"&&(document.getElementById(r).style.zIndex=9999);fadeOpacity(u,0,100,0);var o=f+"?typeaheadsuggest=yes&field="+t;(e=="true"||e=="1")&&(o+="&PostbackOpener=Yes");o+="&value="+i;document.getElementById(u).src=o}function CalendarTypeAheadDisplay(n,t,i,r,u,f){document.getElementById(r).style!=null&&document.getElementById(r).style.display=="none"&&(document.getElementById(i).style.zIndex=99999);fadeOpacity(r,0,100,0);var e=u+"?typeaheadsuggest=yes&field="+n;(f=="true"||f=="1")&&(e+="&PostbackOpener=Yes");e+="&value="+t;document.getElementById(r).src=e}function updateQueryStringParameter(n,t,i){var r=new RegExp("([?|&])"+t+"=.*?(&|$)","i"),u=n.indexOf("?")!==-1?"&":"?";return n.match(r)?n.replace(r,"$1"+t+"="+i+"$2"):n+u+t+"="+i}function getQueryStringParameter(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(window.location.search);return t===null?"":decodeURIComponent(t[1].replace(/\+/g," "))}function InitializeFormSubmitBehavior(n){$('input[type="text"],input[type="email"],input[type="number"],input[type="tel"]').on("keydown",function(t){if($(this).attr("onkeydown")!=null&&$(this).attr("onkeydown")!=""&&$(this).attr("onkeydown")!="undefind")return!0;(t.which&&t.which==13||t.keyCode&&t.keyCode==13)&&$("#"+n).click()})}function gup(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i="[\\?&]"+n+"=([^&#]*)",r=new RegExp(i),t=r.exec(window.location.href);return t==null?"":t[1]}function toTheTop(){var t=20,n=400;$(window).on("scroll",function(){$(this).scrollTop()>t?$(".back-to-top").fadeIn(n):$(".back-to-top").fadeOut(n)});$(".back-to-top").on("click",function(t){return t.preventDefault(),$("html, body").animate({scrollTop:0},n),!1})}function appendHashForPostbacks(){document.getElementById("eWebForm").action+=document.location.hash}function setHash(n){location.hash==""||location.hash=="#"?(location.hash=n,appendHashForPostbacks()):location.hash!="#"+n||location.hash!=n?(location.hash="",location.hash=n,appendHashForPostbacks()):location.hash=""}function disableSubmitButtons(){for(var t=document.getElementsByTagName("input"),n=0;n<t.length;n++)t[n].type=="submit"&&(t[n].disabled="disabled")}var timerid=null,matchString="",mseconds=1500,msecondsshort=500,utilitystring="",bConfirmNavAway=1,bTimeout=!0,DialogWindow=null,nOriginalWidth=0,nOriginalHeight=0,aDialogs=[],differenceUrl2P="",differenceUrl1P="",differenceUrl="",differenceUrl4P="",differenceUrlAnchor="",new_win