var myAgent=navigator.userAgent.toLowerCase();var is_ie=((myAgent.indexOf("msie")!=-1)&&(myAgent.indexOf("opera")==-1));var is_nav=((myAgent.indexOf("mozilla")!=-1)&&(myAgent.indexOf("spoofer")==-1)&&(myAgent.indexOf("compatible")==-1)&&(myAgent.indexOf("opera")==-1)&&(myAgent.indexOf("webtv")==-1)&&(myAgent.indexOf("hotjava")==-1));var is_win=((myAgent.indexOf("win")!=-1)||(myAgent.indexOf("16bit")!=-1));var is_mac=(myAgent.indexOf("mac")!=-1);function expandNavigation(){var b=window.parent.document.getElementById("mycta_sub_frameset");var d=window.parent.document.getElementById("APPLICATION_NAVIGATION");if(d!=null){if(is_ie){var a=d.document.getElementById("expanded_nav");if(a==null){a=d.contentWindow.document.getElementById("expanded_nav")}if(a!=null){a.style.display="block"}var c=d.document.getElementById("collapsed_nav");if(c==null){c=d.contentWindow.document.getElementById("collapsed_nav")}if(c!=null){c.style.display="none"}}else{var a=d.contentDocument.getElementById("expanded_nav");if(a!=null){a.style.display="block"}var c=d.contentDocument.getElementById("collapsed_nav");if(c!=null){c.style.display="none"}}}if(b!=null){b.cols="195,*"}}function collapseNavigation(){var b=window.parent.document.getElementById("mycta_sub_frameset");var d=window.parent.document.getElementById("APPLICATION_NAVIGATION");if(d!=null){if(is_ie){var a=d.document.getElementById("expanded_nav");if(a==null){a=d.contentWindow.document.getElementById("expanded_nav")}if(a!=null){a.style.display="none"}var c=d.document.getElementById("collapsed_nav");if(c==null){c=d.contentWindow.document.getElementById("collapsed_nav")}if(c!=null){c.style.display="block"}}else{var a=d.contentDocument.getElementById("expanded_nav");if(a!=null){a.style.display="none"}var c=d.contentDocument.getElementById("collapsed_nav");if(c!=null){c.style.display="block"}}}if(b!=null){b.cols="45,*"}}function toggleNavigation(){var a=window.parent.document.getElementById("mycta_sub_frameset");if(a.cols=="45,*"){expandNavigation()}else{collapseNavigation()}}function updateBreadcrumbs(){var c=window.parent.document.getElementById("BREADCRUMBS");var j=window.parent.document.getElementById("MYCTA_CONTENT_FRAME");var h="";if(c==null&&is_ie){c=window.top.document.getElementById("BREADCRUMBS")}if(j==null&&is_ie){j=window.top.document.getElementById("MYCTA_CONTENT_FRAME")}if(j!=null){var l=null;if(is_ie){var m=j.document.getElementsByTagName("frame");for(var d=0;d<m.length;d++){var e=new String(m[d].name);if(e.indexOf("MYCTA_CONTENT_FRAME")>-1){l=m[d].contentWindow.document.getElementsByTagName("frame")}}}else{l=j.contentDocument.getElementsByTagName("frame")}if(l.length>0){for(var d=0;d<l.length;d++){var e=new String(l[d].name);if(e.indexOf("MYCTA_CONTENT_FRAME")==-1&&e.indexOf("CONTENT_FRAME")>-1){j=l[d]}}}var a=new String(j.contentWindow.location.toString());var n=new String(j.contentWindow.location.search.substring(1));if(n.length>0){h="/components/breadcrumbs/makeCrumbs.mycta?mycta_breadcrumb_ref="+a.substring(0,((a.length-n.length)-1))}else{h="/components/breadcrumbs/makeCrumbs.mycta?mycta_breadcrumb_ref="+a}if(n.length>0){var k=n.split("&");for(var d=0;d<k.length;d++){var b=k[d].split("=");h+="&"+b[0]+"="+b[1]}}}if(c!=null){var g=null;if(is_ie){g=c.contentWindow.document.getElementById("bread_crumbs")}else{g=c.contentDocument.getElementById("bread_crumbs")}if(g!=null){$(g).innerHTML='<img src="/images/nav.gif" alt="" />&nbsp;Updating Breadcrumbs...';new Ajax.Updater(g,h,{onSuccess:function(i){$(g).innerHTML=i.responseText}})}var f=null;if(is_ie){f=c.contentWindow.document.getElementById("subscribe")}else{f=c.contentDocument.getElementById("subscribe")}if(f!=null){$(f).innerHTML="";new Ajax.Updater(f,"/ajax/updaters/subscribe.mycta?ref="+j.contentWindow.location.toString(),{onSuccess:function(i){$(f).innerHTML=i.responseText}})}}}function updatePageTitle(){var a=window.top.document;a.title=document.title}function go(a){var b=window.parent.document.getElementById("MYCTA_CONTENT_FRAME");if(b!=null){b.contentWindow.location=a}else{var b=window.parent.parent.document.getElementById("MYCTA_CONTENT_FRAME");if(b!=null){b.contentWindow.location=a}else{if(window.top.document.getElementsByTagName("frames").length<1){window.location=a}}}}function launchTool(b,a){if(b=="help"){help()}else{go("/"+b+"/")}}function _getMainContentFrame(){return window.parent.document.getElementById("MYCTA_CONTENT_FRAME")}function goContent(d,c){new Ajax.Request("/resources/markAsRead.aspx?id="+c);var a="/resources/content_frameset.mycta?id="+c;if(_getMainContentFrame()!=null){_getMainContentFrame().contentWindow.location=a}else{var b=window.top.document.getElementById("MYCTA_CONTENT_FRAME");b.contentWindow.location=a}}function ptLaunch(b){if("act" in b){var a=window.parent.parent.document.getElementById("MYCTA_CONTENT_FRAME");if(a==null&&is_ie){a=window.top.document.getElementById("MYCTA_CONTENT_FRAME")}if(a==null){alert("Proxy Tool Invocation can not be called from this location.  Please use the URL based Proxy Tool Invocation instead.");return}switch(b.act){case 1:if("aid" in b){a.src="/news/?aid="+b.aid}else{a.src="/news/"}break;case 2:if("rid" in b){if(("type") in b){if(b.type=="organiser"||b.type=="organiser_child"){if("prid" in b){a.src="/resources/organizer.mycta?id="+b.prid+"&glcid="+b.rid}else{a.src="/resources/organizer.mycta?id="+b.rid}}else{if(b.type=="content"){a.src="/resources/launchFile.aspx?launch_file=true&id="+b.rid}else{a.src="/resources/?id="+b.rid}}}}else{a.src="/resources/"}break;case 3:if("fid" in b&&"tid" in b){a.src="/forums/forum.mycta?id="+b.tid}else{if("fid" in b){a.src="/forums/forum.mycta?id="+b.fid}else{a.src="/forums/topic.mycta?id="+b.tid}}break;case 4:if("eid" in b){a.src="/events/viewEvent.mycta?id="+b.eid}else{a.src="/events/"}break;case 5:if("id" in b){a.src="/go/?id="+b.id}break;case 6:if("sid" in b){a.src="/survey/survey.mycta?sid="+b.sid}}}else{alert("The args variable 'act' is mandatory, and was not supplied to this Proxy Tool Invocation request.  Proxy Tool Invocation can not continue.");return}}function validateFrameset(b){if(b!=null){var a=new String(b.name);if(a==""){b.location="/"}}}function invokeLink(c,d,a,b){hidemenu();if(c!="null"){if(d!="null"){if(a!="null"){go("/"+c+"/"+d+".mycta?"+a)}else{go("/"+c+"/"+d+".mycta")}}else{if(a!="null"){go("/"+c+"/?"+a)}else{go("/"+c+"/")}}}else{if(a!="null"){go("/"+d+".mycta?"+a)}else{go("/"+d+".mycta")}}}function translateVertigoLinks(){var b=document.links;var a=window.location.hostname;for(var c=0;c<b.length;c++){if(b[c].protocol=="http:"||b[c].protocol=="https:"){if(b[c].hostname!=a){b[c].setAttribute("target","_blank");b[c].setAttribute("class","ext_link");b[c].setAttribute("title","Open "+b[c].href+" in a new window.")}else{b[c].setAttribute("target","MYCTA_CONTENT_FRAME")}}if(b[c].getAttribute("href").indexOf("ptLaunch")>-1){b[c].setAttribute("target","_top")}}};