/* do some initial browser parsing because of known quirks in Mac software */

var agt = navigator.userAgent.toLowerCase();
var appVer = navigator.appVersion.toLowerCase();
var is_safari = (agt.indexOf("safari") != -1);
var build = appVer.substring(appVer.lastIndexOf("/")+1);
build = build.substring(0,build.indexOf("."));
var nav_ie = navigator.appName.toLowerCase().indexOf("explorer") != -1;
var nav_pc = navigator.userAgent.toLowerCase().indexOf("windows") != -1;
var nav_mac = navigator.platform.toLowerCase().indexOf("macppc") != -1;
var nav_linux = navigator.platform.toLowerCase().indexOf("linux") != -1;

if (nav_mac && (nav_ie || (is_safari && !(build>86)))) {

	document.write('<style type="text/css">div.nav-item:hover div.nav-block, div.over div.nav-block {display:none !important;}</style>');

} else if (nav_linux){

	// nothing to do if browser linux thanks to amazing browser compatability!

} else {

	// okay, it's windows or mac, so we know that much...  but now we check to see if it's ie)

	startList = function() {

		if ( document.all && document.getElementById ) { // test for IE functionality

			// setup js event triggers since we cannot rely on IE having properly implemented the :hover property for DIV tags

			navRoot = document.getElementById("navleftpad");
			for (i=0; i<navRoot.childNodes.length; i++) {
				node = navRoot.childNodes[i];
				if (node.nodeName=="DIV") {
					node.onmouseover=function() {
						this.className+=" over";
// 						alert('over!');
					}
					node.onmouseout=function() {
						this.className=this.className.replace(" over", "");
// 						alert('o!');
					}
					node.onclick=function() {
						this.className=this.className.replace(" over", "");
					}
				}
			}
		}

	}

	// timer ensures the page has had a chance to load fully before setting the js event handlers
	setTimeout("startList()",2000);

}
//
// // *** END JS FOR DROPDOWN NAV ***
//
// // function nav_option_over(e){
// //
// // 	var targ;
// // 	if (!e) var e = window.event;
// // 	if (e.target) targ = e.target;
// // 	else if (e.srcElement) targ = e.srcElement;
// // 	if (targ.nodeName != 'DIV')
// // 		targ = targ.parentNode;
// //
// // 	targ.className = 'navButtonOver';
// //
// // }
// //
// // function nav_option_out(e){
// //
// // 	var targ;
// // 	if (!e) var e = window.event;
// // 	if (e.target) targ = e.target;
// // 	else if (e.srcElement) targ = e.srcElement;
// // 	if (targ.nodeName != 'DIV')
// // 		targ = targ.parentNode;
// //
// // 	targ.className = 'navButton';
// //
// // }
