<!--
var cls = new Array();
for (i=1; i<50; i++) {
	cls[i] = " class='menuoff' ";
}

if ((whatmenu!=0) && (whatmenu!=1) && (whatmenu!=7) && (whatmenu!=11)) {
	cls[whatmenu] = " class='menuon' ";
}



var homemenu="<center><img src='images/none.png' width='1' height='1' border='0'/></center>";

var trainingmenu="<center>"
	+ "<a href='rescue_certification.php' onmouseover='keepAlive(1)' onmouseout='keepAlive(0)'" + cls[2] + ">Certifications</a> | "
	+ "<a href='rescue_courses.php' onmouseover='keepAlive(1)' onmouseout='keepAlive(0)'" + cls[3] + ">Rescue Courses | </a>"
	+ "<a href='nfpa_information.php' onmouseover='keepAlive(1)' onmouseout='keepAlive(0)'" + cls[4] + ">NFPA Information | </a>"
	+ "<a href='rescue_articles.php' onmouseover='keepAlive(1)' onmouseout='keepAlive(0)'" + cls[5] + ">Articles | </a>"
	+ "<a href='rescue_course_registration.php' onmouseover='keepAlive(1)' onmouseout='keepAlive(0)'" + cls[6] + ">Registration</a>"
	+ "</center>";

var rescuemenu="<center><img src='images/none.png' width='1' height='1' border='0'/></center>";

var safetymenu="<center><img src='images/none.png' width='1' height='1' border='0'/></center>";

var productmenu="<center>"
	+ "<a href='http://americanrescue.net/original%20site/equipment.html' onmouseover='keepAlive(1)' onmouseout='keepAlive(0)'" + cls[8] + ">Shop Online</a> | "
	+ "<a href='rescue_product_engineering.php' onmouseover='keepAlive(1)' onmouseout='keepAlive(0)'" + cls[9] + ">Product Engineering | </a>"
	+ "<a href='rescue_product_testing.php' onmouseover='keepAlive(1)' onmouseout='keepAlive(0)'" + cls[10] + ">Product Testing</a>"
	+ "</center>";

var calendarmenu="<center><img src='images/none.png' width='1' height='1' border='0'/></center>";

var gallerymenu="<center><img src='images/none.png' width='1' height='1' border='0'/></center>";

var aboutmenu="<center>"
	+ "<a href='about_ar.php' onmouseover='keepAlive(1)' onmouseout='keepAlive(0)'" + cls[12] + ">Company Info</a> | "
	+ "<a href='rescue_instructors.php' onmouseover='keepAlive(1)' onmouseout='keepAlive(0)'" + cls[13] + ">Rescue Instructors | </a>"
	+ "<a href='rescue_advances.php' onmouseover='keepAlive(1)' onmouseout='keepAlive(0)'" + cls[14] + ">The Future</a>"
	+ "</center>";

var contactmenu="<center><img src='images/none.png' width='1' height='1' border='0'/></center>";

var imgld=0;
 
function showLayer(name) {
    if (isNS) {
    	document.layers[0].document.layers["lyr"].document.open();
		document.layers[0].document.layers["lyr"].document.write(eval(name));
		document.layers[0].document.layers["lyr"].document.close();
	}		
    if (isIE) {
   		document.getElementById("one").innerHTML=eval(name); 
	}
	if (isNS6) {
	//document.getElementById("one").innerHTML="";
	document.getElementById("one").innerHTML=eval(name);
	}
}

//image cache
if (document.images)
	{
//cache menu	

		var home_on = new Image();
		home_on.src = "images/home_on.png";
		var home_off = new Image();
		home_off.src = "images/home_off.png";

		var training_on = new Image();
		training_on.src = "images/training_on.png";
		var training_off = new Image();
		training_off.src = "images/training_off.png";

		var safety_on = new Image();
		safety_on.src = "images/safety_on.png";
		var safety_off = new Image();
		safety_off.src = "images/safety_off.png";

		var product_on = new Image();
		product_on.src = "images/product_on.png";
		var product_off = new Image();
		product_off.src = "images/product_off.png";

		var calendar_on = new Image();
		calendar_on.src = "images/calendar_on.png";
		var calendar_off = new Image();
		calendar_off.src = "images/calendar_off.png";

		var gallery_on = new Image();
		gallery_on.src = "images/gallery_on.png";
		var gallery_off = new Image();
		gallery_off.src = "images/gallery_off.png";

		var about_on = new Image();
		about_on.src = "images/about_on.png";
		var about_off = new Image();
		about_off.src = "images/about_off.png";

		var contact_on = new Image();
		contact_on.src = "images/contact_on.png";
		var contact_off = new Image();
		contact_off.src = "images/contact_off.png";
		
		imgld=1;
	}
	
function init() {
		if (whatpage!="home"){
	 	if (isNS) {
	 	eval("document.images[whatpage].src = "+ whatpage + "_on.src");
		} else {
			document.images[whatpage].src = eval(whatpage + "_on.src");
		}
		showLayer(layertoshow);
		}
}


function swapImage(i,j) {
	if (imgld==0) return;
	if (i==whatpage) return;
	 	if (isNS) {
	 	eval("document.images[i].src = "+ i + "_" + j + ".src");
		} else {
			document.images[i].src = eval(i + "_" + j + ".src");
		}
}

function keepAlive(mouse_over)
{
  if (mouse_over) {
	if (typeof TimerID != "undefined") clearTimeout(TimerID);
  } else {
    if (typeof TimerID != "undefined") clearTimeout(TimerID);
    TimerID = setTimeout('switchLayer()',2000);
  }
}

function swapMeetOn(x,y) {
 swapImage(x,y);
 showme=(x+"menu");
 showLayer(showme);
}

function swapMeetOff(x,y) {
 swapImage(x,y);
}

function switchLayer() {
 showLayer(layertoshow);
}

//-->

var isNS = (document.layers);
var isNS6=(document.getElementById && (! document.all));
var isIE=(document.getElementById && document.all);

var pltfrm = navigator.userAgent.toLowerCase();
var isMac = (pltfrm.indexOf("mac")>-1);

var useCSS;
if (isMac) {
	if (isNS) {useCSS = "mac_ns"}
	else {useCSS = "mac_ie"}
}
else {
	if (isNS) {useCSS = "win_ns"}	
	else if (isNS6) {useCSS = "win_ns6"}
	else { useCSS = "win_ie"}
}


 // to fix bug with NS4.0X and the onresize event handler
if ((isNS)||(isNS6)) {
	origWidth=innerWidth;
	origHeight=innerHeight;
	onresize=function(){
		if (innerWidth!=origWidth||innerHeight!=origHeight) location.reload()
	}
}