var current_menu=null;var currentExpando=null;var popup_message="Pop-up Window Check\n\nmyCTA takes advantage of pop-up windows as a powerful way to deliver content in an organised fashion.\n\nYou must have pop-up windows enabled or certain parts of the product my not function properly.\n\n\nVisit www.sesechialsoftware.com/myCTA/tuneup for more information on how to enable pop-up windows.";var popUpWin=null;function IsPopupBlocker(){var a=window.open("","testpopupblocker","width=100,height=50,top=5000,left=5000");if(a==null||typeof(a)=="undefined"){return true}else{a.close();return false}}function popUpWindow(c,b,a){if(IsPopupBlocker()){alert(popup_message)}else{if(popUpWin){if(!popUpWin.closed){popUpWin.close()}}if(b==1||a==1){popUpWin=open(c,"popUpWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=1,resizable=no,copyhistory=yes,width="+b+",height="+a+",top=2000000,left=2000000")}else{popUpWin=open(c,"popUpWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=1,resizable=no,copyhistory=yes,width="+b+",height="+a+",top="+Math.floor((screen.height/2)-(a/2))+",left="+Math.floor((screen.width/2)-(b/2))+"")}}}function closeWindowRefreshParent(){var c=null;var b=null;if(window.opener!=null){c=window.opener;b=window}else{c=window.top.opener;b=window.top}if(c!=null){var a=c.window.location;if(a.toString().indexOf("?")>-1){a=a+"&reload=true"}else{a=a+"?reload=true"}c.window.location=a;b.close()}}function help(){if(IsPopupBlocker()){alert(popup_message)}else{if(popUpWin){if(!popUpWin.closed){popUpWin.close()}}var b=window.top.document.getElementById("MYCTA_CONTENT_FRAME");var e=null;var f=null;if(is_ie){var d=b.document.getElementsByTagName("frame");for(var c=0;c<d.length;c++){var a=new String(d[c].name);if(a.indexOf("MYCTA_CONTENT_FRAME")>-1){f=d[c].contentWindow.document.getElementsByTagName("frame")}}}else{f=b.contentDocument.getElementsByTagName("frame")}if(f.length>0){for(var c=0;c<f.length;c++){var a=new String(f[c].name);if(a.indexOf("MYCTA_CONTENT_FRAME")==-1&&a.indexOf("CONTENT_FRAME")>-1){b=f[c]}}}e=b.contentWindow.location;popUpWin=window.open("/help/?referer="+e,"popUpWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=1,resizable=yes,copyhistory=yes,width=800,height=600,top="+Math.floor((screen.height/2)-(600/2))+",left="+Math.floor((screen.width/2)-(800/2))+"");if(!popUpWin.opener){popUpWin.opener=window}}}function showAnnouncements(){if(IsPopupBlocker()){alert(popup_message)}else{if(popUpWin){if(!popUpWin.closed){popUpWin.close()}}popUpWin=window.open("/popups/announcement.aspx?act=show_new","popUpWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=1,resizable=yes,copyhistory=yes,width=648,height=480,top="+Math.floor((screen.height/2)-(640/2))+",left="+Math.floor((screen.width/2)-(480/2))+"");if(!popUpWin.opener){popUpWin.opener=window}}}function showmenu(d){if(typeof(d)!="object"){alert("You must supply a list of named parameters when calling showmenu.");return}if(!"menuid" in d){alert('You must supply a value for the parameter "menuid" when calling showmenu.');return}var b=false;if("submenu" in d){if(!"parent" in d){alert('You must supply a value for the parameter "parent" when calling showmenu and passing the parameter "submenu".');return}if(typeof(d.submenu)!="boolean"){alert('The named parameter "submenu" must be of type boolean.  It was supplied as type: '+typeof(d.submenu)+".")}else{b=d.submenu}}var c=d.menuid;if(!b){hidemenu()}current_menu=$(c);Event.observe(document.getElementsByTagName("body")[0],"click",function(f){$(c).style.visibility="hidden"});var a=$(c+"img");y=_getY(a);x=_getX(a);if(b){x=x+_getWidth(a)+2;y=y+8}else{y=y+_getHeight(a)}current_menu.style.left=x+"px";current_menu.style.top=y+"px";current_menu.style.visibility="visible"}function hidemenu(){if(current_menu!=null){current_menu.style.visibility="hidden";Event.stopObserving(document.getElementsByTagName("body")[0],"click",hidemenu)}}function toggleExpando(a){var c=$(a);var b=$(a+"_controller");if(c.style.display=="none"||c.style.display==""){b.className="expando_controller_open";c.style.display="block"}else{b.className="expando_controller";c.style.display="none"}currentExpando=c}function showAuditTrail(a){if(!("tool" in a)){alert('You must pass the named parameter of "tool" to this function.');return}if(!("id" in a)){alert('You must pass the named parameter of "id" to this function.');return}if(!("url" in a)){popUpWindow("/"+a.tool+"/_audit.mycta?id="+a.id,800,600)}else{popUpWindow("/"+a.tool+"/"+a.url+".mycta?id="+a.id,800,600)}}function usageReport(a){if(!("tid" in a)){alert('You must pass the named parameter of "tid" to this function.');return}if(!("cid" in a)){alert('You must pass the named parameter of "cid" to this function.');return}popUpWindow("/reports/usage.mycta?tid="+a.tid+"&cid="+a.cid,800,600)}function _getY(a){var b=0;while(a!=null){b+=a.offsetTop;a=a.offsetParent}return b}function _getX(b){var a=0;while(b!=null){a+=b.offsetLeft;b=b.offsetParent}return a}function _getWidth(a){return a.offsetWidth}function _getHeight(a){return a.offsetHeight};