var doAnimations=false;var loadingFeedbackTimer=0;var container=top.$("#contentIFrameContainer");var minHeight=350;var activeButtonID,activeColorSet,browserIsSupported;function isSupportedBrowser(){if(browserIsSupported==null){browserIsSupported=false;if($){if($.browser.msie||$.browser.mozilla||$.browser.opera||$.browser.safari){var isIE5=($.browser.msie&&$.browser.version.substring(0,1)=="5")?true:false;if(isIE5==false){browserIsSupported=true;}}}}return browserIsSupported;}function fadeInContent(){if(isSupportedBrowser()==true){setTimeout(function(){removeLoader();if(parseFloat(container.css("opacity"))<0.9){if(doAnimations==true){container.stop().dequeue().animate({"opacity":0.99},{duration:135});}else{container.css("opacity","1");}}},10);}}function removeLoader(){clearTimeout(loadingFeedbackTimer);clearTimeout(loaderInterval);$("#loadingMsg").stop().css("display","none");}function initLoader(){if(isSupportedBrowser()==true){loadingFeedbackTimer=setTimeout(function(){showLoader();},400);}}var loaderInterval=1;function showLoader(){if(isSupportedBrowser()==true){clearInterval(loaderInterval);$("#loadingMsg").stop().fadeIn(250);loaderInterval=window.setInterval(function(){if(contentIFrame.$) try{top.displayContent()}catch(err){};},750);}}function hideContent(){if(isSupportedBrowser()==true){initLoader();container.stop().css("opacity","0");}}function adjustFrameHeight(){if(isSupportedBrowser()==true){var newHeightVal=parseInt(contentIFrame.$("#contentLeft").height());if(minHeight>newHeightVal){newHeightVal=minHeight;}$("#contentIFrame,#cntContent,#contentIFrameContainer").css("height",parseInt(newHeightVal+12)+"px");contentIFrame.$("body").css("height",newHeightVal+"px");}}function switchLayout(newColor){if(isSupportedBrowser()==true){activeColorSet=newColor;$("#imgCntNav").css("backgroundPosition","0px "+colorMapping['headY'][activeColorSet]);$("#cntNav").children(".topNav").css("backgroundPosition","-105px "+colorMapping['btnY'][activeColorSet]);$("#cntNav").children(".topActive").css("backgroundPosition","0px "+colorMapping['btnY'][activeColorSet]);}}function displayContent(){if(isSupportedBrowser()==true){try {var strElemID=contentIFrame.document.getElementById('show').value;var eClicked=top.document.getElementById('Nav'+strElemID.substring(0,2));if(strElemID.length>0&&top.highlightSubNav!=null){if(eClicked&&eClicked.style.display!='block'){if($(eClicked).attr('class').indexOf('topActive')==-1){highlightNav(eClicked);switchSubNav(strElemID.substring(0,2));var newColorset=contentIFrame.document.getElementById('colorset').value;if(activeColorSet!=newColorset){switchLayout(newColorset);}}}highlightSubNav('#subNav'+strElemID.substring(0,4));}adjustFrameHeight();document.title=contentIFrame.document.title;fadeInContent();} catch(err){fadeInContent();}}}function highlightNav(e){if(isSupportedBrowser()==true){$("#cntNav,#cntMiniNav").children().removeClass("topActive");$(e).addClass("topActive");}}function highlightFirstSubNav(strShortID){if(isSupportedBrowser()==true){$(".sn").removeClass("subActive");$("#subNav"+strShortID+"01").addClass("subActive");}}function highlightSubNav(strID){if(isSupportedBrowser()==true){$(".sn").removeClass("subActive");$(strID).addClass("subActive");}}function switchSubNav(strID){if(isSupportedBrowser()==true){if($(".subNav"+strID).css("display")=="none"){hideSubNav();if(!$.browser.msie&&doAnimations==true){$(".subNav"+strID).stop().fadeIn(225);}else{$(".subNav"+strID).css("display","inline");}highlightFirstSubNav(strID);}}}function hideSubNav(){if(isSupportedBrowser()==true){$(".subNavList").css("display","none");}}function contentFrameUnload(){top.hideContent();}function getContentURL(baseURL){return baseURL.replace("main","content");}
