var detect = navigator.userAgent.toLowerCase();
var OS = "";
var browser = "";
var flashversion = "7";
boCheck();
function boCheck() {
	if (this.checkIt('konqueror')) {
		browser = "Konqueror";
		OS = "Linux";
	}
	else if (checkIt('safari')) browser = "Safari"
	else if (checkIt('omniweb')) browser = "OmniWeb"
	else if (checkIt('opera')) browser = "Opera"
	else if (checkIt('webtv')) browser = "WebTV";
	else if (checkIt('icab')) browser = "iCab"
	else if (checkIt('msie')) browser = "Internet Explorer"
	else if (checkIt('firefox')) browser = "Firefox"
	else if (checkIt('netscape')) browser = "Netscape Navigator"
	else if (!checkIt('compatible')) {
		browser = "Netscape Navigator"
	} else 
		browser = "An unknown browser";
	
	if (checkIt('linux')) OS = "Linux";
	else if (checkIt('x11')) OS = "Unix";
	else if (checkIt('mac')) OS = "Mac"
	else if (checkIt('win')) OS = "Windows"
	else OS = "an unknown operating system";
}

function checkIt(string) {
	place = detect.indexOf(string) + 1;
	return place;
}
if (OS == 'Mac' && browser == 'Internet Explorer') {
	var cssURL = '<LINK REL="StyleSheet" HREF="' + baseURL + 'includes/cssbin/sitestyle-mac.css" type="text/css">';
	document.write(cssURL);
}

//product pages

function showHide(tmpObj,tmpVisibility) {
	// console.debug("In orig fn");
if (document.all||document.getElementById) {
 if (document.getElementById) {
    // Level 1 DOM code
	document.getElementById(tmpObj).style.visibility=tmpVisibility;
	
   }
   else if (document.all) {
    // Microsoft DOM code
	document.all[tmpObj].style.visibility=tmpVisibility;
	
}
	
	}
	// console.debug("Out of original fn.");
}

var showHideSets=Array(); // Variable to hold set states

function showHideSet(tmpObj,tmpVisibility, setName) {
	console.debug("showHideSet("+tmpVisibility+" "+setName);
	console.debug("Set: "+showHideSets[setName]);
	if (tmpVisibility.toLowerCase()=="visible") {
		console.debug("Visible");
		if (showHideSets[setName]) {
			if (showHideSets[setName]!=null) { // If we had one in the list
				showHide(showHideSets[setName], "hidden"); // Hide it first
			}
		}
		showHideSets[setName]=tmpObj; // Store the new object in the list
	} else {
		console.debug("hidden");
		showHideSets[setName]=null; // Clear the list
	}
	
	showHide(tmpObj, tmpVisibility); // Use the old method to handle the display
}


function printPage()
{
	window.print();
}

              
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


