//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 = 105;
			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:25%\"><img alt=\"\" src=/pics/" + titleimage + " align=\"left\" /></td>")
document.write("<td style=\"text-align: center;width:50%;\"><img alt=\"\" src=/pics/" + title + " /></td>")
document.write("<td style=\"text-align:right;width:25%;\"><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.htm onMouseOver=activateMenu(1,0,0) class=inactive highlight>Online Shopping</a>&nbsp;")
document.write(" <font color=white size=2>|</font> &nbsp; <a href=/techinfo.htm onMouseOver=activateMenu(2,106,95) class=inactive highlight>Technical Info</a>&nbsp;")
document.write(" <font color=white size=2>|</font> &nbsp; <a href=/links.htm onMouseOver=activateMenu(3,205,185) class=inactive highlight>Fashion Links</a>&nbsp;")
document.write(" <font color=white size=2>|</font> &nbsp; <a href=/contact.htm onMouseOver=activateMenu(4,305,277) class=inactive highlight>Contact Us</a>&nbsp;")
document.write(" <font color=white size=2>|</font> &nbsp; <a href=/index.asp onMouseOver=activateMenu(5,387,355) 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\" class=\"menu\" onMouseover=\"activateMenu(1,13);\">")
   document.write("<A href=/online_shop.htm>Online Shop</A>")
   document.write("<BR><A href=/orderinfo.htm>Ordering Information</A>") 
   document.write("<BR><A href=/convert.htm>Currency Converter</a>")
   document.write("<BR><A href=/receiptformats.htm>Receipt Formats</a>")
   document.write("<BR><A href=/ship.htm>Shipping Costs</a>")
   document.write("<BR><A href=/webmaster-tip_ssl.htm>Online Security - SSL Information</a>")
   document.write("</DIV>")

   document.write("<DIV id=\"menu2\" class=\"menu\" onMouseover=\"activateMenu(2,73);\">")
   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><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("<BR>&nbsp;&nbsp;&nbsp; <A href=/tech_info/clothing_size_b.htm>Boy's Clothing Tables</A>")
   document.write("<BR>&nbsp;&nbsp;&nbsp; <A href=/tech_info/clothing_size_g.htm>Girl's Clothing Tables</A>")
   document.write("</DIV>")

   document.write("<DIV id=\"menu3\" class=\"menu\" onMouseover=\"activateMenu(3,146);\">")   

	/*
	 *	Fashion Links
	 */

   document.write("<A href=/links/linkdisplay.asp?Category=Accessories><u>Accessories</u></A>")
   document.write("<BR><A href=/links/linkdisplay.asp?Category=Australian%20Fashion>Australian Fashion</A>")
   document.write("<BR><A href=/links/linkdisplay.asp?Category=Chain%20Store%20Retailers>Chain Store Retailers</A>")
   document.write("<BR><A href=/links/linkdisplay.asp?Category=Clothing>Clothing</A>")
   document.write("<BR><A href=/links/linkdisplay.asp?Category=Cosmetics>Cosmetics</A>")
   document.write("<BR><A href=/links/linkdisplay.asp?Category=Design>Design</A>")
   document.write("<BR><A href=/links/linkdisplay.asp?Category=Designer%20Fashion>Designer Fashion</A>")
   document.write("<BR><A href=/links/linkdisplay.asp?Category=Fashion%20Publications>Fashion Publications</A>")
   document.write("<BR><A href=/links/linkdisplay.asp?Category=Fashion%20Shows>Fashion Shows</A>")
   document.write("<BR><A href=/links/linkdisplay.asp?Category=Footwear>Footwear</A>")
   document.write("<BR><A href=/links/linkdisplay.asp?Category=Home%20Shopping>Home Shopping</A>")
   document.write("<BR><A href=/links/linkdisplay.asp?Category=Industry%20Associations>Industry Associations</A>")
   document.write("<BR><A href=/links/linkdisplay.asp?Category=Miscellaneous>Miscellaneous</A>")
   document.write("<BR><A href=/links/linkdisplay.asp?Category=Modelling%20Schools>Modelling Schools</A>")
   document.write("<BR><A href=/links/linkdisplay.asp?Category=Outdoor%20Gear>Outdoor Gear</A>")
   document.write("<BR><A href=/links/linkdisplay.asp?Category=Search%20Engines>Search Engines</A>")
   document.write("<BR><A href=/links/linkdisplay.asp?Category=Sunglasses>Sunglasses</A>")
   document.write("<BR><A href=/links/linkdisplay.asp?Category=Watches>Watches</A>")
   
   document.write("</DIV>")
   document.write("<DIV id=\"menu4\" class=\"menu\" onMouseover=\"activateMenu(4,256);\">")
   document.write("<A href=/contact.htm>Contact Us</a>")
   document.write("<BR><A href=/jobform.asp>Jobs with Rivers</a>")
   document.write("<BR><A href=/stores/find.asp>Rivers Shop Locations</a>")
   document.write("</DIV>")
   document.write("<DIV id=\"menu5\" class=\"menu\" onMouseover=\"activateMenu(5,345);\">")
   document.write("<A href=/webmaster-tip.htm>Web Masters Notes</a>")
   document.write("</DIV>");
   }
