function swap(image, over) {
	if (over) {
		document.images[image].src = document.images[image].src.replace(/_off/gi, '_over');
	} else {
		document.images[image].src = document.images[image].src.replace(/_over/gi, '_off');
	}
}

function changeClass(item, newclass) {
	var cell = document.getElementById(item);
	cell.className = newclass;
}

function preload() {
	args = preload.arguments;
	var preloaded = new Array();
	for (i=0;i<args.length;i++) {
		preloaded[i] = new Image();
		preloaded[i].src = args[i];
	}
}

function openWindow(location,width,height,attributes) {
	if ((typeof wNew != "object")||(wNew.closed)) {
		var sAttrib = "width="+parseInt(width)+",height="+parseInt(height);
		if (typeof attributes!="undefined") {
			sAttrib += ","+attributes;
		}
		wNew = window.open(location,"wNew",sAttrib);
	}
	wNew.location = location;
	wNew.focus();
}

function payPalVal() {
	var qty = parseInt(document.buy_form.quantity_1.value);
	if (isNaN(qty) || qty < 1 || qty > 5) {
		alert ("Please contact us to inquire about delivery outside the continental United States and for discounts on quantities greater than five.");
		return false;
	}
}
