


	function confirmDespatch(form)
	{
		if (confirm('Are you sure you want to commit this despatch?'))
		{
			return true;
		}
		else {
			return false;
		}
	}


	function confirmPaymentOption(form)
	{
		var v;
		for (var i = 0; i < form.paymentoption.length; i++)
		{
			if (form.paymentoption[i].checked)
			{
				v = form.paymentoption[i].value;
			}
		}

		if (v == 'account' || v == 'bank')
		{
			if (confirm('You are now ready to complete your checkout.  Please click on "OK" to confirm your order or "Cancel" if you wish to go back to the previous page.'))
			{
				return true;
			}
			else {
				return false;
			}
		}
	}


	function confirmRemove(url)
	{
		if (confirm('Are you sure you want to remove this item?'))
		{
			window.location = url;  	
		}
	}
	

	function confirmEmpty()
	{
		return confirm('Are you sure you want to empty your shopping basket?');
	}


	function popPage(URL)
	{
		window.open(URL, 'page', 'status=no, resizable=yes, scrollbars=yes, width=425, height=475');
	}


	function popNotification(product_id, customer_id)
	{
		var URL = 'notification.php?product_id=' + product_id + '&customer_id=' + customer_id;
		window.open(URL, 'notification', 'status=no, resizable=yes, scrollbars=yes, width=525, height=325');
	}


	function popRMA(id, hideshippingaddress)
	{
		window.open('rma-print.php?id=' + id + '&hideshippingaddress=' + hideshippingaddress, 'rma', 'status=yes, resizable=yes, scrollbars=yes, width=550, height=500');
	}


	function validateSearch(form)
	{
		if (form.search.value == '') 
		{
			alert ('Please enter some search keywords first');
			return false;
		}
		else {			
			return true;
		}
	}


	function printThis()
	{
		if (window.print) 
		{
			window.print();
		}
	}

