var menuOffset=new Array(0,62,202,324,396,0,468,560,650);

var menu0=new Array();
var menu1=new Array();
var menu2=new Array();
var menu3=new Array();
var menu4=new Array();
var menu5=new Array();
var menu6=new Array();
var menu7=new Array();
var menu8=new Array();
var menu9=new Array();


menu0[0]='<a href="/">Home</a>';
menu0[1]='<a href="/shop/shoppingcart.asp">Shopping Cart</a>';
menu0[2]='<a href="/shop/account.asp">My Account</a>';
menu0[3]='<a href="/help/faq.asp">Customer Service</a>';
menu0[4]='<a href="/custom.asp">Custom Gear</a>';
menu0[5]='<a href="/contact.asp">Contact Us</a>';
menu0[6]='<a href="/locator">Find A Store</a>';
menu0[7]='<a href="/news.asp">Press Releases</a>';


menu1[0]='<a href="/products.asp?sport=wlc&page=st">Shafts</a>';
menu1[1]='<a href="/products.asp?sport=wlc&page=he">Complete Sticks & Heads</a>';
menu1[2]='<a href="/products.asp?sport=wlc&page=pw">Gloves & Protection</a>';
menu1[3]='<a href="/products.asp?sport=wlc&c=55&t=63">Harrow Logo Apparel</a>';
menu1[4]='<a href="/products.asp?sport=wlc&page=ac">Bags & Accessories</a>';
menu1[5]='<a href="/products.asp?sport=wlc&c=55&t=61">Women\'s Uniforms</a>';
menu1[6]='<a href="/products.asp?sport=wlc&c=55&t=58">Outerwear</a>';
menu1[7]='<a href="/products.asp?sport=wlc&c=55&t=59">Performance Wear</a>';
menu1[8]='<a href="/products.asp?sport=wlc&c=55&t=62">Basic Gear</a>';
menu1[9]='<a href="/products.asp?sport=wlc&c=50&t=54">Custom Gear</a>';
menu1[10]='<a href="/products.asp?sport=wlc&c=50&t=69">Closeout</a>';


menu2[0]='<a href="/products.asp?sport=mlc&page=st">Shafts</a>';
menu2[1]='<a href="/products.asp?sport=mlc&page=he">Complete Sticks & Heads</a>';
menu2[2]='<a href="/products.asp?sport=mlc&page=pw">Gloves & Protection</a>';
menu2[3]='<a href="/products.asp?sport=mlc&c=55&t=63">Harrow Logo Apparel</a>';
menu2[4]='<a href="/products.asp?sport=mlc&page=ac">Bags & Accessories</a>';
menu2[5]='<a href="/products.asp?sport=mlc&c=55&t=60">Men\'s Uniforms</a>';
menu2[6]='<a href="/products.asp?sport=mlc&c=55&t=58">Outerwear</a>';
menu2[7]='<a href="/products.asp?sport=mlc&c=55&t=59">Performance Wear</a>';
menu2[8]='<a href="/products.asp?sport=mlc&c=55&t=62">Basic Gear</a>';
menu2[9]='<a href="/products.asp?sport=mlc&c=30&t=54">Custom Gear</a>';
menu2[10]='<a href="/products.asp?sport=mlc&c=55&t=69">Closeout</a>';

menu3[0]='<a href="/products.asp?sport=ho&page=st&c=52&t=35">Composite Shafts</a>';
menu3[1]='<a href="/products.asp?sport=ho&c=52&t=34">Composite One-Pieces</a>';
menu3[2]='<a href="/products.asp?sport=ho&page=st&c=52&t=36">Blades</a>';
menu3[3]='<a href="/products.asp?sport=ho&page=st&c=52&t=42">Goalie</a>';
menu3[4]='<a href="/products.asp?sport=ho&page=pw&c=52&t=40">Gloves</a>';
menu3[5]='<a href="/products.asp?sport=ho&page=pw&c=52&t=39">Pants</a>';
menu3[6]='<a href="/products.asp?sport=ho&page=pw&c=52&t=20">Apparel</a>';
menu3[7]='<a href="/products.asp?sport=ho&page=pw&c=52&t=20">Bags & Accessories</a>';
menu3[8]='<a href="/products.asp?sport=ho&c=52&t=54">Custom Gear</a>';
menu3[9]='<a href="/products.asp?sport=ho&c=52&t=69">Closeout</a>';

menu4[0]='<a href="/products.asp?sport=sq&page=rq">Racquets</a>';
menu4[1]='<a href="/products.asp?sport=sq&page=ac">Bags & Accessories</a>';
menu4[2]='<a href="/products.asp?sport=sq&c=55&t=63">Shoes And Harrow Logo Apparel</a>';
menu4[3]='<a href="/products.asp?sport=sq&c=55&t=58">Outerwear</a>';
menu4[4]='<a href="/products.asp?sport=sq&c=55&t=67">Performance Wear</a>';
menu4[5]='<a href="/products.asp?sport=sq&c=55&t=62">Basic Gear</a>';
menu4[6]='<a href="/csa/custom.asp">Custom Gear</a>';
menu4[7]='<a href="/products.asp?sport=sq&c=26&t=69">Closeout</a>';

menu5[0]='<a href="/products.asp?sport=tn&c=25&t=23">Racquets</a>';
menu5[1]='<a href="/products.asp?sport=tn&c=25&t=20">Accessories</a>';


