function checkcoupon(silent) {
	var xmlhttp = new XMLHttpRequest();
	if (xmlhttp) {
		xmlhttp.open('GET', 'cart.coupon.htm?coupon='+ document.getElementById('coupon').value + '&silent=' + silent + '&subtotal=' + document.getElementById('subtotal').value);
		xmlhttp.onreadystatechange = function() {
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				eval(xmlhttp.responseText);
			}
		};
		xmlhttp.send(null);
	}
}
function checktax(silent) {
	var xmlhttp = new XMLHttpRequest();
	if (xmlhttp) {
		// calculating tax based on subtotal + ahipping and handling
		xmlhttp.open('GET',
			'cart.tax.htm?subtotal=' + document.getElementById('subtotal').value + 
			'&shippingmethod=' + document.getElementById('shippingmethod').options[document.getElementById('shippingmethod').selectedIndex].value +
			'&zip=' + document.getElementById('taxzip').value
		);
		xmlhttp.onreadystatechange = function() {
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				eval(xmlhttp.responseText);
				if (!silent){
					if (tax_alert == 'false') {
					} else {
						alert(tax_alert);
					}
				}
			}
		};
		xmlhttp.send(null);
	}
}
function checkshipping(silent) {
	var xmlhttp = new XMLHttpRequest();
	if (xmlhttp) {
		xmlhttp.open('GET', 'cart.shipping.htm?subtotal=' + document.getElementById('subtotal').value + '&method=' + document.getElementById('shippingmethod').options[document.getElementById('shippingmethod').selectedIndex].value);
		xmlhttp.onreadystatechange = function() {
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				eval(xmlhttp.responseText);
			}
		};
		xmlhttp.send(null);
	}
}

function doCheckout() {
	var xmlhttp = new XMLHttpRequest();
	if (xmlhttp) {
		xmlhttp.open('GET', 'cart.order2session.htm?key=' + document.getElementById('securitykey').value + '&note=' + document.getElementById('notes').value);
		xmlhttp.onreadystatechange = function() {
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				eval(xmlhttp.responseText);
			}
		};
		xmlhttp.send(null);
	}
}

function not_ie(){
	if (!document.all) alert('HTML area for this page only works in Internet Explorer!');
}