if(!Array.prototype.indexOf){Array.prototype.indexOf=function(c,b){var d;if(this==null){throw new TypeError('"this" is null or not defined');}var f=Object(this);var a=f.length>>>0;if(a===0){return -1;}var e=+b||0;if(Math.abs(e)===Infinity){e=0;}if(e>=a){return -1;}d=Math.max(e>=0?e:a-Math.abs(e),0);while(d>>0;if(typeof g!=="function"){throw new TypeError(g+" is not a function");}if(arguments.length>1){e=d;}c=new Array(a);f=0;while(f>8-j%1*8)){if(k=e.charCodeAt(j+=0.75),k>255){throw new a("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");}l=l<<8|k;}return d;}),b.atob||(b.atob=function(h){var l=String(h).replace(/[=]+$/,"");if(l.length%4==1){throw new a("'atob' failed: The string to be decoded is not correctly encoded.");}for(var k,e,j=0,g=0,d="";e=l.charAt(g++);~e&&(k=j%4?64*k+e:e,j++%4)?d+=String.fromCharCode(255&k>>(-2*j&6)):0){e=c.indexOf(e); }return d;});}();function RoleAccessGranted_Click(b,c){if(c==null){c=false;}var e=jQuery("#"+b.id).parents("tr:first").find("input[id$='ReadPermission']");var d=b.getAttribute("data-targetControlID");if(d==null){d=b.parentNode.getAttribute("data-targetControlID");}if(d!=null){var a=$get(d);if(a!=null){a.style.display=b.checked?"block":"none";if(!c&&!b.checked){a.Clear();if(e!=null){e.prop("checked",true);}}}}}var PermissionEnum_FullControl=1;var PermissionEnum_Read=2;var PermissionEnum_Add=4;var PermissionEnum_Edit=8;var PermissionEnum_Delete=16;function FullControl_Click(b){if(b.checked){b.OtherCheckBoxesSpan.setAttribute("disabled","disabled");}else{b.OtherCheckBoxesSpan.removeAttribute("disabled");}var a=b.OtherCheckBoxesSpan.getElementsByTagName("input");for(i=0;i=c){return true;}return false;}function CheckScrollUp(a,b){if(a<=b){return true;}return false;}(function(r){var p="$autoscroll",a="$tAutoscroll",o="$autoscrollInterval",n="$edgeAutoscroll",q="$lastEdgeAutoscroll",g={up:90,left:180,right:360,upleft:135,upright:45,downleft:225,downright:315,leftup:135,rightup:45,leftdown:225,rightdown:315,down:270},c={init:function(d){return this.each(function(){if(e(this)){r(this).data(p,b(r.extend(e(this),d)));}else{r(this).data(p,b(r.extend({e:false,fr:false},r.fn.autoscroll.defaults.settings,d)));r(this).hover(function(){var k=e(this);if(k){if(k.scroll){m(this);r(this).stop(true);}k.e=true;}},function(){var k=e(this);if(k&&k.e){if(k.scroll){t(this);}k.e=false;}});t(this);}});},destroy:function(){return this.each(function(){if(e(this)){m(this);r(this).stop(true).data(o,null).data(p,null).data(a,null);}});},delay:function(d){return this.each(function(){var k=e(this);if(k&&k.scroll){r(this).autoscroll("pause");r(this).oneTime(d||r.fn.autoscroll.defaults.delay,p,function(){r(this).autoscroll("resume");});}});},fastforward:function(d){return s(this,"f",d);},rewind:function(d){return s(this,"r",d);},pause:function(){return this.each(function(){var d=e(this);if(d&&d.scroll){d.scroll=false;r(this).stop(true);m(this);}});},resume:function(){return this.each(function(){var d=e(this);if(d){d.scroll=true;t(this);}});},reverse:function(){return this.each(function(){var d=e(this);if(d&&(d.direction+=180)>360){d.direction-=360; }r(this).stop(true);});},toggle:function(){return this.each(function(){var d=e(this);if(d){if(d.scroll){r(this).autoscroll("pause");}else{r(this).autoscroll("resume");}}});},get:function(){return this.each(function(){if(e(this)){return e(this);}});},addpausesource:function(d){if(typeof d=="undefined"){return this;}if(!(d instanceof jQuery)){if((d=r(d)).length==0){return this;}}var k=this.selector;d.each(function(){r(this).hover(function(){r(k).each(function(){var u=e(this);if(u){if(u.scroll){m(this);r(this).stop(true);}u.e=true;}});},function(){r(k).each(function(){var u=e(this);if(u&&u.e){if(u.scroll){t(this);}u.e=false;}});});});return this;}},t=function(d){r(d).data(o,setInterval(function(){var k,u=e(d);if(u){if(typeof u.onEvaluate=="function"){u.onEvaluate.apply(d);}if(!h(d)){if(u.scroll&&!u.e&&!u.fr){if((k=r(d).data(a))&&!i(k,u)){r(d).stop(true).animate(j(u.step,u.direction,d),1000,"linear");}else{r(d).animate(j(u.step,u.direction),1000,"linear");}}}r(d).data(a,r.extend(true,{},u));}},50));},m=function(d){clearInterval(r(d).data(o));},e=function(d){return r(d).data(p);},i=function(k,d){return k.step===d.step&&k.direction===d.direction&&k.scroll===d.scroll;},s=function(k,v,d){var u=b(r.extend(r.fn.autoscroll.defaults.ffrw,d));return k.each(function(){var x=e(this);if(x){var y=x.scroll,w=x.direction;x.fr=true;if(v=="r"&&(w+=180)>360){w-=360;}if(x.scroll){m(this);}r(this).stop(true).animate(j(u.step,w),u.speed,"swing",function(){e(this).fr=false;if(x.scroll){t(this);}});}});},b=function(d){if(r.inArray(typeof d.scroll,["undefined","boolean"])<0){r.error("scroll is not a boolean");}if(r.inArray(typeof d.step,["undefined","number"])<0&&isNaN(d.step=Number(d.step))){r.error("step is not a valid number");}if(d.direction){d.direction=f(d.direction);}return d;},l=function(d){return d*Math.PI/180;},f=function(d){if(typeof d==="string"&&isNaN(Number(d))){if(g[d]){d=g[d];}else{if(d.indexOf("rad")==d.length-3&&!isNaN(d=Number(d.substring(0,d.length-3)))){d=d*180/Math.PI;}}}if(isNaN(d=Number(d))){r.error("Invalid direction on jQuery.autoscroll"); }while(d<0){d+=360;}return d;},j=function(d,u){var w=Math.round(d*Math.cos(u=l(u))),k=Math.round(d*Math.sin(u))*-1,v=arguments[2];return(v&&r(v).length>0)?{scrollTop:v.scrollTop+k,scrollLeft:v.scrollLeft+w}:{scrollTop:((k<0)?"-=":"+=")+Math.abs(k),scrollLeft:((w<0)?"-=":"+=")+Math.abs(w)};},h=function(A){var z=e(A);if(z&&typeof z.onEdge=="function"){var d=r(A).data(n)||{x:null,y:null},k=z.step,F=A.scrollLeft,w=l(z.direction),D=Math.round(k*Math.cos(w)),B=F+D,u=A.scrollTop,E=Math.round(k*Math.sin(w))*-1;nt=u+E,_e=r(A).data(q);if(F>B&&F==0){if(!d.x||d.x!="left"){d.x="left";}}else{if(Fnt&&u==0){if(!d.y||d.y!="top"){d.y="top";}}else{if(ub){h._popupBehavior._visible=false;h._popupBehavior.show();}else{h._popupBehavior._visible=false;h._popupBehavior.show();}}if(typeof(Sys)!=="undefined"){Sys.Application.notifyScriptLoaded();}Date.prototype.convertPartialDate=function(g){var c;c=g.split(" ");this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);if(c.length>1){var a=c[1].toUpperCase();if(a.indexOf("PM")>-1||a.indexOf("P.M.")>-1){c[2]="PM";}a=a.replace(/AM|PM|A\.M\.|P\.M\./gi,"");a=a.replace(/\./gi,":");var j=a.split(":");if(j.length>=1){if(c.length>2&&c[2].toUpperCase()=="PM"){this.setHours(j[0]%12+12);}else{this.setHours(j[0]%12);}if(j.length>=2){this.setMinutes(j[1]);if(j.length>=3){this.setSeconds(j[2]);}}}}c[0]=c[0].replace(/-/gi,"/");c[0]=c[0].replace(/\\/gi,"/");c[0]=c[0].replace(/\./gi,"/");c[0]=c[0].replace(/\|/gi,"/");c[0]=c[0].replace(/,/gi,"/");c[0]=c[0].replace(/\+/gi,"/");var i=c[0].split("/");if(i.length==1&&parseInt(i[0],10)<32){this.setDate(i[0]);return;}var e=GetCurrentDateFormat();if(i.length==1){switch(e){case"mdy":case"dmy":if(i[0].length==8){i=new Array(i[0].substring(0,2),i[0].substring(2,4),i[0].substring(4,8)); }else{if(i[0].length==6){i=new Array(i[0].substring(0,2),i[0].substring(2,4),i[0].substring(4,6));}else{i=new Array(i[0].substring(0,2),i[0].substring(2,4));}}break;case"ymd":case"ydm":if(i[0].length==8){i=new Array(i[0].substring(0,4),i[0].substring(4,6),i[0].substring(6,8));}else{if(i[0].length==6){i=new Array(i[0].substring(0,2),i[0].substring(2,4),i[0].substring(4,6));}else{i=new Array(i[0].substring(0,2),i[0].substring(2,4));}}break;}}var b=0;var f=-1;var h=-1;switch(e){case"mdy":if(i.length>=2){b=1;f=0;if(i.length>=3){h=2;}}break;case"dmy":if(i.length>=2){b=0;f=1;if(i.length>=3){h=2;}}break;case"ymd":if(i.length>=3){b=2;f=1;h=0;}else{if(i.length>=2){b=1;f=0;}}break;case"ydm":if(i.length>=3){b=1;f=2;h=0;}else{if(i.length>=2){b=0;f=1;}}break;}if(h>-1){var d=parseInt(i[h],10);if(d<100){if(d>30){d+=1900;}else{d+=2000;}}if(d<1753||d>9999){throw new object();}this.setFullYear(d);}if(f>-1){this.setDate(1);this.setMonth(parseInt(i[f],10)-1);}this.setDate(parseInt(i[b],10));if((h>-1&&d!=this.getFullYear())||(f>-1&&parseInt(i[f],10)-1!=this.getMonth())||parseInt(i[b],10)!=this.getDate()){throw new object();}};function GetCurrentDateFormat(){var d=new Date(1999,9,8);var f=d.localeFormat("d");var e=f.indexOf("99");var b=f.indexOf("10");var a=f.indexOf("8");var g=new Array();g[e]=1999;g[b]=10;g[a]=8;var h="";for(var c=0;c');if(typeof i.DeltaKeys!==undefined){l(i.DeltaKeys);}}function a(m,o){if(m===undefined||m==null){return;}if(o===undefined||o==null){return;}var n=e(m,o);if(n!=null){var p=m.get_selected();if(i.IsSelectedByDefault===true){j(!p,n);}else{j(p,n);}}}function e(m,q){if(m===undefined||m==null){return null;}if(q===undefined||q==null){return null;}var n=q.get_clientDataKeyNames();if(n!=null&&n.length>0){var p="";for(var o=0;o=0&&!m){p.splice(o,1);}else{if(o<0&&m){p.push(q);}}l(p.toString());}function g(){var m=d();if(m!=null){return jQuery(m).val();}return null;}function l(n){var m=d();if(m!=null){jQuery(m).val(n);}}function h(){return i.GridClientId+"_HiddenDeltaSelectedKeys";}function d(){var m=jQuery("#"+h()); if(m.length==1){return m[0];}return null;}function f(n,m,o){(new Function("sender","eventArgs","try {"+n+"(sender,eventArgs); } finally {}"))(m,o);}}function BusinessDocumentBrowserProperties(){this.TypeFilter=null;this.DocumentHierarchyKey=null;this.DocumentPath=null;this.RootFolder=null;this.AllowUpwardNavigation=true;this.ShowAddress=true;this.AutoPostback=false;this.ValueControlID=null;this.ShowMenu=false;this.ValidateSelection=false;}function BusinessDocumentBrowserControl_Select(b){var a="&ShowRecycleBin=false";if(b.TypeFilter){a+="&TypeFilter="+b.TypeFilter;}if(b.DocumentHierarchyKey){a+="&DocumentHierarchyKey="+b.DocumentHierarchyKey;}if(b.DocumentPath){a+="&DocumentPath="+b.DocumentPath;}if(b.RootFolder){a+="&iRootFolder="+b.RootFolder;a+="&AutoSelectFirstDocument=true";if(!b.DocumentPath){a+="&DocumentPath="+b.RootFolder;}}if(!b.AllowUpwardNavigation){a+="&AllowUpwardNavigation="+b.AllowUpwardNavigation;}if(!b.ShowAddress){a+="&ShowAddress="+b.ShowAddress;}if(b.ShowMenu){a+="&ShowMenu="+b.ShowMenu;a+="&ShowMenuPublish=false&ShowMenuVersions=false&ShowMenuRun=false&ShowMenuPreview=false&ShowMenuNew=true";}OpenObjectBrowser(a,function(c){BusinessDocumentBrowserControl_SelectCallBack(c,b);},true,false);return CancelEvent();}function BusinessDocumentBrowserControl_SelectCallBack(e,c){var d=$(c.ValueControlID);if(d!=null){var b=e.result;if(b==null||b.length==0){return;}if(e.SelectedDocumentPath[e.SelectedDocumentPath.length-1]==="."){d.value=e.SelectedDocumentPath.slice(0,-1);}else{d.value=e.SelectedDocumentPath;}var a=d.value.substr(d.value.lastIndexOf(".")+1);if(a==d.value){a=null;}if(c.ValidateSelection&&d.value&&d.value.length>=100&&e.SelectedDocumentName&&d.value.lastIndexOf(a)===-1&&e.SelectedDocumentType!=null){a="."+e.SelectedDocumentType.toLowerCase();d.value+=a;}var f=$(c.DocumentVersionKeyValueControlID);if(f!=null){f.value=e.SelectedDocumentVersionKey;}d.focus();if(c.AutoPostBack){submitForm(d);}}}function BusinessFileUploadProperties(){this.CallBackValueControl=null;this.CallBackDisplayControl=null;this.AllowMultiple=false;}var businessFileUploadProperties=new BusinessFileUploadProperties();function BusinessFileUpload_Upload(d,b,c,f,g,e,a,h){businessFileUploadProperties.CallBackValueControl=d;if(b!=null){businessFileUploadProperties.CallBackDisplayControl=b;}else{businessFileUploadProperties.CallBackDisplayControl=c;}businessFileUploadProperties.AllowMultiple=!e;OpenFileUpload(BusinessFinderControl_UploadCallback,a,h,f,g);return CancelEvent();}function BusinessFinderControl_UploadCallback(b){if(businessFileUploadProperties.CallBackValueControl!=null){if(b.result==null||b.result.length==0){return;}businessFileUploadProperties.CallBackValueControl.value=b.result;if(document.all){businessFileUploadProperties.CallBackDisplayControl.innerText=b.Filename;}else{businessFileUploadProperties.CallBackDisplayControl.textContent=b.Filename;}var a=getNextObject(businessFileUploadProperties.CallBackValueControl);a.focus();var c=getNextObject(a);c.style.display="inline";}businessFileUploadProperties.CallBackValueControl=null;businessFileUploadProperties.CallBackDisplayControl=null;businessFileUploadProperties.AllowMultiple=false;}function BusinessFinderControl_Delete(e,b,c,f,a){e.value="";if(b!=null){b.innerHTML=a;}if(c!=null){c.innerHTML=a;c.href=null;c.style.textDecoration="none";c.style.color="#000";}if(f!=null){f.style.display="none";}var d=getNextObject(e);d.focus();var g=getNextObject(d);g.style.display="none";return CancelEvent();}function BusinessFinderControlProperties(){this.CallBackValueControl=null;this.CallBackDisplayControl=null;this.Grid=null;this.SelectLink=null;this.AllowMultiple=false;this.CallBackRemoveControl=null;}var businessFinderControlProperties=new BusinessFinderControlProperties();function BusinessFinderControl_Select(e,a,b,k,l,c,g,i,d,f,h,m,j){businessFinderControlProperties.CallBackValueControl=e;businessFinderControlProperties.CallBackDisplayControl=a;businessFinderControlProperties.CallBackRemoveControl=j;businessFinderControlProperties.Grid=b;businessFinderControlProperties.SelectLink=k;businessFinderControlProperties.AllowMultiple=!l;OpenFinderAdderWithQueryFilter(BusinessFinderControl_SelectCallBack,l,c,g,i,d,f,h,null,null,m);return CancelEvent();}function BusinessFinderControl_SelectCallBack(h){var b=h.result;if(businessFinderControlProperties.CallBackValueControl!=null){if(b==null||b.length==0){return;}if(!businessFinderControlProperties.AllowMultiple){businessFinderControlProperties.CallBackValueControl.value=b[0];if(document.all){businessFinderControlProperties.CallBackDisplayControl.innerText=h.SelectedDisplayValues[0];}else{businessFinderControlProperties.CallBackDisplayControl.textContent=h.SelectedDisplayValues[0];}if(businessFinderControlProperties.CallBackRemoveControl){businessFinderControlProperties.CallBackRemoveControl.style.display="block";}try{InitiateControlEventWithArgument(businessFinderControlProperties.CallBackValueControl.id,businessFinderControlProperties.CallBackValueControl.value,"onchange");}catch(e){}businessFinderControlProperties.SelectLink.focus();}else{var m=businessFinderControlProperties.CallBackValueControl.value.split(",");var n="";for(var l=0;l0){n=businessFinderControlProperties.CallBackValueControl.value+n;if(n.substr(0,1)==","){n=n.substr(1);}businessFinderControlProperties.CallBackValueControl.value=n;businessFinderControlProperties.Grid.style.display="block";businessFinderControlProperties.CallBackDisplayControl.style.display="none";}businessFinderControlProperties.SelectLink.focus();}}businessFinderControlProperties.CallBackValueControl=null;businessFinderControlProperties.CallBackDisplayControl=null;businessFinderControlProperties.CallBackRemoveControl=null;businessFinderControlProperties.Grid=null;businessFinderControlProperties.SelectLink=null;businessFinderControlProperties.AllowMultiple=false;}function BusinessFinderControl_Clear(b,a,c,d){b.value="";a.innerHTML=c;d.style.display="none";}function BusinessFinderControl_DeleteItem(d,c,g,f,a){var j=findAncestor(eventSource(),"tr");f=j.rowIndex;var e=d.value.split(",");e.splice(f,1);var h="";for(var b=0;b0){h=h.substr(1);}d.value=h;g.deleteRow(f);if(d.value.length==0){c.style.display="inline";g.style.display="none";}}function OnHTMLEditorClientLoad(a,c){a.attachEventHandler("onkeydown",function(s){var g=s.keyCode?s.keyCode:s.which;if(g!="9"){return false;}var e=jQuery(s.target).closest("body");var o=document.getElementsByTagName("iframe");for(var r=0;r0){for(var p=l-1;p>=0;p--){if(!b(n[p],s)){return false;}}}}else{if((d.length>0)&&(jQuery(d).is(":visible"))){var h=jQuery(d).find("a[href='#Design]'");if(h==null){return false;}$telerik.cancelRawEvent(s);h.focus();return false;}else{if(l<(n.length-1)){for(var q=l+1;q0){for(var d=0;d=0){var websiteSelectedUrl=linkUrl.websiteUrl;if(websiteSelectedUrl!=null){hrefString=websiteSelectedUrl+"/"+hrefString.substring(2);}}}else{hrefString="http://";}if(hrefString.indexOf("?")>=0&&linkUrl.qsParam!=""&&linkUrl.qsParam!=null){if(linkUrl.sourceCode!=""&&linkUrl.sourceCode!=null){hrefString=String.format("{0}&{1}&SourceCode={2}",hrefString,linkUrl.qsParam,linkUrl.sourceCode);}else{hrefString=String.format("{0}&{1}",hrefString,linkUrl.qsParam);}}else{if(linkUrl.qsParam!=""&&linkUrl.qsParam!=null){if(linkUrl.sourceCode!=null&&linkUrl.sourceCode!=""){hrefString=String.format("{0}?{1}&SourceCode={2}",hrefString,linkUrl.qsParam,linkUrl.sourceCode);}else{hrefString=String.format("{0}?{1}",hrefString,linkUrl.qsParam);}}else{if(linkUrl.sourceCode!=null&&linkUrl.sourceCode!=""){if(hrefString.indexOf("?")>=0){hrefString=String.format("{0}&SourceCode={1}",hrefString,linkUrl.sourceCode);}else{hrefString=String.format("{0}?SourceCode={1}",hrefString,linkUrl.sourceCode);}}else{hrefString=String.format("{0}",hrefString); }}}if(isIE){editor.getSelection().selectRange(cursorPosition);}var html=String.format("{3}",hrefString,linkUrl.className,linkUrl.additionalAttributes,linkUrl.name);editor.pasteHtml(html);}};ShowDialog(gWebRoot+'/AsiCommon/controls/ContentManagement/ContentDesigner/ContentLinkDialog.aspx?ShowTypes="y"&FileUploadAllowed='+fileUploadAllowed+"&",argument,800,500,"Insert a link to content",null,"E",callbackFunction,null,true,true,null,null);};}function appendQueryParamsToPath(c,a){var d=Object.keys(a).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(a[e]);}).join("&");var b=c.indexOf("?")!==-1?"&":"?";return d?c+b+d:c;}function HTMLEditorSetupAIContentCreator(c,b,a){if(c==null){c=true;}else{c=(c.toLowerCase()==="true");}if(!b||b.trim()===""){b="iMIS Intelligence - Create Content";}Telerik.Web.UI.Editor.CommandList.AIContentCreator=function(h,j,i){var e=j.getSelectedElement();var d=function(l,m){var o=m._argument;if(o!=null&&typeof o==="string"){var n=decodeURIComponent(o);j.pasteHtml(n);}};var g=gWebRoot;var k=800;var f=600;switch(a.toLowerCase()){case"htmlcontent":g=g+"/AsiCommon/controls/ContentManagement/ContentDesigner/GenAIDialogHtmlContent.aspx";break;case"emailcontent":g=g+"/AsiCommon/controls/ContentManagement/ContentDesigner/GenAIDialogEmailContent.aspx";break;case"emailtemplate":g=g+"/AsiCommon/controls/ContentManagement/ContentDesigner/GenAIDialogEmailTemplate.aspx";f=900;break;}ShowDialog(g,null,k,f,b,null,"E",d,null,true,true,null,null);};}function BusinessImageSelectorProperties(){this.ValueControlID=null;this.DialogID=null;}function ImageSelectorControl_Select(a){$find(a.DialogID).open("ImageManager",{CssClasses:[]},function(b,c){ImageSelectorControl_SelectCallBack(b,c,a);});}function ImageSelectorControl_SelectCallBack(a,d,b){if(!d){return false;}var e=d.value[0].getAttribute("src",2).toLowerCase();if(e.toLowerCase().indexOf("http"==-1)){e=e.replace(gWebRoot,"~");}var c=$get(b.ValueControlID);if(c){c.value=e;}__doPostBack(c.id,"TextChanged");return false;}function _DebugTrace(a){var c=document.getElementById("TraceConsole");if(c!=null){var b=getParent(getParent(c));if(b.style.display=="none"){b.style.display="block";}Sys.Debug.trace(a);}}function _DebugTraceDump(b,a){var d=document.getElementById("TraceConsole");if(d!=null){var c=getParent(getParent(d));if(c.style.display=="none"){c.style.display="block";}Sys.Debug.traceDump(b,a);}}function _DebugFail(a){Sys.Debug.fail(a);}function __Document_Head_Init(a,c,b){if(!__CookiesEnabled()){window.location.href=a;}eraseCookie("Asi.Web.Browser.CookiesEnabled");if(c!=0){alert(c);}__CloseDisposableWindow();if(b){if(typeof jQuery=="undefined"){document.oncontextmenu=__DisableContextMenu;}else{if(browser.isIE&&browser.version==7){document.oncontextmenu=__DisableContextMenu;}}}}function __CloseDisposableWindow(){if(__GetCookieValue("Asi.Web.Browser.DisposableWindow.Loaded")=="true"){var a=window.open("","Asi_Web_Browser_DisposableWindow","width=1,height=1,top=9999,left=9999,resizable=no,scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no");a.close();document.cookie="Asi.Web.Browser.DisposableWindow.Loaded=false;path=/";}}function __CookiesEnabled(){if(navigator.cookieEnabled){return true;}if(__GetCookieValue("Asi.Web.Browser.CookiesEnabled")!="true"){document.cookie="Asi.Web.Browser.CookiesEnabled=true;path=/;SameSite=Strict;Secure";if(__GetCookieValue("Asi.Web.Browser.CookiesEnabled")!="true"){return false;}}return true;}function __GetCookieValue(b){if(document.cookie!=null){var c=document.cookie.indexOf(b+"=");if(c<0){return null;}c+=b.length+1;var a=document.cookie.indexOf(";",c);if(a==-1){a=document.cookie.length;}return unescape(document.cookie.substring(c,a));}return null;}function __WindowOnLoad(){var a=gWindowOnLoad.length;for(var b=1;b|&#?\w+;/i.test(a.replace(" ",""));}function addLoadEvent(b){if(b){var a=window.onload;if(typeof window.onload!="function"){window.onload=b;}else{window.onload=function(){if(typeof a=="function"){a();}b();};}}}function addAjaxLoadEvent(b){function a(){b();Sys.Application.remove_load(a);}Sys.Application.add_load(a);}function addResizeEvent(b,a){if(a==null){a=window;}$addHandler(a,"resize",b);}var resizeFunctionNames=new Array();function addContentResizeEvent(a){resizeFunctionNames.push(a);}function contentResized(contentWidth,contentHeight){for(var i=0;i0){var c=a.split("?");var b=c[1].split("&");return b;}return null;}function FindURLParameter(b){b=b.toUpperCase();var a=GetURLParameters();if(a!=null){return FindParameterInArray(b,a);}return null;}function FindParameterInArray(b,c){b=b.toUpperCase();for(i=0;i0?e.offsetHeight:c;var k=e.offsetWidth>0?e.offsetWidth:h;if((g+j)>n){g=n-j;}if((f+k)>b){f=b-k;}if(f0&&e>0){d=(Math.floor(f/a)<=e)?1:2;}else{if(f>0){if(g>f||(ge||(b=1){c=m.substr(0,9);}else{c=m;}ShowDialog_NoReturnValue(f,null,j,k,m,null,"D",e,c,o,d,l,null);}function RefreshBySubmit(){if(gPostBackFormObject!=null){gPostBackFormObject.submit();}else{if(document.forms.length>0){document.forms[0].submit();}else{window.location.href=window.location.href;}}}function SetDefaultStyle(a){if(a.className!="VTabSelectedStyle"){a.className="VTabDefaultStyle";}}function SetHoverStyle(a){if(a.className!="VTabSelectedStyle"){a.className="VTabHoverStyle";}}function UpdateFormInputAndSubmit(b,d){var e=document.forms;if(docFormsLen>0){for(var c=0,a=e.length;c0){if(f.substr(0,1)=="?"){f=f.substr(1);}if(f.substr(0,1)!="&"){f="&"+f;}d+=f;}if(b==null){b="Content Designer";}NewWindow(d,b,"current","nonmodal",false);CancelEvent();}setBodyCssClass(gIsEasyEditEnabled);function setBodyCssClass(a){if(a){jQuery("Body").addClass("EasyEditOn");}}function contentRecordChangeRequest(c,a,d){var b=window.gWebRoot+"/AsiCommon/Controls/ContentManagement/ContentDesigner/ContentChangeRequestEdit.aspx?CloseWindowOnCommit=true&PageOperation=New&ContentRecordKey="+c;if(a!=null&&a.length>0){if(a.substr(0,1)=="?"){a=a.substr(1);}if(a.substr(0,1)!="&"){a="&"+a;}b+=a;}if(d==null){d="Content Designer";}ShowDialog_NoReturnValue(b,null,"800","600",d,"~/AsiCommon/Images/icon_con.gif","E");CancelEvent();}function printThisPage(){window.open(window.gWebRoot+"/iMIS/Print.aspx");}function printThisPageTemplate(){var b=window.location.href;var a=new RegExp("[?&]TemplateType=[A-Za-z]","g");b=b.replace(a,"");if(b.indexOf("?")<0){b+="?";}else{if(b.indexOf("?")!=b.length-1){b+="&";}}b+="TemplateType=P";window.location.href=b;}function showHideBrush(){var c=document.getElementsByName("editlink");if(c==null||c.length==0){alert("There are no panels to edit on this page.");return;}for(var b=0;b=4){window.print();}}function emailWindow(){alert("Obsolete");}function showInfoCenter(){alert("Obsolete");}function showHelpDialog(a){window.open(a,"_blank","");}function ShowDialog_NoReturnValue(g,f,b,j,e,d,c,h,l,n,k,m,a){ShowDialog(g,f,b,j,e,d,c,h,l,n,k,m,a);}var RadWindowInformation=new Object();function ShowDialog(l,k,c,p,j,h,d,m,s,y,q,v,b,o,n){if(l.indexOf("http://")>-1){var r=l.replace("http://","");r=r.replace("//","/");l="http://"+r;}else{if(l.indexOf("https://")>-1){var r=l.replace("https://","");r=r.replace("//","/");l="https://"+r;}else{l=l.replace("//","/");}}if(l.indexOf("~")==0){l=window.gWebRoot+l.substring(1);}if(s==null||!s||s.length==0){s="GenericWindow";}if(l.indexOf("TemplateType=")<0){if(d==null||d.length==0){d="E";}var u=l.indexOf("?")>-1?"&":"?";l+=u+"TemplateType="+d;}if(y&&l.indexOf("CloseWindowOnCommit")<0){var u=l.indexOf("?")>-1?"&":"?";l+=u+"CloseWindowOnCommit="+y;}if(q&&l.indexOf("PreserveStatefulBusinessContainer")<0){var u=l.indexOf("?")>-1?"&":"?";l+=u+"PreserveStatefulBusinessContainer="+q;var w=$get("PageInstanceKey");if(w!=null){l+="&ParentPageInstanceKey="+w.value;}}if(l.indexOf("DialogCacheParam")<0){var u=l.indexOf("?")>-1?"&":"?";l+=u+"DialogCacheParam="+Math.random();}if(l.indexOf("IsPopup")<0){var u=l.indexOf("?")>-1?"&":"?";l+=u+"IsPopup=true";}var f=livePageWidth();if((c+"").indexOf("%")>-1){c=f*(parseInt(c)/100);}else{if(c>f){c=f;}}var g=livePageHeight();if((p+"").indexOf("%")>-1){p=g*(parseInt(p)/100);}else{if(p>g){p=g;}}RadWindowInformation.windowName=s;RadWindowInformation.url=l;RadWindowInformation.args=k;RadWindowInformation.width=c;RadWindowInformation.height=p;RadWindowInformation.title=j;mPageTitle=j;RadWindowInformation.iconUrl=h;RadWindowInformation.callBackFunction=m;RadWindowInformation.dialogCloseFunction=v;RadWindowInformation.sourceObject=b;RadWindowInformation.dialogWindow=null;var t=window.GetRadWindowManager();if(t==null){DelaySetupRadWindow();return null;}var x=t.getWindowByName(s);if(x!=null&&x.IsClosed()){x.Name=null; x=null;}if(x==null){x=window.radopen(null,s);}if(x==null){DelaySetupRadWindow();return null;}x.setSize(c,p);if(n){RadWindowInformation.isModal=n;x.set_modal(true);}if(x!=null&&l.indexOf("Mode=EditContent")>-1||l.indexOf("/ContentRecordEdit.aspx?")>-1){x.set_behaviors(4+16+32+64);p=livePageHeight();c=livePageWidth();x.setSize(c,p);x.maximize();x.set_animationDuration(0);x.set_keepInScreenBounds(true);x.set_destroyOnClose(false);}if(x!=null&&l.indexOf("/WebsiteEdit.aspx?")>-1||l.indexOf("/SelectTheme.aspx?")>-1){p=livePageHeight()-10;c=livePageWidth()-10;x.setSize(c,p);x.maximize();x.set_animationDuration(0);x.set_behaviors(4+64);x.set_keepInScreenBounds(true);x.set_destroyOnClose(false);}if(x!=null&&l.indexOf("/ContentItemEdit.aspx?")>-1&&l.indexOf("ContentTypeKey=a85f082a-e710-499c-a9f5-27829b8fbff7")>-1||l.indexOf("Mode=Maximized")>-1){p=livePageHeight()+20;c=livePageWidth();x.setSize(c,p);x.maximize();x.set_animationDuration(0);x.set_behaviors(4+64);x.set_keepInScreenBounds(true);x.set_destroyOnClose(false);}if(x!=null&&l.indexOf("/ContentItemEdit.aspx?")===-1&&l.indexOf("/Downloader.aspx?")===-1){if(l.indexOf("/RdlReportDisplay.aspx?")>-1){SetupReportDialog(x);}else{if(o){jQuery.get(l,function(z){var e=z;if(x!=null&&e.indexOf("RdlReportDisplayCommon")>-1||e.indexOf("Microsoft.Reporting")>-1){SetupReportDialog(x);}});}}}if(window.event!==null&&l.indexOf("StopPropagation=true")>-1){var a=window.event;a.cancelBubble=true;if(a.stopPropagation){a.stopPropagation();}if(a.preventDefault){a.preventDefault();}}if(x!==null&&l.indexOf("/ContentItemEdit.aspx?")>-1||l.indexOf("/WebPartCatalog.aspx?")>-1||l.indexOf("/ZonePropertiesDialog.aspx?")>-1||l.indexOf("/ContentLayoutSelector.aspx?")>-1){x.set_showContentDuringLoad(false);x.set_opacity(0);setTimeout(function(){var e=GetViewportScrollPos().y;window.scroll(0,e);if(l.indexOf("/ZonePropertiesDialog.aspx?")===-1){x.moveTo(GetViewportWidth()-825,e+25);}else{x.moveTo(GetViewportWidth()-525,e+25);}x.set_animationDuration(0);x.set_opacity(100); },0);}if(x!=null&&l.indexOf("/UserNameConfirmation.aspx?")>-1){x.set_behaviors();}DisableScroll();RadWindowInformation.dialogWindow=x;return SetupRadWindow();}function closeHandler(a,b){EnableScroll();a.remove_close(closeHandler);}function DisableScroll(){scrollTop=window.pageYOffset||document.documentElement.scrollTop;scrollLeft=window.pageXOffset||document.documentElement.scrollLeft;window.onscroll=function(){window.scrollTo(scrollLeft,scrollTop);};}function EnableScroll(){window.onscroll=function(){};}function SetupReportDialog(c){var a=livePageHeight();var b=livePageWidth();c.setSize(b,a);c.maximize();c.set_animationDuration(0);c.set_behaviors(4+64);c.set_keepInScreenBounds(true);c.set_destroyOnClose(true);c.set_modal(true);c.set_autoSize(false);c.set_visibleStatusbar(false);}function ShowConfirmationDialog(f,b,d,a,c,e){CancelEvent(this.Event);this.windowTitle=f!==String.EMPTY?f:"Confirm";this.windowConfirmText=b!==String.EMPTY?b:"Are you sure?";this.width=375;this.height=200;this.FireCommand_CallBack=function(g){if(g){var h=$find(e).get_masterTableView();if(h==null){h=$find(e).MasterTableView;}if(h!=null){h.fireCommand(c,a);}}};if(d){if(e!==""&&a!==""&&c!==""){radconfirm(this.windowConfirmText,this.FireCommand_CallBack,this.width,this.height,null,this.windowTitle);}else{return false;}}}function DelaySetupRadWindow(){addAjaxLoadEvent(SetupRadWindow);}function SetWindowTitle(b,a){b.set_title(RadWindowInformation.title);}Sys.EventHandlerList.prototype.removeExtraneousHandlers=function(f,d){var e=this._getEvent(f,true);var c=null;if(e.length>0){c=e[0];}Array.clear(this._getEvent(f,true));if(d&&c!=null){Array.add(this._getEvent(f,true),c);}};function SetupRadWindow(){var b=RadWindowInformation.dialogWindow;if(b==null){b=window.GetRadWindowManager().getWindowByName(RadWindowInformation.windowName);}b.get_events().removeExtraneousHandlers("beforeClose",false);b.get_events().removeExtraneousHandlers("close",true);b.set_title(RadWindowInformation.title);b.remove_pageLoad(SetWindowTitle); b.add_pageLoad(SetWindowTitle);b.Argument=RadWindowInformation.args;b.dialogArguments=RadWindowInformation.args;if(RadWindowInformation.callBackFunction!=null){b.add_beforeClose(RadWindowInformation.callBackFunction);}if(RadWindowInformation.dialogCloseFunction!=null){b.add_close(RadWindowInformation.dialogCloseFunction);}b.add_close(closeHandler);b.SourceObject=RadWindowInformation.sourceObject;b.setUrl(RadWindowInformation.url);b.SetVisible(true);b.set_visibleStatusbar(false);b.center();b.add_pageLoad(RestoreWindowTitle);var a=b.view.ui.container.querySelectorAll(".rwControlButtons a")[0];if(a!=null){a.focus();}return b;}function RestoreWindowTitle(a){if(a!=null&&mPageTitle!==""){a.set_title(mPageTitle);}}function CMOpenDialog(g,e,h,b,c,d,a,j,f){if(g!=null){if(c==null){c="";}else{if(c.substr(0,1)!="&"){c="&"+c;}}if(h==null){h=600;}if(b==null){b=400;}if(f==null){f="";}var k=window.gWebRoot+"/iMIS/ContentManagement/Template.aspx?ContentCode="+g+c;if(typeof gWebsiteKey!="undefined"&&gWebsiteKey!="null"&&k.indexOf("&WebsiteKey=")<0){k+="&WebsiteKey="+gWebsiteKey;}if(j!=null){k=k+"&NavigationCode="+j;}ShowDialog(k,d,h,b,f,"","E",a);}else{alert("contentCode is required!");}}function GetViewportWidth(){var a;if(typeof window.innerWidth!="undefined"){a=window.innerWidth;}else{if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){a=document.documentElement.clientWidth;}else{a=document.getElementsByTagName("body")[0].clientWidth;}}return a;}function GetViewportHeight(){var a;if(typeof window.innerWidth!="undefined"){a=window.innerHeight;}else{if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){a=document.documentElement.clientHeight;}else{a=document.getElementsByTagName("body")[0].clientHeight;}}return a;}var dialogWin=new Object();function ShowPseudoDialog(f,h,j,b,a){window.attachEvent("onclick",checkModal); window.attachEvent("onfocus",checkModal);var g=false;try{if(!dialogWin.win||(dialogWin.win&&dialogWin.win.closed)){g=true;}}catch(c){if(c.message=="The remote server machine does not exist or is unavailable"){g=true;}}if(g){dialogWin.returnFunc=a;dialogWin.returnedValue="";dialogWin.args=h;if(typeof(a)=="string"&&a!=""){if(f.indexOf("?")<0){f+="?iCallbackFunction="+a;}else{f+="&iCallbackFunction="+a;}}dialogWin.url=f;dialogWin.width=j;dialogWin.height=b;dialogWin.name=(new Date()).getSeconds().toString();dialogWin.left=(screen.width-dialogWin.width)/2;dialogWin.top=(screen.height-dialogWin.height)/2;var d="left="+dialogWin.left+",top="+dialogWin.top+",scrollbars=yes,resizable=yes,width="+dialogWin.width+",height="+dialogWin.height;dialogWin.win=window.open(dialogWin.url,dialogWin.name,d);dialogWin.win.focus();}else{dialogWin.win.focus();}}function checkModal(){setTimeout("finishChecking()",50);return true;}function finishChecking(){try{if(dialogWin.win&&!dialogWin.win.closed){dialogWin.win.focus();}}catch(a){if(a.message=="The remote server machine does not exist or is unavailable"){return;}}}function wait(){window.document.body.style.cursor="wait";var c=document.getElementsByTagName("input");for(var b=0;b0){a+="&DisplayValueColumn="+d;}if(f!=null&&f.length>0){a+="&DataKeyName="+f;}if(k!=null&&k.length>0){a+="&filterValue="+k;}if(m!=null&&m){a+="&AllowMultiSelect=false";}else{a+="&AllowMultiSelect=true&PagingEnabled=false";}if(n!=null&&n.length>0){a+="&AddTargetUrl="+n; }if(b==null){b=1024;}if(h==null){h=768;}var c="Find";if(n!=null&&n.length>0){c="Find/Add";}return ShowDialog(a,null,b,h,c,null,"E",l,"ObjectBrowser",false,true);}function OpenPartyFinderAdder(a,g,d,f,e,b,h,j,c){OpenPartyFinderAdderWithQueryFilter(a,g,d,f,e,b,h,"",j,c,false,null);}function OpenPartyFinderAdderWithQueryFilter(n,p,f,h,l,e,g,m,c,b,j,o,a){var k=window.gWebRoot+"/AsiCommon/Controls/Shared/FinderAdder/PartyFinderAdder.aspx?DialogMode=true";if(f!=null){k+="&DocumentKey="+f;}else{if(h!=null){k+="&DocumentPath="+h;}else{if(l!=null){k+="&AtomName="+l;}}}if(e!=null&&e.length>0){k+="&DisplayValueColumn="+e;}if(g!=null&&g.length>0){k+="&DataKeyName="+g;}if(m!=null&&m.length>0){k+="&filterValue="+m;}if(p!=null&&p){k+="&AllowMultiSelect=false";}else{k+="&AllowMultiSelect=true&PagingEnabled=false";}if(j!=null&&j=="True"){k+="&AllowAdd="+j;}if(o!=null&&o.length>0){k+="&PartyType="+o;}if(c==null){c=1024;}if(b==null){b=768;}var d="Find";if(j!=null&&j=="True"){d="Find/Add";}if(a!=null&&a.length>0){k+="&addTargetShortcut="+a;}return ShowDialog(k,null,c,b,d,null,"E",n,"ObjectBrowser",false,true);}function OpenFileUpload(a,b,f,d,c){var e=window.gWebRoot+"/AsiCommon/Controls/Shared/FileUpload/FileUpload.aspx";if(b!=null&&b.length>0){e+="?DocumentStorageKey="+b;}if(f!=null&&f>0){if(e.indexOf("?")<0){e+="?MaxFileUploadSize="+f;}else{e+="&MaxFileUploadSize="+f;}}if(d!=null&&d.length>0){if(e.indexOf("?")<0){e+="?AllowedTypes="+d;}else{e+="&AllowedTypes="+d;}}if(c!=null&&c.toLowerCase()=="true"){if(e.indexOf("?")<0){e+="?EnableDescriptionField=true";}else{e+="&EnableDescriptionField=true";}}return ShowDialog(e,null,450,430,"File Upload",null,"E",a,"GenericWindow",false,true);}function OpenObjectSaver(b,a){var c=b.split("&");if(FindParameterInArray("ShowFilename",c)==null){b=b+"&ShowFilename=true";}if(FindParameterInArray("Mode",c)==null){b=b+"&Mode=SelectContainer";}OpenObjectBrowser(b,a);}function clickButton(b,a){var c=document.getElementById(a);if(typeof c=="object"){var d=navigator.appName.indexOf("Netscape")>(-1)?b:event; if(d.keyCode==13){c.click();return cancelEvent();}}return true;}var dirty=true;function finish(b){if(dirty&&window.opener){if(b){var a=window.opener.document.getElementById(b);if(a==null&&window.opener.dialogWin.args!=null){a=window.opener.document.getElementById(window.opener.dialogWin.args);}if(a!=null){a.click();}}if(a==null&&window.opener.RefreshBySubmit){window.opener.RefreshBySubmit();}if(window.opener.dialogWin.returnFunc!=null){window.opener.dialogWin.returnFunc();}}else{if(dirty&&parent){if(typeof parent.SubPage_Committed=="function"){parent.SubPage_Committed();}else{if(parent.objectBrowserClass!==null){parent.objectBrowserClass.SubPage_Committed();}}}}}var MatchColumnsSemaphore=false;matchColumns=function(){var a,g,e,c,b;a=document.getElementsByTagName("div");g=[];e=0;for(var f=0;f'+a;var e=document.querySelector(".user-message-area")||document.querySelector('[id$="UserMessagesUpdatePanel"]'); if(e){e.appendChild(c);}else{var b=document.getElementsByTagName("body")[0];b.insertBefore(c,b.childNodes[0]);}setTimeout(autoHideMessage,8000);};function setNextAppend(a){theForm=a.form;for(i=0;i=0){this.isIE=true;this.version=parseFloat(c.substr(b+a.length));return;}a="Netscape6/";if((b=c.indexOf(a))>=0){this.isNS=true;this.version=parseFloat(c.substr(b+a.length));return;}a="Gecko";if((b=c.indexOf(a))>=0){this.isNS=true;this.version=6.1;return;}}var browser=new Browser();var activeButton=null;function buttonClick(b,c){var a;if(browser.isIE){a=window.event.srcElement;}else{a=b.currentTarget;}a.blur();if(a.menu==null){a.menu=document.getElementById(c);if(a.menu.isInitialized==null){menuInit(a.menu);}}if(a.onmouseout==null){a.onmouseout=buttonOrMenuMouseout;}if(a==activeButton){return false;}if(activeButton!=null){resetButton(activeButton);}if(a!=activeButton){depressButton(a);activeButton=a;}else{activeButton=null;}return false;}function buttonMouseover(b,c){var a;if(activeButton==null){buttonClick(b,c);return;}if(browser.isIE){a=window.event.srcElement;}else{a=b.currentTarget;}if(activeButton!=null&&activeButton!=a){buttonClick(b,c);}}function depressButton(p){var f,g;p.className+=" menuButtonActive";p.attachEvent("onmouseout",buttonOrMenuMouseout);if(p.onmouseout==null){p.onmouseout=buttonOrMenuMouseout;}if(p.menu.onmouseout==null){p.menu.onmouseout=buttonOrMenuMouseout;}f=getPageOffsetLeft(p);g=getPageOffsetTop(p)+p.offsetHeight;if(browser.isIE){f+=p.offsetParent.clientLeft;g+=p.offsetParent.clientTop;}var h=0;var d=0;var l=document.body.offsetLeft+document.body.offsetWidth-30; var b=document.body.offsetTop+document.body.offsetHeight-30;var q=getParent(p.menu);var c=f+getPageOffsetLeft(q);var j=g+getPageOffsetTop(q)+q.offsetHeight;if(browser.isIE){h=c+p.menu.clientWidth;d=j+p.menu.clientHeight;}else{h=c+100;d=j+300;}if(h>l){f-=(h-l);h=f+p.menu.clientWidth;}if(d>b){d=g+p.menu.clientHeight;}p.menu.style.left=f+"px";p.menu.style.top=g+"px";p.menu.style.visibility="visible";var n=document.getElementsByTagName("select");for(i=0;id){h=Math.max(0,h-b.offsetWidth-b.subMenu.offsetWidth+(c.offsetWidth-b.offsetWidth));}g=Math.max(0,Math.min(g,e));b.subMenu.style.left=h+"px";b.subMenu.style.top=g+"px";b.subMenu.style.visibility="visible";if(browser.isIE){window.event.cancelBubble=true;}else{a.stopPropagation();}}function closeSubMenu(a){if(a==null||a.activeItem==null){return;}if(a.activeItem.subMenu!=null){closeSubMenu(a.activeItem.subMenu);a.activeItem.subMenu.style.visibility="hidden";a.activeItem.subMenu=null;}removeClassName(a.activeItem,"menuItemHighlight");a.activeItem=null;}function buttonOrMenuMouseout(a){var b;if(activeButton==null){return;}if(browser.isIE){b=window.event.toElement;}else{if(a.relatedTarget!=null){b=(a.relatedTarget.tagName?a.relatedTarget:getParent(a.relatedTarget));}}if(getContainerWith(b,"DIV","menu")==null){resetButton(activeButton);activeButton=null;}window.event.srcElement.detachEvent("onmouseout",buttonOrMenuMouseout);}function menuInit(e){var g,a;var k,h;var f;var d,b;var c,l;if(browser.isIE){e.style.lineHeight="2.5ex";a=e.getElementsByTagName("SPAN");for(c=0;c0){f=g[0].offsetWidth;}else{return;}for(c=0;c0){var d=b.childNodes;for(var e=0;ea){b.value=b.value.substring(0,a);}}function RunAllValidators(c,a){if(typeof Page_ClientValidate=="function"){var b;for(b=0;b=0){return true;}return false;}function FireSingleValidator(a,c){var b=document.all!=null?document.all[a]:document.getElementById(a);ValidatorValidate(b);ValidatorUpdateIsValid();ValidationSummaryOnSubmit(c);}function ShowProblemTelerikTab(){var j=GetAllTabsStrips();if(j.length>0){for(m=0;m=0){for(m=0;m0){var c=0;}var e=false;for(c=0;c=0){h=true;}if(h===true){jQuery(e).show();}else{jQuery(e).hide();}});}function ScrollToLastPosition(e,c){if(e!=null&&c!=null){var b=getParameterByName(e,window.location.href);if(b!=null){var a=b.substring(0,8)+"LastPosition";var d=c;if(gIsPostBack){ElementScrollTo(d,a);}jQuery(d).scroll(function(f){SetElementScrollPosition(d,a);});}}}function searchAvailableItems(e,c,b,a){if(a!=null){jQuery(a).hide();}var d=jQuery(e);d.each(function(h,g){var k=false;var j=c?jQuery(g).find(c).text():jQuery(g).text();if(j.toLowerCase().indexOf(b.toLowerCase())>=0){k=true;}if(k===true){jQuery(g).show();}else{jQuery(g).hide();}});if(a!=null){var f=jQuery(e).filter(function(){return jQuery(this).is('[style="display: none;"]');}).length;if(d.length==f){jQuery(a).show();}}}function disablePage(a){createLoadingOverlay(a);}function createLoadingOverlay(a){destroyLoadingOverlay();if(a!=null){a="

"+a+"

";}else{a="";}var b=document.createElement("div");b.id="PageLoadingStatus";b.className="modal fade";b.setAttribute("role","status");b.innerHTML='";document.body.appendChild(b);this.overlay={element:b};this.showLoadingOverlay();}function showLoadingOverlay(){if(this.overlay!=null&&!this.overlay.element){return;}jQuery(this.overlay.element).modal({backdrop:"static",keyboard:false},"show");}function destroyLoadingOverlay(){if(this.overlay!=null&&this.overlay.element){jQuery(this.overlay.element).modal("hide");this.overlay.element.remove();}this.overlay=null;}function addKeyboardNav(a){var b=document.getElementsByClassName(a);for(i=0;i0){for(var a=0;adiv[data-uniqueid='"+a+"']");if(b!=null&&b.id!=null){hideElement(b.id);}hideSystemAlertsIfEmpty();}function hideSystemAlertsIfEmpty(){var a=Array.from(document.querySelectorAll("#SystemAlertPanel .AlertItem>div"));if(a.length==0||a.every(isHidden)){hideElement("SystemAlertPanel");}}function hideElement(b){if(!b){return;}var a=document.getElementById(b);if(a!=null){a.style.display="none";}}function isHidden(a){return a.style.display=="none";}function stopFooterOverlap(a){footerTop=jQuery("#ft").position().top;regAreaPos=jQuery(document).scrollTop()+parseInt(jQuery(a).css("top"),10)+jQuery(a).outerHeight();regAreaMargin=regAreaPos-footerTop;if(regAreaPos>footerTop){jQuery(a).css("margin-top",0-regAreaMargin-20);}else{jQuery(a).css("margin-top",0);}}function truncateHTML(a,b,c){jQuery(document).ready(function(){var h=document.getElementsByClassName("shortDesc");var o=document.getElementsByClassName("moreLess");var r=document.getElementsByClassName("longText");var j=document.getElementsByClassName("moreLessLabel");var s=[];var l=new RegExp(/(<[^>]*>)/g);function e(t){return function(){if(j[t].innerHTML.includes(b)){h[t].innerHTML=r[t].innerHTML+" ";j[t].innerHTML=c;o[t].innerHTML=o[t].innerHTML.replace("caret","caret-up");}else{h[t].innerHTML=s[t];j[t].innerHTML=b;o[t].innerHTML=o[t].innerHTML.replace("caret-up","caret");}};}for(var f=0;fa){var n=g-a;k[p]=k[p].slice(0,-n);k[p]=k[p].substring(0,k[p].substring(0,a).lastIndexOf(" "));var m=k[p].slice(k[p].length-1,k[p].length);m=m.replace(/[.,\/#!$%\^&\*;:{}=\-_`~()]/g,"");k[p]=k[p].substring(0,k[p].length-1)+m;g=a;}}}var q=k.join("");q=q.replace(/(<(?!\/)[^>]+>)+(<\/[^>]+>)/g,"")+"... ";s.push(q);h[f].innerHTML=s[f];o[f].addEventListener("click",e(f));}});}function collapsedText(c,h){var a=document.getElementsByClassName("collapsedText");var g=document.getElementsByClassName("moreLess");var f=document.getElementsByClassName("moreLessLabel");function e(j){return function(){if(f[j].innerHTML.includes(c)){a[j].style.display="block";f[j].innerHTML=h;g[j].innerHTML=g[j].innerHTML.replace("caret","caret-up");}else{a[j].style.display="none";f[j].innerHTML=c;g[j].innerHTML=g[j].innerHTML.replace("caret-up","caret");}};}for(var b=0;b0){var d=e.split(",");for(var c=0;c0){var messagesPanelID=$get("TemplateUserMessagesID").value;var messagesPanel=messagesPanelID.length>0?$get(messagesPanelID):null;if(messagesPanel==null){eval(customPostCommitScript);}}commitButtonClickedHiddenInput.value="false";}function CancelButton_Click(c){var b=GetRadWindow();if(b!=null){CloseAndCancelRadWindow();if(location.href.indexOf("iOperation=Purge")>-1||location.href.indexOf("iOperation=Delete")>-1){RefreshRadWindowParent(); }}else{try{window.location.href=c;}catch(a){return null;}}try{return CancelEvent();}catch(d){return null;}}function MasterPageBaseResizeProperties(){this.TopPanel=null;this.TopPanelDivider=null;this.TitlePanel=null;this.SideBarPanel=null;this.ContentPanel=null;this.ButtonPanel=null;this.FootPanel=null;this.OldTopPanelHeight=null;this.OldSideBarPanelWidth=null;this.ExtraPixels=0;this.ResizeHeightIntervalID=0;this.ResizeHeightLastHeight=0;}var masterPageBaseResizeProperties=new MasterPageBaseResizeProperties();function MasterPageBase_SetupComponents(f,b,g,e,d,a,c){if(f!=null&&f.length>0){masterPageBaseResizeProperties.TopPanel=$get(f);masterPageBaseResizeProperties.TopPanelDivider=$get(f+"Divider");}if(b!=null&&b.length>0){masterPageBaseResizeProperties.TitlePanel=$get(b);}if(g!=null&&g.length>0){masterPageBaseResizeProperties.SideBarPanel=$get(g);}if(e!=null&&e.length>0){masterPageBaseResizeProperties.ContentPanel=$get(e);}if(d!=null&&d.length>0){masterPageBaseResizeProperties.ButtonPanel=$get(d);}if(a!=null&&a.length>0){masterPageBaseResizeProperties.FootPanel=$get(a);}if(c!=null){masterPageBaseResizeProperties.ExtraPixels=c;}else{masterPageBaseResizeProperties.ExtraPixels=13;}}function Window_Load_Aspen(){addResizeEvent(Window_Resize_Aspen);Window_Resize_Aspen();setTimeout("ScrollToFragment()",200);}function Window_Load(){addResizeEvent(Window_Resize);Window_Resize();setTimeout("ScrollToFragment()",200);}function getProperChildObject(b){var a=b.firstChild;if(a!=null&&a.nodeName=="#text"){a=a.nextSibling;}return a;}function ScrollToElement(b){var a=0;var c=0;while(b!=null&&b!=contentPanel){c+=b.offsetTop;b=b.offsetParent;}if(masterPageBaseResizeProperties.ContentPanel!=null){masterPageBaseResizeProperties.ContentPanel.scrollTop=c;}else{window.scrollTo(a,c);}}function ScrollToFragment(){try{if(location.hash!=null&&location.hash!=""){var b=$get(location.hash.substring(1));if(b==null){b=$get(location.hash);}if(b!=null){ScrollToElement(b);}}}catch(a){}}function Window_Resize(){setTimeout("ResizeContentPanel()",300); }function Window_Resize_Aspen(){setTimeout("ResizeContentPanel_Aspen()",300);}function TopPanel_Resize(a){var b=masterPageBaseResizeProperties.TopPanel.offsetHeight;if(b!=masterPageBaseResizeProperties.OldTopPanelHeight){masterPageBaseResizeProperties.OldTopPanelHeight=b;ResizeContentPanel();}}function SideBarPanel_Resize(){if(BrowserDetect.browser=="Explorer"&&BrowserDetect.version<7){return;}var a=masterPageBaseResizeProperties.SideBarPanel.offsetWidth;if(a!=masterPageBaseResizeProperties.OldSideBarPanelWidth){masterPageBaseResizeProperties.OldSideBarPanelWidth=a;ResizeContentPanel();}}function ResizeContentPanel(){var a=livePageHeight();var g=livePageWidth();var f=0;if(masterPageBaseResizeProperties.TopPanel!=null){try{f+=masterPageBaseResizeProperties.TopPanel.offsetHeight+masterPageBaseResizeProperties.TopPanelDivider.offsetHeight;}catch(e){f+=masterPageBaseResizeProperties.TopPanel.offsetHeight;}}if(masterPageBaseResizeProperties.TitlePanel!=null){if(masterPageBaseResizeProperties.TitlePanel.length>0){for(i=0;i0){for(i=0;i0){var d=f.substring(h+1).split("&");var e=new Array(d.length);var j=false;for(var b=0;b=0;f-=1){d=c[f].split("=")[0];if(d===a){c.splice(f,1);}}if(c.length){g=g+"?"+c.join("&");}}return g;}var ContactProxyButtonControlID_Enabled;var ContactProxyButtonControlID_Disabled;function MasterPage_SetupProxy(a,b){ContactProxyButtonControlID_Enabled=a;ContactProxyButtonControlID_Disabled=b;}function RefreshProxyStatus(a){var b=document.getElementById(a);if(b!=null){_RefreshPanelStatus(ContactProxyButtonControlID_Enabled,ContactProxyButtonControlID_Disabled,b.value.toLowerCase());}}function _RefreshPanelStatus(a,b,d){var c=document.getElementById(a);var e=document.getElementById(b);if(c!=null&&e!=null){if(d.toString().toUpperCase()!="TRUE"){c.style.display="inline";e.style.display="none";}else{c.style.display="none";e.style.display="inline";}}}(function(b){Sys.Application.add_load(e); var c="";b("body").on("change",function(j){var h=b("[id*='lastClickedElementId']").eq(0);if(h.length>0){d(j,h);}});b("body").on("click",function(j){var h=b("[id*='lastClickedElementId']").eq(0);if(h.length>0){d(j,h);}});function e(){if(jQuery(".AsiMessage").length>0&&jQuery(".AsiMessage.AsiSystem").length==0){return;}var h=b("[id*='lastClickedElementId']").eq(0);if(!h.length>0){return;}var l=null;var m=h.val().split("-");if(m.length<2){return;}try{if(m[0]=="id"){l=a(m[1]);}if(m[0]=="name"){l=f(m[1]);}if(m[0]=="href"){l=g(m[1]);}if(l&&l.length>0){var j=m[1];if(j&&(j.indexOf("CancelRegistrationButton")>-1||j.indexOf("RegisterButton")>-1||j.indexOf("RegistrationOptionsDiv")>-1||j.indexOf("RegisteredAttendeesDiv")>-1||j.indexOf("PromotionManager")>-1||j==="EventProgramAnchor")){smoothScrollWithFade(j);}else{setTimeout(function(){l.trigger("focus");},100);}h.val("");}}catch(k){}}function a(h){c="findById:Id search";var j=b("#"+h);if(!j||j.length==0){c="findById:href search";j=b("a[href*='"+h+"']");}return j;}function f(h){c="findByName:Name search";var j=b("input[name='"+h+"']");if(!j||j.length==0){c="findByName:href search";j=b("a[href*='"+h+"']");if(!j||j.length==0){c="findByName:id search";j=b("#"+h);}}return j;}function g(h){c="findByAnchor:href search";var j=b("a[href*='"+h+"']");if(!j||j.length==0){c="findByAnchor:name search";j=b("input[name='"+h+"']");if(!j||j.length==0){c="findByAnchor:id search";j=b("#"+h);}if(j&&j.length>0){c="findByAnchor:anchor search";j=j.siblings("a").eq(0);}}return j;}function d(j,h){if(h.val().split("|").length>2){return;}h.val("");var k=b(j.target);if(k.attr("id")&&k.attr("id").length>0){h.val("id-"+k.attr("id"));}else{if(k.attr("href")&&k.attr("href").length>0){var l=k.attr("href").split("'");if(l.length>1){h.val("href-"+l[1]);}}else{if(k.attr("name")&&k.attr("name").length>0){h.val("name-"+k.attr("name"));}}}}})(jQuery);function updateCartItemCount(){var a=jQuery(".cartSprite");if(a==null){return;}if(IsUpdating){return;}IsUpdating=true; var b=a.parent().parent();if(b!=null){jQuery.ajax({type:"POST",url:gWebRoot+"/WebMethodUtilities.aspx/GetCartItemCount",data:"{}",contentType:"application/json; charset=utf-8",dataType:"json",success:function(d){if(d.d!=""&&d.d!=null){var c=d.d;if(c!=null){a.parent().remove();b.append(c);}}IsUpdating=false;},async:true});}}function GetAvailableHeight(a){var b;if(jQuery(window).height()!=null){b=jQuery(window).height();}else{return 500;}var c;if(a.length>0){for(c=0;c0){for(c=0;c125){jQuery(a).animate({scrollTop:c},"fast");}localStorage.removeItem(b);},400);});}}function SetElementScrollPosition(a,b){if(a!=null&&a!="undefined"&&b!=null&&b!="undefined"){localStorage.setItem(b,jQuery(a).scrollTop());}}function openBootstrapModal(b){var a=document.getElementById("ContentFrame");var c=jQuery("#BootstrapModal");if(a&&c&&b!=null&&b.toLowerCase().indexOf("http")>-1){a.src=b;a.addEventListener("load",function(){c.modal("show");});}else{console.error("Asi: Invalid modal request");}}function smoothScrollWithFade(c){var b=document.body;var a=document.getElementById(c);if(!a){return;}b.style.transition="opacity 0.5s";b.style.opacity=0;setTimeout(function(){var d=a.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:d});setTimeout(function(){b.style.opacity=1;},100);},100);}if(typeof(Type)!=="undefined"){Type.registerNamespace("AsiWebControls");}AsiWebControls.MatchTextBehavior=function(b,c,a,d){this._targetControlID=b;this._sourceControlClientID=c;this._enabled=a;this._validCharsRegularExpression=d;this._sourceControl=null;this._targetControl=null;};AsiWebControls.MatchTextBehavior.prototype={initialize:function(){if(this._enabled){var a=$get(this._sourceControlClientID);this._sourceControl=a;var b=this;$addHandler(a,"keyup",function(){b._onkeyup();});}},_onkeyup:function(){if(this._targetControl==null){this._targetControl=$get(this._targetControlID);}if(this._sourceControl){var text=this._sourceControl.value;if(this._validCharsRegularExpression&&this._validCharsRegularExpression.length>0){text=eval("text.replace(/"+this._validCharsRegularExpression+"/g, '-')");}this._targetControl.value=text;}}};if(typeof(Type)!=="undefined"){AsiWebControls.MatchTextBehavior.registerClass("AsiWebControls.MatchTextBehavior");}addLoadEvent(NavigationList_Init);var NavigationList_LinkIndex=0;var NavigationList_SelectedNode=null;var NavigationList_NavControlId=null;var NavigationList_NavControl=null;function NavigationList_Init(){NavigationList_NavControl=document.getElementById(NavigationList_NavControlId);if(NavigationList_NavControl!=null){var b=NavigationList_NavControl.getElementsByTagName("a");for(var a=0;a0){for(var a=0;a0){for(var a=0;a0){for(var d=0;d0){j.remove(j.item(0));}h.classList.add("ContentRecordPublishPanel");h.classList.add("AsiWarning");h.classList.add("AsiWarningIcon");setTimeout(function(){if(heightUpdated==0){heightUpdated++;var k="+="+jQuery(".ContentRecordPublishPanel").outerHeight(true)+"px";jQuery(".reInlineEditor").css("top",k);}},100);var b=document.querySelector("[id$=PublishMessageLabel]");if(b!=null){b.innerHTML="This page has unsaved changes.";}var e=document.querySelector("[id$=PublishContentRecordButton]");if(e!=null){e.classList.add("d-none");}var d=document.querySelector("[id$=DiscardChangesButton]");if(d!=null){d.classList.remove("d-none");}var c=document.querySelector("[id$=SaveAllContentItemsButton]");if(c!=null){c.classList.remove("d-none");}var g=document.querySelector("[id$=SavePublishContentItemsButton]");if(g!=null){g.classList.remove("d-none");}}}}var editorContentsModified=function(b,a){document.getElementById(b.id).addEventListener("input",function(){a();});};function ContentModified(a,c){if(a._initialContent!=a.get_html(true)){var d=a._element.dataset.contentitemkey;var b=localStorage.getItem("editorIsDirtyList");if(b==null){localStorage.setItem("editorIsDirtyList",d);}else{b=localStorage.getItem("editorIsDirtyList");if(!b.includes(d)){d=b.concat(" ",d);localStorage.setItem("editorIsDirtyList",d);}}setTimeout(function(){ContentPublishPanel(a,c);},0);}}window.onbeforeunload=function(){localStorage.removeItem("editorIsDirtyList");};function SimpleSearchFieldProperties(){this.WatermarkClass="Watermarked";this.WatermarkText="Search";this.SearchTarget=null;}function SimpleSearchField_OnFocus(d,a){var b=document.getElementById(d);if(b==null){return;}if(hasClass(b,a.WatermarkClass)){removeClass(b,a.WatermarkClass);b.value="";if(b.setSelectionRange){b.setSelectionRange(0,0);}else{if(b.createTextRange){var c=b.createTextRange();c.moveStart("character",0);c.collapse();c.select();}}}}function SimpleSearchField_OnBlur(c,a){var b=document.getElementById(c);if(b==null){return;}if(b.value==""&&!hasClass(b,a.WatermarkClass)){addClass(b,a.WatermarkClass);b.value=a.WatermarkText;}}function SimpleSearchField_ExecuteSearch(c,a){var b=document.getElementById(c);if(b==null){return;}if(hasClass(b,a.WatermarkClass)){return;}var d=a.SearchTarget;if(d.indexOf("?")>0){d+="&";}else{d+="?";}d+="SearchTerms="+encodeURIComponent(b.value);location.href=d;}addLoadEvent(SmartControls_Init);var defaultSmartControlInput=null;addLoadEvent(SmartControls_AsyncInit);function SmartControls_AsyncInit(){var a=Sys.WebForms.PageRequestManager.getInstance();if(a!=null){a.add_endRequest(SmartControls_AsyncInit2);}}function SmartControls_AsyncInit2(a,b){setTimeout("SmartControls_Init(true)",750);}function SmartControls_Init(h){if(typeof(DefaultPropertySmartControls)!="undefined"&&DefaultPropertySmartControls&&DefaultPropertySmartControls!=null&&DefaultPropertySmartControls.length>0){var d=$(DefaultPropertySmartControls[0]);var c=false;var k=d.getElementsByTagName("input");for(var f=0;f0){return $(a.id+"_"+b);}}return a;}function SmartControl_LongClientValidation(a,b){b.IsValid=false;inVal=b.Value;if(inVal.substr(0,15)=="922337203685477"){lastDigits=inVal.substr(15,4);if(lastDigits<=5807){b.IsValid=true;}}else{if(inVal.substr(0,16)=="-922337203685477"){lastDigits=inVal.substr(16,4);if(lastDigits<=5808){b.IsValid=true;}}else{if(inVal>=-922337203685477&&inVal<=922337203685477){b.IsValid=true;}}}}if(typeof(Sys)!=="undefined"){Sys.Application.notifyScriptLoaded();}var IMIS_TAG_LABEL="asiweb:BusinessLabel";var IMIS_TAG_HYPERLINK="asiweb:BusinessHyperLink";var IMIS_TAG_IMAGE="asiweb:BusinessStyledImage";var IMIS_TAG_IFBLOCK="asiweb:AtomPanelIfBlock";var IMIS_TAG_IFBLOCK_BODY="asiweb:AtomPanelIfBody";var IMIS_TAG_IFBLOCK_ELSE="asiweb:AtomPanelElseBody";var theEditor;function setImisAttribute(a,b,c){if(c!=null&&c.toString().length>0){a.setAttribute(b,c);}else{if(a.getAttribute(b)!=null){a.removeAttribute(b);}}}function getImisScopeElement(a,c){if(c==null||c.toLowerCase()==a.tagName.toLowerCase()){return a;}if(a.childNodes==null||a.childNodes.length==0){return null;}for(var d=0;d1){var g;var e;var f;for(g=0;g-1;};}else{c=function(f){return d==null||d.toLowerCase()==b.tagName.toLowerCase(); };}var b=a;while(b!=null){if(b.tagName==null){break;}if(c(b.tagName.toLowerCase())){return b;}b=b.parentNode;}return null;}function createImisScopeElement(f,e,d){var g=f.createElement(e);var b="defaultId";if(d!=null&&d.length>0){b=d;}else{for(var a=1;a<200;a++){b=e+(f.getElementsByTagName(e).length+a);b=b.replace(/:/gi,"_");var c=f.getElementById(b)==null?true:false;if(c){break;}}}g.id=b;g.setAttribute("runat","server");return g;}function createLabelElement(c,d,b){var a=createImisScopeElement(c,IMIS_TAG_LABEL,d);updateLabelElement(a,b);return a;}function updateLabelElement(b,a){setImisAttribute(b,"BoundPropertyName",a.BoundPropertyName);setImisAttribute(b,"DisplayMask",a.DisplayMask);setImisAttribute(b,"DisplayValue",a.DisplayValue);b.innerHTML="["+a.BoundPropertyCaption+"]";}function labelToolCallbackFunction(a,e){if(e==null){return;}var b=theEditor.getSelection();var c=b.GetParentElement();var d=findAncestorElement(c,IMIS_TAG_LABEL);if(d==null){d=createLabelElement(theEditor.get_document(),null,e);theEditor.pasteHtml(" "+d.outerHTML+" ");}else{updateLabelElement(d,e);}}function createLinkElement(c,d,a){var b=createImisScopeElement(c,IMIS_TAG_HYPERLINK,d);b.setAttribute("NavigateAutomatically","true");b.setAttribute("IgnoreChildren","true");updateLinkElement(b,a);return b;}function updateLinkElement(a,b){setImisAttribute(a,"BoundPropertyName",b.BoundPropertyName);setImisAttribute(a,"Text",b.Text);setImisAttribute(a,"DisplayMask",b.DisplayMask);var c=(b.Text!=null&&b.Text.length>0)?b.Text:"["+b.BoundPropertyCaption+"]";a.innerHTML=""+c+"";}function linkToolCallbackFunction(c,b){if(b==null){return;}var a=theEditor.getSelection();var e=a.GetParentElement();var f=findAncestorElement(e,IMIS_TAG_HYPERLINK);if(f==null){var d=findAncestorElement(e,IMIS_TAG_LABEL);if(d!=null){f=createLinkElement(theEditor.get_document(),null,b);d.parentNode.replaceChild(f,d);}else{f=createLinkElement(theEditor.get_document(),null,b);theEditor.pasteHtml(" "+f.outerHTML+" ");}}else{updateLinkElement(f,b); }}function createImageElement(d,a,c){var b=createImisScopeElement(d,IMIS_TAG_IMAGE,a);updateImageElement(b,c);return b;}function updateImageElement(a,b){setImisAttribute(a,"BoundPropertyName",b.BoundPropertyName);setImisAttribute(a,"class","contentTaggedListImageThumbnail");setImisAttribute(a,"ToolTip","Featured Image");}function imageToolCallbackFunction(c,b){if(b==null){return;}var a=theEditor.getSelection();var e=a.GetParentElement();var f=findAncestorElement(e,IMIS_TAG_IMAGE);if(f==null){var d=findAncestorElement(e,IMIS_TAG_LABEL);if(d!=null){f=createImageElement(theEditor.get_document(),null,b);d.parentNode.replaceChild(f,d);}else{f=createImageElement(theEditor.get_document(),null,b);theEditor.pasteHtml(" "+f.outerHTML+" ");}}else{updateImageElement(f,b);}}function createIfBlock(f,d,e,a,g){var h=createImisScopeElement(f,IMIS_TAG_IFBLOCK,d);var c="";if(g==null||!g){c+="{";}c+="<"+IMIS_TAG_IFBLOCK_BODY+" runat='server'>";var b="";if(g==null||!g){b+="}";}h.innerHTML=c+a+b;updateIfBlock(h,e);return h;}function updateIfBlock(a,b){setImisAttribute(a,"TestCompareValue1",b.TestCompareValue1);setImisAttribute(a,"TestCompareValue2",b.TestCompareValue2);setImisAttribute(a,"TestCompareType",b.TestCompareType);setImisAttribute(a,"TestDataType",b.TestDataType);}function conditionalDisplayCallbackFunction(a,e){if(e==null||e.cancel===true){return;}var c=theEditor.getSelection();var d=c.GetParentElement();var b=findAncestorElement(d,IMIS_TAG_IFBLOCK);if(b==null){b=createIfBlock(theEditor.get_document(),null,e,c.GetHtmlText());theEditor.pasteHtml(" "+b.outerHTML+" ");}else{updateIfBlock(b,e);}}if(typeof(Sys)!=="undefined"){Sys.Application.notifyScriptLoaded();}var CVM_SOURCEOPTION_LITERAL=new Array("literal","None (Static Text)");var CVM_SOURCEOPTION_PROPERTY=new Array("panel","Property");var CVM_SOURCEOPTION_CONTEXT=new Array("currentcontext","Current Context");var CVM_SOURCEOPTION_REQUEST=new Array("request","Current Request"); var CVM_SOURCEOPTION_SESSION=new Array("session","Current Session");var CVM_SOURCEOPTION_SYSTEMCONFIG=new Array("systemconfig","System Configuration");var CVM_SOURCEOPTIONS=new Array(CVM_SOURCEOPTION_LITERAL,CVM_SOURCEOPTION_PROPERTY,CVM_SOURCEOPTION_CONTEXT,CVM_SOURCEOPTION_REQUEST,CVM_SOURCEOPTION_SESSION,CVM_SOURCEOPTION_SYSTEMCONFIG);function CompareValueManager(c,b){this.Source="literal";this.Property=null;this.Value=null;this.StaticValue=c!=null?c:"";if(b!=null){this.StaticValueControlID=b;this.StaticValueControl=$get(b);this.SourceControl=$get(b+"Source");this.PropertyControl=$get(b+"PropertySelect");this.ValueControl=$get(b+"Text");}if(c!=null&&c.length>0&&c.substr(0,2)=="$("){var a=c.substring(2,c.length-1).split(".");this.Source=a[0];if(a[0]=="panel"){this.Property=a[1];}else{this.Value=a[1];}}this.initialize=function(){for(var f=0;f=0){var e=document.getElementById(b.id+"Node"+b.selectedIndex);e.selected="false";document.getElementById(e.spanId).className=document.getElementById(e.spanId).defaultClass;b.selectedIndex="-1";}b.selectedIndex=c.index;document.getElementById(c.treeviewId+"SelectedIndex").value=c.index;document.getElementById(c.treeviewId+"SelectedKey").value=c.key;c.selected="true";if(d.selectedClass!=""){d.className=d.selectedClass;}if(c.target&&c.target.length>0){document.frames(c.target).location=c.navigateurl;}else{document.location=c.navigateurl;}}function atvOpenClose(a){var b=getParent(a);var c=document.getElementById(b.treeviewId+"OpenNodes");if(a.state=="open"){for(i=0;i0){c.value=c.value+",";}c.value=c.value+b.index;}}}function atvSetStyle(a,b){var d=getParent(a);var c=document.getElementById(d.spanId);var e;if(d.selected=="false"){if(b=="HoverOut"&&c.defaultClass!=""){c.className=c.defaultClass;}else{if(b=="Hover"&&c.hoverClass!=""){c.className=c.hoverClass;}}}}+function(a){var b=function(g,f){this.$element=a(g);this.$indicators=this.$element.find(".carousel-indicators");this.options=f;this.paused=null;this.sliding=null;this.interval=null;this.$active=null;this.$items=null;this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this));this.options.pause=="hover"&&!("ontouchstart" in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this));};b.VERSION="3.4.1";b.TRANSITION_DURATION=600;b.DEFAULTS={interval:5000,pause:"hover",wrap:true,keyboard:true};b.prototype.keydown=function(f){if(/input|textarea/i.test(f.target.tagName)){return;}switch(f.which){case 37:this.prev();break;case 39:this.next();break;default:return;}f.preventDefault();};b.prototype.cycle=function(f){f||(this.paused=false);this.interval&&clearInterval(this.interval);this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval));return this;};b.prototype.getItemIndex=function(f){this.$items=f.parent().children(".item");return this.$items.index(f||this.$active);};b.prototype.getItemForDirection=function(k,i){var g=this.getItemIndex(i);var f=(k=="prev"&&g===0)||(k=="next"&&g==(this.$items.length-1));if(f&&!this.options.wrap){return i;}var h=k=="prev"?-1:1;var j=(g+h)%this.$items.length;return this.$items.eq(j);};b.prototype.to=function(h){var g=this;var f=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(h>(this.$items.length-1)||h<0){return;}if(this.sliding){return this.$element.one("slid.bs.carousel",function(){g.to(h);});}if(f==h){return this.pause().cycle();}return this.slide(h>f?"next":"prev",this.$items.eq(h));};b.prototype.pause=function(f){f||(this.paused=true);if(this.$element.find(".next, .prev").length&&a.support.transition){this.$element.trigger(a.support.transition.end);this.cycle(true);}this.interval=clearInterval(this.interval);return this;};b.prototype.next=function(){if(this.sliding){return; }return this.slide("next");};b.prototype.prev=function(){if(this.sliding){return;}return this.slide("prev");};b.prototype.slide=function(n,l){var p=this.$element.find(".item.active");var g=l||this.getItemForDirection(n,p);var h=this.interval;var o=n=="next"?"left":"right";var m=this;if(g.hasClass("active")){return(this.sliding=false);}var f=g[0];var j=a.Event("slide.bs.carousel",{relatedTarget:f,direction:o});this.$element.trigger(j);if(j.isDefaultPrevented()){return;}this.sliding=true;h&&this.pause();if(this.$indicators.length){this.$indicators.find(".active").removeClass("active");var i=a(this.$indicators.children()[this.getItemIndex(g)]);i&&i.addClass("active");}var k=a.Event("slid.bs.carousel",{relatedTarget:f,direction:o});if(a.support.transition&&this.$element.hasClass("slide")){g.addClass(n);if(typeof g==="object"&&g.length){g[0].offsetWidth;}p.addClass(o);g.addClass(o);p.one("bsTransitionEnd",function(){g.removeClass([n,o].join(" ")).addClass("active");p.removeClass(["active",o].join(" "));m.sliding=false;setTimeout(function(){m.$element.trigger(k);},0);}).emulateTransitionEnd(b.TRANSITION_DURATION);}else{p.removeClass("active");g.addClass("active");this.sliding=false;this.$element.trigger(k);}h&&this.cycle();return this;};function c(f){return this.each(function(){var g=a(this);var j=g.data("bs.carousel");var i=a.extend({},b.DEFAULTS,g.data(),typeof f=="object"&&f);var h=typeof f=="string"?f:i.slide;if(!j){g.data("bs.carousel",(j=new b(this,i)));}if(typeof f=="number"){j.to(f);}else{if(h){j[h]();}else{if(i.interval){j.pause().cycle();}}}});}var e=a.fn.carousel;a.fn.carousel=c;a.fn.carousel.Constructor=b;a.fn.carousel.noConflict=function(){a.fn.carousel=e;return this;};var d=function(h){var j=a(this);var f=j.attr("href");if(f){f=f.replace(/.*(?=#[^\s]+$)/,"");}var l=j.attr("data-target")||f;var i=a(document).find(l);if(!i.hasClass("carousel")){return;}var k=a.extend({},i.data(),j.data());var g=j.attr("data-slide-to");if(g){k.interval=false;}c.call(i,k);if(g){i.data("bs.carousel").to(g); }h.preventDefault();};a(document).on("click.bs.carousel.data-api","[data-slide]",d).on("click.bs.carousel.data-api","[data-slide-to]",d);a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var f=a(this);c.call(f,f.data());});});}(jQuery);+function(a){var e=function(g,f){this.$element=a(g);this.options=a.extend({},e.DEFAULTS,f);this.$trigger=a('[data-toggle="collapse"][href="#'+g.id+'"],[data-toggle="collapse"][data-target="#'+g.id+'"]');this.transitioning=null;if(this.options.parent){this.$parent=this.getParent();}else{this.addAriaAndCollapsedClass(this.$element,this.$trigger);}if(this.options.toggle){this.toggle();}};e.VERSION="3.4.1";e.TRANSITION_DURATION=350;e.DEFAULTS={toggle:true};e.prototype.dimension=function(){var f=this.$element.hasClass("width");return f?"width":"height";};e.prototype.show=function(){if(this.transitioning||this.$element.hasClass("in")){return;}var i;var k=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(k&&k.length){i=k.data("bs.collapse");if(i&&i.transitioning){return;}}var j=a.Event("show.bs.collapse");this.$element.trigger(j);if(j.isDefaultPrevented()){return;}if(k&&k.length){b.call(k,"hide");i||k.data("bs.collapse",null);}var h=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[h](0).attr("aria-expanded",true);this.$trigger.removeClass("collapsed").attr("aria-expanded",true);this.transitioning=1;var g=function(){this.$element.removeClass("collapsing").addClass("collapse in")[h]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse");};if(!a.support.transition){return g.call(this);}var f=a.camelCase(["scroll",h].join("-"));this.$element.one("bsTransitionEnd",a.proxy(g,this)).emulateTransitionEnd(e.TRANSITION_DURATION)[h](this.$element[0][f]);};e.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("in")){return;}var g=a.Event("hide.bs.collapse");this.$element.trigger(g);if(g.isDefaultPrevented()){return;}var f=this.dimension();this.$element[f](this.$element[f]())[0].offsetHeight;this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",false);this.$trigger.addClass("collapsed").attr("aria-expanded",false);this.transitioning=1;var h=function(){this.transitioning=0; this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse");};if(!a.support.transition){return h.call(this);}this.$element[f](0).one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(e.TRANSITION_DURATION);};e.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]();};e.prototype.getParent=function(){return a(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(h,f){var g=a(f);this.addAriaAndCollapsedClass(d(g),g);},this)).end();};e.prototype.addAriaAndCollapsedClass=function(g,f){var h=g.hasClass("in");g.attr("aria-expanded",h);f.toggleClass("collapsed",!h).attr("aria-expanded",h);};function d(g){var h;var f=g.attr("data-target")||(h=g.attr("href"))&&h.replace(/.*(?=#[^\s]+$)/,"");return a(document).find(f);}function b(f){return this.each(function(){var g=a(this);var i=g.data("bs.collapse");var h=a.extend({},e.DEFAULTS,g.data(),typeof f=="object"&&f);if(!i&&h.toggle&&/show|hide/.test(f)){h.toggle=false;}if(!i){g.data("bs.collapse",(i=new e(this,h)));}if(typeof f=="string"){i[f]();}});}var c=a.fn.collapse;a.fn.collapse=b;a.fn.collapse.Constructor=e;a.fn.collapse.noConflict=function(){a.fn.collapse=c;return this;};a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(g){var f=a(this);if(!f.attr("data-target")){g.preventDefault();}var i=d(f);var j=i.data("bs.collapse");var h=j?"toggle":f.data();b.call(i,h);});}(jQuery);+function(b){var a=".dropdown-backdrop";var c='[data-toggle="dropdown"]';var h=function(i){b(i).on("click.bs.dropdown",this.toggle);};h.VERSION="3.4.1";function e(i){var j=i.attr("data-target");if(!j){j=i.attr("href");j=j&&/#[A-Za-z]/.test(j)&&j.replace(/.*(?=#[^\s]*$)/,"");}var k=j!=="#"?b(document).find(j):null;return k&&k.length?k:i.parent();}function d(i){if(i&&i.which===3){return;}b(a).remove();b(c).each(function(){var j=b(this);var k=e(j);var l={relatedTarget:this};if(!k.hasClass("open")){return;}if(i&&i.type=="click"&&/input|textarea/i.test(i.target.tagName)&&b.contains(k[0],i.target)){return;}k.trigger(i=b.Event("hide.bs.dropdown",l));if(i.isDefaultPrevented()){return;}j.attr("aria-expanded","false");k.removeClass("open").trigger(b.Event("hidden.bs.dropdown",l));});}h.prototype.toggle=function(j){var i=b(this);if(i.is(".disabled, :disabled")){return;}var k=e(i);var l=k.hasClass("open");d();if(!l){if("ontouchstart" in document.documentElement&&!k.closest(".navbar-nav").length){b(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(b(this)).on("click",d);}var m={relatedTarget:this};k.trigger(j=b.Event("show.bs.dropdown",m));if(j.isDefaultPrevented()){return;}i.trigger("focus").attr("aria-expanded","true");k.toggleClass("open").trigger(b.Event("shown.bs.dropdown",m));}return false;};h.prototype.keydown=function(k){if(!/(38|40|27|32)/.test(k.which)||/input|textarea/i.test(k.target.tagName)){return;}var o=b(this);k.preventDefault();k.stopPropagation();if(o.is(".disabled, :disabled")){return;}var i=e(o);var n=i.hasClass("open");if(!n&&k.which!=27||n&&k.which==27){if(k.which==27){i.find(c).trigger("focus");}return o.trigger("click");}var l=" li:not(.disabled):visible a";var j=i.find(".dropdown-menu"+l);if(!j.length){return;}var m=j.index(k.target);if(k.which==38&&m>0){m--;}if(k.which==40&&mdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""});};d.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""});};d.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var f=document.documentElement.getBoundingClientRect();e=f.right-Math.abs(f.left);}this.bodyIsOverflowing=document.body.clientWidth"+(this.escape_html(i.group_label))+""+i.html;}else{return i.html;}};h.prototype.mouse_enter=function(){return this.mouse_on_container=true;};h.prototype.mouse_leave=function(){return this.mouse_on_container=false;};h.prototype.input_focus=function(i){if(this.is_multiple){if(!this.active_field){return setTimeout(((function(j){return function(){return j.container_mousedown();};})(this)),50);}}else{if(!this.active_field){return this.activate_field();}}};h.prototype.input_blur=function(i){if(!this.mouse_on_container){this.active_field=false;return setTimeout(((function(j){return function(){return j.blur_test();};})(this)),100);}};h.prototype.label_click_handler=function(i){if(this.is_multiple){return this.container_mousedown(i);}else{return this.activate_field();}};h.prototype.results_option_build=function(n){var o,l,j,p,m,q,k;o="";k=0;q=this.results_data;for(p=0,m=q.length;p=this.max_shown_results){break;}}return o;};h.prototype.result_add_option=function(i){var j,k;if(!i.search_match){return"";}if(!this.include_option_in_results(i)){return"";}j=[];if(!i.disabled&&!(i.selected&&this.is_multiple)){j.push("active-result");}if(i.disabled&&!(i.selected&&this.is_multiple)){j.push("disabled-result");}if(i.selected){j.push("result-selected");}if(i.group_array_index!=null){j.push("group-option");}if(i.classes!==""){j.push(i.classes);}k=document.createElement("li");k.className=j.join(" ");if(i.style){k.style.cssText=i.style;}k.setAttribute("data-option-array-index",i.array_index);k.innerHTML=i.highlighted_html||i.html;if(i.title){k.title=i.title;}return this.outerHTML(k);};h.prototype.result_add_group=function(j){var i,k;if(!(j.search_match||j.group_match)){return"";}if(!(j.active_options>0)){return"";}i=[];i.push("group-result");if(j.classes){i.push(j.classes);}k=document.createElement("li");k.className=i.join(" ");k.innerHTML=j.highlighted_html||this.escape_html(j.label);if(j.title){k.title=j.title;}return this.outerHTML(k);};h.prototype.append_option=function(i){return this.select_append_option(i);};h.prototype.results_update_field=function(){this.set_default_text();if(!this.is_multiple){this.results_reset_cleanup();}this.result_clear_highlight();this.results_build();if(this.results_showing){return this.winnow_results();}};h.prototype.reset_single_select_options=function(){var l,k,m,j,n;m=this.results_data;n=[];for(l=0,k=m.length;l"+(this.escape_html(m))+""+(this.escape_html(j));}if(p!=null){p.group_match=true;}}else{if((z.group_array_index!=null)&&this.results_data[z.group_array_index].search_match){z.search_match=true;}}}}}this.result_clear_highlight();if(t<1&&s.length){this.update_results_content("");if(!(this.create_option&&this.skip_no_results)){return this.no_results(s);}}else{this.update_results_content(this.results_option_build());if(!(k!=null?k.skip_highlight:void 0)){return this.winnow_results_set_highlight();}}if(this.create_option&&(t<1||(!y&&this.persistent_create_option))&&s.length){return this.show_create_option(s);}};h.prototype.get_search_regex=function(j){var k,i;i=this.search_contains?j:"(^|\\s|\\b)"+j+"[^\\s]*";if(!(this.enable_split_word_search||this.search_contains)){i="^"+i;}k=this.case_sensitive_search?"":"i";return new RegExp(i,k);};h.prototype.search_string_match=function(j,k){var i;i=k.exec(j);if(!this.search_contains&&(i!=null?i[1]:void 0)){i.index+=1;}return i;};h.prototype.choices_count=function(){var l,k,j,m; if(this.selected_option_count!=null){return this.selected_option_count;}this.selected_option_count=0;m=this.form_field.options;for(l=0,k=m.length;l0){this.keydown_backstroke();}else{if(!this.pending_backstroke){this.result_clear_highlight();this.results_search();}}break;case 13:i.preventDefault();if(this.results_showing){this.result_select(i);}break;case 27:if(this.results_showing){this.results_hide();}break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search();break;}};h.prototype.clipboard_event_checker=function(i){if(this.is_disabled){return;}return setTimeout(((function(j){return function(){return j.results_search();};})(this)),50);};h.prototype.container_width=function(){if(this.options.width!=null){return this.options.width;}else{return this.form_field.offsetWidth+"px";}};h.prototype.include_option_in_results=function(i){if(this.is_multiple&&(!this.display_selected_options&&i.selected)){return false; }if(!this.display_disabled_options&&i.disabled){return false;}if(i.empty){return false;}return true;};h.prototype.search_results_touchstart=function(i){this.touch_started=true;return this.search_results_mouseover(i);};h.prototype.search_results_touchmove=function(i){this.touch_started=false;return this.search_results_mouseout(i);};h.prototype.search_results_touchend=function(i){if(this.touch_started){return this.search_results_mouseup(i);}};h.prototype.outerHTML=function(j){var i;if(j.outerHTML){return j.outerHTML;}i=document.createElement("div");i.appendChild(j);return i.innerHTML;};h.prototype.get_single_html=function(){return'\n '+this.default_text+'\n
\n
\n
\n \n
    \n
    ';};h.prototype.get_multi_html=function(){return'
      \n
    • \n \n
    • \n
    \n
    \n
      \n
      ';};h.prototype.get_no_results_html=function(i){return'
    • \n '+this.results_none_found+" "+(this.escape_html(i))+"\n
    • ";};h.browser_is_supported=function(){if("Microsoft Internet Explorer"===window.navigator.appName){return document.documentMode>=8;}if(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent)){return false;}return true;};h.default_multiple_text="Select Some Options";h.default_single_text="Select an Option";h.default_no_result_text="No results match";h.default_create_option_text="Add Option"; return h;})();b=jQuery;b.fn.extend({chosen:function(h){if(!a.browser_is_supported()){return this;}return this.each(function(k){var i,j;i=b(this);j=i.data("chosen");if(h==="destroy"){if(j instanceof d){j.destroy();}return;}if(!(j instanceof d)){i.data("chosen",new d(this,h));}});}});d=(function(h){f(i,h);function i(){return i.__super__.constructor.apply(this,arguments);}i.prototype.setup=function(){this.form_field_jq=b(this.form_field);return this.current_selectedIndex=this.form_field.selectedIndex;};i.prototype.set_up_html=function(){var k,j;k=["chosen-container"];k.push("chosen-container-"+(this.is_multiple?"multi":"single"));if(this.inherit_select_classes&&this.form_field.className){k.push(this.form_field.className);}if(this.is_rtl){k.push("chosen-rtl");}j={"class":k.join(" "),title:this.form_field.title};if(this.form_field.id.length){j.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen";}this.container=b("
      ",j);this.container.width(this.container_width());if(this.is_multiple){this.container.html(this.get_multi_html());}else{this.container.html(this.get_single_html());}this.form_field_jq.hide().after(this.container);this.dropdown=this.container.find("div.chosen-drop").first();this.search_field=this.container.find("input").first();this.search_results=this.container.find("ul.chosen-results").first();this.search_field_scale();this.search_no_results=this.container.find("li.no-results").first();if(this.is_multiple){this.search_choices=this.container.find("ul.chosen-choices").first();this.search_container=this.container.find("li.search-field").first();}else{this.search_container=this.container.find("div.chosen-search").first();this.selected_item=this.container.find(".chosen-single").first();}this.results_build();this.set_tab_index();this.search_field.attr("aria-label",this.default_text.replace(" ","_")+"_label");return this.set_label_behavior();};i.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this});};i.prototype.register_observers=function(){this.container.on("touchstart.chosen",(function(j){return function(k){j.container_mousedown(k); };})(this));this.container.on("touchend.chosen",(function(j){return function(k){j.container_mouseup(k);};})(this));this.container.on("mousedown.chosen",(function(j){return function(k){j.container_mousedown(k);};})(this));this.container.on("mouseup.chosen",(function(j){return function(k){j.container_mouseup(k);};})(this));this.container.on("mouseenter.chosen",(function(j){return function(k){j.mouse_enter(k);};})(this));this.container.on("mouseleave.chosen",(function(j){return function(k){j.mouse_leave(k);};})(this));this.search_results.on("mouseup.chosen",(function(j){return function(k){j.search_results_mouseup(k);};})(this));this.search_results.on("mouseover.chosen",(function(j){return function(k){j.search_results_mouseover(k);};})(this));this.search_results.on("mouseout.chosen",(function(j){return function(k){j.search_results_mouseout(k);};})(this));this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",(function(j){return function(k){j.search_results_mousewheel(k);};})(this));this.search_results.on("touchstart.chosen",(function(j){return function(k){j.search_results_touchstart(k);};})(this));this.search_results.on("touchmove.chosen",(function(j){return function(k){j.search_results_touchmove(k);};})(this));this.search_results.on("touchend.chosen",(function(j){return function(k){j.search_results_touchend(k);};})(this));this.form_field_jq.on("chosen:updated.chosen",(function(j){return function(k){j.results_update_field(k);};})(this));this.form_field_jq.on("chosen:activate.chosen",(function(j){return function(k){j.activate_field(k);};})(this));this.form_field_jq.on("chosen:open.chosen",(function(j){return function(k){j.container_mousedown(k);};})(this));this.form_field_jq.on("chosen:close.chosen",(function(j){return function(k){j.close_field(k);};})(this));this.search_field.on("blur.chosen",(function(j){return function(k){j.input_blur(k);};})(this));this.search_field.on("keyup.chosen",(function(j){return function(k){j.keyup_checker(k);};})(this));this.search_field.on("keydown.chosen",(function(j){return function(k){j.keydown_checker(k); };})(this));this.search_field.on("focus.chosen",(function(j){return function(k){j.input_focus(k);};})(this));this.search_field.on("cut.chosen",(function(j){return function(k){j.clipboard_event_checker(k);};})(this));this.search_field.on("paste.chosen",(function(j){return function(k){j.clipboard_event_checker(k);};})(this));if(this.is_multiple){return this.search_choices.on("click.chosen",(function(j){return function(k){j.choices_click(k);};})(this));}else{return this.container.on("click.chosen",function(j){j.preventDefault();});}};i.prototype.destroy=function(){b(this.container[0].ownerDocument).off("click.chosen",this.click_test_action);if(this.form_field_label.length>0){this.form_field_label.off("click.chosen");}if(this.search_field[0].tabIndex){this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex;}this.container.remove();this.form_field_jq.removeData("chosen");return this.form_field_jq.show();};i.prototype.search_field_disabled=function(){this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled");this.container.toggleClass("chosen-disabled",this.is_disabled);this.search_field[0].disabled=this.is_disabled;if(!this.is_multiple){this.selected_item.off("focus.chosen",this.activate_field);}if(this.is_disabled){return this.close_field();}else{if(!this.is_multiple){return this.selected_item.on("focus.chosen",this.activate_field);}}};i.prototype.container_mousedown=function(j){var k;if(this.is_disabled){return;}if(j&&((k=j.type)==="mousedown"||k==="touchstart")&&!this.results_showing){j.preventDefault();}if(!((j!=null)&&(b(j.target)).hasClass("search-choice-close"))){if(!this.active_field){if(this.is_multiple){this.search_field.val("");}b(this.container[0].ownerDocument).on("click.chosen",this.click_test_action);this.results_show();}else{if(!this.is_multiple&&j&&((b(j.target)[0]===this.selected_item[0])||b(j.target).parents("a.chosen-single").length)){j.preventDefault();this.results_toggle();}}return this.activate_field();}}; i.prototype.container_mouseup=function(j){if(j.target.nodeName==="ABBR"&&!this.is_disabled){return this.results_reset(j);}};i.prototype.search_results_mousewheel=function(k){var j;if(k.originalEvent){j=k.originalEvent.deltaY||-k.originalEvent.wheelDelta||k.originalEvent.detail;}if(j!=null){k.preventDefault();if(k.type==="DOMMouseScroll"){j=j*40;}return this.search_results.scrollTop(j+this.search_results.scrollTop());}};i.prototype.blur_test=function(j){if(!this.active_field&&this.container.hasClass("chosen-container-active")){return this.close_field();}};i.prototype.close_field=function(){b(this.container[0].ownerDocument).off("click.chosen",this.click_test_action);this.active_field=false;this.results_hide();this.container.removeClass("chosen-container-active");this.clear_backstroke();this.show_search_field_default();this.search_field_scale();return this.search_field.blur();};i.prototype.activate_field=function(){if(this.is_disabled){return;}this.container.addClass("chosen-container-active");this.active_field=true;this.search_field.val(this.search_field.val());return this.search_field.focus();};i.prototype.test_active_click=function(k){var j;j=b(k.target).closest(".chosen-container");if(j.length&&this.container[0]===j[0]){return this.active_field=true;}else{return this.close_field();}};i.prototype.results_build=function(){this.parsing=true;this.selected_option_count=null;this.results_data=c.select_to_array(this.form_field);if(this.is_multiple){this.search_choices.find("li.search-choice").remove();}else{this.single_set_selected_text();if(this.disable_search||this.form_field.options.length<=this.disable_search_threshold&&!this.create_option){this.search_field[0].readOnly=true;this.container.addClass("chosen-container-single-nosearch");}else{this.search_field[0].readOnly=false;this.container.removeClass("chosen-container-single-nosearch");}}this.update_results_content(this.results_option_build({first:true}));this.search_field_disabled();this.show_search_field_default(); this.search_field_scale();return this.parsing=false;};i.prototype.result_do_highlight=function(j){var o,n,l,k,m;if(j.length){this.result_clear_highlight();this.result_highlight=j;this.result_highlight.addClass("highlighted");l=parseInt(this.search_results.css("maxHeight"),10);m=this.search_results.scrollTop();k=l+m;n=this.result_highlight.position().top+this.search_results.scrollTop();o=n+this.result_highlight.outerHeight();if(o>=k){return this.search_results.scrollTop((o-l)>0?o-l:0);}else{if(n0){return this.form_field_label.on("click.chosen",this.label_click_handler);}};i.prototype.show_search_field_default=function(){if(this.is_multiple&&this.choices_count()<1&&!this.active_field){this.search_field.val(this.default_text); return this.search_field.addClass("default");}else{this.search_field.val("");return this.search_field.removeClass("default");}};i.prototype.search_results_mouseup=function(k){var j;j=b(k.target).hasClass("active-result")?b(k.target):b(k.target).parents(".active-result").first();if(j.length){this.result_highlight=j;this.result_select(k);return this.search_field.focus();}};i.prototype.search_results_mouseover=function(k){var j;j=b(k.target).hasClass("active-result")?b(k.target):b(k.target).parents(".active-result").first();if(j){return this.result_do_highlight(j);}};i.prototype.search_results_mouseout=function(j){if(b(j.target).hasClass("active-result")||b(j.target).parents(".active-result").first()){return this.result_clear_highlight();}};i.prototype.choice_build=function(j){var k,l;k=b("
    • ",{"class":"search-choice"}).html(""+(this.choice_label(j))+"");if(j.disabled){k.addClass("search-choice-disabled");}else{l=b("",{"class":"search-choice-close","data-option-array-index":j.array_index});l.on("click.chosen",(function(m){return function(n){return m.choice_destroy_link_click(n);};})(this));k.append(l);}return this.search_container.before(k);};i.prototype.choice_destroy_link_click=function(j){j.preventDefault();j.stopPropagation();if(!this.is_disabled){return this.choice_destroy(b(j.target));}};i.prototype.choice_destroy=function(j){if(this.result_deselect(j[0].getAttribute("data-option-array-index"))){if(this.active_field){this.search_field.focus();}else{this.show_search_field_default();}if(this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1){this.results_hide();}j.parents("li").first().remove();return this.search_field_scale();}};i.prototype.results_reset=function(){this.reset_single_select_options();this.form_field.options[0].selected=true;this.single_set_selected_text();this.show_search_field_default();this.results_reset_cleanup();this.trigger_form_field_change();if(this.active_field){return this.results_hide();}};i.prototype.results_reset_cleanup=function(){this.current_selectedIndex=this.form_field.selectedIndex; return this.selected_item.find("abbr").remove();};i.prototype.result_select=function(j){var l,k;if(this.result_highlight){l=this.result_highlight;if(l.hasClass("create-option")){this.select_create_option(this.search_field.val());return this.results_hide();}this.result_clear_highlight();if(this.is_multiple&&this.max_selected_options<=this.choices_count()){this.form_field_jq.trigger("chosen:maxselected",{chosen:this});return false;}if(this.is_multiple){l.removeClass("active-result");}else{this.reset_single_select_options();}l.addClass("result-selected");k=this.results_data[l[0].getAttribute("data-option-array-index")];k.selected=true;this.form_field.options[k.options_index].selected=true;this.selected_option_count=null;if(this.is_multiple){this.choice_build(k);}else{this.single_set_selected_text(this.choice_label(k));}if(this.is_multiple&&(!this.hide_results_on_select||(j.metaKey||j.ctrlKey))){if(j.metaKey||j.ctrlKey){this.winnow_results({skip_highlight:true});}else{this.search_field.val("");this.winnow_results();}}else{this.results_hide();this.show_search_field_default();}if(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex){this.trigger_form_field_change({selected:this.form_field.options[k.options_index].value});}this.current_selectedIndex=this.form_field.selectedIndex;j.preventDefault();return this.search_field_scale();}};i.prototype.single_set_selected_text=function(j){if(j==null){j=this.default_text;}if(j===this.default_text){this.selected_item.addClass("chosen-default");}else{this.single_deselect_control_build();this.selected_item.removeClass("chosen-default");}return this.selected_item.find("span").html(j);};i.prototype.result_deselect=function(k){var j;j=this.results_data[k];if(!this.form_field.options[j.options_index].disabled){j.selected=false;this.form_field.options[j.options_index].selected=false;this.selected_option_count=null;this.result_clear_highlight();if(this.results_showing){this.winnow_results();}this.trigger_form_field_change({deselected:this.form_field.options[j.options_index].value}); this.search_field_scale();return true;}else{return false;}};i.prototype.single_deselect_control_build=function(){if(!this.allow_single_deselect){return;}if(!this.selected_item.find("abbr").length){this.selected_item.find("span").first().after('');}return this.selected_item.addClass("chosen-single-with-deselect");};i.prototype.get_search_field_value=function(){return this.search_field.val();};i.prototype.get_search_text=function(){return b.trim(this.get_search_field_value());};i.prototype.escape_html=function(j){return b("
      ").text(j).html();};i.prototype.winnow_results_set_highlight=function(){var j,k;k=!this.is_multiple?this.search_results.find(".result-selected.active-result"):[];j=k.length?k.first():this.search_results.find(".active-result").first();if(j!=null){return this.result_do_highlight(j);}};i.prototype.no_results=function(j){var k;k=this.get_no_results_html(j);this.search_results.append(k);return this.form_field_jq.trigger("chosen:no_results",{chosen:this});};i.prototype.show_create_option=function(j){var k;k=b('
    • '+this.create_option_text+': "'+j+'"
    • ');return this.search_results.append(k);};i.prototype.create_option_clear=function(){return this.search_results.find(".create-option").remove();};i.prototype.select_create_option=function(j){if(b.isFunction(this.create_option)){return this.create_option.call(this,j);}else{return this.select_append_option({value:j,text:j});}};i.prototype.select_append_option=function(k){var j;j=b("