// menu.js
Tandoori.Menu=Class.create();Tandoori.Menu.HIDE_DELAY=400;Tandoori.Menu.SHOW_DELAY=200;Tandoori.Menu.instances=[];Tandoori.Menu.timer=null;Tandoori.Menu.prototype={initialize:function(A){this.preShow=A.preShow;this.postHide=A.postHide;this.onAttach=A.onAttach;this.attachElement=$(A.element);this.otherLink=A.otherLink;this.otherLinkText=A.otherLinkText;this.element=this.frame(A.items,this.attachElement);if(this.onAttach){this.onAttach()}Element.hide(this.element);document.body.appendChild(this.element);Element.addClassName(this.attachElement,"menu-title");Event.observe(this.attachElement,"mouseover",this.showMenu.bind(this));Event.observe(this.attachElement,"mouseout",this.hideMenu.bind(this));Event.observe(this.element,"mouseover",this.showMenu.bind(this));Event.observe(this.element,"mouseout",this.hideMenu.bind(this));Tandoori.Menu.instances.push(this)},frame:function(G,B){var H=Math.ceil(G.length/20);var C=Math.ceil(G.length/H);var A=document.createElement("div");Element.addClassName(A,"menu");var D=document.createElement("iframe");Object.extend(D,{src:'javascript:""',scrolling:"no",frameBorder:"0"});Object.extend(D.style,{display:"none",position:"absolute",zIndex:"9"});document.body.appendChild(D);this.iframe=D;var F=document.createElement("ul");A.appendChild(F);var E=0;var I=this;G.each(function(L){if(E>C-1){E=0;F=document.createElement("ul");A.appendChild(F)}var J=document.createElement("li");var K=Object.extend(document.createElement("a"),{href:L.l});if(L.t!="Books"){if(L.t!="Cold/Flu Season"){K.appendChild(document.createTextNode(L.t))}}if(L.t!="Books"){if(L.t!="Cold/Flu Season"){J.appendChild(K)}}Event.observe(J,"click",I.visit.bind(I,L.l));if(L.t!="Books"){if(L.t!="Cold/Flu Season"){F.appendChild(J);E++}}});if(this.otherLink){otherLink=document.createElement("a");otherLink.href=this.otherLink;otherLink.className="other";otherLink.appendChild(document.createTextNode(this.otherLinkText));A.appendChild(otherLink)}return A},visit:function(A){document.location=A},position:function(){this.element.style.left=0;this.element.style.right=null;this.element.style.position="absolute";var G=Position.cumulativeOffset(this.attachElement);var F=Element.getDimensions(this.attachElement);var B=Element.getDimensions(this.element);var C=Position.windowEdges();var E=(G[1]+F.height).px();this.element.style.top=E;if(G[0]+B.width>C[0]){var D=null;var A="1px"}else{var D=G[0].px();var A=null}this.element.style.left=D;this.element.style.right=A;this.iframe.style.top=E;this.iframe.style.left=D;this.iframe.style.right=A;this.iframe.style.width=B.width.px();this.iframe.style.height=B.height.px()},showMenu:function(){clearTimeout(Tandoori.Menu.timer);if(this.showing()){return }if(Tandoori.Menu.instances.select(function(A){return A.showing()}).length>0){this._show()}else{Tandoori.Menu.timer=setTimeout(this._show.bind(this),Tandoori.Menu.SHOW_DELAY)}},_show:function(){if(this.preShow){this.preShow()}Tandoori.Menu.instances.each(function(A){if(A!=this&&A.showing()){A._hide()}});Element.addClassName(this.attachElement,"menu-selected");this.position();Element.show(this.element);Element.show(this.iframe)},hideMenu:function(){clearTimeout(Tandoori.Menu.timer);Tandoori.Menu.timer=setTimeout(this._hide.bind(this),Tandoori.Menu.HIDE_DELAY)},_hide:function(){Element.removeClassName(this.attachElement,"menu-selected");Element.hide(this.element);Element.hide(this.iframe);if(this.postHide){this.postHide()}},showing:function(){return Element.visible(this.element)}};Tandoori.Menu.inject=function(){Tandoori.Menu.data.each(function(A){if(element=$(A.element)){new Tandoori.Menu(A)}})};Tandoori.Menu.makeMenu=function(A){return ul};Event.observe(window,"load",Tandoori.Menu.inject.bind(Tandoori.Menu));
// main.js
onLoader=new OnLoader();function OnLoader(){this.funcs=new Array();this.execute=OnLoaderExecute;this.add=OnLoaderAdd}function OnLoaderExecute(){for(i in this.funcs){this.funcs[i]()}}function OnLoaderAdd(A){this.funcs[this.funcs.size]=A}function jsLink(A){window.location=A}function noBillingAddress(A){if(A.useShippingAddress.checked){A.billingStreetAddress.value=A.streetAddress.value;A.billingStreetAddress.disabled=true;A.billingStreetAddress_2.value=A.streetAddress_2.value;A.billingStreetAddress_2.disabled=true;A.billingCity.value=A.city.value;A.billingCity.disabled=true;A.billingState.value=A.state.value;A.billingState.disabled=true;A.billingZip.value=A.zip.value;A.billingZip.disabled=true}else{A.billingStreetAddress.disabled=false;A.billingStreetAddress_2.disabled=false;A.billingCity.disabled=false;A.billingState.disabled=false;A.billingZip.disabled=false}}function sendAnAlert(A){alert(A)}function popupPrintable(){var A=document.URL;loadWindow("",640,665);return false}var detect=navigator.userAgent.toLowerCase();var OS,browser,version,total,thestring;if(checkIt("konqueror")){browser="Konqueror";OS="Linux"}else{if(checkIt("safari")){browser="Safari"}else{if(checkIt("omniweb")){browser="OmniWeb"}else{if(checkIt("opera")){browser="Opera"}else{if(checkIt("webtv")){browser="WebTV"}else{if(checkIt("icab")){browser="iCab"}else{if(checkIt("msie")){browser="Internet Explorer"}else{if(!checkIt("compatible")){browser="Netscape Navigator";version=detect.charAt(8)}else{browser="An unknown browser"}}}}}}}}if(!version){version=detect.charAt(place+thestring.length)}if(!OS){if(checkIt("linux")){OS="Linux"}else{if(checkIt("x11")){OS="Unix"}else{if(checkIt("mac")){OS="Mac"}else{if(checkIt("win")){OS="Windows"}else{OS="an unknown operating system"}}}}}function checkIt(A){place=detect.indexOf(A)+1;thestring=A;return place}function BBBRightClickAlert(B){var A;if(!B){var B=window.event}if(B.which){A=(B.which==3)}else{if(B.button){A=(B.button==2)}}if(A){alert("Use without permission is prohibited. The BBB Accredited Business seal is a trademark of the Council of Better Business Bureaus, Inc.");return false}return true};
// popupwindow.js
isMac=(navigator.appVersion.indexOf("Mac")!=-1)?true:false;NS4=(document.layers)?true:false;IEmac=((document.all)&&(isMac))?true:false;IE4plus=(document.all)?true:false;IE4=((document.all)&&(navigator.appVersion.indexOf("MSIE 4.")!=-1))?true:false;IE5=((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!=-1))?true:false;IE6=((document.all)&&(navigator.appVersion.indexOf("MSIE 6.")!=-1))?true:false;ver4=(NS4||IE4plus)?true:false;NS6=(!document.layers)&&(navigator.userAgent.indexOf("Netscape")!=-1)?true:false;IE5plus=IE5||IE6;IEMajor=0;if(IE4plus){var start=navigator.appVersion.indexOf("MSIE");var end=navigator.appVersion.indexOf(".",start);IEMajor=parseInt(navigator.appVersion.substring(start+5,end));IE5plus=(IEMajor>=5)?true:false}var gSafeOnload=new Array();function SafeAddOnload(A){if(IEmac&&IE4){window.onload=SafeOnload;gSafeOnload[gSafeOnload.length]=A}else{if(window.onload){if(window.onload!=SafeOnload){gSafeOnload[0]=window.onload;window.onload=SafeOnload}gSafeOnload[gSafeOnload.length]=A}else{window.onload=A}}}function SafeOnload(){for(var A=0;A<gSafeOnload.length;A++){gSafeOnload[A]()}}function isInt(B){var A=parseInt(B);return !isNaN(A)}function PUW_Init(){if(gPopupWindow.CheckFrequency()){setTimeout("gPopupWindow.Show()",gPopupWindow.showDelay)}}function PUW_Show(){var B="width="+this.width+",height="+this.height+",top="+this.top+",left="+this.left+",";B+="scrollbars="+((this.scrollbars)?"yes,":"no,");B+="toolbar="+((this.toolbar)?"yes,":"no,");B+="location="+((this.locationbar)?"yes,":"no,");B+="menubar="+((this.menubar)?"yes,":"no,");B+="status="+((this.statusbar)?"yes,":"no,");B+="resizable="+((this.resizable)?"yes":"no");var A=window.open(this.url,this.name,B);if(!this.ontop){window.focus()}}function PUW_CheckFrequency(){var A=this.frequency!=0;if(this.frequency>0){var C=document.cookie;var F=C.indexOf("PUWCount=");if(F>=0){var B=C.indexOf(";",F);if(B<0){B=C.length}var D=C.substring(F+9,B);if(isInt(D)){this.frequency=parseInt(D)}}if(this.frequency>0){this.frequency--}else{A=false}var E=new Date();E.setTime(E.getTime()+this.renew*60*60000);document.cookie="PUWCount="+this.frequency+"; expires="+E.toGMTString()}return A}function PopupWindow(C,D,B,A){this.width=D;this.height=B;this.top=screen.availHeight/2-B/2;this.left=screen.availWidth/2-D/2;this.name="CWViewer";this.url=C;this.showDelay=2000;this.frequency=2;this.renew=1;this.scrollbars=A;this.toolbar=false;this.statusbar=false;this.resizable=false;this.locationbar=false;this.menubar=false;this.ontop=true;this.Init=PUW_Init;this.Show=PUW_Show;this.CheckFrequency=PUW_CheckFrequency}function PUWStart(){gPopupWindow.Init()}function loadWindow(B,C,A){loadWindow(B,C,A,false)}function loadWindow(C,D,B,A){gPopupWindow=new PopupWindow(C,D,B,A);SafeAddOnload(PUWStart);gPopupWindow.toolbar=false;gPopupWindow.statusbar=false;gPopupWindow.resizable=true;gPopupWindow.ontop=true;gPopupWindow.Show()};
// menu_data.js
Tandoori.addMenuBarMask=function(A){var A=$(A);var D=document.createElement("div");D.style.height="2px";D.className="menu-bar-mask";var B=Element.getDimensions(A);D.style.width=(B.width-1).px();var C=Position.cumulativeOffset(A);D.style.top=(C[1]+B.height-1).px();D.style.left=C[0].px();document.body.appendChild(D)};Tandoori.removeMenuBarMask=function(B){var A=$A(document.getElementsByClassName("menu-bar-mask"));if(A.length>0){Element.remove(A[0])}};Tandoori.killLinks=function(A){$A($(A).getElementsByTagName("a")).each(function(B){B.onclick=function(){return false}})};Tandoori.Menu.data=[{element:"category-menu",onAttach:Tandoori.killLinks.bind(null,"category-menu"),preShow:Tandoori.addMenuBarMask.bind(null,"category-menu"),postHide:Tandoori.removeMenuBarMask.bind(null,"category-menu"),otherLinkText:"See all categories...",otherLink:"/categorysitemap.html",items:[{t:"Clothing",l:"/clothing-c6934.html"},{t:"Complete Skateboards",l:"/complete-skateboards-c6974.html"},{t:"DVD Videos",l:"/dvd-videos-c6981.html"},{t:"Ocean Stuff",l:"/ocean-stuff-c6982.html"},{t:"Other Stuff",l:"/other-stuff-c7026.html"},{t:"Protective Gear",l:"/protective-gear-c7032.html"},{t:"Skateboard Decks",l:"/skateboard-decks-c7039.html"},{t:"Skateboard Hardware",l:"/skateboard-hardware-c7087.html"},{t:"Skateboard Trucks",l:"/skateboard-trucks-c7147.html"},{t:"Skateboard Wheels",l:"/skateboard-wheels-c7166.html"}]},{element:"brand-menu",onAttach:Tandoori.killLinks.bind(null,"brand-menu"),preShow:Tandoori.addMenuBarMask.bind(null,"brand-menu"),postHide:Tandoori.removeMenuBarMask.bind(null,"brand-menu"),otherLinkText:"See all brands...",otherLink:"/brandsitemap.html",items:[{t:"411",l:"/411-b8ab281c10e5c8a86010e5c8aa3810001.html"},{t:"ABEC",l:"/abec-11-b8ab281c10e5c8a86010e5c8aa3a10002.html"},{t:"Auto Bahn",l:"/auto-bahn-b8ab281c10e5c8a86010e5c8aa3b00005.html"},{t:"Destructo",l:"/destructo-b8ab281c10e5c8a86010e5c8aa3ef000f.html"},{t:"Dregs",l:"/dregs-b8ab281c10e815a2a010e815a4e770001.html"},{t:"Grind King",l:"/grind-king-b8ab281c10e5c8a86010e5c8aa3fe0014.html"},{t:"Hubba",l:"/hubba-b8ab281c10e5d78cf010e5d78fdcb0009.html"},{t:"Lucky",l:"/lucky-b8ab281c10e5c8a86010e5c8aa46c001c.html"},{t:"Mack",l:"/mack-b8ab281c10e5c8a86010e5c8aa46c001d.html"},{t:"Rax Surf",l:"/rax-surf-b8ab281c10e5c8a86010e5c8aa4e90028.html"},{t:"Sipa Sipa",l:"/sipa-sipa-b8ab281c10e5d22f4010e5d2312b1000c.html"},{t:"Thrasher",l:"/thrasher-b8ab281c10e5c8a86010e5c8aa5d30035.html"},{t:"World Industries",l:"/world-industries-b8ab281c10e5c8a86010e5c8aa6bd0040.html"}]}];
