// JavaScript Document

function browserVer4Detect()
{
//Workaround for very old browsers
  if(navigator.appVersion.substring(0,1) < 4)
  {
    URLStr = "help.htm";
	window.location = URLStr;
  }
 // else
 //   URLStr = "index.html";
 // window.location = URLStr;
}
browserVer4Detect();
// -->

//Workaround for very old browsers
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->

//This function will change the look of this page's navigation item so that you know what section you are in.
function setNav() {
	pathName = window.location.pathname;
	var pageName = pathName.substring(pathName.lastIndexOf('/') + 1);
	switch(pageName) {
	case "index.html":
		document.getElementById("homeNav").style.color = "#0000f2";
		break;
	case "craneparts.htm":
		document.getElementById("craneNav").style.color = "#0000f2";
		break;
	case "oemproducts.htm":
	case "OEMProductGridAC.htm":
	case "OEMProductGridDC.htm":		
		document.getElementById("oemNav").style.color = "#0000f2";
		break;
	case "acuwatt.htm":
		document.getElementById("acuwattNav").style.color = "#0000f2";
		break;
	case "frickparts.htm":
		document.getElementById("frickNav").style.color = "#0000f2";
		break;
	case "contact.htm":
		document.getElementById("contactNav").style.color = "#0000f2";
		break;
	}
}


//Google Analytics code
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-16524319-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();


