var home_menu=new Array()
home_menu[0]='<a href="index.php">Home</a>'

var coffees_menu=new Array()
coffees_menu[0]='<a href="about.php">Introduction</a>'
coffees_menu[1]='<a href="employment.php">Employment Opportunities</a>'

var inventory_menu=new Array()
inventory_menu[0]='<a href="inventory.php?cat=c1">C1 Corvettes (1953-1962)</a>'
inventory_menu[1]='<a href="inventory.php?cat=c2">C2 Corvettes (1963-1967)</a>'
inventory_menu[2]='<a href="inventory.php?cat=c3">C3 Corvettes (1968-1982)</a>'
inventory_menu[3]='<a href="inventory.php?cat=c4">C4 Corvettes (1984-1996)</a>'
inventory_menu[4]='<a href="inventory.php?cat=c5">C5 Corvettes (1997-2004)</a>'
inventory_menu[5]='<a href="inventory.php?cat=c6">C6 Corvettes (2005-2009)</a>'
inventory_menu[6]='<a href="inventory.php?cat=other">Specialty Cars and Trucks</a>'
inventory_menu[7]='<a href="inventory.php?cat=preshop">Pre Shop</a>'
inventory_menu[8]='<a href="inventory.php?cat=parts">Parts &amp; Accessories</a>'
inventory_menu[9]='<a href="inventory.php?cat=sold">See What You Missed</a>'

var contact_menu=new Array()
contact_menu[0]='<font style=\"font-size:10px;\">1003 Moosic Road<br />Old Forge, PA 18518<br />Phone: (570) 457-7423<br />Fax: (570) 457-7424<br /></font><a href="mailto:info@coffeescorvettes.com">info@coffeescorvettes.com</a>'

var directions_menu=new Array()
directions_menu[0]='<a href="directions.html">Directions To Our Facility</a>'

var testimonial_menu=new Array()
testimonial_menu[0]='<a href="testimonials.html">Testimonials</a>'

var financing_menu=new Array()
financing_menu[0]='<a href="financing.html">Online Financing Options</a>'
		
var disappeardelay=250
var horizontaloffset=0

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width: 160px" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

	function getposOffset(what, offsettype)
	{
	var totaloffset=(offsettype=="top")? what.offsetTop : what.offsetLeft;
	var parentEl=what.offsetParent;
		while (parentEl!=null)
		{
		totaloffset=(offsettype=="top")? totaloffset+parentEl.offsetTop : totaloffset+parentEl.offsetLeft;
		parentEl=parentEl.offsetParent;
		}
	return totaloffset;
	}


	function showhide(obj, e, visible, hidden, menuwidth)
	{
	if (ie4||ns6)
	dropmenuobj.style.left=dropmenuobj.style.top=-500
	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-obj.offsetWidth < 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)
	{
	edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight
	if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure)
	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")+horizontaloffset+"px"
	dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+19+"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)
	}

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;

function ddInit(e)
	{
	topDog=isIE ? "BODY" : "HTML";
  	whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");  
  	hotDog=isIE ? event.srcElement : e.target;  
  	while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog)
		{
  		hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
  		}  
	if (hotDog.id=="titleBar")
		{
    		offsetx=isIE ? event.clientX : e.clientX;
    		offsety=isIE ? event.clientY : e.clientY;
    		nowX=parseInt(whichDog.style.left);
    		nowY=parseInt(whichDog.style.top);
    		ddEnabled=true;
    		document.onmousemove=dd;
  		}
	}

function dd(e)
	{
  	if (!ddEnabled) return;
  	whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx; 
  	whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  	return false;  
	}

function ddN4(whatDog)	
	{
  	if (!isN4) return;
  	N4=eval(whatDog);
  	N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  	N4.onmousedown=function(e)
		{
  		N4.captureEvents(Event.MOUSEMOVE);
    		N4x=e.x;
    		N4y=e.y;
  		}
  	N4.onmousemove=function(e)
		{
    		if (isHot)
			{
      			N4.moveBy(e.x-N4x,e.y-N4y);
      			return false;
   			}
  		}
  	N4.onmouseup=function()
		{
    		N4.releaseEvents(Event.MOUSEMOVE);
  		}
	}

function hideMe()
	{
  	if (isIE||isNN) parent.theLayer.style.visibility="hidden";
  	else if (isN4) parent.theLayer.visibility="hide";
	}

function showMe()
	{
  	if (isIE||isNN) parent.theLayer.style.visibility="visible";
  	else if (isN4) parent.theLayer.visibility="show";
	}

document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");
