

	function popSendFriend(product_id)
	{
		window.open('send-friend.php?product_id=' + product_id,'email_friend','status=yes,resizable=yes,scrollbars=yes,width=490,height=575');
	}


	function validateQuotePlus(form)
	{
		var err;

		if (isBlank(form.name.value) || form.name.value == 'Name')
		{
			err = true;
		}
		if (isBlank(form.company.value) || form.company.value == 'Company')
		{
			err = true;
		}
		if (isBlank(form.telephone.value) || form.telephone.value == 'Telephone number')
		{
			err = true;
		}
		if (isBlank(form.email.value) || form.email.value == 'Email')
		{
			err = true;
		}
		
		if (err == true)
		{
			alert('Please complete all fields first');
			return false;
		}
		else {			
			return true;
		}
	}


	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');
		return false;
	}


	function validateSearch(form)
	{
		if (isBlank(form.search.value)) 
		{
			alert('Please enter some keywords 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


	function confirmRemove(url)
	{
		if (confirm('Are you sure you want to remove this item?'))
		{
			window.location = url;  	
		}
	}