var AddtoContinue="";function SetFeaturePackages(){var c=document.getElementsByName("imgCtrlFeaturePkg").length;for(var b=0;b<c;b++){var d="divFeaturePkg"+b;var a="imgCtrlFeaturePkg"+b;if(b==0){document.getElementById(d).style.display="";document.getElementById(a).src="/images/addons/AdRotator/icon1-on.gif"}else{document.getElementById(d).style.display="none";document.getElementById(a).src="/images/addons/AdRotator/icon"+(b+1)+"-off.gif"}}}function SetControl(a){var d=document.getElementsByName("imgCtrlFeaturePkg").length;for(var c=0;c<d;c++){var e="divFeaturePkg"+c;var b="imgCtrlFeaturePkg"+c;if(a==c){document.getElementById(e).style.display="";document.getElementById(b).src="/images/addons/AdRotator/icon"+(c+1)+"-on.gif"}else{document.getElementById(e).style.display="none";document.getElementById(b).src="/images/addons/AdRotator/icon"+(c+1)+"-off.gif"}}initSIFR()}function SetSecondaryPkgHeight(){var a=parseInt(document.getElementById("hdnTotalSecPkg").value);var e=0;var d=0;for(var c=1;c<=parseInt(a/2);c++){var g=[];for(var b=e;b<(e+2);b++){var f="tdSecPkg"+b;g.push(parseInt(document.getElementById(f).offsetHeight))}d=0;d=maxValue(g);for(var b=e;b<(e+2);b++){var f="tdSecPkg"+b;document.getElementById(f).style.height=d+"px"}e=e+2}}maxValue=function(a){mxm=a[0];for(i=0;i<a.length;i++){if(a[i]>mxm){mxm=a[i]}}return mxm};function closeServiceDetailDiv(){window.top.closeModalPopup(false)}function showModelDiv(c){var d=false;for(i=0;i<serviceArray.length;i++){if(serviceArray[i].ID==c){var b=parseFloat(serviceArray[i].Price);b=b.toFixed(2);var a="";if(b!=0){a="<b style='color:#000; font-size:12px;'> $"+b+"</b> per month"}else{a="<b style='color:#000; font-size:12px;'>FREE</b>"}document.getElementById("litServiceDescription").innerHTML=serviceArray[i].Description;document.getElementById("litServiceName").innerHTML="<b style='color:#000; font-size:12px;'>"+serviceArray[i].Name+"</b>";document.getElementById("psServiceDiv").innerHTML=a;document.getElementById("imgGroupHeader").style.display="block";document.getElementById("imgGroupHeader").src=serviceArray[i].ImagePath;d=true;break}}if(d){document.getElementById("modalDivServiceDetail").style.display="block";openModalDiv("ServiceModalDiv","450","300",function(){})}}function PackageInlinePopup(c){if("plan"==c.toLowerCase()){AddtoContinue="plan"}else{AddtoContinue="phone"}var b=document.getElementById("PkgNavigation_modalDivPkgInlinePoUp");var a=(b.innerHTML.length-270)/150*10+50;openModalDiv("PkgNavigation_modalDivPkgInlinePoUp","500",a,function(){})}function CloseModelPopup(){window.top.closeModalPopup(false)}function Continue(){CloseModelPopup();if(AddtoContinue=="plan"){window.location="/shop/plans/Cell-Phone-Plans-Overview.aspx"}else{window.location="/shop/phones"}}var inSwatch=false;function MouseOver(c,b,a){inSwatch=true;document.getElementById(c+"divColSwatch"+b).className="imgGalleryOver";document.getElementById(c+"divAsset").getElementsByTagName("img")[0].src=a}function MouseOut(b,a,c){inSwatch=false;document.getElementById(b+"divColSwatch"+a).className="imgGalleryOut";DelayMouseOut(b,c)}function showDefaultImage(a,b){if(!inSwatch){document.getElementById(a+"divAsset").getElementsByTagName("img")[0].src=b}}function DelayMouseOut(a,b){setTimeout(function(){showDefaultImage(a,b)},100)}function Click(ClientID,deviceID,object){document.getElementById(ClientID+"hdnDeviceID").value=deviceID;eval(document.getElementById("lnkAjaxDriver").href)}function HandleAjax(object,CategoryID){object.href="";document.getElementById("hdnCategoryID").value=CategoryID;eval(document.getElementById("lnkAjaxDriver").href);return false};