
	function stockWarning()
	{
		var msg = "There is insufficient stock to meet your order in full.\nThe balance will be placed on backorder.";
		alert (msg);
	}


	function confirmB2BOrder(form)
	{
		var strMsg = 'Are you sure you want to place this order?\nBy clicking OK you are agreeing to our terms and conditions';

		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 popBadge(type)
	{
		window.open('badgedetail.php?type=' + type, 'badge', 'status=no, resizable=yes, scrollbars=yes, width=425, height=200');
	}


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


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


	function validateContactForm(form)
	{

		if (isBlank(form.firstname.value))
		{
			alert ('Please complete firstname');
			return false;
		}

		if (isBlank(form.surname.value))
		{
			alert ('Please complete surname');
			return false;
		}

		if (isBlank(form.address1.value))
		{
			alert ('Please complete address line 1');
			return false;
		}

		if (isBlank(form.postcode.value))
		{
			alert ('Please complete postcode');
			return false;
		}

		if (isBlank(form.telephone.value))
		{
			alert ('Please complete telephone number');
			return false;
		}

		if (isBlank(form.subject.value))
		{
			alert ('Please complete subject');
			return false;
		}

		if (isBlank(form.enquiry.value))
		{
			alert ('Please complete enquiry');
			return false;
		}

	} // ef