/************** Copyright (c) 2001 Thomas Brattli (www.dhtmlcentral.com) eXperience DHTML coolMenus - Get it at www.dhtmlcentral.com Version 3.02 This script can be used freely as long as all copyright messages are intact. (You can delete the comments below to save space) This script takes over for the old Coolmenus2 and CoolFrameMenu Visit www.dhtmlcentral.com/coolmenus/ for the latest version of the script. Tutorial: http://www.dhtmlcentral.com/tutorial.asp Support: http://www.dhtmlcentral.com/forums/forum.asp?FORUM_ID=2&CAT_ID=1&Forum_Title=CoolMenus Known bugs: Netscape 6: When using padding in the layers you can sometimes get strange visual effects on the lowest menu item. Only way to fix is to not use padding. Opera: This menu is very close to working on Opera, but as far as I could figure out opera don't support innerHTML or document.createElement() which makes the changing of the text inside the submenus immpossible. If anyone know a solution to this please let me know. Explorer 4 for mac: It will not work in this browser, nothing does. Explorer 5 for mac: It works fine, but like Netscape 6 it's a little slow and you can get strange visual effects sometimes. Script checked and working with: PC: Netscape 4.03 - Netscape 4.04 -Netscape 4.08 - Netscape 4.73 - Netscape 6 - Netscape 6.01 Internet Explorer 5.0 - Internet Explorer 5.5 -Internet Explorer 6.0 MAC: Netscape 4 - Explorer 5 Btw: There is basically just one explanation to why this code is sort of "scrambled": I wanted this file be as small as possible.. If you want it to be smaller feel free to remove all comments (except for the copyright) **************/ /************* Pageobject ***************/ function makePageCoords(win,fr){ if(!win) win=window this.x=0;this.x2=(bw.ns4 || bw.ns6)?win.innerWidth-1:win.document.body.offsetWidth; if(!fr&&bw.ie) this.x2-=20; else if(!fr&&bw.ns4) this.x2-=4; else if(bw.ns6) this.x2+=1 this.y=0;this.y2=(bw.ns4 || bw.ns6)?win.innerHeight:win.document.body.offsetHeight; if(bw.ns4&&!win.rows) this.x2+=5; if(!fr&&bw.ie) this.y2-=4; else if(bw.ns4&&fr) this.y2+=4 this.y2orig=this.y2; this.x50=this.x2/2; this.y50=this.y2/2; return this; } /************* Debugging function ***************/ function debug(txt,ev){if(mDebugging==2) self.status=txt; else alert(txt); if(ev) eval(ev); return false} /************ Scroll function *************/ function cm_checkScrolled(obj){ if(bw.ns4 || bw.ns6) obj.scrolledY=obj.win.pageYOffset else obj.scrolledY=obj.win.document.body.scrollTop if(obj.scrolledY!=obj.lastScrolled){ if(!obj.useframes){ for(i=0;i(end-px*px-px) && px>1) px-=px/5; this.moveIt(this.x,this.y+px) this.clipTo(end-this.y,this.width,this.height,0) this.tim=setTimeout(this.obj+".slide("+end+","+px+","+tim+","+w+","+h+")",tim) }else{this.clipTo(0,this.width,this.height,0); this.moveIt(this.x,end)} } function cm_filterIt(f){if(this.evnt.filters[0]) this.evnt.filters[0].Stop(); else this.css.filter=f; this.evnt.filters[0].Apply(); this.showIt(); this.evnt.filters[0].Play();} function cm_setactive(on,name,frmmouse){ if(!name) name=this.name; var tobj=this.parent.m[name] if(tobj.img){if(tobj.img2){if(on) this.ref.images[tobj.img].src=tobj.img2; else this.ref.images[tobj.img].src=tobj.img1} }else{ if(on){var color=tobj.c2; var fcolor=tobj.c4; var re=tobj.c3}else{var color=tobj.c1; var fcolor=tobj.c3; var re=tobj.c4} if(color){if(bw.dom || bw.ie4) this.css.backgroundColor=color; else if(bw.ns4) if(color=="transparent") color=null; this.css.bgColor=color} if(fcolor && !bw.ns4){if(bw.ie4) this.evnt.style.color=fcolor; else if(this.evnt.childNodes[0]) this.evnt.style.color=fcolor }else if(fcolor&&frmmouse){t=this.parent.m[name].text; t=t.replace(re,fcolor); this.writeIt(t); if(on) this.addEvents(name,this.parent.name,tobj.lnk,this.parent.useclick)} if(tobj.l==0&&bw.ns6){this.parent.l[0].o[tobj.num].oBorder.hideIt(); this.parent.l[0].o[tobj.num].oBorder.showIt();} //Stupid fix for netscape 6.... } } function cm_clipTo(t,r,b,l,w){if(bw.ns4){this.css.clip.top=t;this.css.clip.right=r; this.css.clip.bottom=b;this.css.clip.left=l }else{this.css.clip="rect("+t+","+r+","+b+","+l+")"; if(w){this.css.width=r; this.css.height=b}}; this.width=r; this.height=b} function cm_addEvents(n,name,url,useclick){ this.evnt.onmouseover=new Function(name+".mover('"+n+"')"); this.evnt.onmouseout=new Function(name+".mmout('"+n+"')") if(!url && useclick) ev=new Function(name+".mover('"+n+"',1)") else ev=new Function(name+".go('"+n+"')") if(bw.ns4){this.ref.captureEvents(Event.MOUSEDOWN); this.ref.onmousedown=ev} else this.evnt.onclick=ev } /************ Making menu object *************/ function cm_makeMenu(name,parent,text,link,target,width,height,img1,img2,bgcoloroff,bgcoloron,textcolor,hovercolor,onclick,onmouseover,onmouseout){ this.m[name]=new Object(); var obj=this.m[name]; obj.name=name; obj.subs=new Array(); obj.parent=parent; var tt obj.lnk=(link==0||link=='')?"":link; obj.target=target if(parent!="" && parent){this.m[parent].subs[this.m[parent].subs.length]=name; l=this.m[parent].l+1} else l=0 obj.l=l; prop1=lthis.l[l].maxnum) this.l[l].maxnum=this.m[parent].subs.length if(this.m[parent].totheight==0) this.m[parent].totheight=this.l[l].border this.m[parent].totheight+=obj.height+ this.l[l].border if(this.m[parent].maxwidthobj.width?this.maxwidth:obj.width; this.maxheight=this.maxheight>obj.height?this.maxwidth:obj.height }if(img1) text='' else if(bw.ns4){text=''+text+''} if(bw.ns4&&this.useNS4links&&(l==0||!this.useframes) ||(l==0&&img1)){tt=img1&&l==0?this.useclick?this.name+".mover('"+name+"',1);":this.name+".go('"+name+"');":"";text=''+text+''} if(img1){obj.preimg1=new Image(); obj.preimg1.src=img1}; if(img2){obj.preimg2=new Image(); obj.preimg2.src=img2} if(img2) obj.img="imgCMenu"+name; else obj.img=0; obj.img1=img1||""; obj.img2=img2||""; obj.text=text; obj.subx=-1; obj.c1=bgcoloroff||prop1.bgcoloroff||prop2.bgcoloroff; obj.c2=bgcoloron||prop1.bgcoloron||prop2.bgcoloron; obj.c3=textcolor||this.l[l].tc; obj.c4=hovercolor||prop1.hovercolor||prop2.hovercolor; obj.suby=-1; obj.mclick=onclick||""; obj.mover=onmouseover||""; obj.mout=onmouseout||""; obj.totheight=0; obj.maxwidth=0; } /************ Onmouseout *************/ function cm_mout(name,cl){ if(!name&&cl&&!this.isover){this.isclicked=0; this.hideSubs(1,0,0,0,1); this.aobj[0]=-1; return} if(!name) return; var l=this.m[name].l; if((this.m[name].subs.length==0||!this.loaded)||(this.useclick&&!this.isclicked)){if((this.aobj[l+1]==-1||l>=this.l.length-1)&&this.aobj[l]!=-1){this.aobj[l].setactive(0,0,1); this.aobj[l]=-1;}} if(this.m[name].mout!="") eval(this.m[name].mout) if(this.useclick){this.isover=0; return}; clearTimeout(this.tim); if(!(!bw.ie&&this.useframes&&l==0&&this.aobj1)){ this.isover=0; this.aobj1=0; this.tim=setTimeout(this.name+".hideSubs(1,0,0,0,1)",this.wait)} } /************ Onmouseover *************/ function cm_mover(name,cl){ clearTimeout(this.tim); this.isover=1; var l=this.m[name].l; if(this.aobj[l].name==name){ if(this.aobj[l+1]!=-1 && l=page.y2) { this.m[name].suby=page.y2-this.m[name].totheight-this.l[l].height; } if(this.pagecheck&&(l!=1||!this.useframes)) { this.checkPage(name,l,num,topalign,align,ln,border,cn) } } /************ Checking page coords *************/ function cm_checkPage(name,l,num,topalign,align,ln,border,cn){ cn++; if(this.m[name].subx+this.m[name].maxwidth>page.x2){ if(align!=1){if(align==3&&topalign!=0) topalign=3; align=1; this.getCoords(name,l,num,topalign,align,ln,border,cn)} }else if(this.m[name].subxpage.y2){ if(l==1){topalign=3; this.getCoords(name,l,num,topalign,align,ln,border,cn,3)} else if(align!=3){ align=3; this.getCoords(name,l,num,topalign,align,ln,border,cn)} }else if(this.m[name].suby=this.l.length) return; ln=this.m[name].subs.length if(ln==0){this.hideSubs(l,1,0,1); return} else this.hideSubs(l+1,1); var border=this.l[l].border; this.aobj[l]=-1 if(this.useframes&&(bw.ns4||bw.ns6)) cm_checkScrolled(this) if((this.m[name].subx==-1 || this.m[name].suby==-1) || this.m[name].scrollY!=this.lastScrolled || this.isresized){ var topalign=this.l[0].align; var align=this.l[l-1].align; this.getCoords(name,l,num,topalign,align,ln,border,0) }var x=this.m[name].subx; var y=this.m[name].suby; var bobj=this.l[l].oBorder; bobj.hideIt(); if(this.l[l-1].clip&&!(this.l[l-1].filter&&bw.filter)){ clearTimeout(bobj.tim); bobj.clipy=0; bobj.clipTo(0,this.m[name].maxwidth,0,0); bobj.moveIt(x,y); }else if(this.l[l-1].slide&&!(this.l[l-1].filter&&bw.filter)){ clearTimeout(bobj.tim); bobj.clipTo(0,this.m[name].maxwidth,this.m[name].totheight,0,1) bobj.moveIt(x,y-this.m[name].totheight) }else{ bobj.clipTo(0,this.m[name].maxwidth,this.m[name].totheight,0,1) bobj.moveIt(x,y); } var yy=border for(i=0;ithis.m[name].subx && selx<(this.m[name].subx+this.m[name].maxwidth)) &&((sely+selh)>this.m[name].suby && sely<(this.m[name].suby+this.m[name].totheight))){ if(this.sel[i].style.visibility!="hidden"){this.sel[i].level=l; this.sel[i].style.visibility="hidden"; this.hcode+=this.name+".sel["+i+"].style.visibility='visible';"} }else if(l<=this.sel[i].level) this.sel[i].style.visibility="visible" } }else if(bw.ns4&&this.hideForm){eval(this.hideForm+".visibility='hide'"); this.hcode=this.hideForm+".visibility='show'"} } /************ Making all top elements *************/ function cm_makeTop(rr){ var m,rows,border,x,y,mpa m=this.menuplacement; rows=this.rows; this.pxbetween=this.checkp(this.pxbetween,0,1,1) border=this.l[0].border;y=this.checkp(this.fromtop,0,0,1)+border;x=this.checkp(this.fromleft,0,0,1)+border if(m=="bottomcenter"||m=="bottom"){ if(m=="bottomcenter") x=toppage.x2/2-(this.totwidth+border*this.l[0].num+this.pxbetween*(this.l[0].num-1))/2 y=toppage.y2-this.maxheight-border }else if(m=="right") x=toppage.x2-this.maxwidth-border*2 else if(m=="bottom") y=toppage.y2-this.maxheight-border*2 else if(m=="center"){if(rows==0) x=toppage.x2/2 - (this.maxwidth+border*2)/2; else x=toppage.x2/2 - (this.totwidth + border*this.l[0].num +this.pxbetween*(this.l[0].num-1))/2} else if(m.toString().indexOf(",")>-1) mpa=1 if(this.usebar){ var bx,by,bww,bh,oBb oNS=bw.ns6?this.oNS[this.l[0].maxnum]:0 this.oBar=new cm_makeObj('div'+this.name+'Bar',0,0,window,0,oNS) if(this.barx=="menu") bx=mpa&&rows?this.checkp(m[0],1,0,1)-border:x-border; else{ bx=this.checkp(this.barx,1,0,1) } if(this.bary=="menu") by=mpa&&!rows?this.checkp(m[0],0,0,1)-border:y-border; else by=this.checkp(this.bary,0,0,1); this.oBar.moveIt(bx,by) if(this.barwidth=="menu"){bww=rows?mpa?(this.checkp(m[m.length-1],1,0,1)-bx)+this.m[this.l[0].names[this.l[0].num-1]].width+border:(this.totwidth +this.pxbetween*(this.l[0].num-1)):this.maxwidth; bww+=!rows?border*2:0;}else bww=this.checkp(this.barwidth,1,0,1); if(bw.ie&&rows&&this.barwidth=="100%"&&this.useframes) bww+=parseInt(self.document.body.leftMargin)*2 if(this.barheight=="menu"){bh=!rows?mpa?(this.checkp(m[m.length-1],0,0,1)-by)+this.m[this.l[0].names[this.l[0].num-1]].height+border:(this.totheight + this.pxbetween*(this.l[0].num-1)):this.maxheight; bh+=rows?this.l[0].border*2:0;} else bh=this.checkp(this.barheight,0,0,1); this.oBar.clipTo(0,bww,bh,0,1); if(this.barinheritborder&&border){oBb=new cm_makeObj('div'+this.name+'Barb',0,0,window,'div'+this.name+'Bar'); oBb.moveIt(border,border); oBb.clipTo(0,bww-border*2,bh-border*2,0,1); oBb=null;} }this.l[0].o=new Array(); if(this.usetextwidth) this.maxwidth=0 for(j=0;j\n' for(j=0;j' str+=tempstr+' class="cl'+this.name+i+'">'+txt+''; str+='\n' }else this.oNS[j]=cm_NS6_createElement(this.ns6styleb[i],tempstr+' class="cl'+this.name+i+'">'+txt+'') }else frstr+=tempstr+'">\n' }if(i!=0){frstr+='\n'} }if(this.usebar){ if(this.barinheritborder) str2='
'; if(bw.ns6) this.oNS[this.l[0].maxnum]=cm_NS6_createElement(this.ns6styleb[this.ns6styleb.length-1],str2) else{str+='
';str+=str2+'
\n'} }if(!this.useframes&&bw.ie) str+=frstr; else this.frstr=frstr; if(!bw.ns6) document.write(str) this.makeTop(); if(this.useframes) window.onerror=cm_check_error; } coolFrameError=0//Trapping external pages in frame error! function cm_check_error(e){e=e.toLowerCase(); if(e.indexOf("access")>-1||e.indexOf("permission")>-1){coolFrameError=1; return true;}else return false} /************** Make styles **************/ function cm_makeStyle(){ var str="\n") } /************ Refreshing page if it's resized *************/ function cm_resized(){ page2=new makePageCoords(window,this.useframes); if(page2.x2!=toppage.x2 || page2.y2!=toppage.y2){ if(!bw.ns4){ toppage=new makePageCoords(window,this.useframes); this.makeTop(1) if(!this.useframes) page=toppage; this.isresized=1; eval(this.resizecode) }else{this.win.location.reload(); location.reload()} }if(!bw.ns4&&this.useframes){page=new makePageCoords(this.win,this.useframes)} } /************ Going to another page *************/ function cm_go(name){ obj=this.m[name]; url=obj.lnk; target=obj.target; fc=obj.mclick if(url){ if(this.useframes&&!coolFrameError) loc=this.win.location.href; else loc=location.href if(fc) eval(fc); url=this.checkFolder(loc.toString(),url); this.isover=0; this.hideSubs(1,0,1); this.isclicked=0; this.aobj[0]=-1 if(String(target)=="undefined" || target=="" || target==0 || target=="_self"){ this.win.location.href=url }else if(target=="_blank") window.open(url) else if(target=="_top" || target=="window") top.location.href=url else if(top[target]) top[target].location.href=url else{fr=findFrame(target); if(fr) fr.location.href=url} }else if(fc) eval(fc) } /************ Getting folders - THANKS TO DCAGE FOR THIS FIX *************/ function cm_checkFolder(tmp,url){ if(url.indexOf("mailto:")>-1 || url.indexOf("/")==0 || url.indexOf("http://")==0) return url else if(this.useframes && bw.ie || bw.ns6) return url var addr=''; var lvl=''; var off_cnt=0; var cnt=0; if(tmp.indexOf('file:')>-1 || tmp.charAt(1)==':') addr=this.offlineUrl; else if(tmp.indexOf('http:')>-1) addr=this.onlineUrl; for(var i=0;ioff_cnt) lvl+='../'; }} return lvl + url } /************ Checkloaded for the frames version *************/ function cm_checkLoaded(ev,ns){ coolFName=eval(coolFName) var ok=0 if(document.layers){ if(ns){coolFName.refresh(); coolFName.nsload=1; ok=1; coolFrameError=0 }else if(ev.target.name==coolFName.frame&&!coolFName.nsload){coolFName.refresh(); ok=1; coolFrameError=0; routeEvent(ev)} }else if(bw.ie){ if (coolFName.win.document.readyState == "complete"){ coolFName.win.document.body.insertAdjacentHTML("beforeEnd",coolFName.frstr) coolFName.win.document.body.onunload=cm_unloaded; coolFName.refresh(); ok=1; coolFrameError=0 }else setTimeout("cm_checkLoaded()",200) }else if(bw.ns6){ if(coolFName.win.document){ if(coolFName.win.document.body){coolFName.win.addEventListener("unload", cm_unloaded, true); coolFName.refresh(); ok=1; coolFrameError=0} else setTimeout("cm_checkLoaded()",200) }else setTimeout("cm_checkLoaded()",200) } } function cm_unloaded(ev){coolFName=eval(coolFName); if(!coolFName) return; if(document.layers && ev.target.name!=coolFName.frame) return; else coolFName.nsload=0; coolFName.loaded=0; if(!document.layers) setTimeout("cm_checkLoaded()",200)} /************ Make menu object *************/ var coolFName=""; var onload; var coolFMouseup=""; function makeCoolMenu(name){ coolFName=name; this.name=name; this.lastScrolled=0; this.win=window; toppage=new makePageCoords(window,parent.frames.length); this.aobj=new Array(); this.m=new Array(); this.l=new Array() this.level=new Array(); this.resized=cm_resized; this.makeMenu=cm_makeMenu; this.showSubs=cm_showSubs; this.makeTop=cm_makeTop; this.getCoords=cm_getCoords; this.checkPage=cm_checkPage; this.mmout=cm_mout; this.mover=cm_mover; this.checkp=cm_checkp; this.hideSubs=cm_hideSubs; this.construct=cm_construct; this.makeStyle=cm_makeStyle; this.refresh=cm_refresh; this.go=cm_go; this.frstr=""; this.mobj=new Array() this.totwidth=0; this.totheight=0; this.maxwidth=0; this.maxheight=0 this.tim=10; this.loaded=0; this.isover=false; this.checkFrame=cm_checkFrame; this.checkFolder=cm_checkFolder; this.hcode=""; this.oNS=new Array(); this.oNS2=new Array() bw.filter=(bw.ie7||bw.ie6||bw.ver.indexOf("MSIE 5.5")>-1) && !bw.mac } /************ Find frame *************/ function findFrame(frameName){ obj=top; var frameObj=0; for(i=0;i-1 && this.dom)?1:0; this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0; this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom)?1:0; this.ie4=(document.all && !this.dom)?1:0; this.ie=this.ie4||this.ie5||this.ie6||this.ie7 this.mac=this.agent.indexOf("Mac")>-1 this.opera5=this.agent.indexOf("Opera 5")>-1 this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; this.ns4=(document.layers && !this.dom)?1:0; this.bw=(this.ie7 || this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5 || this.dom) return this } var bw=new lib_bwcheck() //Making browsercheck object var mDebugging=2 oCMenu=new makeCoolMenu("oCMenu") oCMenu.useframes=0 oCMenu.frame="" oCMenu.useNS4links=1 oCMenu.checkselect=0 oCMenu.offlineUrl="" oCMenu.onlineUrl="" oCMenu=new makeCoolMenu("oCMenu") oCMenu.usebar=0 oCMenu.barinheritborder=0 oCMenu.rows=0 oCMenu.barcolor="#ffffcc" oCMenu.barwidth=0 oCMenu.barheight=0 oCMenu.barx=0 oCMenu.bary=0 oCMenu.fromleft=14 oCMenu.fromtop=180 oCMenu.pxbetween=2 oCMenu.menuplacement=0 oCMenu.level[0]=new Array() oCMenu.level[0].width=145 oCMenu.level[0].height=15 oCMenu.level[0].bgcoloroff="#FFCA98" oCMenu.level[0].bgcoloron="#AE4100" oCMenu.level[0].textcolor="#AE4100" oCMenu.level[0].hovercolor="#ffffff" oCMenu.level[0].style="font-family:arial,helvetica; font-size:12px" oCMenu.level[0].border=1 oCMenu.level[0].bordercolor="#FFCA98" oCMenu.level[0].offsetX=0 oCMenu.level[0].offsetY=0 oCMenu.level[0].NS4font="Arial" oCMenu.level[0].NS4fontSize="2" oCMenu.level[0].NS4fontColor="AE4100" oCMenu.level[0].align="right" oCMenu.level[0].clip=1 oCMenu.level[0].clippx= 20 oCMenu.level[0].cliptim= 10 oCMenu.level[1]=new Array() oCMenu.level[1].width=160 oCMenu.level[1].height=15 oCMenu.level[1].bgcoloroff="#FFCA98" oCMenu.level[1].bgcoloron="#AE4100" oCMenu.level[1].textcolor="#AE4100" oCMenu.level[1].hovercolor="#ffffff" oCMenu.level[1].style="font-family:arial,helvetica; font-size:12px" oCMenu.level[1].offsetX=0 oCMenu.level[1].offsetY=0 oCMenu.level[1].border=1 oCMenu.level[1].bordercolor="E7AA6F" oCMenu.level[1].NS4font="Arial" oCMenu.level[1].NS4fontSize="2" oCMenu.level[1].NS4fontColor="AE4100" oCMenu.makeMenu('top47','',' Motorcycle Accessories','http://www.sounddistribution.co.uk/main.asp?category=Motorcycle+Accessories','') oCMenu.makeMenu('sub163','top47','Accessories','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Accessories&subcategory=Accessories') oCMenu.makeMenu('sub173','top47','Bar Ends','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Accessories&subcategory=Bar+Ends') oCMenu.makeMenu('sub162','top47','Handlebar Grips','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Accessories&subcategory=Handlebar+Grips') oCMenu.makeMenu('sub404','top47','Heated Grips','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Accessories&subcategory=Heated+Grips') oCMenu.makeMenu('sub161','top47','Tank Protectors','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Accessories&subcategory=Tank+Protectors') oCMenu.makeMenu('sub172','top47','Tax Disc Holders','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Accessories&subcategory=Tax+Disc+Holders') oCMenu.makeMenu('sub151','top47','Tie Downs','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Accessories&subcategory=Tie+Downs') oCMenu.makeMenu('top40','',' Motorcycle Bodywork','http://www.sounddistribution.co.uk/main.asp?category=Motorcycle+Bodywork','') oCMenu.makeMenu('sub199','top40','R&G Crash Protectors','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=R%26G+Crash+Protectors') oCMenu.makeMenu('sub306','top40','R&G Exhaust Hangers','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=R%26G+Exhaust+Hangers') oCMenu.makeMenu('sub235','top40','R&G Fork Protectors','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=R%26G+Fork+Protectors') oCMenu.makeMenu('sub236','top40','R&G Tail Tidies','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=R%26G+Tail+Tidies') oCMenu.makeMenu('sub237','top40','R&G Bar Ends','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=R%26G+Bar+Ends') oCMenu.makeMenu('sub238','top40','R&G Cotton Reels','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=R%26G+Cotton+Reels') oCMenu.makeMenu('sub277','top40','R&G Swingarm Protectors','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=R%26G+Swingarm+Protectors') oCMenu.makeMenu('sub278','top40','R&G Spindle Sliders','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=R%26G+Spindle+Sliders') oCMenu.makeMenu('sub103','top40','Indicators','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=Indicators') oCMenu.makeMenu('sub155','top40','LED Indicators','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=LED+Indicators') oCMenu.makeMenu('sub248','top40','LED Tail Lights','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=LED+Tail+Lights') oCMenu.makeMenu('sub191','top40','Motrax Tail Tidies','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=Motrax+Tail+Tidies') oCMenu.makeMenu('sub102','top40','Pyramid Huggers','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=Pyramid+Huggers') oCMenu.makeMenu('sub97','top40','Pyramid Undertrays','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=Pyramid+Undertrays') oCMenu.makeMenu('sub157','top40','Renntec Cissy Bars','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=Renntec+Cissy+Bars') oCMenu.makeMenu('sub101','top40','Renntec Engine Bars','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=Renntec+Engine+Bars') oCMenu.makeMenu('sub99','top40','Renntec Grab Rails','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=Renntec+Grab+Rails') oCMenu.makeMenu('sub158','top40','Renntec Sports Racks','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=Renntec+Sports+Racks') oCMenu.makeMenu('sub353','top40','SW Motech Crash Bars','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=SW+Motech+Crash+Bars') oCMenu.makeMenu('sub214','top40','SW Motech Center Stands','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=SW+Motech+Center+Stands') oCMenu.makeMenu('sub350','top40','SW Motech Chaingaurds','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=SW+Motech+Chaingaurds') oCMenu.makeMenu('sub352','top40','SW Motech Engine Guards','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bodywork&subcategory=SW+Motech+Engine+Guards') oCMenu.makeMenu('top39','',' Motorcycle Care','http://www.sounddistribution.co.uk/main.asp?category=Motorcycle+Care','') oCMenu.makeMenu('sub258','top39','ACF-50','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Care&subcategory=ACF%2D50') oCMenu.makeMenu('sub369','top39','Auto Glym','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Care&subcategory=Auto+Glym') oCMenu.makeMenu('sub139','top39','Cleaning Tools','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Care&subcategory=Cleaning+Tools') oCMenu.makeMenu('sub405','top39','Muc Off','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Care&subcategory=Muc+Off') oCMenu.makeMenu('sub297','top39','Sdoc 100','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Care&subcategory=Sdoc+100') oCMenu.makeMenu('top54','',' Motorcycle Covers','http://www.sounddistribution.co.uk/main.asp?category=Motorcycle+Covers','') oCMenu.makeMenu('sub300','top54','Motrax','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Covers&subcategory=Motrax') oCMenu.makeMenu('sub301','top54','Oxford','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Covers&subcategory=Oxford') oCMenu.makeMenu('sub302','top54','R & G','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Covers&subcategory=R+%26+G') oCMenu.makeMenu('sub249','top54','Specialised','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Covers&subcategory=Specialised') oCMenu.makeMenu('top30','',' Motorcycle Clothing','http://www.sounddistribution.co.uk/main.asp?category=Motorcycle+Clothing','') oCMenu.makeMenu('sub135','top30','Accessories','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Clothing&subcategory=Accessories') oCMenu.makeMenu('sub85','top30','Back Protectors','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Clothing&subcategory=Back+Protectors') oCMenu.makeMenu('sub208','top30','Body Armour','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Clothing&subcategory=Body+Armour') oCMenu.makeMenu('sub391','top30','Bone Dry Boots','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Clothing&subcategory=Bone+Dry+Boots') oCMenu.makeMenu('sub220','top30','Heated Clothing','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Clothing&subcategory=Heated+Clothing') oCMenu.makeMenu('sub144','top30','Knee Sliders','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Clothing&subcategory=Knee+Sliders') oCMenu.makeMenu('sub117','top30','Reflective','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Clothing&subcategory=Reflective') oCMenu.makeMenu('sub366','top30','Thermals','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Clothing&subcategory=Thermals') oCMenu.makeMenu('top50','',' Motorcycle Earplugs','http://www.sounddistribution.co.uk/main.asp?category=Motorcycle+Earplugs','') oCMenu.makeMenu('sub201','top50','Earplugs','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Earplugs&subcategory=Earplugs') oCMenu.makeMenu('top12','',' Motorcycle Exhausts','http://www.sounddistribution.co.uk/main.asp?category=Motorcycle+Exhausts','') oCMenu.makeMenu('sub13','top12','Laser Exhausts','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Exhausts&subcategory=Laser+Exhausts') oCMenu.makeMenu('sub257','top12','Scorpion','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Exhausts&subcategory=Scorpion') oCMenu.makeMenu('sub317','top12','Scorpion High Level','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Exhausts&subcategory=Scorpion+High+Level') oCMenu.makeMenu('sub314','top12','Scorpion Carbon Ends','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Exhausts&subcategory=Scorpion+Carbon+Ends') oCMenu.makeMenu('sub312','top12','Street Extreme','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Exhausts&subcategory=Street+Extreme') oCMenu.makeMenu('sub313','top12','Street Extreme Carbon Ends','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Exhausts&subcategory=Street+Extreme+Carbon+Ends') oCMenu.makeMenu('top37','',' Motorcycle Gadgets','http://www.sounddistribution.co.uk/main.asp?category=Motorcycle+Gadgets','') oCMenu.makeMenu('sub255','top37','Camera Mounts','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Gadgets&subcategory=Camera+Mounts') oCMenu.makeMenu('sub78','top37','Clocks','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Gadgets&subcategory=Clocks') oCMenu.makeMenu('sub80','top37','Gear Indicators','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Gadgets&subcategory=Gear+Indicators') oCMenu.makeMenu('sub303','top37','LED Lighting','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Gadgets&subcategory=LED+Lighting') oCMenu.makeMenu('top49','',' Motorcycle Helmets','http://www.sounddistribution.co.uk/main.asp?category=Motorcycle+Helmets','') oCMenu.makeMenu('sub372','top49','Bluetooth Helmets','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Helmets&subcategory=Bluetooth+Helmets') oCMenu.makeMenu('sub345','top49','Viper Bluetooth','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Helmets&subcategory=Viper+Bluetooth') oCMenu.makeMenu('sub392','top49','Box Helmets','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Helmets&subcategory=Box+Helmets') oCMenu.makeMenu('sub402','top49','Caberg Helmets','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Helmets&subcategory=Caberg+Helmets') oCMenu.makeMenu('sub176','top49','Caberg V2R','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Helmets&subcategory=Caberg+V2R') oCMenu.makeMenu('sub295','top49','HJC Helmets','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Helmets&subcategory=HJC+Helmets') oCMenu.makeMenu('sub359','top49','Nolan','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Helmets&subcategory=Nolan') oCMenu.makeMenu('sub290','top49','Schuberth','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Helmets&subcategory=Schuberth') oCMenu.makeMenu('sub395','top49','Scorpion','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Helmets&subcategory=Scorpion') oCMenu.makeMenu('sub393','top49','UVEX','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Helmets&subcategory=UVEX') oCMenu.makeMenu('sub378','top49','Sharp 5 Star Helmets','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Helmets&subcategory=Sharp+5+Star+Helmets') oCMenu.makeMenu('sub385','top49','Sharp 4 Star Helmets','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Helmets&subcategory=Sharp+4+Star+Helmets') oCMenu.makeMenu('sub230','top49','Helmet Accessories','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Helmets&subcategory=Helmet+Accessories') oCMenu.makeMenu('top20','',' Motorcycle Bluetooth','http://www.sounddistribution.co.uk/main.asp?category=Motorcycle+Bluetooth','') oCMenu.makeMenu('sub274','top20','Bluetooth Helmets','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bluetooth&subcategory=Bluetooth+Helmets') oCMenu.makeMenu('sub403','top20','Bluetooth Communicators','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Bluetooth&subcategory=Bluetooth+Communicators') oCMenu.makeMenu('top16','',' Motorcycle Luggage','http://www.sounddistribution.co.uk/main.asp?category=Motorcycle+Luggage','') oCMenu.makeMenu('sub91','top16','Accessories','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Luggage&subcategory=Accessories') oCMenu.makeMenu('sub243','top16','Cargo Luggage','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Luggage&subcategory=Cargo+Luggage') oCMenu.makeMenu('sub374','top16','Kriega','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Luggage&subcategory=Kriega') oCMenu.makeMenu('sub294','top16','Oxford Luggage','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Luggage&subcategory=Oxford+Luggage') oCMenu.makeMenu('sub221','top16','Pac Safe Luggage','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Luggage&subcategory=Pac+Safe+Luggage') oCMenu.makeMenu('sub239','top16','SW Motech Racks','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Luggage&subcategory=SW+Motech+Racks') oCMenu.makeMenu('sub376','top16','SW Motech Evo Carriers','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Luggage&subcategory=SW+Motech+Evo+Carriers') oCMenu.makeMenu('sub305','top16','SW Motech Side Carriers','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Luggage&subcategory=SW+Motech+Side+Carriers') oCMenu.makeMenu('sub377','top16','SW Motech Carriers Givi V35','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Luggage&subcategory=SW+Motech+Carriers+Givi+V35') oCMenu.makeMenu('sub370','top16','SW Motech Hard Luggage','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Luggage&subcategory=SW+Motech+Hard+Luggage') oCMenu.makeMenu('sub92','top16','SW Motech Tank Bags','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Luggage&subcategory=SW+Motech+Tank+Bags') oCMenu.makeMenu('sub299','top16','SW Motech Rear Bags','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Luggage&subcategory=SW+Motech+Rear+Bags') oCMenu.makeMenu('sub43','top16','Ventura Bike Pack','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Luggage&subcategory=Ventura+Bike+Pack') oCMenu.makeMenu('sub344','top16','Ventura Seat Bags','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Luggage&subcategory=Ventura+Seat+Bags') oCMenu.makeMenu('sub389','top16','Waterproof','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Luggage&subcategory=Waterproof') oCMenu.makeMenu('top19','',' Motorcycle Maintenance','http://www.sounddistribution.co.uk/main.asp?category=Motorcycle+Maintenance','') oCMenu.makeMenu('sub39','top19','Battery Conditioners','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Maintenance&subcategory=Battery+Conditioners') oCMenu.makeMenu('sub109','top19','Brake Bleeding','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Maintenance&subcategory=Brake+Bleeding') oCMenu.makeMenu('sub49','top19','Replacement Bulbs','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Maintenance&subcategory=Replacement+Bulbs') oCMenu.makeMenu('sub41','top19','Chain Oilers','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Maintenance&subcategory=Chain+Oilers') oCMenu.makeMenu('sub141','top19','Fuel Filters','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Maintenance&subcategory=Fuel+Filters') oCMenu.makeMenu('sub246','top19','Garage','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Maintenance&subcategory=Garage') oCMenu.makeMenu('sub50','top19','Paddock Stands','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Maintenance&subcategory=Paddock+Stands') oCMenu.makeMenu('sub42','top19','Tyre Accessories','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Maintenance&subcategory=Tyre+Accessories') oCMenu.makeMenu('top36','',' Motorcycle Manuals','http://www.sounddistribution.co.uk/main.asp?category=Motorcycle+Manuals','') oCMenu.makeMenu('sub288','top36','Clymer Manuals','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Manuals&subcategory=Clymer+Manuals') oCMenu.makeMenu('top45','',' Motorcycle Performance','http://www.sounddistribution.co.uk/main.asp?category=Motorcycle+Performance','') oCMenu.makeMenu('sub136','top45','Acumen Digital Gear Indicators','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Performance&subcategory=Acumen+Digital+Gear+Indicators') oCMenu.makeMenu('sub184','top45','Track Kit','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Performance&subcategory=Track+Kit') oCMenu.makeMenu('sub130','top45','Tyre Warmers','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Performance&subcategory=Tyre+Warmers') oCMenu.makeMenu('top17','',' Motorcycle Security','http://www.sounddistribution.co.uk/main.asp?category=Motorcycle+Security','') oCMenu.makeMenu('sub38','top17','Accessories','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Security&subcategory=Accessories') oCMenu.makeMenu('sub79','top17','Cable Locks','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Security&subcategory=Cable+Locks') oCMenu.makeMenu('sub35','top17','Disc Locks','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Security&subcategory=Disc+Locks') oCMenu.makeMenu('sub36','top17','Ground Anchors','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Security&subcategory=Ground+Anchors') oCMenu.makeMenu('sub33','top17','Security Chains','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Security&subcategory=Security+Chains') oCMenu.makeMenu('sub37','top17','Tagging Kit','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Security&subcategory=Tagging+Kit') oCMenu.makeMenu('sub338','top17','U Locks','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Security&subcategory=U+Locks') oCMenu.makeMenu('sub398','top17','Xena Zone Alarms','http://www.sounddistribution.co.uk/products.asp?category=Motorcycle+Security&subcategory=Xena+Zone+Alarms') oCMenu.makeMenu('top48','',' Best Buys - Offers','http://www.sounddistribution.co.uk/main.asp?category=Best+Buys+%2D+Offers','') oCMenu.makeMenu('sub211','top48','Ride Best Buys','http://www.sounddistribution.co.uk/products.asp?category=Best+Buys+%2D+Offers&subcategory=Ride+Best+Buys') oCMenu.makeMenu('sub259','top48','Special Offers','http://www.sounddistribution.co.uk/products.asp?category=Best+Buys+%2D+Offers&subcategory=Special+Offers') oCMenu.wait=1000 oCMenu.pagecheck=1 oCMenu.checkscroll=0 oCMenu.resizecheck=1 oCMenu.makeStyle(); oCMenu.construct() function cm_checkScrolled(obj){ if(bw.ns4 || bw.ns6) obj.scrolledY=obj.win.pageYOffset else obj.scrolledY=obj.win.document.body.scrollTop if(obj.scrolledY!=obj.lastScrolled){ if(!obj.useframes){ self.status=obj.scrolledY if(obj.scrolledY>119){ for(i=0;i