// nav button rollovers
function SwapOn(imgName) {
	document.images[imgName].src="images/" + imgName+ "_gk_on.gif";
}
function SwapOff(imgName) {
	document.images[imgName].src="images/" + imgName + "_gk.gif";
}
// place footer at bottom of page
function footerPos() {
	var footH = 150;
	var bodyDiv = divID('body');
	var footDiv = divID('footer');
	var t = bodyDiv.offsetHeight + (footH * 2);
	var h = document.documentElement.clientHeight || window.innerHeight;
	h = (h - t) + footH;
	if (h < footH) {
		h = footH;
	}
	footDiv.style.top = t + 'px';
	footDiv.style.height = h + 'px';
}
// put all screenprinting divs in the same spot
function screenPos() {
	var x;
	var y;
	var div0 = divID('screen0');
	var div1 = divID('screen1');
	var div2 = divID('screen2');
	x = div0.offsetLeft;
	y = div0.offsetTop;
	div1.style.left = div2.style.left = x + 'px';
	div1.style.top = div2.style.top = y + 'px';
	var query = window.location.search.substring(1).split('=');
	if (query[1] == 'color') {
		screenDiv(1);
	} else if (query[1] == 'brands') {
		screenDiv(2);
	}
}
// page through screenprinting divs
function screenDiv(id) {
	var pgTot = 3;
	for (i=0; i<pgTot; i++) {
		var div = divID('screen'+i);
		if (i == id) {
			div.style.visibility = 'visible';
		} else {
			div.style.visibility = 'hidden';
		}
	}
}
// make sure all step boxes are the same height
var divH;
function stepHeight(num, dif) {
	var h = 0;
	for (i=1; i<=num; i++) {
		var div = divID('s'+i);
		var sh = div.offsetHeight;
		if (sh>h) {
			h=sh;
		}
	}
	divH = h-dif;
	for (i=1; i<=num; i++) {
		var div = divID('s'+i);
		div.style.height = h+'px';
		var div2 = divID('ss'+i);
		div2.style.height = divH+'px';
	}
}
// fix odd steps
function stepFix(num, dif) {
	var div = divID('ss'+num);
	var sh = div.offsetHeight;
	var divFix = sh+dif;
	if (sh>divH) {
		divFix -= sh-divH;
	}
	div.style.height = divFix+'px';
}
// return size of div
function divID(id) {
	var div;
	if (document.getElementById) {
		div = document.getElementById(id);
	} else if (document.all) {
		div = document.all[id];
	} else if (document.layers) {
		div = document.layers[id];
	}
	return div;
}