IS_DOM = (document.getElementById) ? true : false;
IS_IE = (document.all) ? true : false;
IS_MOZ = (IS_DOM && !IS_IE);

// opens windows
function openWindow(URL,windowName,width,height) {
	var winName = windowName;
	attributes = "height=" + height + ",width=" + width + ",resizable=no,scrollbars=no,top=100,left=100";
	window.open(URL,winName,attributes);
}

// image swapper
function changeImages() 
{
  if (document.getElementById) {
    for (var i = 0; i < changeImages.arguments.length; i += 2) { 
  		document.getElementById(changeImages.arguments[i]).src = eval(changeImages.arguments[i + 1] + ".src"); 
	}
  }
}

// preload imagery
aNav = new Array();
aNav = ["", "audit-reports", "inspection-reports", "target-suppliers", "order-now"];
for (var i = 1; i < aNav.length; i++) { 
	eval("menu" + i + "on = new Image();");
	eval("menu" + i + "off = new Image();");
	eval("menu" + i + "on.src = \"" + sFolderLevel + "images/" + aNav[i] + "-r.gif\";");
	eval("menu" + i + "off.src = \"" + sFolderLevel + "images/" + aNav[i] + "-0.gif\";");
}

// 1.0 Expanding and Contracting Boxes (independent) //

	function changeDisplayState(sBoxId,sLinkId)
	{
		if (document.getElementById) {
			oBox = document.getElementById(sBoxId);
			oLink = document.getElementById(sLinkId);
			if (oBox.style.display == "block"){
				oBox.style.display = "none";
				oLink.className = "off";
			}
			else {
				oBox.style.display = "block";
				oLink.className = "on";
				//oLink.style.display = "none";
			}
		}
	}