/***********************************************/
/* Script: Browser Detect for ObjectMenu v1.0  */
/* Author: Jim Salyer                          */
/***********************************************/

// global variables
var menuDir = "/includes/ladyamericana-includes/menu/"; // directory to find the menu scripts
var hideDelay = 300;   // delay before hiding menus (in milliseconds)

// browser feature variables
var browseID = navigator.userAgent.toLowerCase();
var isAll = (document.all);
var isLayers = (document.layers || (navigator.appName == "Netscape" && 
	parseInt(navigator.appVersion) < 5 && parseInt(navigator.appVersion) >= 4));
var isW3C = (document.getElementById);

// browser ID variables
var isIE = (navigator.appName == "Microsoft Internet Explorer");
var ieVer = (isIE ? parseFloat(browseID.substr(browseID.indexOf("msie") + 5, 
	3)) : -1);
var isNS = (navigator.appName == "Netscape");
var isOP = (window.opera ? true : false);

// strings to hold the script tag for the appropriate build file
var scriptTagBeg = '<script type="text/javascript" src="' + menuDir;
var scriptTagEnd = '"></script>';
var scriptTag = '';

// build the script tag according to the browser type
if (isAll && !isW3C)
	scriptTag = scriptTagBeg + 'build-all.js' + scriptTagEnd;
else if (isLayers)
	scriptTag = scriptTagBeg + 'build-lyr.js' + scriptTagEnd;
else if (isW3C)
	scriptTag = scriptTagBeg + 'build-w3c.js' + scriptTagEnd;
else
	alert("Your browser doesn't support ObjectMenu.");
	
// write the script tag to the page
if (scriptTag != "") document.write(scriptTag);
