//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=54"><font face="verdana,arial,helvetica,sans-serif" size="1">Cucina</a>'
menu1[1]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=87">Aromatique</a>'
menu1[2]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=33">Poo-Pourri</a>'



//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=73" ><font face="verdana,arial,helvetica,sans-serif" size="1">Votivo</a>'
menu2[1]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=35">Seda</a>'
menu2[2]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=65">Lah Tee Dah</a>'
menu2[3]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=34">Ergo</a>'
menu2[4]='<a href="http://www.macdavidandcompany.com/park_avenue.php">Park Avenue</a>'
menu2[5]='<a href="http://www.macdavidandcompany.com/low_country_lux.php">Low Country Luxe</a>'

var menu3=new Array()
menu3[0]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=15"><font face="verdana,arial,helvetica,sans-serif" size="1">Dirt Road Gourmet</a>'
menu3[1]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=14">Blue Crab Bay</a>'
menu3[2]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=16">Flathau\'s Gourmet Cookies</a>'
menu3[3]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=17">Gullah Gourmet</a>'
menu3[4]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=30">Stirrings</a>'
menu3[5]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=28">PB Loco</a>'
menu3[6]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=29">Not Yo MaMa\'s Gourmet</a>'
menu3[7]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=45">Betsy\'s Cheese Straws</a>'
//menu3[8]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=50">Chocolates</a>'

var menu4=new Array()
menu4[0]='<a href="http://www.macdavidandcompany.com/cart.php?m=registry_search"><font face="verdana,arial,helvetica,sans-serif" size="1">Search</a>'
menu4[1]='<a href="http://www.macdavidandcompany.com/cart.php?m=registry_signup">Sign Up</a>'

var menu5=new Array()
menu5[0]='<a href="http://www.macdavidandcompany.com/denn_wall_about.php"><font face="verdana,arial,helvetica,sans-serif" size="1">About Jim Denney</a>'
menu5[1]='<a href="http://www.macdavidandcompany.com/denn_wall_legend.php">Legends of the Fall</a>'
menu5[2]='<a href="http://www.macdavidandcompany.com/denn_wall_map.php">Lake Martin Maps</a>'
menu5[3]='<a href="http://www.macdavidandcompany.com/denn_wall.php">Limited Edition Fish Prints</a>'
menu5[4]='<a href="http://www.macdavidandcompany.com/denn_wall_eagle.php">Limited Edition Eagle Prints</a>'
menu5[5]='<a href="http://www.macdavidandcompany.com/denn_wall_other.php">Other Prints</a>'
menu5[6]='<a href="http://www.macdavidandcompany.com/denn_wall_pets.php">Pet Portraits</a>'
menu5[7]='<a href="http://www.macdavidandcompany.com/denn_wall_special.php">Special Commissions</a>'

var menu6=new Array()
menu6[0]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=40"><font face="verdana,arial,helvetica,sans-serif" size="1">Serveware</a>'
//menu6[1]='<a href="#">Stemware</a>'
//menu6[2]='<a href="#">Barware</a>'
//menu6[3]='<a href="#">Holloware</a>'

var menu7=new Array()
menu7[0]='<a href="#"><font face="verdana,arial,helvetica,sans-serif" size="1">MACDAVID & CO.</a>'
menu7[1]='<a href="#">Shawna Haynie</a>'
menu7[2]='<a href="#">Shoreline</a>'

var menu8=new Array()
menu8[0]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=88"><font face="verdana,arial,helvetica,sans-serif" size="1">Stone Mountain</a>'
//menu8[1]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=89">Shiraleah</a>'
//menu8[2]='<a href="http://www.macdavidandcompany.com/cart.php?m=product_list&c=93">MACDAVID & CO.</a>'
		
var disappeardelay=1000000  //menu disappear speed onMouseout (in miliseconds)
var horizontaloffset=0 //horizontal offset of menu from default location. (0-5 is a good value)

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

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;
}

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width: 170px; position:absolute" 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 (ie5||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
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=ie5 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x-obj.offsetWidth < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth+(horizontaloffset*2) //no space to the right of page? Move menu over to the left
}
else{
var topedge=ie5 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie5 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move menu up?
edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? (position at top of viewable window then)
edgeoffset=dropmenuobj.y
}
}
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")+obj.offsetWidth+horizontaloffset+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"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)
}


var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes ,resizable=no'
win = window.open(mypage,myname,settings)
}

function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
    if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }
}
function bookmark(url,title){
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}
