//Contents for menu 1
var menu1=new Array();

//Contents for menu 2
var menu2=new Array();
menu2[0]='<a href="http://www.bluetoad.com/publication?r=82945&i=8248" target="_blank">Digital Magazine</a>';
menu2[1]='<a href="/contributors/">Contributors</a>';
menu2[2]='<a href="/articles/">Articles</a>';

//Contents for menu 3
var menu3=new Array();
menu3[0]='<a href="/inked_girls/">Girls</a>';
menu3[1]='<a href="http://www.moli.com/p/views/v2bXV2i84j2ZGPzXiQzKpFMQ../" target="_blank">Guys</a>';
menu3[3]='<a href="/inked_people/">Inked People</a>';
menu3[2]='<a href="/search/celebrity/">Celebrity Tattoos</a>';
menu3[4]='<a href="/coverphoto/">Cover Photos</a>';

//Contents for menu 4
var menu4=new Array();
menu4[0]='<a href="/reviews/drinks/">Drinks</a>';
menu4[1]='<a href="/reviews/music/">Music</a>';
menu4[2]='<a href="/reviews/games/">Games</a>';
menu4[3]='<a href="/reviews/drive/">Drive</a>';
menu4[4]='<a href="/reviews/go/">Travel</a>';
menu4[5]='<a href="/meanings/">Tattoo Meanings</a>';
menu4[6]='<a href="/gallery/event/category/1/">Party Photos</a>';
menu4[7]='<a href="/gallery/event/category/2/">Convention Photos</a>';
menu4[8]='<a href="/news/">Tattoo News</a>';
menu4[9]='<a href="/fashion/">Fashion</a>';
menu4[10]='<a href="/reviews/inked_for_a_cause/detail/129/inked-for-a-cause-heidi-van-horne">Inked For A Cause</a>';

//menu4[10]='<a href="/inkednetwork">Inked Network</a>';

//Contents for menu 5
var menu5=new Array();
menu5[0]='<a href="/gallery/user_submitted/">Tattoo Gallery</a>';
menu5[1]='<a href="/artgallery/">Fine Art</a>';
menu5[2]='<a href="/gallery/topic/tramp stamp/">Lower Back Tattoo Gallery</a>';
menu5[3]='<a href="/gallery/topic/celebrity/">Celebrity Tattoo Gallery</a>';
menu5[4]='<a href="/gallery/topic/tribal/">Tribal Tattoo Gallery</a>';
menu5[5]='<a href="/gallery/topic/celtic/">Celtic Tattoo Gallery</a>';
menu5[6]='<a href="/gallery/topic/skull/">Skull Tattoo Gallery</a>';
menu5[7]='<a href="/gallery/topic/sleeve/">Sleeve Tattoo Gallery</a>';

var menuwidth='461px';          //default menu width
var menubgcolor='#878787';  //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="position:absolute; text-align: center; top: 1; left: 150; height: 25px; z-index: 2; 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 populatemenu(what) {
    if (ie4||ns6) {
        dropmenuobj.innerHTML=what;
    }
}

function dropdownmenu(obj, e, menucontents, menuwidth, intMenuNumber){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv ;
//populatemenu(menucontents)
populatemenu(document.getElementById('populated_menu_'+intMenuNumber).innerHTML);

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", '461px'); //menuwidth);
var overall_width = document.documentElement.clientWidth;
dropmenuobj.x= (overall_width/2)-475; getposOffset(obj, "left");
dropmenuobj.y= -0+getposOffset(obj, "top");
//dropmenuobj.x=60;
//dropmenuobj.y=200;
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
