function ShowWindow(path, windowOptions) {
	window.open(path, '', windowOptions);
	return false;
}

function AddToCart(path,prodid,ref,action) {
	var newPath = (path + '/upc=' + prodid + '/ref=' + ref + '/');
	if(action != "undefined" && action != null && action.length > 0) {
		newPath += ("action=" + action);
	}
	if(prodid == "undefined" || prodid == null || prodid == 0) {
		alert("Choose an option for this product.");
		return false;
	}
	document.location = newPath;
}

function openWhatIsThis(path) {
	/*
	var ns = false;
	var screenX;
	var screenY;
	if(navigator.appName == "Microsoft Internet Explorer") {
		screenX = window.screen.availWidth;
		screenY = document.body.offsetHeight;
	} else {
		screenX = window.screenY;
		screenY = window.screenX;
	}
	if(ns) {
		position = (",screenX=" + (document.screenX + 100) + ",screenY=" + (document.screenY + 100));
	} else {
		position = (",left=" + (document.left + 100) + ",top=" + (document.top + 100));
	}
	*/
	window.open(path,'','height=200,width=300,scrollbars=1');
	return false;
}

function openSmallWindow(path) {
	window.open(path,'','height=200,width=300,scrollbars=1');
	return false;
}

function openWindow(path, width, height) {
	window.open(path,'','height='+height+',width='+width+',scrollbars=1');
	return false;
}

function expandCollapse() {
	for (var i=0; i<expandCollapse.arguments.length; i++) {
		var element = document.getElementById(expandCollapse.arguments[i]);
		element.style.display = (element.style.display == "none") ? "block" : "none";
	}
}
