

	function popTip(product_id)
	{
		window.open('tip.php?product_id=' + product_id, 'tip', 'status=no, resizable=yes, scrollbars=yes, width=300, height=300');
	}


	function billingToDeliveryAddress(form)
	{
		form.dname.value = form.name.value;
		form.daddress1.value = form.address1.value;
		form.daddress2.value = form.address2.value;
		form.dtown.value = form.town.value;
		form.dpostcode.value = form.postcode.value;

		return false;
	}


	function setAction(action)
	{
		var el = document.getElementById('action');
		el.value = action;
	}


	 function doSel(obj)
	{
		for (var i = 1; i < obj.length; i++)
		{
			if (obj[i].selected == true)
			{
				eval(obj[i].value);
			}
		}
	}


	function confirmCommitOrder()
	{
		var strMsg = 'Are you sure you want to place this account order?';

		if (confirm(strMsg))
		{
			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 validateSearch(form)
	{
		if (isBlank(form.search.value)) 
		{
			alert('Please enter some search words first');
			return false;
		}
		else {			
			return true;
		}
	}


	function validateSearchStockCode(form)
	{
		if (isBlank(form.stock_code.value)) 
		{
			alert('Please enter a valid stock code e.g. EFPS 00 00 00 000');
			return false;
		}
		else {			
			return true;
		}
	}	


	function printThis()
	{
		if (window.print) 
		{
			window.print();
		}
		void (null);
	}

