/*************** start add to favorite JS code *************/ function addToFavorites() { eval(favorite_omniture); if(window.sidebar){ window.sidebar.addPanel(favorite_title, favorite_url,""); }else if (window.external){ window.external.AddFavorite(favorite_url,favorite_title) }else{ alert("Sorry! Your browser doesn't support this function."); } } if(!window.sidebar && !window.external){ document.getElementById('bookmarkPage').style.display = 'none'; } /*************** end add to favorite JS code *************/ /*************** start of top navigation guides JS code *************/ // this is an dynamic image.onload function that will // automatically resize the tab element to the size of it's tab image function setTabImageWidth() { this.tabEm.style.width = this.width + 'px'; resizeTabs(); return true; } function handle_guide_tab(){ if(mast_guide_ids && mast_guide_ids.length>0){ for(var i=0; i0){ for(var i=0; i 800 && document.getElementById('channelTab_' + i).className != 'channelTab on') { // If mast too wide, hide the tab unless its currently highlighted tabsWidth = (tabsWidth - tabsWidths[i]); document.getElementById('channelTab_' + i).style.display = 'none'; moreTabs.push(document.getElementById('channelTab_' + i).innerHTML); } } if(document.getElementById('channelTab_' + totalTabs).style.display == 'block' && document.getElementById('channelTab_' + (totalTabs-1)).style.display == 'block'){ tabsWidth = (tabsWidth - moreTabWidth); document.getElementById('channelTab_more').style.display = 'none'; }else{ moreTabs.sort(linksort); moreTabs.reverse(); for(i=0, iCount=moreTabs.length; i < iCount; i++){ if (i == 0) last = ' last'; else last = ''; document.getElementById('moreChannelTabs').innerHTML = '
  • ' + moreTabs[i] + '
  • ' + document.getElementById('moreChannelTabs').innerHTML; } document.getElementById('moreChannels').style.top = (DomUtils.getElementTop(document.getElementById('channelTabsList')) + DomUtils.getElementHeight(document.getElementById('channelTabsList'))) + 'px'; // console.log( (DomUtils.getElementTop(document.getElementById('channelTabsList')) + DomUtils.getElementHeight(document.getElementById('channelTabsList'))) + 'px'); } document.getElementById('channelTabsList').style.width = (tabsWidth + 10) + 'px'; timer = false; } function linksort(a,b) { var linkla = linkextract.exec(a); var linklb = linkextract.exec(b); var linka = linkla[2]; var linkb = linklb[2]; if (linka == linkb) { return 0; } else if (linka < linkb) { return -1; } else { return 1; } } function showMoreMenu () { displayMoreMenu = true; document.getElementById('moreChannels').style.display = 'block'; document.getElementById('moreChannels').style.left = (DomUtils.getElementLeft(document.getElementById('channelTab_more')) + document.getElementById('channelTab_more').offsetWidth - document.getElementById('moreChannels').offsetWidth + 8) + 'px'; } function hideMoreMenu () { displayMoreMenu = false; setTimeout("hideMoreMenuNow()",1000); } function hideMoreMenuNow () { if (displayMoreMenu == false) document.getElementById('moreChannels').style.display = 'none'; } /*************** end of top navigation guides JS code *************/ /*************** start search select drop dow JS code *************/ function BlurAndFocusSelect(){ searchSelect.blur(); searchSelect.focus(); } function setSearchTarget(e) { var searchTarget = '/search.php'; if(searchSelect.value != '' ){ if(searchForm.st){ searchForm.st.value = 'query'; } if(searchForm.page_id){ searchForm.page_id.value = ''; } searchForm.action = searchTarget; } if(typeof(mast_search_dd_om)!="undefined"){ eval(mast_search_dd_om); } } /*************** end search select drop dow JS code *************/