//***********************************************
//* 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 (Catalogs)
var menu1=new Array()
menu1[0]='Pontiac - GMC'
menu1[1]='<a href="https://www.hoco.com/embroidery/new_shirt_display.htm"><div class="indent">Shirts</div></a>'
menu1[2]='<a href="https://www.hoco.com/embroidery/new_tshirt_display.htm"><div class="indent">T-Shirts</div></a>'
menu1[3]='<a href="https://www.hoco.com/embroidery/new_hat_display.htm"><div class="indent">Hats</div></a>'
menu1[4]='<a href="https://www.hoco.com/embroidery/new_jacket_display.htm"><div class="indent">Jackets</div></a>'
menu1[5]='<a href="https://www.hoco.com/embroidery/new_sweatshirt_display.htm"><div class="indent">Sweatshirts</div></a>'
menu1[6]='Clubs'
menu1[7]='<a href="https://www.hoco.com/embroidery/club_shirt_display.htm"><div class="indent">Shirts</div></a>'
menu1[8]='<a href="https://www.hoco.com/embroidery/club_tshirt_display.htm"><div class="indent">T-Shirts</div></a>'
menu1[9]='<a href="https://www.hoco.com/embroidery/club_hat_display.htm"><div class="indent">Hats</div></a>'
menu1[10]='<a href="https://www.hoco.com/embroidery/club_jacket_display.htm"><div class="indent">Jackets</div></a>'
menu1[11]='<a href="https://www.hoco.com/embroidery/club_sweatshirt_display.htm"><div class="indent">Sweatshirts</div></a>'
menu1[12]='<a href="https://www.hoco.com/embroidery/club_stuff_display.htm"><div class="indent">Other Stuff</div></a>'//Contents for menu 2 (Custom Apparel)
var menu2=new Array()
menu2[0]='<a href="http://www.hoco.com/embroidery/businesses.html">Businesses / Trademarks</a>'
menu2[1]='<a href="http://www.hoco.com/embroidery/clubs.html">Clubs</a>'
menu2[2]='<a href="http://www.hoco.com/embroidery/hobbies.html">Hobbies</a>'
menu2[3]='<a href="http://www.hoco.com/embroidery/sports.html">Sports Teams</a>'
//Contents for menu 3 (Hobbies & Collectables)
var menu3=new Array()
menu3[0]='<a href="http://www.hoco.com/auto/automobiles.html">Auto</a>'
menu3[1]='<a href="http://www.hoco.com/furn/furniture.html">Furniture</a>'
menu3[2]='<a href="http://www.hoco.com/recs/RecordFrame.html">Records & Tapes</a>'
		var menuwidth='150px' //default menu width
var menubgcolor='#434D5C'  //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=-500
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, theImage){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
if (document.all)
{
	imageobj=document.all(theImage)
}
else
{
	imageobj=document.images[theImage]
}
MenuOn(imageobj.name);
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"
MenuOff(imageobj.name)
}
}
function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}
function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}
if (hidemenu_onclick=="yes")
document.onclick=hidemenu
function MenuOn(imageID)
{
		menuArray = new Array(3);
		menuArray[1] = "Menu_Catalogs";
		menuArray[2] = "Menu_Custom_Apparel";
		menuArray[3] = "Menu_Hobbies_Collectables";
	  	if (document.all)
	{
		for(i=0; i < menuArray.length; i++)
		{
			MenuOff(menuArray[i]);
		}
	}
	else
	{
			MenuOff(menuArray[1]);	
		MenuOff(menuArray[2]);	
		MenuOff(menuArray[3]);	
		}
	if (document.all)
	{
		document.all(imageID).src = '../main_images/' + imageID + '_ON.gif';
	}
	else
	{
		document.images[imageID].src = '../main_images/' + imageID + '_ON.gif';
	}
}
function MenuOff(imageID)
{
	if (document.all)
	{
		document.all(imageID).src = '../main_images/' + imageID + '.gif';	
	}
	else

	{
		document.images[imageID].src = '../main_images/' + imageID + '.gif';
	}
}
function preLoadImages() {
  if (document.images)
	{
	document.imagearray = new Array();
	document.imagearray[0] = new Image;
	document.imagearray[0].src = '../main_images/Menu_Catalogs_ON.gif';
	document.imagearray[1] = new Image;
	document.imagearray[1].src = '../main_images/Menu_Custom_Apparel_ON.gif';
	document.imagearray[2] = new Image;
	document.imagearray[2].src = '../main_images/Menu_Hobbies_Collectables_ON.gif';
	document.imagearray[3] = new Image;
	document.imagearray[3].src = '../main_images/JacketDetails_ON.gif';
	document.imagearray[4] = new Image;
	document.imagearray[4].src = '../main_images/ShirtDetails_ON.gif';
	document.imagearray[5] = new Image;
	document.imagearray[5].src = '../main_images/HatDetails_ON.gif';
	document.imagearray[6] = new Image;
	document.imagearray[6].src = '../main_images/MoreJackets_ON.gif';
	document.imagearray[7] = new Image;
	document.imagearray[7].src = '../main_images/MoreShirts_ON.gif';
	document.imagearray[8] = new Image;
	document.imagearray[8].src = '../main_images/MoreHats_ON.gif';
	document.imagearray[9] = new Image;
	document.imagearray[9].src = '../main_images/MoreSweatShirts_ON.gif';
	document.imagearray[10] = new Image;
	document.imagearray[10].src = '../main_images/SweatShirtDetails_ON.gif';	
	}
  else
    {
	image1 = new Image;
	image1.src = '../main_images/Menu_Catalogs_ON.gif.gif';
	image2 = new Image;
	image2.src = '../main_images/Menu_Custom_Apparel_ON.gif';
	image3 = new Image;
	image3.src = '../main_images/Menu_Hobbies_Collectables_ON.gif';
	image4 = new Image;
	image4.src = '../main_images/JacketDetails_ON.gif';
	image5 = new Image;
	image5.src = '../main_images/ShirtDetails_ON.gif';
	image6 = new Image;
	image6.src = '../main_images/HatDetails_ON.gif';
	image7 = new Image;
	image7.src = '../main_images/MoreJackets_ON.gif';
	image8 = new Image;
	image8.src = '../main_images/MoreShirts_ON.gif';
	image9 = new Image;
	image9.src = '../main_images/MoreHats_ON.gif';
	image10 = new Image;
	image10.src = '../main_images/MoreSweatShirts_ON.gif';	
	image10 = new Image;
	image10.src = '../main_images/SweatShirtDetails_ON.gif';	
	}
		today=new Date();
	month=today.getMonth();
		if (month == 8 || month == 9 || month == 10  || month == 11 || month == 0 || month == 1 || month == 2)	
	{
		document.getElementById("SweatShirtRow").style.display = "";	
		document.getElementById("SweatShirtLabel").style.display = "";	
			document.getElementById("SweatShirtImage").style.display = "";
			document.getElementById("TShirtRow").style.display = "none";	
		document.getElementById("TShirtLabel").style.display = "none";	
		document.getElementById("TShirtImage").style.display = "none";	
		}
	else
	{
		document.getElementById("SweatShirtRow").style.display = "none";
			document.getElementById("SweatShirtLabel").style.display = "none";
		document.getElementById("SweatShirtImage").style.display = "none";
					document.getElementById("TShirtRow").style.display = "";	
		document.getElementById("TShirtLabel").style.display = "";	
		document.getElementById("TShirtImage").style.display = "";	
			}
}
