Event.observe(window,'load',function(){imagePreLoader();detectPage();compareToggle();faqToggle();tabs();assignPopupHandler();initiateRotateHero();getMedia();attTableInit();if((!navigator.userAgent.match(/iPhone/i))&&(!navigator.userAgent.match(/iPod/i))){detectBG();printMe();replaceSM();exploreFlash()}});function imagePreLoader(){newimage0=new Image();newimage0.src="/localcallingarea/common/images/nav/primaryexplore.png";newimage1=new Image();newimage1.src="/localcallingarea/common/images/nav/primaryexplore_h.png";newimage2=new Image();newimage2.src="/localcallingarea/common/images/nav/primaryexplore_s.png";newimage3=new Image();newimage3.src="/localcallingarea/common/images/nav/primaryshop.png";newimage4=new Image();newimage4.src="/localcallingarea/common/images/nav/primaryshop_h.png";newimage5=new Image();newimage5.src="/localcallingarea/common/images/nav/primaryshop_s.png";newimage6=new Image();newimage6.src="/localcallingarea/common/images/nav/primarysupport.png";newimage7=new Image();newimage7.src="/localcallingarea/common/images/nav/primarysupport_h.png";newimage8=new Image();newimage8.src="/localcallingarea/common/images/nav/primarysupport_s.png";newimage9=new Image();newimage9.src="/localcallingarea/common/images/nav/primaryaccount.png";newimage10=new Image();newimage10.src="/localcallingarea/common/images/nav/primaryaccount_h.png";newimage11=new Image();newimage11.src="/localcallingarea/common/images/nav/primaryaccount_s.png"}function detectPage(){if($('pageID')){var pageID=$('pageID').innerHTML;$('page_').id='page_'+pageID}}function detectBG(){if($('wrapper')){var z=$('wrapper').getStyle('backgroundColor')}if($('popupWrapper')){var z=$('popupWrapper').getStyle('backgroundColor')}if(z=='#ededed'||z=='rgb(237, 237, 237)'){{tertiaryNav()}}if($('accountSecondaryNav')){var myAcctStyle=$('accountSecondaryNav').getStyle('backgroundColor');if(myAcctStyle=='#fff'||myAcctStyle=='#ffffff'||myAcctStyle=='rgb(255, 255, 255)'){createStyleRule("#PrimaryNav","height: 35px;");createStyleRule("#PrimaryNav li#first","height: 35px;");createStyleRule("#PrimaryNav li#last","height: 35px;");createStyleRule(".secondaryNav","display: none !important;")}}}function tertiaryNav(){function rightPost(){return'<span id="rightPost">&nbsp;</span>'}function removeParentOnHover(id){$(id).up('li').removeClassName('onHover')}function removeRightPost(xPath){$$(xPath).each(function(element){element.remove()})}if(Control.Modal.browser=='Microsoft Internet Explorer'){Control.Modal.msie=true}new Control.Modal('hoverbox_wireless',{hover:true,position:'relative',offsetTop:30,offsetLeft:0,fade:true,fadeDuration:0.3,contents:function(){$('hoverbox_wireless').up('li').addClassName('onHover');new Insertion.After($('hoverbox_wireless'),rightPost());return $('hoverbox_wireless_contents').innerHTML},afterClose:function(){removeParentOnHover('hoverbox_wireless');removeRightPost('#shopSecondaryNav span')}});new Control.Modal('hoverbox_internet',{hover:true,position:'relative',offsetTop:30,offsetLeft:0,fade:true,fadeDuration:0.3,contents:function(){$('hoverbox_internet').up('li').addClassName('onHover');new Insertion.After($('hoverbox_internet'),rightPost());return $('hoverbox_internet_contents').innerHTML},afterClose:function(){removeParentOnHover('hoverbox_internet');removeRightPost('#shopSecondaryNav span')}});new Control.Modal('hoverbox_digitaltv',{hover:true,position:'relative',offsetTop:30,offsetLeft:0,fade:true,fadeDuration:0.3,contents:function(){$('hoverbox_digitaltv').up('li').addClassName('onHover');new Insertion.After($('hoverbox_digitaltv'),rightPost());return $('hoverbox_digitaltv_contents').innerHTML},afterClose:function(){removeParentOnHover('hoverbox_digitaltv');removeRightPost('#shopSecondaryNav span')}});new Control.Modal('hoverbox_homephone',{hover:true,position:'relative',offsetTop:30,offsetLeft:0,fade:true,fadeDuration:0.3,contents:function(){$('hoverbox_homephone').up('li').addClassName('onHover');new Insertion.After($('hoverbox_homephone'),rightPost());return $('hoverbox_homephone_contents').innerHTML},afterClose:function(){removeParentOnHover('hoverbox_homephone');removeRightPost('#shopSecondaryNav span')}});new Control.Modal('s-hoverbox_bundles',{hover:true,position:'relative',offsetTop:30,offsetLeft:-88,fade:true,fadeDuration:0.3,contents:function(){$('s-hoverbox_bundles').up('li').addClassName('onHover');new Insertion.After($('s-hoverbox_bundles'),rightPost());return $('hoverbox_bundles_contents').innerHTML},afterClose:function(){removeParentOnHover('s-hoverbox_bundles');removeRightPost('#shopSecondaryNav span')}});new Control.Modal('t-hoverbox_bundles',{hover:true,position:'relative',offsetTop:30,offsetLeft:0,fade:true,fadeDuration:0.3,contents:function(){$('t-hoverbox_bundles').up('li').addClassName('onHover');new Insertion.After($('t-hoverbox_bundles'),rightPost());return $('hoverbox_bundles_contents').innerHTML},afterClose:function(){removeParentOnHover('t-hoverbox_bundles');removeRightPost('#shopSecondaryNav span')}});new Control.Modal('hoverbox_addserv',{hover:true,position:'relative',offsetTop:30,offsetLeft:0,fade:true,fadeDuration:0.3,contents:function(){$('hoverbox_addserv').up('li').addClassName('onHover');new Insertion.After($('hoverbox_addserv'),rightPost());return $('hoverbox_addserv_contents').innerHTML},afterClose:function(){removeParentOnHover('hoverbox_addserv');removeRightPost('#shopSecondaryNav span')}})}function replaceSM(){var getSUP=$$('sup');getSUP.each(function(element){if(element.innerHTML=='SM')element.replace('<sup class="sm">&#8480;</sup><sup class="ieSM">SM</sup>')})}function getMedia(){if($('pageID')){var pageID=document.getElementById('pageID'),media;if(pageID.currentStyle)zIndex=pageID.currentStyle['zIndex'];else if(window.getComputedStyle)zIndex=window.getComputedStyle(pageID,'').getPropertyValue("z-index");switch(parseInt(zIndex)){case 1:media='aural';break;case 2:media='braille';break;case 3:media='embossed';break;case 4:media='handheld';break;case 5:media='print';break;case 6:media='projection';break;case 7:media='screen';break;case 8:media='tty';break;case 9:media='tv';break;default:media='screen';break}return media}}function compareToggle(){if($('compare')){function openClose(clickedRow){if(clickedRow.hasClassName('open')){clickedRow.toggleClassName('close');clickedRow.removeClassName('open')}else if(clickedRow.hasClassName('close')){clickedRow.toggleClassName('open');clickedRow.removeClassName('close')}};var media=getMedia();if(media=='screen')['pf_1','pf_2','pf_3','eq_1','eq_2','eq_3'].each(Element.hide);else if(media=='print')['pf_1','pf_2','pf_3','eq_1','eq_2','eq_3'].each(Element.show);Event.observe($('compare'),'click',function(event){var element=Event.element(event);if(element.className!='printLink'){element=element.id;var clickedRow=$(element).up(0);if(element=='plandetails'){['pd_price','pd_offers','pd_speed','pd_email','pd_emailsize','pd_storage'].each(Element.toggle);openClose(clickedRow);return false}else if(element=='planfeatures'){['pf_1','pf_2','pf_3'].each(Element.toggle);openClose(clickedRow);return false}else if(element=='equipment'){['eq_1','eq_2','eq_3'].each(Element.toggle);openClose(clickedRow);return false}}})}}function faqToggle(){if($('faqList')){var faqList=$('faqList');function openAll(xPath){$(xPath).each(function(answer){answer.removeClassName('close');if(!answer.hasClassName('open')){answer.toggleClassName('open')}})};function closeAll(xPath){$(xPath).each(function(answer){answer.removeClassName('open');if(!answer.hasClassName('close')){answer.toggleClassName('close')}})}function openClose(openQ){var openQ=$(openQ);if(openQ.hasClassName('open')){openQ.toggleClassName('close');openQ.removeClassName('open')}else if(openQ.hasClassName('close')){openQ.toggleClassName('open');openQ.removeClassName('close')}};var FAQs=$$('#faqList li');var is_anchor=location.href.indexOf('#');var addr_str=location.href.substring(is_anchor+1,location.href.length);if((is_anchor!=-1)&&($(addr_str)!=null)){var openFAQ=$(addr_str);closeAll(FAQs);openClose(openFAQ)};Event.observe($('faqList'),'click',function(event){var element=Event.element(event).up('li');if((element)&&(element.up('ul').id=='faqList')){openClose(element.id);return false}});if($('openAll')){Event.observe($('openAll'),'click',function(event){var element=Event.element(event);if(element){openAll(FAQs)}})}if($('printAll')){Event.observe($('printAll'),'click',function(event){var element=Event.element(event);if(element){openAll(FAQs)}})}if(addr_str=='all'){openAll(FAQs)}}}function printMe(){Event.observe(document.body,'click',function(event){var element=Event.element(event);if(element.hasClassName('printLink')){window.print()}})}if((document.getElementById)&&(!navigator.userAgent.match(/iPhone/i))&&(!navigator.userAgent.match(/iPod/i))){createStyleRule(".moreNav","display:none;");createStyleRule("#PrimaryNav li.selected ul#accountSecondaryNav","background: #fff !important; height: 37px; width: 930px; position: absolute; top: 34px;");window.onload=myUnobtrusiveBehavior}function myUnobtrusiveBehavior(){setElementStyleByClassName("moreNav","display","none")}function createStyleRule(selector,declaration){if(!document.getElementsByTagName||!(document.createElement||document.createElementNS))return;var agt=navigator.userAgent.toLowerCase();var is_ie=((agt.indexOf("msie")!=-1)&&(agt.indexOf("opera")==-1));var is_iewin=(is_ie&&(agt.indexOf("win")!=-1));var is_iemac=(is_ie&&(agt.indexOf("mac")!=-1));if(is_iemac)return;var head=document.getElementsByTagName("head")[0];var style=(typeof document.createElementNS!="undefined")?document.createElementNS("http://www.w3.org/1999/xhtml","style"):document.createElement("style");if(!is_iewin){var styleRule=document.createTextNode(selector+" {"+declaration+"}");style.appendChild(styleRule)}style.setAttribute("type","text/css");style.setAttribute("media","screen");head.appendChild(style);if(is_iewin&&document.styleSheets&&document.styleSheets.length>0){var lastStyle=document.styleSheets[document.styleSheets.length-1];if(typeof lastStyle.addRule=="object"){lastStyle.addRule(selector,declaration)}}}function setElementStyleById(id,propertyName,propertyValue){if(!document.getElementById)return;var el=document.getElementById(id);if(el)el.style[propertyName]=propertyValue}function setElementStyle(element,propertyName,propertyValue){if(!document.getElementsByTagName)return;var el=document.getElementsByTagName(element);for(var i=0;i<el.length;i++){el[i].style[propertyName]=propertyValue}}function setElementStyleByClassName(cl,propertyName,propertyValue){if(!document.getElementsByTagName)return;var re=new RegExp("(^| )"+cl+"( |$)");var el=document.all?document.all:document.getElementsByTagName("body")[0].getElementsByTagName("*");for(var i=0;i<el.length;i++){if(el[i].className&&el[i].className.match(re)){el[i].style[propertyName]=propertyValue}}}function tabs(){if($('tabContainer')){new Control.Tabs($('tabContainer'),{linkSelector:'li a',setClassOnContainer:true,activeClassName:'active',defaultTab:'first'})}}function assignPopupHandler(){$$('a.popup').each(function(element){element.onclick=function(){return openPopup(this.href)}})}function openPopup(url){window.open(url,'popup_window','height=600,width=800,resizable=yes,scrollbars=yes');return false}function initiateRotateHero(){if($('hero1')){var heroRotateBtns=document.getElementsByClassName('rotateHero');var currentHero='hero1';heroRotateBtns.each(Element.show);rotateHero(currentHero)}function rotateHero(currentHero){$$('div.rotateHero a').each(function(element){element.onclick=function(){var elementClass=element.readAttribute('class');if($('hero1').style.display='block'){currentHero=='hero1'}if((currentHero=='hero1')&&(elementClass=='back')){$('hero1').hide();$('hero2').hide();$('hero3').show();rotateHero('hero3')}else if((currentHero=='hero1')&&(element.hasClassName('next'))){$('hero1').hide();$('hero3').hide();$('hero2').show();rotateHero('hero2')}else if((currentHero=='hero2')&&(element.hasClassName('back'))){$('hero2').hide();$('hero3').hide();$('hero1').show();rotateHero('hero1')}else if((currentHero=='hero2')&&(element.hasClassName('next'))){$('hero2').hide();$('hero1').hide();$('hero3').show();rotateHero('hero3')}else if((currentHero=='hero3')&&(element.hasClassName('back'))){$('hero3').hide();$('hero1').hide();$('hero2').show();rotateHero('hero2')}else if((currentHero=='hero3')&&(element.hasClassName('next'))){$('hero3').hide();$('hero2').hide();$('hero1').show();rotateHero('hero1')}}})}}function attTableInit(){function zebraStripes(cssClass){var evenClass=arguments[1]?arguments[1]:'even';var oddClass=arguments[2]?arguments[2]:'odd';var zebras=new Array();var tables=document.getElementsByTagName('table');for(i=0,j=0;i<tables.length;i++){if(new RegExp("\\b"+cssClass+"\\b").test(tables[i].className)){zebras[j]=tables[i];j++}}for(i=0;i<zebras.length;i++){var tbodies=zebras[i].getElementsByTagName('tbody');var parity=false;for(j=0;j<tbodies.length;j++){var trs=tbodies[j].getElementsByTagName('tr');for(k=0;k<trs.length;k++){newClass=parity?evenClass:oddClass;trs[k].className+=trs[k].className?' '+newClass:newClass;parity=!parity;if((trs[k].className!='selected')&&(trs[k].className!='selected even')&&(trs[k].className!='selected odd')){if((zebras[i].className!='ledger noHover')&&(zebras[i].className!='noHover ledger')&&(zebras[i].className!='ledger nohover')&&(zebras[i].className!='nohover ledger')){trs[k].onmouseover=function(){this.oldClassName=this.className;var hoverClass='sfhover';this.className=hoverClass};trs[k].onmouseout=function(){this.className=this.oldClassName}}}}}}}zebraStripes('ledger')}function exploreFlash(){if($('exploreHomeFlash')){var so=new SWFObject("flash/Explore_landing.swf","Explore_landing","950","346","8","#ffffff");so.addParam("wmode","transparent");so.write("exploreHomeFlash")}if($('exploreProdServFlash')){var so=new SWFObject("flash/Explore_prods_serv.swf","Explore_prods_serv","950","346","8","#ffffff");so.addParam("wmode","transparent");so.write("exploreProdServFlash")}}