function popupImage(src, _width, _height)
{
	var winl = (screen.width-_width)/2;
	var wint = (screen.height-_height)/2;
	window.open(src, 'popupWindow', 'left='+winl+', top='+wint+',toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width='+_width+',height='+_height);
	return false;
}

<!-- Begin
function getCookie(name){
	var cname = name + "=";               
	var dc = document.cookie;             
	if (dc.length > 0) {              
		begin = dc.indexOf(cname);       
		if (begin != -1) {           
			begin += cname.length;       
			end = dc.indexOf(";", begin);
			if (end == -1) end = dc.length;
				return unescape(dc.substring(begin, end));
		} 
	}
	return null;
}

function setCookie(name, value) {
	var now = new Date();
	var then = new Date(now.getTime() + 31536000000);
	document.cookie = name + "=" + escape(value) + "; expires=" + then.toGMTString() + "; path=/";
}

function getInfo(form) {
	form.info.value = "Browser Information: " + navigator.userAgent;
}

function getValue(element) {
	var value = getCookie(element.name);
	if (value != null) element.value = value;
}

function setValue(element) {
	setCookie(element.name, element.value);
}

function fixElement(element, message) {
	alert(message);
}

function isMailReady(form) {
	var passed = false;
	if (form.on0.value == "") {
		fixElement(form.on0, "Please make a selection from the drop down menu");
	}else if (form.on1.value == "") {
		fixElement(form.on1, "Please make a selection from the drop down menu");
	}else if (form.os0.value == "") {
		fixElement(form.os0, "Please make a selection from the drop down menu");
	}else if (form.quantity.value == "") {
		fixElement(form.quantity, "Please make sure that the quantity equals more than 0");
	}else {
		getInfo(form);
		passed = true;
	}
	return passed;
}

function checkForm(frm, message)
{
	if(frm.quantity.value > 0)
		return true;
	else
		alert(message)
	return false;
}

function changePrice(idx)
{
	var x = document.getElementById("amountDiv"+idx)
	var price_arr = eval("prices"+idx);
    x.innerHTML = price_arr[document["payment"+idx].on0.selectedIndex];
	document["payment"+idx].amount.value = price_arr[document["payment"+idx].on0.selectedIndex];
}
