var helpWindow;var helpWindowSimple;var objCalendarFrame;var blnLoggedIntoPortal=false;try{blnLoggedIntoPortal=window.top.blnLoggedIntoPortal}catch(e){if(document.location.search.indexOf("Portal=1")>=0){blnLoggedIntoPortal=true}}function openIDoc(a){openWindow(idocURL+"/Default.htm?idocID="+a,"_blank",1000,800,"",false)}var strProjectFramesPagePlus="index.htm#";function GetLocalWindow(){var a=window.top.WindowBar;if(!a||typeof LocalWindowName=="undefined"){return false}return a.GetWindow(LocalWindowName)}function GetCurrentPageID(){if(typeof(currentPageID)=="undefined"){var a=window.top.WindowBar.GetActiveWindow();return a.GetContentFrame(a.ContentFrame).currentPageID}else{return currentPageID}}function GetCurrentLogRequestID(){if(typeof(logRequestID)=="undefined"){var a=window.top.WindowBar.GetActiveWindow();return a.GetContentFrame(a.ContentFrame).logRequestID}else{return logRequestID}}function resetSessionTimeout(){if(window.top.resetLastUserActivity){window.top.resetLastUserActivity()}}function callHelp(d,b,a){var f=",toolbar=no,location=no,status=no,menubar=no,resizable=yes";f+=",top=30";f+=",left=25";f+=",width=880";f+=",height=625";if(helpWindow==null||helpWindow.closed){if(helpWindowSimple&&!helpWindowSimple.closed){helpWindowSimple.close()}if(a==undefined){a="Aprimo80Help"}helpWindow=window.open("",a,f);if(helpWindow.frames.length>0){helpWindow.frames[1].frames[1].location.href=d+b}else{if(IsMac()){if(b.split("#").length>1){b=b.substring(0,b.lastIndexOf("#"))}}helpWindow.location.href=d+strProjectFramesPagePlus+b}helpWindow.focus()}else{if(helpWindow&&!helpWindow.closed){if(helpWindowSimple&&!helpWindowSimple.closed){helpWindowSimple.close()}helpWindow.frames[1].frames[1].location.href=d+b;helpWindow.focus()}}}function HelpContentToHTML(b){var a=b.replace(/<</g,"&lt;&lt;");a=a.replace(/>>/g,"&gt;&gt;");return a}function HelpContentFromHTML(b){var a=b.replace(/&lt;&lt;/g,"<<");a=a.replace(/&gt;&gt;/g,">>");return a}function SwapImage(g,a,d){var b=document.getElementById(g);if(d){if(d=="Off"){b.src=a}else{var f=a.substring(0,a.lastIndexOf("."))+"_On"+a.substring(a.lastIndexOf("."));b.src=f}}else{b.src=a}}var g_lngCounter=0;var g_blnReverse=false;function OpenReportWindow(f,b,k,a,g,j,h,i){if(g!=""){g+=","}g+="scrollbars=yes,width="+k;g+=",height="+a;g+=",left="+j+",top="+h;g+=",resizable=yes";var d=window.open(f,b,g);d.focus()}function openWindow(g,b,m,a,h,i){if(!b||b==""){b="newWin"}if(IsMac()){if(!m){m=750}if(!a){a=600}if(!h||h==""){h="alwaysRaised=yes, status=1, menubar=yes"}}var l=screen.availWidth;var k=screen.availHeight;var j=(l-m)/2;var d=(k-a)/2;if(h!=""){h+=","}h+="scrollbars=yes,width="+m;h+=",height="+a;h+=",left="+j+",top="+d;h+=",resizable=yes";if(i){b="ModalWindow"}var f=window.open(g,b,h);f.focus();if(i){window.Modal=f;if(IsMac()){window.onmouseover=WindowOnFocus}else{window.onfocus=WindowOnFocus}}}function WindowOnFocus(){if(window.Modal!=null){window.Modal.focus()}}function openPositionedWindow(g,b,l,a,h){var k=screen.availWidth;var j=screen.availHeight;var i=(k-l)/2;var d=(j-a)/2;if(h!=""){h+=","}h+="width="+l;h+=",height="+a;h+=",left="+i+",top="+d;var f=window.open(g,b,h);f.focus()}function openWindowsegmentation(d,b,f){var h=screen.availWidth-225;var i=screen.availHeight-225;var j=round((screen.availWidth-h)/2);var a=round((screen.availHeight-i)/2)-50;if(f!=""){f+=","}f+="scrollbars=no,status=yes";f+=",left="+j+",top="+a;f+=",width="+h+",height="+i;if(bIsIE()){f+=",resizable=yes"}var g=window.open(d,b,f);g.focus()}function openWindowFileOutput(d,b,f){var h=screen.availWidth-225;var i=screen.availHeight-225;var j=round((screen.availWidth-h)/2);var a=round((screen.availHeight-i)/2)-50;if(f!=""){f+=","}f+="scrollbars=no,status=yes";f+=",width="+h+",height="+i;if((f.indexOf("left")<0)&&(f.indexOf("top")<0)){f+=",left="+j+",top="+a}if(bIsIE()){f+=",resizable=yes"}var g=window.open(d,b,f);g.focus()}function openWindowGeneric(d,b,f){var h=screen.availWidth-225;var i=screen.availHeight-225;var j=round((screen.availWidth-h)/2);var a=round((screen.availHeight-i)/2)-50;if(f!=""){f+=","}f+="scrollbars=no,status=yes";f+=",width="+h+",height="+i;if((f.indexOf("left")<0)&&(f.indexOf("top")<0)){f+=",left="+j+",top="+a}if(bIsIE()){f+=",resizable=yes"}var g=window.open(d,b,f);g.focus()}function openfilterwindow(a){win=openWindow(a,"PopupFilter",750,550,"",false)}function openDashboardWindow(a){win=window.open(a,"ExecutiveDashboard","scrollbars=yes,menubar=yes,toolbar=no,status=no,resizable=yes,top=0,left=0,height="+(screen.availHeight-75)+",width="+(screen.availWidth-25),false);win.focus()}function popMessage(b,f){var a;var g;var d=false;if(typeof(f)!="object"){f=document.getElementById(f)}if(b.indexOf("|")>0){a=b.substring(b.indexOf("|")+1);b=b.substring(0,b.indexOf("|"));f=document.getElementById(a)}if(b!=""){alert(b);d=true}if(f!=null&&!f.disabled){f.focus();d=true}return d}function openLinkFromCalendar(a){window.opener.parent.opener.document.location.href=a;window.opener.parent.opener.focus();window.close()}function move(b){var f=document.getElementById("Starter");f.style.posLeft=f.style.posLeft+b;x=f.style.posLeft;var a=document.getElementById("StartTable");var d=f.offsetWidth-a.offsetWidth+10;if(x<d){if(g_blnReverse&&x==(d-15)){g_blnReverse=false}if(g_blnReverse&&x>(d-15)){setTimeout("move(-1)",3)}else{setTimeout("move(1)",6)}}else{if(!g_blnReverse&&g_lngCounter==0){g_blnReverse=true;setTimeout("move(-1)",50);g_lngCounter++}}}function SetCookie(f,d,v,l){var s="";var i=new Array;var p="";var g=0;var n=new Date();var m="";var q=new Array;var h=0;var k="";var t=false;var a="";var o=new Array;var b=0;var u=new Array;var r=false;var j="";s=v;s=Replace(s,"&","%26");s=Replace(s,";","%3B");s=Replace(s," ","%20");if(l){i=l.split(":");p=i[0];g=i[1];switch(p.toUpperCase()){case"S":n.setTime(n.getTime()+(1000*g));break;case"M":n.setTime(n.getTime()+(1000*60*g));break;case"H":n.setTime(n.getTime()+(1000*60*60*g));break;case"D":n.setTime(n.getTime()+(1000*60*60*24*g));break}m=";expires="+n.toGMTString()+";path=/"}else{m=";path=/"}q=document.cookie.split(";");for(h=0;h<q.length;h++){k=trim(q[h]);if((k.substring(0,k.indexOf("="))==f)&&(d=="")){document.cookie=f+"="+s+m;t=true}else{if((k.substring(0,k.indexOf("="))==f)&&(d!="")){if(k.indexOf("=")!=k.lastIndexOf("=")){a=k.substring(k.indexOf("=")+1);o=a.split("&");for(b=0;b<o.length;b++){u=o[b].split("=");if(u[0]==d){o[b]=d+"="+s;r=true;break}}if(r==false){o[o.length]=d+"="+s}for(b=0;b<o.length;b++){j=j+"&"+o[b]}document.cookie=f+"="+j.substring(1)+m;t=true}else{document.cookie=f+"="+d+"="+s+m;t=true}}}if(t==true){break}}if(t==false){if(d==""){document.cookie=f+"="+s+m}else{document.cookie=f+"="+d+"="+s+m}}}function GetCookie(j,b){var h="";var i=new Array;var k=0;var m="";var g="";var l=new Array;var f=0;var a="";var d=false;j=j.toUpperCase();if(!b){b=""}b=b.toUpperCase();if(document.cookie.length>0){i=document.cookie.split(";");for(k=0;k<i.length;k++){m=trim(i[k]);if((unescape(m.substring(0,m.indexOf("="))).toUpperCase()==j)&&(b=="")){h=m.substring(m.indexOf("=")+1);d=true}else{if((unescape(m.substring(0,m.indexOf("="))).toUpperCase()==j)&&(m.indexOf("=")!=m.lastIndexOf("="))){g=m.substring(m.indexOf("=")+1);l=g.split("&");for(f=0;f<l.length;f++){a=l[f].split("=");if(unescape(a[0]).toUpperCase()==b){h=a[1];d=true;break}}}}if(d==true){h=Replace(h,"%0D%0A","\r\n");h=Replace(h,"+"," ");if(j=="VALIDATIONERROR"){h=decodeURIComponent(h);break}h=unescape(h);break}}}return h}function IsIE(){var a=window.navigator.userAgent;if(IsMac()){return(a.indexOf("Safari")>0?true:false)}else{return(a.indexOf("MSIE ")>0?true:false)}}function IsIE6(){var a=window.navigator.userAgent;if(IsMac()){return(a.indexOf("Safari")>0?true:false)}else{return(a.indexOf("MSIE 6.0")>0?true:false)}}function IsValidBrowser(){var d=window.navigator.userAgent;if(IsMac()){return IsIE()}else{if(IsIE()){var a=d.indexOf("MSIE ")+5;var b=d.substring(a,d.indexOf(";",a));var f=new Array();f=b.split(".");if(f[0]>=5){return true}else{return false}}else{if(d.indexOf("Firefox")>-1){return true}else{return false}}}}function IsMac(){var a=window.navigator.userAgent;if(a.indexOf("Safari")>0&&a.indexOf("Firefox")==-1){return true}else{return false}}function IsSilverlightSupported(){return !IsPowerPCMac()}function IsPowerPCMac(){var a=window.navigator.userAgent;if(a.indexOf("PPC Mac")>0){return true}else{return false}}var whitespace="\n\r\t ";var quotes="\"'";function isEmpty(a){return(a==null)||(a.length==0)}function trim(a,b,h){if(isEmpty(a)){return""}if(b==null){b=true}if(h==null){h=true}var j=0;var g=0;var f=0;var d=0;if(b==true){while((f<a.length)&&(whitespace.indexOf(a.charAt(f++))!=-1)){j++}}if(h==true){d=a.length-1;while((d>=j)&&(whitespace.indexOf(a.charAt(d--))!=-1)){g++}}return a.substring(j,a.length-g)}function ToInt(a){a=parseInt(a);if(isNaN(a)||a==null){a=0}return a}function Replace(g,h,b){var a;if(!g||g==""){return""}if(h==b||(!h||h=="")){return g}var f="";var d=g+"";a=d.indexOf(h);while(a>=0){f+=d.substring(0,a)+b;d=d.substring(a+h.length);a=d.indexOf(h)}if(d.length>0){f+=d}return f}function ShowSection(a){if(typeof(a)!="object"){a=document.getElementById(a)}if(a==null){return}a.style.display=""}function HideSection(a){if(typeof(a)!="object"){a=document.getElementById(a)}if(a==null){return}a.style.display="none"}function ShowControl(b){var a=document.getElementById("L_"+b);var d=document.getElementById("V_"+b);if(a){a.style.display=""}if(d){d.style.display=""}}function HideControl(b){var a=document.getElementById("L_"+b);var d=document.getElementById("V_"+b);if(a){a.style.display="none"}if(d){d.style.display="none"}}function SetControlParentDisplayStyle(b,a){var d=document.getElementById("V_"+b);if(d==null||d.parentNode==null){return}d.parentNode.style.display=a}function HeaderPageCommonOnLoad(){if(IsMac()){ValidatorOnLoad()}if(window.initializepage!=null){initializepage()}if(window.InitializePage!=null){InitializePage()}}function CommonOnLoad(){if(window.Aprimo&&window.Aprimo.jsVersionID&&window.jsDynVersionID){if(window.Aprimo.jsVersionID!=window.jsDynVersionID){alert(ResourceID12830)}}if(window.top.WindowBar){var a=window.top.WindowBar.GetWindow(LocalWindowName);if(a!=null){a.AddTrace("Begin CommonOnLoad()")}}var f=false;if(window.menus){for(var b=0;b<window.menus.length;b++){if(menus[b]=="navcol"){Menu.buildNav(menus[b])}else{Menu.build(menus[b])}}}if(GetCookie("Aprimo","ResetViewPageData")=="Yes"){SetCookie("AprimoViewPageData","","")}ObjectManager.OnInit();windowManager.OnInit();MaintainTableWidths();if(window.initializepage!=null){initializepage();f=true}if(window.InitializePage!=null){InitializePage();f=true}if(window.Aprimo&&window.Aprimo.processControls){Aprimo.processControls();Aprimo.trigger("Page.Load");Aprimo.triggerDelayed("Window.Resize")}if(f){ObjectManager.ResetDefaults()}var d=GetCookie("ValidationError");SetCookie("ValidationError","","");if(d){popMessage(d)}var h=GetCookie("popUrl");SetCookie("popUrl","","");if(h.toLowerCase().indexOf("executivedashboard")>-1){openDashboardWindow(h)}else{if(h){GoToURL(h,"PopURL",true)}}if(window.top.WindowBar){var a=window.top.WindowBar.GetWindow(LocalWindowName);if(a!=null){a.AddTrace("After CommonOnLoad()");a.EndTracingControl();a.ToggleHelp(showHelp)}}Aprimo.requires("Aprimo.Controls.NavCol");var g=new SaasNav("SaasNav");setTimeout("LoadFocus()",1);resetSessionTimeout()}function ToggleApplicationHelp(){CloseHelpTipHover();Aprimo.requires("Aprimo.Serialize");var b=new BusinessObject("Aprimo.Utility","Aprimo.Utility.APUtility");showHelp=b.invoke("SwitchHelpMode");if(window.top.WindowBar){var a=window.top.WindowBar.GetWindow(LocalWindowName);if(a!=null){a.ToggleHelp(showHelp,true)}}}function CloseHelpTipHover(){$("#cluetip-close").triggerHandler("click")}function CommonOnUnload(){if(window.unloadpage){unloadpage()}if(window.UnLoadPage){UnLoadPage()}ObjectManager.OnUnLoad();if((window.opener!=null)&&(!window.opener.closed)&&(window.opener.Modal!=null)){if(window.opener.Modal.name==window.name){window.opener.Modal=null}}windowManager.OnUnLoad();if(window.menus){for(var a=0;a<window.menus.length;a++){PurgeEvents(document.getElementById(menus[a]))}}Aprimo.unload()}function HeaderPageCommonOnUnload(){if(window.unloadpage){unloadpage()}if(window.UnLoadPage){UnLoadPage()}}function CommonOnLoadSub(){if(IsMac()){ValidatorOnLoad()}if(window.initializepage!=null){initializepage()}if(window.InitializePage!=null){InitializePage()}LoadFocus();var a=document.getElementById("CalendarFrame");if(a){a.src=RelativePath+"Common/Calendar_"+GetCookie(g_LoginCookieName,"LanguageID")+".htm"}}function LoadFocus(){var d=0;var a;var f="false";var b=false;if(window.top.WindowBar&&window.LocalWindowName){var h=window.top.WindowBar.GetWindow(window.LocalWindowName);if(!h){b=true}else{b=h.IsMinimized}}if(!b){if(document.forms.length>0){for(d=0;d<document.forms[0].length;d++){a=document.forms[0].elements[d];if((a.type!="hidden")&&(a.disabled!=true)&&(a.noautofocus!="true")&&(!IsHidden(a))&&!IsDisabled(a)&&a.tagName.toLowerCase()!="object"){try{a.focus();return}catch(g){}}}}}}function IsHidden(a){if(a.style.display=="none"||a.style.visibility=="hidden"){return true}else{if(!a.parentNode){return false}else{if(a.parentNode.tagName=="HTML"){return false}else{return IsHidden(a.parentNode)}}}}function IsDisabled(a){if((a.tagName=="DIV"||a.tagName=="TABLE"||a.tagName=="SPAN"||a.tagName=="TR"||a.tagName=="TD")&&(a.disabled)){return true}else{return(a.parentNode?(IsDisabled(a.parentNode)):false)}}function ChangeClass(a,b){if(a){if(a.className){a.className=b}}}function PrintPage(){if(Aprimo.Events.hasSubscribers("Page.Print")){Aprimo.trigger("Page.Print",null)}else{openWindow(window.RelativePath+"Print.aspx","Print",600,400)}}function Export(a){if(isNaN(TotalRecords)){alert(JSResourceID535)}else{if(TotalRecords==0){alert(JSResourceID537)}else{openWindow(a,"Export",800,500,"scroll=auto,menubar=yes")}}}function Position(a,f){switch(f.toUpperCase()){case"LEFT":var d=(a.offsetParent?(Position(a.offsetParent,"LEFT")+a.offsetLeft):a.offsetLeft)-a.scrollLeft;if(a.nodeName=="BODY"){return(d>0?d:0)}else{return d}break;case"TOP":var b=(a.offsetParent?(Position(a.offsetParent,"TOP")+a.offsetTop):a.offsetTop)-a.scrollTop;if(a.nodeName=="BODY"){return(b>0?b:0)}else{return b}break;case"RIGHT":var d=(a.offsetParent?(Position(a.offsetParent,"LEFT")+a.offsetLeft):a.offsetLeft)-a.scrollLeft;return d+a.offsetWidth;break;case"BOTTOM":var b=(a.offsetParent?(Position(a.offsetParent,"TOP")+a.offsetTop):a.offsetTop)-a.scrollTop;return b+a.offsetHeight;break}}function EncodedTitle_Edit(a,d,g){var b="";b="?FieldID="+a.id+"&Type="+d+"&EncodedTitleID="+g;var f=Replace(Replace(Replace(Replace(a.value," ","%20"),"&","~~@~~"),"+","@@~@@"),",","!!^!!");b+="&Value="+f;openWindow(RelativePath+"Common/EncodedTitles/EncodedTitleAddEdit.aspx"+b,"EncodedTitle60",600,400,"",false)}function buildFrame(i,b,k,a,h){var j=GetParentWindowDoc();var l=j.getElementById(i+"Frame");if(l){l.style.width=k;l.style.height=a;if(bIsIE()){l=j.frames[i+"Frame"]}}else{l=CreateFrame(i+"Frame",j,k,a,h)}var g;if(l.contentWindow){g=l.contentWindow}else{g=l}var d=j.getElementById("PageHeadInfo").innerHTML;d="<HEAD id='PageHeadInfo'>"+d+"</HEAD>";g.document.open();g.document.write("<html>"+d+"<body class='FrameBody' id='"+i+"body'>"+b+"</body></html>");setTimeout("CloseFrame("+g.ID+")",1);return j.getElementById(i+"Frame")}function CloseFrame(a){var b=document.getElementById(a);if(b!=null){b.document.close()}}function GetParentWindowDoc(){var a=document;while(a.body.id!="pagebody"){a=parent.document}return a}function funcname(b){var a=b.toString().match(/function (\w*)/)[1];if((a==null)||(a.length==0)){return"anonymous"}return a}function stacktrace(){var d="";for(var b=arguments.caller;b!=null;b=b.caller){d+=funcname(b.callee)+"\n";if(b.caller==b){break}}return d}function ToggleMenuState(){var a=GetParentWindowDoc();if(a.MenuEnabled==false){a.MenuEnabled=true}else{HideAllMenus()}}function HideAllMenus(){var b=GetParentWindowDoc();var f=null;if(b.MenuEnabled!=false){b.MenuEnabled=false}if(b.OpenWindows==null){b.OpenWindows=new Object();b.OpenWindows.ID="!!ROOTMENU";b.OpenWindows.Child=null;b.OpenWindows.Parent=null}var a=b.OpenWindows;while(a!=null){var d=b.getElementById(a.ID+"Frame");if(d){b.getElementById(a.ID+"Frame").style.visibility="hidden"}a=a.Child}}function CreateFrame(d,i,h,g,b,f){if(!h){h=1}if(!g){g=1}if(IsMac()){var a=i.createElement("IFRAME");a.id=d;a.style.position="absolute";a.style.visibility="hidden";a.style.width=h;a.style.height=g;a.marginHeight=0;a.marginWidth=0;a.frameBorder=0;a.scrolling="no";if(IsMac()){a.src="about:blank"}else{a.src="blank.html"}i.body.insertBefore(a,null);return i.getElementById(d)}else{if(b){i.body.insertAdjacentHTML("beforeEnd","<IFRAME id='"+d+"' src='"+RelativePath+"blank.html' style='position:absolute;visibility:hidden;width="+h+";height="+g+";' marginheight=0 marginwidth=0 frameborder=0 noresize scrolling=no onmouseout='HideFrame(this)' "+f+" ></IFRAME>")}else{i.body.insertAdjacentHTML("beforeEnd","<IFRAME id='"+d+"' src='"+RelativePath+"blank.html' style='position:absolute;visibility:hidden;width="+h+";height="+g+";' marginheight=0 marginwidth=0 frameborder=0 noresize scrolling=no "+f+" ></IFRAME>")}return i.frames[d]}}function ShowPopupDiv(a,g,d,i){if(!i){HidePopupDivs()}if(typeof(a)!="object"){a=document.getElementById(a)}if(g&&typeof(g)!="object"){g=document.getElementById(g)}var h=Aprimo.Dom.getParentNode(a);if(a&&a.parentNode.tagName!="BODY"){Aprimo.Dom.removeNode(a);document.body.appendChild(a);a.style.display="block"}if(!d){d="right"}var f,k,b,j;if(g==null){return}if(g.clientX){f=b=g.clientX;k=j=g.clientY}else{f=Position(g,"left");k=Position(g,"top");b=Position(g,"right");j=Position(g,"bottom")}if(d=="bottom"){a.style.top=j;if(f+a.offsetWidth>document.body.offsetWidth){a.style.left=b-a.offsetWidth}else{a.style.left=f}}if(d=="right"){if(b+a.offsetWidth>document.body.offsetWidth){a.style.left=f-a.offsetWidth}else{a.style.left=b-1}if(k+a.offsetHeight>document.body.offsetHeight){a.style.top=j-a.offsetHeight}else{a.style.top=k}}if(d=="left"){a.style.left=b-a.offsetWidth;if(j+a.offsetHeight>document.body.offsetHeight){a.style.top=k-a.offsetHeight}else{a.style.top=j}}if(d=="top"){a.style.top=k-a.offsetHeight;if(f+a.offsetWidth>document.body.offsetWidth){a.style.left=b-a.offsetWidth}else{a.style.left=f}}a.style.zIndex=10;if(!i){window.VisiblePopUp=a}el_popup(a,true)}function HidePopupDivs(){var a=window.VisiblePopUp;if(a){el_popup(a,false)}}function ShowFrame(z,k,o,C,u){var q=Aprimo.Util.GetEventObject(arguments);var D=document;if(typeof(k)!="object"){k=D.getElementById(k)}var B=0;var A=0;var j=null;while(D.body.id!="pagebody"){D=parent.document;var y=document.body.id;j=D.getElementById(Replace(y,"body","Frame"));if(j!=null){B+=j.offsetLeft;A+=j.offsetTop}}var h="";if(typeof(z)!="object"){h=z;z=D.getElementById(z);if(z!=null){if(z.tagName.toLowerCase()=="iframe"){z.style.zIndex=z.style.zIndex+2}else{if(z.tagName.toLowerCase()=="div"){var v=z.offsetWidth;var l=z.offsetHeight;var n=z.innerHTML;z=buildFrame(h,n,v,l,false);z.IsModal=true}}}}if(z==null&&C==null){return}if(C!=null&&h!=""){if(z==null){z=CreateFrame(h,D,300,300,false)}if(z.src!=C){z.src=C}}if(z==null){return}if(j!=null){z.style.zIndex=j.style.zIndex+3;z.parentFrame=j}var a=z.offsetHeight;var d=z.offsetWidth;var f=D.body.scrollTop;var t=D.body.scrollLeft;if(k==null||o.toUpperCase()=="MOUSE"){var s=q.clientX;var r=q.clientY;if(s+d>document.body.clientWidth+t){z.style.left=s-d}else{z.style.left=s}if(r+a>document.body.clientHeight+f&&r>a){z.style.top=r-a+10}else{z.style.top=r-10}}else{var m=Position(k,"top")+A;var p=Position(k,"bottom")+A;var g=Position(k,"left")+B;var i=Position(k,"right")+B;var w=k.offsetHeight;var b=k.offsetWidth;switch(o.toUpperCase()){case"RIGHT":z.style.left=i-2;if(m+a>D.body.clientHeight+f){z.style.top=p-a}else{z.style.top=m}break;case"BOTTOM":z.style.top=p;if(g+d>D.body.clientWidth+t){z.style.left=i-d}else{z.style.left=g}break;case"LEFT":z.style.left=g;if(p+a>D.body.clientHeight+f){z.style.top=m-a}else{z.style.top=p}break;case"TOP":z.style.top=m-a;if(g+d>D.body.clientWidth+t){z.style.left=i-d}else{z.style.left=g}break;case"AUTO":if(g+d>D.body.clientWidth+t){z.style.left=i-d}else{z.style.left=g}if(p+a>D.body.clientHeight+f){z.style.top=m-a}else{z.style.top=p}break;case"FRAMES":z.style.top=m;if(g+d>D.body.clientWidth+t){z.style.left=i}else{z.style.left=g}break}}z.style.visibility="visible";if(z.IsModal){if(window.CurrentFrame!=z){HideFrame(window.CurrentFrame)}window.CurrentFrame=z}if(z.parentFrame){z.parentFrame.childFrame=z}}function HideFrame(n,j,i,m){var l=GetParentWindowDoc();if(!m){m=false}if(m==true){n.style.visibility="hidden";return}var h=0;var g=0;if(typeof(n)!="object"){n=l.getElementById(n)}if(!n){return}if(n.childFrame){return}if(n.parentFrame){h=n.parentFrame.offsetLeft+2;g=n.parentFrame.offsetTop}var f=event;var d=0;var b=0;if(IsMac()&&f==null){if(window.frames[n.id]!=null&&window.frames[n.id].event!=null){f=window.frames[n.id].event}else{if(n.parentFrame){if(window.frames[n.parentFrame.id]!=null&&window.frames[n.parentFrame.id].event!=null){f=window.frames[n.parentFrame.id].event;if(f!=null){if(f.x>0&&f.y>0){n.style.visibility="hidden";if(n.parentFrame){n.parentFrame.childFrame=null}}}return}}}if(!j&&!i&&f!=null){j=f.clientX;i=f.clientY}if(j<0||j>n.offsetWidth||i<0||i>n.offsetHeight){n.style.visibility="hidden";while(n.parentFrame){n.parentFrame.childFrame=null;n=n.parentFrame;n.style.visibility="hidden"}}return;if(f==null){f=Aprimo.Util.GetEventObject(arguments)}}if(!j&&!i&&f==null){n.style.visibility="hidden";return}var k=1;var a=1;if(f&&!j&&!i){d=f.clientX;b=f.clientY;if(d<0&&IsMac()){return}j=document.body.scrollLeft+d;i=document.body.scrollTop+b;if(document.body.id!="pagebody"){j+=h;i+=g;k=0}}if(j<0||i<0){return}if(j>n.offsetLeft+k&&j<n.offsetLeft+n.offsetWidth&&i>n.offsetTop+a&&i<n.offsetTop+n.offsetHeight){return}n.style.visibility="hidden";if(n.parentFrame){n.parentFrame.childFrame=null;setTimeout("HideFrame('"+n.parentFrame.id+"', "+j+", "+i+")",10)}}function HideMenuTree(d){var b=GetParentWindowDoc();var a=b.getElementById(d+"Frame");while(a){HideFrame(a,-1,-1,true);a=a.parentFrame}}function updateMainWindow(a){var b=/~@@~/;while(a.indexOf("~@@~")!=-1){a=a.replace(b,"%")}document.URL=a}function MergeTableAttributes(d,a,b){if(!IsMac()){d.mergeAttributes(a,b)}else{d.width=a.width;d.className=a.className;d.height=a.height;d.cellspacing=a.cellspacing;d.cellpadding=a.cellpadding;d.border=a.border;d.rules=a.rules;d.style.width=a.style.width;d.style.borderCollapse=a.style.borderCollapse;if(b){d.id=a.id}}}function MergeTableRowAttributes(d,b,a){if(!IsMac()){d.mergeAttributes(b,a)}else{if(a){d.id=b.id}}}function MergeTableCellAttributes(d,a,b){if(!IsMac()){d.mergeAttributes(a,b)}else{d.width=a.width;d.height=a.height;d.className=a.className;d.noWrap=a.noWrap;d.vAlign=a.vAlign;d.align=a.align;d.style.width=a.style.width;if(b){d.id=a.id}}}function jsDictionary(){this.NumEntries=0;this.Keys=new Array();this.StatusMessage="";this.Add=function(b,d){this.StatusMessage="";if(b==""){this.StatusMessage="Invalid key!"}else{var f;if(b.toLowerCase!=null){f=b.toLowerCase()}else{f=b}var a=this[f];if(a!=null){if(a==d){this.StatusMessage="Entry already exists for "+d+" for key "+b}else{this[f]=d;this.StatusMessage="Replaced entry for "+a+" with "+d+" for key "+b}}else{this[f]=d;this.Keys[this.Keys.length]=f;this.NumEntries++;this.StatusMessage="Successfully added "+d+" for key "+b}}};this.LookupValue=function(a){this.StatusMessage="";var b=a.toLowerCase();return this[b]};this.Delete=function(d){var a;this.StatusMessage="";if(d==""){this.StatusMessage="Invalid key!"}else{var f=d.toLowerCase();if(this[f]){this.StatusMessage="Successfully Deleted "+d;this[f]=null;for(var b=0;b<this.Keys.length;b++){if(this.Keys[b]==f){this.Keys[b]=null;break}}this.NumEntries--}else{this.StatusMessage="Could not find an entry to delete for "+d}}return a};this.GetCount=function(){this.StatusMessage="";return this.NumEntries};this.GetEntries=function(){this.StatusMessage="";var a=new Array(this.NumEntries);var b=0;for(var d=0;d<this.Keys.length;d++){if(this.Keys[d]!=null){a[b]=new Array(2);a[b][0]=this.Keys[d];a[b++][1]=this[this.Keys[d]]}}return a}}function RedirectF5(){var a=Aprimo.Util.GetEventObject(arguments);if(a&&a.keyCode==116){a.keyCode=17;a.cancelBubble=true;a.returnValue=false;window.location.reload();return false}}function SetFocusToWindow(){var a=window.top.WindowBar.GetActiveWindow();var d=window.top.WindowBar.GetWindow(LocalWindowName);var b=false;if(a!=d){b=true}d.Activate(b)}function HideCommonIFrames(b){var a=b;if(Aprimo.Util.IsNull(a)){a=Aprimo.Util.GetEventObject(arguments)}if(window.HideAssigneesFrame){HideAssigneesFrame()}if(window.HideCalendar){HideCalendar()}if(window.HideSelectBox){HideSelectBox()}if(window.HideDropDowns){HideDropDowns(a)}if(window.HideTreeDropDowns){HideTreeDropDowns(a)}if(!blnLoggedIntoPortal&&window.HideContextMenu){HideContextMenu()}if(!blnLoggedIntoPortal&&window.HideAllMenus){HideAllMenus()}if(!blnLoggedIntoPortal&&window.top.WindowBar){window.top.WindowBar.HideWindowMenus()}}function CommonOnResize(){var a=Aprimo.Util.GetEventObject(arguments);HideCommonIFrames(a);HideCommonIFrames();WriteWinCoord();ObjectManager.OnResize()}function ShowMultiEdit(a){var b=Aprimo.Util.GetEventObject(arguments);var d=ObjectManager.GetObject(a);if(d){d.Show()}if(b){b.cancelBubble=true}}function MultiEdit(namingContainer,objName){this.namingContainer=namingContainer;this.objName=objName;this.divTagName=objName+"MultiEditIframe";if(namingContainer!=""){this.controlPrefix=namingContainer+"_"}else{this.controlPrefix=""}this.Show=function(){var divToDisplay=document.getElementById(this.divTagName);this.tableName=this.controlPrefix+objName+"EditLink";if(divToDisplay){var strHTML=divToDisplay.innerHTML;var objContainer=CreateSizingContainer(strHTML,true);var displayTable=document.getElementById(this.tableName);var menuHeightME=eval("window."+objName+"_MultiHeight");var menuWidthME=eval("window."+objName+"_MultiWidth");objContainer.innerHTML="";var theIFrame=this.GetMultiEditIFrame(menuWidthME,menuHeightME);if(theIFrame){if(IsIFrameHidden(theIFrame)){this.PositionMultiEdit(theIFrame,displayTable,menuHeightME,menuWidthME);for(var i=0;i<ObjectManager.RegisteredObjects.Keys.length;i++){var obj=ObjectManager.RegisteredObjects.LookupValue(ObjectManager.RegisteredObjects.Keys[i]);if(obj.ID!=undefined){if(obj.ID.indexOf("_MultiEdit")>0){obj.Render}}this.hidden=false;ShowIFrame(theIFrame)}}else{this.hidden=true;HideIFrame(theIFrame)}}}};this.GetMultiEditIFrame=function(menuWidth,menuHeight){var tempIFrame=document.getElementById(this.divTagName);tempIFrame.removeNode(true);theIFrame=document.body.insertBefore(tempIFrame);theIFrame.onselectstart=function(){return false};return theIFrame};this.PositionMultiEdit=function(Frame,ParentObj,FrameHeight,FrameWidth){var ParentTop=Position(ParentObj,"TOP");var ParentBottom=Position(ParentObj,"BOTTOM");var ParentLeft=Position(ParentObj,"LEFT");var ParentRight=Position(ParentObj,"RIGHT");var ParentHeight=ParentObj.offsetHeight;var ParentWidth=ParentObj.offsetWidth;var ScrollTop=document.body.scrollTop;var ScrollLeft=document.body.scrollLeft;Frame.style.height=FrameHeight;Frame.style.width=FrameWidth;if(ParentLeft+FrameWidth>document.body.clientWidth+ScrollLeft){Frame.style.left=ParentLeft-FrameWidth}else{Frame.style.left=ParentLeft}if(ParentTop+FrameHeight>document.body.clientHeight+ScrollTop){Frame.style.top=ParentTop}else{Frame.style.top=ParentTop}Frame.style.zIndex=900}}function SaveMultiEdit(a){var b=ObjectManager.GetObject(a);if(b){if(window.PageLevelMultiEditSave!=null){PageLevelMultiEditSave(a,b)}}var d=document.getElementById(b.divTagName);if(d.style.display!="none"){d.style.display="none"}}function HideMultiEdit(a,f){var b=ObjectManager.GetObject(a);var d=document.getElementById(b.divTagName);if(d.style.display!="none"){d.style.display="none"}}function HideSubSection(a){ShowHideSubSection(a,"none")}function ShowSubSection(a){ShowHideSubSection(a,"")}function ShowHideSubSection(sectionID,displayString){if(typeof(sectionID)=="object"){sectionID=sectionID.id}var firstID=eval("window."+sectionID+"_FirstRowID");var lastID=eval("window."+sectionID+"_LastRowID");var field=null;for(var i=firstID;i<=lastID;i++){field=document.getElementById(sectionID+i);if(field){field.style.display=displayString}}}function RunSpellCheckFromMenu(a){multiSpellChecker_RunSpellCheck(a);HideMenu("Menu_0")}var RepStringReq;var RepStringValue;function GetRepStringProcessRequest(){if(RepStringReq.readyState==4){if(RepStringReq.status==200){var b=RepStringReq.responseXML;var a=b.getElementsByTagName("string");RepStringValue=a[0].firstChild.nodeValue}else{alert("There was a problem retrieving the XML data:\n"+RepStringReq.statusText+" "+RepStringReq.status)}}}function GetReplacementString(d){var b;var h;if(window.XMLHttpRequest){b=new XMLHttpRequest()}else{b=new ActiveXObject("Microsoft.XMLHTTP")}url="submit.asmx/GetReplacementString";var g="";g+="ReplacementStringID="+d;if(b){b.open("POST",url,false);b.setRequestHeader("Content-Type","application/x-www-form-urlencoded");b.send(g);if(b.status==200){var f=b.responseXML;var a=f.getElementsByTagName("string");h=a[0].firstChild.nodeValue}}return h}function walkTheDom(b,a){a(b);b=b.firstChild;while(b){walkTheDom(b,a);b=b.nextSibling}}function mkElement(b,j,a,i,d,g){var f;if(j){f=document.getElementById(j)}if(!f||f.tagName!=b){f=document.createElement(b);if(j){f.id=j}}else{f.exist=true}el_setPosition(f,a,i);el_setSize(f,d,g);return f}function el_setCursor(a,b){if(b){a.style.cursor=b}}function el_setColor(f,g,a){if(!g){return}if(a){var b=f.getElementsByTagName("B");for(var d=0;d<b.length;d++){if(b[d].className!="rb1"){b[d].style.backgroundColor=g}}}else{f.style.backgroundColor=g}}function el_setBorderColor(f,g,a){if(!g){return}if(a){var b=f.getElementsByTagName("B");for(var d=0;d<b.length;d++){if(b[d].className=="1"){b[d].style.backgroundColor=g}else{b[d].style.borderColor=g}}}else{f.style.borderColor=g}}function el_setPosition(b,a,d){if(a!=null&&!isNaN(a)){b.style.left=a}if(d!=null&&!isNaN(d)){b.style.top=d}}function el_setSize(d,a,b){if(a){d.style.width=a}if(b){d.style.height=b}}function el_setCssClass(b,a){b.className=a}function el_show(a){a.style.display=""}function el_hide(a){a.style.display="none"}function el_popup(g,b){if(b==undefined){b=true}if(typeof(g)!="object"){g=document.getElementById(g)}if(g==null){return}var h=mkElement("DIV",g.id+"shadow");if(!h.exist){if(IsMac()){document.body.appendChild(h)}else{if(g.parentNode){g.parentNode.appendChild(h)}else{document.body.appendChild(h)}}}var f;var a=5;if(g.taskBarShim){f=window.top.document.getElementById("shimTB");a=0}else{f=document.getElementById("shim")}if(f){var d;if(g.taskBarShim){if(g.taskBarPopUpShim){d=window.top.document.getElementById("shimTB")}else{d=window.top.document.getElementById(g.id+"shimTB")}}else{d=document.getElementById(g.id+"shim")}if(!d){d=f.cloneNode(true);if(g.taskBarShim){window.top.document.body.appendChild(d,f);d.id=g.id+"shimTB"}else{if(g.parentNode){g.parentNode.appendChild(d,f)}else{document.body.appendChild(d,f)}d.id=g.id+"shim"}}}if(b){g.style.visibility="visible";h.className="shadow";h.style.top=Position(g,"top")+5;h.style.left=Position(g,"left")+5;h.style.width=g.offsetWidth;h.style.height=g.offsetHeight+1;h.style.zIndex=g.style.zIndex-1;h.style.visibility="visible";if(d){d.style.visibility="visible";d.style.top=Position(g,"top")+a;d.style.left=Position(g,"left")+a;d.style.width=g.offsetWidth;d.style.height=g.offsetHeight+1;d.style.zIndex=g.style.zIndex-2}}else{g.style.visibility="hidden";h.style.visibility="hidden";if(d){d.style.visibility="hidden"}}}function el_setZIndex(a,b){a.style.zIndex=b}function el_setGroupboxTitle(g,a,b){var i=document.getElementById(g.id+"_Title");if(!i){return}var j=mkDiv(a,0,0,1);j.style.paddingLeft="5px";j.style.paddingRight="5px";j.style.zIndex=g.style.zIndex+1;if(!b){j.style.backgroundColor="#ffffff"}else{j.style.backgroundColor=b}j.innerHTML=i.innerHTML;g.appendChild(j);j=i;j.style.paddingLeft="5px";j.style.paddingRight="5px";j.style.zIndex=g.style.zIndex+2;j.innerHTML=i.innerHTML;j.style.overflow="";j.style.visibility="visible";var f=j.offsetHeight;el_setPosition(j,a,(-1)*parseInt(f/2))}function mkDiv(a,i,b,f,g){var d=mkElement("DIV",g,a,i,b,f);if(!d.exist){d.style.position="absolute";d.style.overflow="hidden";d.style.cursor="default";if(!d.style.zIndex){d.style.zIndex=1}}return d}function clearSelection(a){if(a==null){a=window}if(a.getSelection){var b=a.getSelection();if(b.removeAllRanges){b.removeAllRanges()}if(b.empty){b.empty()}}if(a.document.selection){a.document.selection.empty()}}function eventTarget(b){var a;b=Aprimo.Util.GetEventObject(arguments);if(b.srcElement){a=b.srcElement}else{if(b.target){a=b.target}}if(a&&a.nodeType&&a.nodeType==3){a=a.parentNode}return a}function cancelBubble(a){if(!a){a=Aprimo.Util.GetEventObject(arguments)}if(a){a.cancelBubble=true;if(a.stopPropagation){a.stopPropagation()}}}function hexEncoding(d){var b="";for(var a=0;a<d.length;a++){c=d.charCodeAt(a);b+=((c<16)?"0":"")+c.toString(16)}return b}function OpenLinkFromReport(b){var a;a=window.top.WindowBar.CreateWindow(b,"LinkFromReport");a.Maximize();a.Activate()}function ApplyDataGridColumns(i,g,f){var b=ObjectManager.GetObject(f+"SC_S");var a=ObjectManager.GetObject(f+"SC_A");if((b)&&(a)){g.CreateOptionsFrom2DArray(b.CopyOptions());i.CreateOptionsFrom2DArray(a.CopyOptions())}else{var h=Aprimo.getControl(f);if(h){h.populateArrays(i,g)}}}function BlockBubble(){var a=Aprimo.Util.GetEventObject(arguments);if(a){a.cancelBubble=true}}function swapStyles(d,a){var b;if(typeof(d)!="object"){b=document.getElementById(d)}else{b=d}if(b){b.className=a}}function buildButtons(b,d){if(!d){padding=5;spacing=2}else{if(d=="menu"){padding=0;spacing=0}}document.write("<table border=0 cellpadding="+padding+" cellspacing="+spacing+">\n");document.write("<tr>\n");for(var a=0;a<b.length;a++){document.write("<td>\n");document.write(b[a]+"\n");document.write("</td>\n")}document.write("</tr>\n");document.write("</table>\n")}function htmlButton(d,b,a,i,h,f){if(!i){i=""}if(!h){h=""}if(!f){width=10;classon="ButtonOn";classoff="ButtonOff";padding="&nbsp;&nbsp;";symbol=""}else{if(f=="menu"){width=8;classon="MenuOn";classoff="MenuOff";padding="";symbol="&#149; "}}var g="<table border=0 cellspacing=0 cellpadding=0>\n";g+="<tr>\n";g+="<td><img id='"+d+"Left' src='"+RelativePath+"images/ButtonLeft_Off60b.gif' border=0></td>\n";g+="<td id='"+d+"A' class='"+classoff+"' valign='middle' nowrap='true'>\n";g+="<a href='"+a+"' class='none'";if(h!=""){g+=' target="'+h+'" '}g+="onmouseover=\"ButtonGlow('"+d+"', 'ButtonOn', 'On');\" onmouseout=\"ButtonGlow('"+d+"', 'ButtonOff', 'Off')\">\n";g+="<div id='"+d+"B' class='"+classoff+"'>"+padding+symbol+b+padding+"</div></a>\n</td>\n";g+="<td><img id='"+d+"Right' src='"+RelativePath+"images/ButtonRight_Off60b.gif' border=0></td>\n";g+="</tr>\n";g+="</table>\n";return g}function ButtonGlow(b,d,g){var f=document.getElementById(b+"Left");if(g=="Off"){f.src=RelativePath+"images/ButtonLeft_"+g+"60b.gif"}else{f.src=RelativePath+"images/ButtonLeft_"+g+".gif"}var f=document.getElementById(b+"Right");if(g=="Off"){f.src=RelativePath+"images/ButtonRight_"+g+"60b.gif"}else{f.src=RelativePath+"images/ButtonRight_"+g+".gif"}var f=document.getElementById(b+"Back");if(f){f.src=RelativePath+"images/Button_Back"+g+".gif"}var f=document.getElementById(b+"Continue");if(f){f.src=RelativePath+"images/Button_Continue"+g+".gif"}var a=document.getElementById(b+"A");a.className=d+"Cell";var a=document.getElementById(b+"B");a.className=d;var a=document.getElementById(b+"C");if(a){a.className=d+"Cell"}var a=document.getElementById(b+"D");if(a){a.className=d+"Cell"}}function PurgeEvents(a){Aprimo.Dom.purgeEvents(a)}function ValidateURLField(a){a=a.substring(5,a.length);var f=ObjectManager.GetObject(a);var b=f.GetValue();if(b.length>0){var d=b.charAt(b.length-1);if(d!="/"){b=b+"/";f.SetValue(b)}}}function RegisterEventForControl(elem,functionName,eventName){var allowEditEventName=true;var evtName="blur";if(typeof(eventName)!="undefined"){evtName=eventName;allowEditEventName=false}var elm;if(typeof(elem)!="object"){var elm=document.getElementById(elem)}else{elm=elem}if(allowEditEventName){if(elm.tagName.toLowerCase()=="select"&&allowEditEventName){evtName="change"}else{if(elm.tagName.toLowerCase()=="input"&&(elm.getAttribute("type").toLowerCase()=="checkbox"||elm.getAttribute("type").toLowerCase()=="radio")){evtName="click"}}}if(elm.addEventListener){elm.addEventListener(evtName,eval(functionName),false)}else{if(elm.attachEvent){elm.attachEvent("on"+evtName,eval(functionName))}}}function GetFrame(a){var b;if(document.frames){b=document.frames[a]}else{b=document.getElementById(a)}return b}function GetDocument(b){var a;if(b.document){a=b.document}else{a=b.contentWindow.document}return a};
