/** RANDOM IMAGE GENERATOR - LOGO **/
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'https://checkout.netsuite.com/c.801044/media/images/hmlogo1.png'
theImages[1] = 'https://checkout.netsuite.com/c.801044/media/images/hmlogo2.png'
theImages[2] = 'https://checkout.netsuite.com/c.801044/media/images/hmlogo3.png'
theImages[3] = 'https://checkout.netsuite.com/c.801044/media/images/hmlogo4.png'

// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'" border="0">');
}

//  End -->


var fontcolor = '#666666';
var fontcode = '';
var fontface = 'verdana';
var fontsize = '1';
var fontstyle = '';
var fontclass = 'font_top';
var textline = '';
var defaultdisplay = '22';

/***********************************************
* 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 Adult Costumes menu
var menu1=new Array()
menu1[0]='<a href="http://www.halloweenmart.com/adult-costumes">All Adult Costumes</a>'
menu1[1]='<a href="http://www.halloweenmart.com/adult-costumes/plus-size-costumes">Plus Size Costumes</a>'
menu1[2]='<a href="http://www.halloweenmart.com/adult-costumes/sexy-costumes">Sexy Costumes</a>'
menu1[3]='<a href="http://www.halloweenmart.com/adult-costumes/couples-costumes">Couples Costumes</a>'
menu1[4]='<a href="http://www.halloweenmart.com/adult-costumes/lingerie">Lingerie</a>'
menu1[5]='<a href="http://www.halloweenmart.com/adult-costumes/Comical-Adult">Triple X Humor</a>'
menu1[6]='<a href="http://www.halloweenmart.com/adult-costumes/holiday">Seasonal</a>'
menu1[7]='<a href="http://www.halloweenmart.com/adult-costumes/clearance" style="color:#FF0000">Sale</a>';

//Contents for children's costumes menu
var menu2=new Array()
menu2[0]='<a href="http://www.halloweenmart.com/childrens-costumes">All Children\'s Costumes</a>'
menu2[1]='<a href="http://www.halloweenmart.com/childrens-costumes/infant-costumes">Infant Costumes</a>'
menu2[2]='<a href="http://www.halloweenmart.com/childrens-costumes/toddler-costumes">Toddler Costumes</a>'
menu2[3]='<a href="http://www.halloweenmart.com/halloween-safety-tips.html">Safety Tips</a>'
menu2[4]='<a href="http://www.halloweenmart.com/childrens-costumes/holiday_2">Seasonal</a>'
menu2[5]='<a href="http://www.halloweenmart.com/childrens-costumes/clearance-4" style="color:#FF0000">Sale</a>';

//Contents for accessories menu
var menu3=new Array()
menu3[0]='<a href="http://www.halloweenmart.com/accessories">All Accessories</a>'
menu3[1]='<a href="http://www.halloweenmart.com/accessories/masks">Masks</a>'
menu3[2]='<a href="http://www.halloweenmart.com/accessories/adult-wigs">Wigs</a>'
menu3[3]='<a href="http://www.halloweenmart.com/accessories/makeup">Make-Up</a>'
menu3[4]='<a href="http://www.halloweenmart.com/accessories/hats">Hats</a>'
menu3[5]='<a href="http://www.halloweenmart.com/accessories/stockings-hoisery">Stockings</a>'
menu3[6]='<a href="http://www.halloweenmart.com/accessories/shoes">Shoes</a>'
menu3[7]='<a href="http://www.halloweenmart.com/accessories/holiday-accessories">Seasonal</a>'
menu3[8]='<a href="http://www.halloweenmart.com/accessories/clearance-3" style="color:#FF0000">Sale</a>';

//Contents for props and decor menu
var menu4=new Array()
menu4[0]='<a href="http://www.halloweenmart.com/halloween-decorations">All Decorations</a>'
menu4[1]='<a href="http://www.halloweenmart.com/halloween-decorations/skulls">Skull Decorations</a>'
menu4[2]='<a href="http://www.halloweenmart.com/halloween-decorations/partyware">Partyware</a>'
menu4[3]='<a href="http://www.halloweenmart.com/halloween-decorations/super-deluxe-props">Super Deluxe Props</a>'
menu4[4]='<a href="http://www.halloweenmart.com/halloween-decorations/body-parts">Body Parts</a>'
menu4[5]='<a href="http://www.halloweenmart.com/halloween-decorations/home-decor">Home D&eacute;cor</a>'
menu4[6]='<a href="http://www.halloweenmart.com/halloween-decorations/foggers-sp-effects">Foggers &amp; Special Effects</a>'
menu4[7]='<a href="http://www.halloweenmart.com/halloween-decorations/cds-books-videos">CDs/Books/Music</a>'
menu4[8]='<a href="http://www.halloweenmart.com/halloween-decorations/clearance_5" style="color:#FF0000">Sale</a>';

//Contents for company info menu
var menu5=new Array()
menu5[0]='<a href="http://www.halloweenmart.com/about-us.html">About Us</a>'
menu5[1]='<a href="http://www.halloweenmart.com/costume-affiliate.html">Become an Affiliate</a>'
menu5[2]='<a href="http://www.halloweenmart.com/buying_wholesale.html">Buying Wholesale</a>';

//Contents for customer service menu
var menu6=new Array()
menu6[0]='<a href="http://www.halloweenmart.com/faq.html">FAQ</a>'
menu6[1]='<a href="http://www.halloweenmart.com/how-to-shop.html">How to Shop</a>'
menu6[2]='<a href="http://www.halloweenmart.com/shipping-info.html">Shipping Info</a>'
menu6[3]='<a href="http://www.halloweenmart.com/payments-and-pricing.html">Payments and Pricing</a>'
menu6[4]='<a href="http://www.halloweenmart.com/returns-exchanges.html">Returns and Exchanges</a>'
menu6[5]='<a href="http://www.halloweenmart.com/sizing-info.html">Sizing Info</a>';

//Contents for seasonal menu
var menu7=new Array()
menu7[0]='<a href="http://www.halloweenmart.com/seasonal-costumes/christmas">Christmas</a>'
menu7[1]='<a href="http://www.halloweenmart.com/seasonal-costumes/Cinco-de-Mayo">Cinco de Mayo</a>'
menu7[2]='<a href="http://www.halloweenmart.com/seasonal-costumes/easter">Easter</a>'
menu7[3]='<a href="http://www.halloweenmart.com/seasonal-costumes/st-patricks-day">St. Patrick\'s Day</a>'
menu7[4]='<a href="http://www.halloweenmart.com/seasonal-costumes/4th-of-july">4th of July</a>'
menu7[5]='<a href="http://www.halloweenmart.com/seasonal-costumes/thanksgiving">Thanksgiving</a>'
menu7[6]='<a href="http://www.halloweenmart.com/seasonal-costumes/mardi-gras">Mardi Gras</a>'
menu7[7]='<a href="http://www.halloweenmart.com/seasonal-costumes/valentines-day">Valentine\'s Day</a>';
		
var menuwidth='160px' //default menu width
var menubgcolor='#fefefe'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="no" //hide menu when user clicks within menu?

/////No further editting needed
var browserName=navigator.appName;
var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:198px;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


//dropdown function
/* Dropdown function */
startList = function() {
if (document.all && document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
  node = navRoot.childNodes[i];
  if (node.nodeName=="LI") {
  node.onmouseover=function() {
  this.className+=" over";
    }
  node.onmouseout=function() {
  this.className=this.className.replace
      (" over", "");
   }
   }
  }
 }
}
window.onload=startList;
