// ADDITIONAL NOTES // The input variables to the toggle function are the number of the submenu to open/close, // starting with 0, and the number of pixels to move the objects below. // For example toggle(1,60) opens/closes the second submenu and moves the objects below 60 pixels. var nom = 16; // Number of menus var usePictures = 1; // use pictures? 1 = yes, 0 = no var ttls = new Array(); // An array for the title objects var subs = new Array(); // An array for the submenu objects var lastn; var lastmove; var isNS4 = document.layers ? true : false; if (isNS4) { visible = 'show'; hidden = 'hide'; } else { visible = 'visible'; hidden = 'hidden'; } for (var i = 1; i <= nom; i++) { ttls[i] = ('title' + i); subs[i] = ('submenu' +i); } function picopen(n) { title = ('title' + n); pic = ('pic' + n); if (isNS4) document.layers[title].document.images[pic].src = "/images/common/opened.gif"; else document.getElementById(pic).src = "/images/common/opened.gif"; } function picclose(n) { title = ('title' + n); pic = ('pic' + n); if (isNS4) document.layers[title].document.images[pic].src = "/images/common/closed.gif"; else document.getElementById(pic).src = "/images/common/closed.gif"; } lastn = (nom + 1); lastmove = 0; function lasttoggle(n,move) { if (n > nom) return; menu = ('submenu' + n); if (isNS4) { submenu = document.layers[menu]; } else { submenu = document.getElementById(menu).style; } if (submenu.visibility == visible) { submenu.visibility = hidden; picclose(n); // Remove this if you don't use pictures for (var i = (n+1); i <= nom; i++) { if (isNS4) { document.layers[ttls[i]].top -= move; document.layers[subs[i]].top -= move; } else { elem = document.getElementById(ttls[i]); elem.style.top = (parseInt(elem.style.top) - move) + "px"; elem = document.getElementById(subs[i]); elem.style.top = (parseInt(elem.style.top) - move) + "px"; } } } } function toggle(n,move) { var submenu; menu = ('submenu' + n); if (isNS4) submenu = document.layers[menu]; else submenu = document.getElementById(menu).style; if (submenu.visibility == visible) { submenu.visibility = hidden; if (usePictures) picclose(n); for (var i = (n+1); i <= nom; i++) { if (isNS4) { document.layers[ttls[i]].top -= move; document.layers[subs[i]].top -= move; } else { elem = document.getElementById(ttls[i]); elem.style.top = (parseInt(elem.style.top) - move) + "px"; elem = document.getElementById(subs[i]); elem.style.top = (parseInt(elem.style.top) - move) + "px"; } } } else { submenu.visibility = visible; if (usePictures) picopen(n); if (lastn != n) { lasttoggle(lastn,lastmove); } for (var i = (n+1); i <= nom; i++) { if (isNS4) { document.layers[ttls[i]].top += move; document.layers[subs[i]].top += move; } else { elem = document.getElementById(ttls[i]); elem.style.top = (parseInt(elem.style.top) + move) + "px"; elem = document.getElementById(subs[i]); elem.style.top = (parseInt(elem.style.top) + move) + "px"; } } } lastn = n; lastmove = move; } function processRequest(buttonName) { var form = document.searchForm var inputValue = form.keywords.value if (buttonName == "SEARCH") { if (form.search.value == "all") { form.action ="/webapp/commerce/servlet/sony/SearchResults_1.jsp" form.submit() } else { form.action = "/cgi-bin/search/search.cgi?&restrictoption=site%3Awww.sonystyle.ca&num=10&q="+inputValue form.submit() } } } var sleep = 0; var timeout = 180; var needTimeOut = "no"; function checkTimeOut() { if (parent.SIS_frame != null && needTimeOut == "yes") { window.history.forward(1); if (sleep == timeout) { top.location="/webapp/commerce/servlet/sony/SISRefresh.jsp"; } else { sleep++; setTimeout("checkTimeOut()", 1000) } } } function resetClock() { sleep = 0; } function startLoading() { if (window.parent.SIS_frame != null) window.parent.SIS_frame.loading(); } function stopLoading() { if (window.parent.SIS_frame != null) window.parent.SIS_frame.loaded(); } // End -->
The World In Your
Hands
|