menu6[0]='<a href="/products.asp?sport=fh&page=st">Sticks</a>';
menu6[1]='<a href="/products.asp?sport=fh&page=pw">Gloves & Protection</a>';
menu6[2]='<a href="/products.asp?sport=fh&c=55&t=63">Harrow Logo Apparel</a>';
menu6[3]='<a href="/products.asp?sport=fh&page=ac">Bags & Accessories</a>';
menu6[4]='<a href="/products.asp?sport=fh&c=55&t=61">Women\'s Uniforms</a>';
menu6[5]='<a href="/products.asp?sport=fh&c=55&t=58">Outerwear</a>';
menu6[6]='<a href="/products.asp?sport=fh&c=55&t=59">Performance Wear</a>';
menu6[7]='<a href="/products.asp?sport=fh&c=55&t=62">Basic Gear</a>';
menu6[8]='<a href="http://www.hockeypower.com"><i><font color=#00CCFF>hockey</font><font color=#FF9900>power</font>.com</i></a>';

menu7[0]='<a href="/teamgear">Outfit Your Team</a>';
menu7[1]='<a href="/teamgear/stores.asp">Find Your Team Store</a>';
menu7[2]='<a href="/products.asp?sport=ap&c=55&t=63">Harrow Logo Apparel</a>';
menu7[3]='<a href="/products.asp?sport=ap&c=55&t=60">Men\'s Uniforms</a>';
menu7[4]='<a href="/products.asp?sport=ap&c=55&t=61">Women\'s Uniforms</a>';
menu7[5]='<a href="/products.asp?sport=ap&c=55&t=58">Outerwear</a>';
menu7[6]='<a href="/products.asp?sport=ap&c=55&t=59">Performance Wear</a>';
menu7[7]='<a href="/products.asp?sport=ap&c=55&t=62">Basic Gear</a>';
<!--menu7[8]='<a href="/custom"><font color=Yellow>Custom Designer</font></a>';-->



menu8[0]='<a href="/courttennis.asp">Court (Real) Tennis</a>';
menu8[1]='<a href="/products.asp?q=t%3D23%3Bc%3D56">Platform Tennis</a>';

var X;
var Y;
var ie4=document.all?true:false;
var ns6=document.getElementById&&!document.all;

if (!ie4) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;


if (ie4||ns6) {
	document.write('<div id="genericpop" style="position:absolute;visibility:hidden;"></div>');
}



function getpopobj() {
	if (document.getElementById)
		return document.getElementById("genericpop")
	else if (document.all)
		return document.all.genericpop
}

function clearpopobj() {
	getpopobj().innerHTML = '';
	getpopobj().style.visibility="hidden";
	getpopobj().style.left="-1000px";
}



function showcountry() {

	var thw = 100;
	var divtext = '<div style="background-color: #C6C6C6; layer-background-color: #C6C6C6; border: 2px #FFFFFF; padding:10px; width:'+thw+'px;">';
	//divtext += '<a href="/Default.asp?cp=US" class=hrwCountry>United States</a><br><a href="/Default.asp?cp=CA" class=hrwCountry>Canada</a><br><a href="/Default.asp?cp=MX" class=hrwCountry>Mexico</a><br><a href="/Default.asp?cp=AU" class=hrwCountry>Australia</a><br><a href="/Default.asp?cp=UK" class=hrwCountry>Great Britain</a><br><a href="/Default.asp?cp=JP" class=hrwCountry>Japan</a><br><a href="/Default.asp?cp=EG" class=hrwCountry>Egypt</a><br><a href="/Default.asp?cp=SA" class=hrwCountry>South Africa</a></div>';
	divtext += '<a href="/Default.asp?cp=US" class=hrwCountry>United States</a><br><a href="/Default.asp?cp=CA" class=hrwCountry>Canada</a><br></div>';

	getpopobj().innerHTML = divtext;
	getpopobj().style.visibility="visible";

	getpopobj().style.left=X;
	getpopobj().style.top=Y;

}


function getMouseXY(e) {

  if (ie4) {
		X = event.clientX + document.body.scrollLeft;
		Y = event.clientY + document.body.scrollTop;
	} else {
		X = e.pageX;
		Y = e.pageY;
	}
	return true;
}


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, offset){
	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=menuOffset[offset]+8;
	dropmenuobj.y=55;
	dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
	dropmenuobj.style.top="68px"
	}

	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"
getpopobj().style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

function f_clientWidth() {
	return f_filterResults (
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}
function f_clientHeight() {
	return f_filterResults (
		window.innerHeight ? window.innerHeight : 0,
		document.documentElement ? document.documentElement.clientHeight : 0,
		document.body ? document.body.clientHeight : 0
	);
}
function f_scrollLeft() {
	return f_filterResults (
		window.pageXOffset ? window.pageXOffset : 0,
		document.documentElement ? document.documentElement.scrollLeft : 0,
		document.body ? document.body.scrollLeft : 0
	);
}
function f_scrollTop() {
	return f_filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}
function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}


function a(b,c,d,e) {	// Ryan-o's little obfuscation routine
	var i; var len = b.length; var f = "";
	for (i=0;i<len;i++) { if (b.charAt(i) != '_') { f = f.concat(String.fromCharCode(((((b.charCodeAt(i)-97)+(26-c))%26)+97))); } else { f = f.concat('_'); }}
	f = f.substring(0,d-1)+"@"+f.substring(d-1,e)+"."+f.substring(e,len);
	return "<a href='mailto:"+f+"'>"+f+"</a>";
}

document.onclick=hidemenu;
