// JavaScript Document

function btn_swap(theBtn, theAction) {
	thePath = location.href;
	theExt = document.images[theBtn].src;
	theExt = theExt.substring(theExt.lastIndexOf("."), theExt.length);
	if(thePath.indexOf("cgi-bin") > -1) {
		thePath = "../images/";	
	} else {
		thePath = "images/";
	}
		
	if(theAction == "over") {
		 document.images[theBtn].src = thePath + theBtn + "_on" + theExt;	
	}
	if(theAction == "out") {
		 document.images[theBtn].src = thePath + theBtn + "_off" + theExt;	
	}
}

function getLiveSize() {
	if(window.innerWidth != null) {
		theWidth = window.innerWidth;
	}
	if(document.body.clientWidth != null) {
		theWidth = document.body.clientWidth;
	}
	return theWidth;
}

function resize() {
	winSize = getLiveSize();
	if(winSize < 968) {
		leftM = (winSize / 2) * -1 + "px";
		document.getElementById("content").style.marginLeft = leftM;
	} else {
		document.getElementById("content").style.marginLeft = "-484px";
	}
	
}
window.onresize = resize;
