/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="showcase.php?m=price&l=1&h=50&so=price">up to $50</a>'
menu1[1]='<a href="showcase.php?m=price&l=50&h=100&so=price">$50 to $100</a>'
menu1[2]='<a href="showcase.php?m=price&l=100&h=200&so=price">$100 to $200</a>'
menu1[3]='<a href="showcase.php?m=price&l=200&h=300&so=price">$200 to $300</a>'
menu1[4]='<a href="showcase.php?m=price&l=300&h=400&so=price">$300 to $400</a>'
menu1[5]='<a href="showcase.php?m=price&l=400&h=500&so=price">$400 to $500</a>'
menu1[6]='<a href="showcase.php?m=price&l=500&h=750&so=price">$500 to $750</a>'
menu1[7]='<a href="showcase.php?m=price&l=750&h=1000&so=price">$750 to $1000</a>'
menu1[8]='<a href="showcase.php?m=price&l=1000&h=99999&so=price">over $1000</a>'

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="showcase.php?m=mixed&t=beads&me=GS">Beads</a>'
menu2[1]='<a href="showcase.php?m=mixed&t=belt buckles&me=GS">Belt Buckles</a>'
menu2[2]='<a href="showcase.php?m=mixed&t=bracelets&me=GS">Bracelets</a>'
menu2[3]='<a href="showcase.php?m=mixed&t=crosses&me=GS">Crosses</a>'
menu2[4]='<a href="showcase.php?m=mixed&t=cufflinks tie tacks&me=GS">Cufflinks & Tie Tacks</a>'
menu2[5]='<a href="showcase.php?m=mixed&t=earrings&me=GS">Earrings</a>'
menu2[6]='<a href="showcase.php?m=mixed&t=ltd edition&me=GS">Limited Edition</a>'
menu2[7]='<a href="showcase.php?m=mixed&t=lockets pins&me=GS">Lockets & Pins</a>'
menu2[8]='<a href="showcase.php?m=mixed&t=mens&me=GS">Men\'s Jewelry</a>'
menu2[9]='<a href="showcase.php?m=mixed&t=necklaces&me=GS">Necklaces</a>'
menu2[10]='<a href="showcase.php?m=mixed&t=neckwear&me=GS">Neckwear</a>'
menu2[11]='<a href="showcase.php?m=mixed&t=pendants&me=GS">Pendants</a>'
menu2[12]='<a href="showcase.php?m=mixed&t=rings&me=GS">Rings</a>'
menu2[13]='<a href="showcase.php?m=mixed&t=sliders&me=GS">Sliders</a>'
menu2[14]='<a href="showcase.php?m=mixed&t=tuxedo accessories&me=GS">Tuxedo Accessories</a>'
menu2[15]='<a href="showcase.php?m=mixed&t=watches&me=GS">Watches</a>'

//Contents for menu 3, and so on
var menu3=new Array()
menu3[0]='<a href="showcase.php?m=silver&t=rainbow beads&me=SS">Beads</a>'
menu3[1]='<a href="showcase.php?m=silver&t=bracelets&me=SS">Bracelets</a>'
menu3[2]='<a href="showcase.php?m=silver&t=chains cords&me=SS">Chains</a>'
menu3[3]='<a href="showcase.php?m=silver&t=crosses&me=SS">Crosses</a>'
menu3[4]='<a href="showcase.php?m=silver&t=earrings&me=SS">Earrings</a>'
menu3[5]='<a href="showcase.php?m=silver&t=neckwear&me=SS">Neckwear</a>'
menu3[6]='<a href="showcase.php?m=silver&t=pendants&me=SS">Pendants</a>'
menu3[7]='<a href="showcase.php?m=silver&t=rings&me=SS">Rings</a>'
menu3[8]='<a href="showcase.php?m=silver&t=sliders&me=SS">Sliders</a>'
menu3[9]='<a href="showcase.php?m=silver&t=watches&me=SS">Watches</a>'
		
//Contents for menu 4, and so on
var menu4=new Array()
menu4[0]='<a href="showcase.php?m=gold&t=earrings&me=G">Earrings</a>'
menu4[1]='<a href="showcase.php?m=gold&t=neckwear&me=G">Neckwear</a>'
menu4[2]='<a href="showcase.php?m=gold&t=pendants&me=G">Pendants</a>'


var menuwidth='165px' //default menu width
var menubgcolor='lightyellow'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu
