function over(Name) {
	document.images[Name].src = "http://www.nwbackpack.com/images/nav_" + Name + "_over.jpg";
}

function out(Name) {
	document.images[Name].src = "http://www.nwbackpack.com/images/nav_" + Name + "_reg.jpg";
}

if (!document.getElementById)
    document.getElementById = function() { return null; }

function initializeMenu(menuId, actuatorId, state) {
    var menu = document.getElementById(menuId);
    var actuator = document.getElementById(actuatorId);

    if (menu == null || actuator == null) return;

	menu.style.display = state;

    actuator.onclick = function() {
        var display = menu.style.display;
        menu.style.display = (display == "block") ? "none" : "block";

        return false;
    }
}

function asyncRequest(url) {
//alert(url);
	var req; //the request object

	if (!document.all) {
		req = new XMLHttpRequest();
	}
	else {
		try {
			req = new ActiveXObject("Msxml2.XMLHTTP.3.0");
		} catch(e) {
			try {
				req = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try {
					req = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e) {
					req = false;
				}
			}
		}
	}
//alert(req.name);
	if (req) {
//		req.onreadystatechange = processRequestChange; //set the state change request function
		req.open("GET", url, false);
		req.send(null);
//alert(req.responseText);
		return req.responseText;
	}

}

function processRequestChange() 
{
	// only if req shows "complete"
	if (req.readyState == 4) {
	// only if "OK"
		if (req.status == 200) {
	// go ahead and deal with the response
		} else {
			alert("There was a problem retrieving the data:\n" + req.statusText);
		}
	}
}

function open_support(deptid)
{
	var unique = '';
	var chat_width = 450;
	var chat_height = 360;
	var url = "http://www.nwbackpack.com/livehelp/request.php?l=nwbackpa&x=1&deptid="+deptid+"&page="+escape(location.toString());
	window.open(url, unique, 'scrollbars=no,menubar=no,resizable=0,location=no,screenX=50,screenY=100,width='+chat_width+',height='+chat_height+'' ).focus();
}
