var myArray=new Array(new Array("fidopromotion","open_arrow1"));var loginFormTop;var loginFormLeft;var closeMsgHeight;var activeMenu;function fnClearField(a){a.value=""}var currentPage="";function checkoutConfirmCheck(a,c){if(currentPage=="yes"){var b=document.getElementById("storeLoc");b.href=b.href+"&chkout=true";if(a=="false"){return confirm(c)}else{return true}}}function fnSendMessageClear(f){var b=myLookupIdByTagId("msg_textbox_area",f);var c=myLookupIdByTagId("msg_textbox_fno",f);var a=myLookupIdByTagId("msg_textbox_urname",f);var e=myLookupIdByTagId("msg_textbox_message",f);var d=myLookupIdByTagId("msg_word_cnt",f);fnClearField(document.getElementById(b));fnClearField(document.getElementById(c));fnClearField(document.getElementById(a));fnClearField(document.getElementById(e));fnClearField(document.getElementById(d));return false}function fnClearCheckEligibilty(d){var b=myLookupIdByTagId("areacode1",d);var a=myLookupIdByTagId("areacode2",d);var q=myLookupIdByTagId("areacode3",d);var p=myLookupIdByTagId("areacode4",d);var o=myLookupIdByTagId("areacode5",d);var l=myLookupIdByTagId("prefix1",d);var j=myLookupIdByTagId("prefix2",d);var g=myLookupIdByTagId("prefix3",d);var e=myLookupIdByTagId("prefix4",d);var c=myLookupIdByTagId("prefix5",d);var n=myLookupIdByTagId("lineNumber1",d);var m=myLookupIdByTagId("lineNumber2",d);var k=myLookupIdByTagId("lineNumber3",d);var h=myLookupIdByTagId("lineNumber4",d);var f=myLookupIdByTagId("lineNumber5",d);fnClearField(document.getElementById(b));fnClearField(document.getElementById(a));fnClearField(document.getElementById(q));fnClearField(document.getElementById(p));fnClearField(document.getElementById(o));fnClearField(document.getElementById(l));fnClearField(document.getElementById(j));fnClearField(document.getElementById(g));fnClearField(document.getElementById(e));fnClearField(document.getElementById(c));fnClearField(document.getElementById(n));fnClearField(document.getElementById(m));fnClearField(document.getElementById(k));fnClearField(document.getElementById(h));fnClearField(document.getElementById(f));return false}function fnClearportstatus(b){var a=fnClearCheckEligibilty(b);var m=myLookupIdByTagId("postalcodeFSA1",b);var l=myLookupIdByTagId("postalcodeFSA2",b);var j=myLookupIdByTagId("postalcodeFSA3",b);var h=myLookupIdByTagId("postalcodeFSA4",b);var f=myLookupIdByTagId("postalcodeFSA5",b);var k=myLookupIdByTagId("postalcodeLDU1",b);var g=myLookupIdByTagId("postalcodeLDU2",b);var e=myLookupIdByTagId("postalcodeLDU3",b);var d=myLookupIdByTagId("postalcodeLDU4",b);var c=myLookupIdByTagId("postalcodeLDU5",b);fnClearField(document.getElementById(m));fnClearField(document.getElementById(l));fnClearField(document.getElementById(j));fnClearField(document.getElementById(h));fnClearField(document.getElementById(f));fnClearField(document.getElementById(k));fnClearField(document.getElementById(g));fnClearField(document.getElementById(e));fnClearField(document.getElementById(d));fnClearField(document.getElementById(c));return false}function smsFormSubmit(m,q){var p=myLookupIdByTagId("msg_textbox_area",m);var c=document.getElementById(p).value;var d=c.length;var b=myLookupIdByTagId("msg_textbox_fno",m);var n=document.getElementById(b).value;var l=n.length;var e=myLookupIdByTagId("msg_textbox_message",m);var k=document.getElementById(e).value;k=trimAll(k);var h=k.length;var j=myLookupIdByTagId("msg_textbox_urname",m);var a=document.getElementById(j).value;a=trimAll(a);var s=a.length;var o=IsNumeric(c);var g=IsNumeric(n);var r=h;var f=myLookupIdByTagId("smsForm",m);if(c==""){if(q=="fr"){alert("S?il vous pla?t entrez le code r?gional")}else{alert("Please enter the area code")}document.getElementById(p).focus();return false}if(o==false||d==0){if(q=="fr"){alert("S?il vous pla?t entrez le code r?gional valide")}else{alert("Please enter the valid area code")}document.getElementById(p).focus();return false}if(d<3){if(q=="fr"){alert("Area code ? 3 chiffres se.")}else{alert("Area code as to be 3 digits.")}document.getElementById(p).focus();return false}if(l<7){if(q=="fr"){alert("Num?ro de t?l?phone mobile pour ?tre 7 chiffres.")}else{alert("Mobile Number as to be 7 digits.")}document.getElementById(b).focus();return false}if(n==""){if(q=="fr"){alert("S?il vous pla?t entrez le num?ro Fido")}else{alert("Please enter the fido number")}document.getElementById(b).focus();return false}if(g==false||l==0){if(q=="fr"){alert("S?il vous pla?t entrez le num?ro valide fido")}else{alert("Please enter the valid fido number")}document.getElementById(b).focus();return false}if(a==""){if(q=="fr"){alert("S?il vous pla?t entrez le nom d'exp?diteur")}else{alert("Please enter the sender name")}document.getElementById(j).focus();return false}if(s==0){if(q=="fr"){alert("S?il vous pla?t entrez le nom d'exp?diteur valide")}else{alert("Please enter the valid sender name")}document.getElementById(j).focus();return false}if(k==""){if(q=="fr"){alert("S?il vous pla?t entrez le message")}else{alert("Please enter the message")}document.getElementById(e).focus();return false}if(h==0){if(q=="fr"){alert("S?il vous pla?t entrez le message valide")}else{alert("Please enter the valid message")}document.getElementById(e).focus();return false}if(r>160){if(q=="fr"){alert("Nombre total de caract?res dans le champ Message doit ?tre 160 caract?res")}else{alert("Total number of characters in Message field should be 160 characters")}document.getElementById(e).focus();return false}document.getElementById(f).submit()}function IsNumeric(b){var d="0123456789";var c=true;var a;for(i=0;i<b.length&&c==true;i++){a=b.charAt(i);if(d.indexOf(a)==-1){c=false}}return c}function trimAll(a){while(a.substring(0,1)==" "){a=a.substring(1,a.length)}while(a.substring(a.length-1,a.length)==" "){a=a.substring(0,a.length-1)}return a}function updateCharCount(f){var e=myLookupIdByTagId("msg_textbox_message",f);var c=document.getElementById(e).value;c=trimAll(c);var b=c.length;var d=myLookupIdByTagId("msg_word_cnt",f);var a=b;if(b>124){f.value=f.value.substring(0,124);b=f.value.length;a=b}document.getElementById(d).value=a}function hideAllDropDowns(a){for(var b=0;b<myArray.length;b++){if(a!=myArray[b][0]){fnHideMenu(myArray[b][0]);document.getElementById(myArray[b][1]).src="/web/framework/skins/fido/images/open_arrow_btn.jpg";document.getElementById(myArray[b][1]).width="8";document.getElementById(myArray[b][1]).height="4"}}}function fnDropTextMessage(a,b){hideAllDropDowns(a);if(document.getElementById(a).style.visibility=="hidden"){fnShowMenu(a);document.getElementById("fidopromotionbtn").className="nontabdesign";document.getElementById(b).src="/web/framework/skins/fido/images/close_arrow_b.jpg"}else{fnHideMenu(a);document.getElementById(b).src="/web/framework/skins/fido/images/open_arrow_btn.jpg";document.getElementById("fidopromotionbtn").className="tabdesign"}}function fnDropManageAccount(){if(document.getElementById("manageaccountdrop1").style.visibility=="hidden"){fnShowMenu("manageaccountdrop1");document.getElementById("manageaccount2").style.top="120px";document.getElementById("manageaccount3").style.top="140px";document.getElementById("manageaccount4").style.top="160px";document.getElementById("manageaccount5").style.top="180px";document.getElementById("manageaccount6").style.top="200px";document.getElementById("arrow1").src="images/open_arrow_btn.jpg";document.getElementById("arrow1").width="8";document.getElementById("arrow1").height="5"}else{fnHideMenu("manageaccountdrop1");document.getElementById("manageaccount2").style.top="30px";document.getElementById("manageaccount3").style.top="50px";document.getElementById("manageaccount4").style.top="70px";document.getElementById("manageaccount5").style.top="90px";document.getElementById("manageaccount6").style.top="110px";document.getElementById("arrow1").src="images/home_new_r19_c5.jpg";document.getElementById("arrow1").width="5";document.getElementById("arrow1").height="8"}}function fnDropSearch(){if(document.getElementById("fidosearch").style.visibility=="hidden"){fnShowMenu("fidosearch");document.getElementById("home_new_r3_c19").src="images/search_open_btn.jpg"}else{fnHideMenu("fidosearch");document.getElementById("home_new_r3_c19").src="images/search_close_btn.jpg"}if(document.getElementById("fidoCartMenu").style.visibility=="visible"){fnHideMenu("fidoCartMenu");document.getElementById("home_new_r3_c21").src="images/cart_close_btn.jpg";if(document.getElementById("sideselect")){if(document.getElementById("sideselect").style.display=="none"){document.getElementById("sideselect").style.display="block"}}}}function fnDropCart(){if(document.getElementById("fidoCartMenu").style.visibility=="hidden"){fnShowMenu("fidoCartMenu");document.getElementById("fidoCartMenu").style.display="block";document.getElementById("home_new_r3_c21").src="images/cart_open_btn.jpg";if(document.getElementById("sideselect")){if(document.getElementById("sideselect").style.display!="none"){document.getElementById("sideselect").style.display="none"}}}else{fnHideMenu("fidoCartMenu");document.getElementById("home_new_r3_c21").src="images/cart_close_btn.jpg";if(document.getElementById("sideselect")){if(document.getElementById("sideselect").style.display=="none"){document.getElementById("sideselect").style.display="block"}}}if(document.getElementById("fidosearch").style.visibility=="visible"){fnHideMenu("fidosearch");document.getElementById("home_new_r3_c19").src="images/search_close_btn.jpg"}}function onPageLoad(){fnHideMenu("fidosearch");fnHideMenu("fidoCartMenu")}function fnDropAccount(){var a=document.getElementById("manageaccountdrop1");alert(a.style.visibilty);if(a.style.visibilty=="hidden"){a.style.visibilty="visible"}else{a.style.visibilty="hidden"}}function imageChange(b,a){document[b].src=a}function fnDropAccount(){var a=document.getElementById("manageaccountdrop1");if(a.style.visibility!="hidden"){fnHideMenu("manageaccountdrop1")}else{fnShowMenu("manageaccountdrop1")}}function SwitchSubMenu(d){if(document.getElementById){var c=document.getElementById(d);var a=document.getElementById("sub1").getElementsByTagName("span");if(c.style.display!="block"){for(var b=0;b<a.length;b++){if(a[b].className=="innermenu"){a[b].style.display="none"}}c.style.display="block"}else{c.style.display="none"}}}function closeAllDropDowns(){if(document.getElementById("main16c2")!=null&&document.getElementById("main16c2").style.visibility!="hidden"){document.getElementById("main16c2").style.visibility="hidden";document.getElementById("open_arrow1").src="/web/framework/skins/fido/images/open_arrow_btn.jpg";document.getElementById("open_arrow1").width="8";document.getElementById("open_arrow1").height="4"}if(document.getElementById("fidopromotion")!=null&&document.getElementById("fidopromotion").style.visibility!="hidden"){document.getElementById("fidopromotion").style.visibility="hidden";document.getElementById("open_arrow2").src="/web/framework/skins/fido/images/open_arrow_btn.jpg";document.getElementById("open_arrow2").width="8";document.getElementById("open_arrow2").height="4"}}function closeSearchandCart(){if(document.getElementById("fidosearch").style.visibility!="hidden"){document.getElementById("fidosearch").style.visibility="hidden";document.getElementById("search").src="images/search_close_btn.jpg"}}function fpromo_rollOver(a){showSub("promotion_cont_area");if(document.getElementById("promotion_cont_area").style.visibility=="visible"){document.getElementById("index_mid_tab").className="promotion_nontabline";document.getElementById(a).src="/web/framework/skins/fido/images/mid_tab_over.jpg"}}function fpromo_rollOut(a){subt=previous_menu;timer=setTimeout("newcloseSub('"+subt+"')",50)}function newcloseSub(a){if(a!=""){MM_showHideLayers(a,"","hide");document.getElementById("promoImg").src="/web/framework/skins/fido/images/mid_tab_norm.jpg";document.getElementById("index_mid_tab").className="promotion_tabline"}}function toggleSubMenu(b){activeMenu=b;nodeID="#"+b;$(nodeID).css("background-color","#ffeb36");var a=$(nodeID).children();$(a).each(function(d){var e=$(a[d]).attr("id");$("#"+e).css("color","#000000")});var c=$(nodeID).siblings();$(c).each(function(d){var e=$(c[d]).attr("id");$(c[d]).css("background-color","#c6c6c6");$("#"+e+"submenu").hide();d++});$(nodeID+"submenu").show()}function toggleMySubMenu(b){activeMenu=b;nodeID="#"+b;$(nodeID).css("background-color","#ffeb36");var a=$(nodeID).children();var c=$(nodeID).siblings();$(c).each(function(d){var e=$(c[d]).attr("id");if(e.indexOf("Active")!=-1){siblingsubStringID=e.substring(0,e.indexOf("Active"));$("#"+siblingsubStringID+"submenu").hide()}else{$("#"+e+"submenu").hide()}d++});$(nodeID+"submenu").show()}function getActiveMenu(){return activeMenu}function hideChildMenu(b){nodeID="#"+b;if(b=="MyAccount"){$(nodeID).css("background-color","#c6c6c6");$(nodeID+"submenu").hide()}if(b=="Shop"){$(nodeID).css("background-color","#c6c6c6");$(nodeID+"submenu").hide()}if(b=="Support"){$(nodeID).css("background-color","#c6c6c6");$(nodeID+"submenu").hide()}var c=$(nodeID).siblings();$(c).each(function(d){var e=$(c[d]).attr("id");if(e.indexOf("Active")!=-1){siblingsubStringID=e.substring(0,e.indexOf("Active"));$("#"+siblingsubStringID+"submenu").show();activeMenu=""}d++});var a=$(nodeID).children();$(a).each(function(d){var e=$(a[d]).attr("id");$("#"+e).css("color","#5e5e5e")})}function hideSubMenu(b,c){nodeID="#"+c;parentID="#"+b;$(parentID).css("background-color","#c6c6c6");$(nodeID).hide();var d=$(parentID).siblings();$(d).each(function(e){var f=$(d[e]).attr("id");if(f.indexOf("Active")!=-1){siblingsubStringID=f.substring(0,f.indexOf("Active"));$("#"+siblingsubStringID+"submenu").show();activeMenu=""}e++});var a=$(parentID).children();$(a).each(function(e){var f=$(a[e]).attr("id");$("#"+f).css("color","#5e5e5e")})}function changeMenuColor(a){nodeID="#"+a;$(nodeID).css("background-color","#ffeb36");$(nodeID+"link").css("color","#000000")}function revertMenuColor(a){nodeID="#"+a;$(nodeID).css("background-color","#c6c6c6");$(nodeID+"link").css("color","#5e5e5e")}function loadURL(b){nodeID="#"+b;var a=$(nodeID+"link").attr("href");window.location=a}function loginBoxSlideDown(d,b,a,c){findPos(d);toHideID="#"+b;toShowID="#"+a;toSlideID="#"+c;$(toSlideID).css("left",loginFormLeft);$(toSlideID).css("top",loginFormTop);$(toSlideID).slideDown("slow");$(toHideID).hide();$(toShowID).css("display","block")}function loginBoxSlideUp(d,b,a,c){toHideID="#"+b;toShowID="#"+a;toSlideID="#"+c;$(toSlideID).slideUp("slow");$("div#loginBox").css("height","25");$(toSlideID).css("display","none");$(toHideID).hide();$(toShowID).css("display","block")}function toggleSignIn(){}function findPos(a){var b=document.getElementById(a);var d=b.offsetLeft;var c=b.offsetTop;while(b.offsetParent){d=d+b.offsetParent.offsetLeft;c=c+b.offsetParent.offsetTop;if(b==document.getElementsByTagName("body")[0]){break}else{b=b.offsetParent}}loginFormLeft=d;loginFormTop=c+16};