//do browser detect stuff
var isNS = (navigator.appName == "Netscape");
var isMacIE = ( (navigator.userAgent.indexOf("IE 4")  > -1) && (navigator.userAgent.indexOf("Mac")  > -1) );
var layerRef = (isNS) ? "document" : "document.all";
var styleRef = (isNS) ? "" : ".style";
var isDynamic = ( (document.layers || document.all) && !isMacIE );

var activeMenu = 0;
var finalClip;


function activateMenu(menuLayerRef, offset, offset1) {
	
	if (isDynamic && activeMenu != menuLayerRef) {

		if (activeMenu) hideMenu("menu" + activeMenu);
			
		menuID = "menu" + menuLayerRef;
		activeMenu = menuLayerRef;
	
		if (isNS) {
			document[menuID].top = 103;
			document[menuID].left = offset1;
		} else {
			document.all[menuID].style.pixelTop = 107;
			document.all[menuID].style.pixelLeft = offset;
		}

		showMenu(menuID);
		
	}
	if (isDynamic && !isNS) window.event.cancelBubble = true;
}

function showMenu(layerID) {
	eval(layerRef + '["' + layerID + '"]' + styleRef + '.visibility = "visible"');
}

function hideMenu(layerID) {
	eval(layerRef + '["' + layerID + '"]' + styleRef + '.visibility = "hidden"');
}

function killMenu(e) {
	//check if theres a menu active
	if (activeMenu) {
		menuID = "menu" + activeMenu;
		if (isNS) {
			menuX1 = document[menuID].left;
			menuX2 = menuX1 + document[menuID].clip.right;
			menuY1 = document[menuID].top;
			menuY2 = menuY1 + document[menuID].clip.bottom;
			
			if (e.pageX < menuX1 || e.pageX > menuX2 || e.pageY > menuY2) {
				hideMenu(menuID);
				activeMenu = 0;
			}
		} else {
				hideMenu(menuID);
				activeMenu = 0;
		}
	}
}


function init() {
	if (isDynamic) {
		if (isNS) { 
			document.captureEvents(Event.MOUSEMOVE); 
			document.onmousemove = killMenu;
		} else {
			document.onmouseover = killMenu;
		}
	}
}

//This function is included just for demonstration
function popUp(moviePath, winName, xSize, Ysize) {	
      window.open(moviePath, winName, "width=" + xSize + ",height=" + Ysize + ",directories=no,status=no,scrollbars=no,resize=no,menubar=no,toolbar=no,alwaysRaised=yes" );
}

document.write("<table style=\"background-color: #2053A3;\" width=100% cellspacing=0 cellpadding=0 border=0>")
document.write("<tr><td style=\"width:45%;\"><img src=/pics/" + titleimage + " />")
document.write("</td><td style=\"width:35%;text-align:right;\"><img alt=\"\" src=/pics/" + title + " />")
document.write("</td><td style=\"width:20%;text-align:right;\"><img alt=\"\" src=/pics/Logo_Transparent_110b.GIF width=\"99px\" height=\"86px\" /></td>")
document.write("</tr><tr bgcolor=#2053A3>")
document.write("<td colspan=3><b>&nbsp;<a href=/online_shop_men.htm ")
document.write(" onMouseOver=activateMenu(1,0,0) class=inactive highlight>Mens Products</a>&nbsp;")
document.write(" <font color=white size=2>|</font> &nbsp; <a href=/online_shop_women.htm ")
document.write(" onMouseOver=activateMenu(2,102,92) class=inactive highlight>Womens Products</a>&nbsp;")
document.write(" <font color=white size=2>|</font> &nbsp; <a href=/techinfo.htm onMouseOver=activateMenu(3,227,210) class=inactive highlight>Technical Info</a>&nbsp;")
document.write(" <font color=white size=2>|</font> &nbsp; <a href=/index.asp onMouseOver=activateMenu(4,326,300) class=inactive highlight>Home Links</a>&nbsp;")
document.write(" <font color=white size=2>|</font> &nbsp; <a href=/index.asp class=inactive highlight>Home Page</a></font></b></td></tr></table>")

