function trim(n){return n.replace(/^\s*|\s*$/g,"")}function SafeAddOnload(n){window.onload?window.onload!=SafeOnload&&(gSafeOnload[0]=window.onload,window.onload=SafeOnload):window.onload=SafeOnload;gSafeOnload[gSafeOnload.length]=n}function SafeOnload(){for(var i=0;i0&&(c.left=v>i?p+(v-i)/2:screen.width>i?(screen.width-i)/2:0,l+=(window.screenX?",screenX=":",left=")+Math.round(c.left,0),l+=",width="+c.width),r>0&&(c.top=y>r?w+(y-r)/2:screen.height>r?(screen.height-r)/2:0,l+=(window.screenY?",screenY=":",top=")+Math.round(c.top,0),l+=",height="+c.height),c.win=window.open(c.url,c.name,l),c.win==null)alert("Popup window is blocked!\n\nPlease enable popup in your browser.");else if(c.win!=null)try{c.win.name=c.win.name.replace(/ /g,"_");c.win.focus();gDialogs[gDialogs.length]=c}catch(k){}}else c.win&&c.win.focus();return c.win}function findMainWindow(){for(var n=self;;){if(n==n.parent&&n.parent==n.parent.parent)break;n=n.parent}return n}function printFrame(n){typeof n.contentWindow=="undefined"?window.print():n.contentWindow.print()}function printFireEvent(n,t,i){var r=t[i];switch(typeof r){case"string":n.execScript(r);break;case"function":r()}}function printGetEventScope(n){var t=n.document.all.tags("FRAMESET");return t.length?t[0]:n.document.body}function checkFrames(){}function getRootPath(){var n=window.location.pathname;return n.length>1&&(p=n.indexOf("/",1),p>=0)?n.substr(0,p+1):"/"}function goChat(n,t,i,r,u){var f=document.getElementById(n),o=document.getElementById(t),e,s;f&&o&&(e=f.options[f.selectedIndex].value,s=o.value,loadIFrameContent("chatFrame",getRootPath()+"Web/Collab/Chat/gochat.aspx?room="+e+"&roomName="+e+"&nickname="+s+"&admin="+r+"&moderate="+i+"&logged="+u))}function goChatDirect(n,t,i,r,u){loadIFrameContent("chatFrame",getRootPath()+"Web/Collab/Chat/gochat.aspx?room="+n+"&roomName="+n+"&nickname="+t+"&admin="+r+"&moderate="+i+"&logged="+u)}function checkFrames(){}function waitAndRedirect(n,t){var i="redirectUrl('"+t+"')";setTimeout(i,n*1e3)}function redirectUrl(n){document.location.replace(n)}function loadFrameContent(n,t){document.frames[n].document.location.replace(t)}function loadIFrameContent(n,t){var i=document.getElementById(n);i?i.src=t:alert("Cannot find frame:"+n)}function FirstFocus_FindFirst(){for(var t,n,r,i=0;i0)for(var i=0;idocument.documentElement.offsetWidth-20&&(r+=t.offsetWidth-themenu.offsetWidth),themenu.style.left=r+"px",themenu.style.top=yaf_top(t)+"px",themenu.style.visibility="visible",themenu.style.zIndex=100):yaf_hidemenu(),!1}function yaf_mouseover(){var n=getEvent(window.event);n.srcElement?n.srcElement.style.cursor="hand":n.target&&(n.target.style.cursor="pointer")}function mouseHover(n,t){if(t){n.className="postfooter";try{n.style.cursor="pointer"}catch(i){n.style.cursor="hand"}}else n.className="post"}function yaf_hidemenu(){window.themenu&&(window.themenu.style.visibility="hidden",window.themenu=null)}function getEvent(n){return n.stopPropagation?(n.stopPropagation(),n.preventDefault(),n):(window.event.returnValue=!1,window.event.cancelBubble=!0,window.event)}function yaf_left(n){for(var t=0;n;)t+=n.offsetLeft,n=n.offsetParent;return t}function yaf_top(n){for(var t=n.offsetHeight;n;)t+=n.offsetTop,n=n.offsetParent;return t}function collapsablePanelSaveState(n,t){var i,r,u,f;n.lastIndexOf("_")>-1&&(n=n.substr(n.lastIndexOf("_")+1,n.length));i=getCookie(_boxStateCookieName);i==null&&(i="|");r=i.indexOf(n);t&&r<0?(i=i+n+"|",setCookie(_boxStateCookieName,i,getExpirationDate(1))):!t&&r>-1&&(u=r+n.length,f=i.length-u,i=i.substr(0,r),u>0&&(i+=i.substr(u+1,f)),setCookie(_boxStateCookieName,i,getExpirationDate(1)))}function saveBoxState(){var n="",t;for(i=0;i<_boxSaveArr.length;i++)t=CollapsablePanel_Find(_boxSaveArr[i]),t&&(t.Collapsed||(n=n+"|"+_boxSaveArr[i]));setCookie(_boxStateCookieName,n,getExpirationDate(1))}function setCookie(n,t,i){return cookieInfo=n+"="+escape(t)+";expires="+i+";path=/",document.cookie=cookieInfo,document.cookie}function getExpirationDate(n){return today=new Date,today.setTime(Date.parse(today)+n*864e4),today.toUTCString()}function getCookie(n){for(var i,r=document.cookie.split("; "),t=0;tt&&(n.value=n.value.substr(0,t))}function centerDiv(n){var t=document.getElementById(n),i,r;t&&(i=supressPx(t.style.width),typeof i=="undefined"&&(i=0),r=supressPx(t.style.height),typeof i=="undefined"&&(r=0),t.style.left=parseInt((windowState.getWidth()+windowState.getScrollX()-i)/2)+"px",t.style.top=parseInt((windowState.getHeight()-r)/2)+windowState.getScrollY()+"px")}function getPosition(n){n=n||window.event;var t={x:0,y:0};return n.pageX||n.pageY?(t.x=n.pageX,t.y=n.pageY):(t.x=n.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft,t.y=n.clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop),t}function isNumberKey(n){var t=n.which?n.which:event.keyCode;return t>31&&(t<48||t>57)?!1:!0}function fix_flash(){var o=document.getElementsByTagName("embed"),t,f,u,n,r,e;for(i=0;i/i)?n.replace(//i,""):n.replace(/<\/object\>/i,"\n<\/object>"),r=object.childNodes,j=0;j/i,"")))}catch(s){}object.insertAdjacentHTML("beforeBegin",u);object.parentNode.removeChild(object)}}function TextAreaMaxLenth(n,t){var r=$(t).attr("_maxlength"),i=n.keyCode==0?n.which:n.keyCode;$(t).val().length>=r&&$(t).val($(t).val().substr(0,r));$(t).val().length>=r&&(i==8||i==9||i==46||i==33||i==27||i==145||i==19||i==34||i==37||i==39||i==16||i==18||i==38||i==40||i==35||i==36||n.ctrlKey&&i==88||n.ctrlKey&&i==65||n.ctrlKey&&i==67||n.ctrlKey&&i==86||n.preventDefault())}function OnFailedCallback(){$.ajax({type:"POST",url:mplsRootPath+"/WebService/Utils.asmx/IsLogged",data:"{}",contentType:"application/json; charset=ISO-8859-1",dataType:"json",async:!1,success:function(n){n.d!=""&&(window.location=n.d)}})}function hexToRgb(n){var t;return n=n.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(n,t,i,r){return t+t+i+i+r+r}),t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n),t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function ExecSearchWithLoading(n,t,i,r,u,f){n?t.slideUp(function(){t.empty().append("
<\/div>").slideDown().delay(500);i(function(n){t.slideUp(function(){r(n,t.empty(),u);t.slideDown(f)})})}):t.css({height:t.height().toString()+"px",width:t.width().toString()+"px"}).fadeOut(function(){t.css({backgroundColor:"#EFEFEF"}).addClass("loading").empty().fadeIn(function(){i(function(n){t.fadeOut(function(){t.css({height:"",width:"",backgroundColor:""}).removeClass("loading").empty();r(n,t,u);t.fadeIn(f)})})})})}function StorageWrp(n,t,i){var r={},u=n!=null;this.get=function(f){return u?n.getItem(t+f.toString()+i.toString()):r[t+f.toString()+i.toString()]};this.set=function(f,e){u?n.setItem(t+f.toString()+i.toString(),e):r[t+f.toString()+i.toString()]=e}}function LocalStorageWrp(n,t){var i=new StorageWrp(window.localStorage,n,t);this.get=function(n){return i.get(n)};this.set=function(n,t){i.set(n,t)}}function SessionStorageWrp(n,t){var i=new StorageWrp(window.sessionStorage,n,t);this.get=function(n){return i.get(n)};this.set=function(n,t){i.set(n,t)}}function buildPaging(n,t,i,r,u,f){var h=$("div.paging",n).empty(),o=Math.ceil(t/i),c=function(n){var t=$("").attr("title",n).attr("data-page",n).html(n.toString()).click(u);n==r&&t.addClass("selected");h.append(t)},l=function(n,t){var i=2,r=o-1,u=n-t,f=n+t;return ur?{Start:r-t*2,End:r}:{Start:u,End:f}},s,e;if(o<16)for(e=1;e<=o;e++)c(e);else{for(c(1),s=l(+(r<=o?r:1),3),s.Start!=2&&h.append($("")),e=s.Start;e<=s.End;e++)c(e);s.End!=o-1&&h.append($(""));c(o)}return o>0&&$(".selected",h).length==0?(window.setTimeout(f,1),!1):!0}function CommonDateRangeValidator(n,t,i,r,u,f){var e=$find(n).get_selectedDate(),a=$find(t),o=$find(i).get_selectedDate(),v=$find(r),s,h,c,l;if(e!=null&&a!=null){if(s=a.get_selectedDate(),s==null)return!1;e.setHours(s.getHours());e.setMinutes(s.getMinutes())}if(o!=null&&v!=null){if(h=v.get_selectedDate(),h==null)return!1;o.setHours(h.getHours());o.setMinutes(h.getMinutes())}return e==null||o==null?!f:(c=new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes()),l=new Date(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes()),c.getTime()<\/div>").fadeIn(function(){location.href=n})})}function KeepPanelsOnScreen(n){var f=function(n,t){var r=t.parent(),i=$("
").hide();r.append(i);this.SetPosition=function(n,r,u,f){var l,s,h,c,e,a,o;i.hide();l=t.css("display");s=t.css({display:"",position:"relative",top:"",bottom:"",width:"",height:""}).offset().top;t.css("display",l);h=r>=s;c=t.hasClass("fixedPosition");(h||c)&&(e=null,o=t.outerHeight(),oo+s&&(e=!1),(e!=null||c)&&(a=t.width(),o=t.height(),i.width(t.outerWidth(!0)).height(o).show(),t.css("position","fixed"),h&&e!=null?t.css(e?"top":"bottom",e?"0px":f).width(a).height(o):t.css("top",s-r+"px")))}},r=$(n);if(!(r.length<2)){var u=r.map(function(n,t){return new f(n,$(t))}),i=!1,t=function(){var s,r;if(!i){i=!0;var f=$(window).height(),e=$(window).scrollTop(),o=$(document).height(),n=$(".BottomContent").offset().top,t=f+e;for(t>n&&(f=n-e),s=(t<=n?0:o-n-(o-t)).toString()+"px",r=0;r<\/iframe>'),i=null;t.on("load",function(){$(this.contentWindow).resize(function(){var t=$(document).height();i!=t&&(n(),i=t)})});$(document.body).append(t)}function PortalThreePanelsBarVisibilityControl(){function f(n){i=$("
").click(n);$(document.body).append(i);i.show("fade")}function e(){n?(i.remove(),$(".LeftPanel>.LeftContent").removeClass("fixedPosition").hide().css({zIndex:"",backgroundColor:"",border:"",left:""})):(f(e),$(".LeftPanel>.LeftContent").addClass("fixedPosition").show().css({zIndex:999,backgroundColor:"white",border:"1px solid gray",left:0}));n=!n;$(window).trigger("scroll")}function o(){t?(i.remove(),$(".RightPanel>.RightContent").removeClass("fixedPosition").hide().css({zIndex:"",backgroundColor:"",border:"",right:""})):(f(o),$(".RightPanel>.RightContent").addClass("fixedPosition").show().css({zIndex:999,backgroundColor:"white",border:"1px solid gray",right:0}));t=!t;$(window).trigger("scroll")}function s(){var i=h("LeftPanel","LeftContent","imgLeftPanel",900,n,u);u=i.WndVar;n=i.BarVar;i=h("RightPanel","RightContent","imgRightPanel",1100,t,r);r=i.WndVar;t=i.BarVar;r?($(".RightPanel").css({overflow:""}),$(".RightPanel>.RightContent").css({position:"",right:""})):($(".RightPanel").css({overflow:"hidden"}),$(".RightPanel>.RightContent").css({position:"absolute",right:"0"}))}function h(n,t,i,r,u,f){if(f!=u)return{WndVar:f,BarVar:u};var e=$("."+n),o=$("."+n+">."+t),s=$("."+n+">."+i);return $(window).width().imgLeftPanel").click(e);$(".RightPanel>.imgRightPanel").click(o);s()})}function portalChange(n,t){window.location=t}function MainMenuSearch(n){function t(n){var t=[],i=[];if(t.push(n.get_value()),i.push(n.get_text()),t[0]!=null&&t[0]!=""){if(n.get_level()>0)do n=n.get_parent(),t.push(n.get_value()),i.push(n.get_text());while(n.get_level()>0);return{Value:t.reverse().join(">"),Text:i.reverse().join(" > ")}}}this.mainMenuClickedOn=function(n,i){var r=t(i.get_item());r&&$.post(mplsRootPath+"/Web/Portal/MenuHit.ashx",{value:JSON.stringify({Type:r.Type,PageName:r.PageName})})};var i={};this.loadMenu=function(r){var h=$(".mainMenuSearchText"),s,f,e,o,u;if(h.length!=0){for(s=r.get_allItems(),f=[],f.push($("