if (isDynamic) {   

   document.write("<DIV id=\"menu1\" style=\"width:175\" class=\"menu\" onMouseover=\"activateMenu(1,8);\">")

   document.write("<font color=white><u>Clothing</u></font>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=143>Business Shirts</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=132>Industrial Wear</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=11>Jackets</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=141>Jeans</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=9>Jumpers</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=14>Long Sleeve Check Shirts</a>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=13>Long Sleeve Plain Shirts</a>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=15>Long Sleeve Stripe Shirts</a>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=138>Long Sleeve T-Shirts</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=139>Print Shirts</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=16>Polo Shirts</a>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=20>Short Sleeve Check Shirts</a>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=19>Short Sleeve Plain Shirts</a>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=21>Short Sleeve Stripe Shirts</a>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=17>Shorts</a>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=18>T-Shirts</a>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=10>Trousers</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=154>Underwear</A>")
   document.write("<BR><font color=white><u>Footwear</u></font>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=4>Boat Shoes</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=5>Boots</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=1>Casual Shoes</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=3>Dress Shoes</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=6>Sandals</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=125>Sneakers</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=142>Work Shoes</A>")
   document.write("</DIV>")

   document.write("<DIV id=\"menu2\" class=\"menu\" onMouseover=\"activateMenu(2,20);\">")

   document.write("<font color=white><u>Clothing</u></font>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=140>Activewear</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=27>Basic Tops</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=134>Hike and Bike</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=36>Jackets</A>")
   //document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=29>Jumpers</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=145>Knitwear</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=28>Pants</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=144>Jeans</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=30>Shirts</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=31>Shorts & Skirts</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=156>Sleepwear</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=158>Underwear</A>")

   document.write("<BR><font color=white><u>Footwear</u></font>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=24>Boat Shoes</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=23>Casual Shoes</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=22>Dress Shoes</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=25>Outdoor Footwear</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=26>Sandals</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/catalogdb/catalog-www.asp?category=126>Sneakers</A>")
   document.write("</DIV>")   

   document.write("<DIV id=\"menu3\" style=\"width:170\" class=\"menu\" onMouseover=\"activateMenu(3,345);\">")

   document.write("<font color=white><u>Footwear</u></font>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/tech_info/footwear_sole.htm>Sole Construction</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/tech_info/footwear_upper.htm>Upper Construction</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/tech_info/footwear_lining.htm>Lining Materials</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/tech_info/footwear_leather.htm>Leather</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/tech_info/footwear_guarantee.htm>Guarantee Policy</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/tech_info/footwear_exam.htm>Physical Examination</A>")   
   document.write("<BR><font color=white><u>Clothing</u></font>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/tech_info/clothing_lss.htm>Long Sleeve Shirts</A>") 
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/tech_info/clothing_sss.htm>Short Sleeve Shirts</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/tech_info/clothing_jumper.htm>Jumpers</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/tech_info/clothing_trousers.htm>Trousers</A>")  
   document.write("<BR><font color=white><u>Sizing Information</u></font>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/tech_info/shoe_size_m.htm>Mens Footwear Chart</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/tech_info/shoe_size_w.htm>Womens Footwear Chart</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/tech_info/clothing_size_m.htm>Mens Clothing Tables</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/tech_info/clothing_size_w.htm>Womens Clothing Tables</A>")
   document.write("</DIV>")

   document.write("<DIV id=\"menu4\" class=\"menu\" onMouseover=\"activateMenu(4,450);\">")

   document.write("<A href=/orderinfo.htm>Ordering Information</a>")
   document.write("<BR><A href=/links.htm>Fashion Links</a>")
   document.write("<BR><A href=/CustomerFeedbackFAQ.htm>Customer Feedback</a>")
   document.write("<BR><A href=/contact.htm>Contact Us</a>")
   document.write("<BR><A href=/stores/find.asp>Rivers Shop Locations</a>")
   document.write("<BR><A href=/convert.htm>Currency Converter</a>")
   document.write("<BR><A href=/ship.htm>Shipping Costs</a>")
   document.write("<BR><A href=/jobform.asp>Jobs with Rivers</a>")
   document.write("<BR><A href=/webmaster-tip.htm>Web Masters Notes</a>")
   document.write("<BR><A href=/webmaster-tip_ssl.htm>Online Security - SSL</a>")
   document.write("</DIV>");
   }
