function validate_shop_user()
{
	$('#validationerror').css({display: 'none'});
	$('form').resetValidationErrorStyle() 
	
	var error = false;
	if($('#firstname').val() == "")
	{
		$("#firstname").addClass("validation_textbox");
			error = true;
	}
	if($('#lastname').val() == "")
	{
		$("#lastname").addClass("validation_textbox");
			error = true;
	}
	if($('#email').val() == "")
	{
		$("#email").addClass("validation_textbox");
			error = true;
	}
	if($('#address').val() == "")
	{
		$("#address").addClass("validation_textbox");
			error = true;
	}
	if($('#address2').val() == "")
	{
		$("#address2").addClass("validation_textbox");
			error = true;
	}
	if($('#city').val() == "")
	{
		$("#city").addClass("validation_textbox");
			error = true;
	}
	if($('#postcode').val() == "")
	{
		$("#postcode").addClass("validation_textbox");
			error = true;
	}
	if($('#mobile').val() == "")
	{
		$("#mobile").addClass("validation_textbox");
			error = true;
	}
	
	if(error)
	{
		$('#validationerror').css({display: 'block'});
		return false;
	}
	else
	{
		return true;
	}
}

function determine_postage()
{
	var value = $("#country").val();
		if(value == "GB")
		{
			$("#pandp").val("UK");
		}
		else if(value == "AT" || value == "BE" || value == "DK" || value == "EE" || value == "FR" || value == "DE" || value == "HU" || value == "IS" || value == "IE" || value == "NL" || value == "PL" || value == "ES" || value == "SE" || value == "IT" || value == "CH" || value == "FI" || value == "PT" || value == "HR" || value == "CZ" || value == "NO")
		{
			$("#pandp").val("EU");
		}
		else
		{
			$("#pandp").val("ROW");
		}
		//load in the postage price into the checkout
		$.post('shop_basket_functions.php',
			{
			  action: 'update_postage', pandp: $("#pandp").val()
			}, function(txt)
			{
		  	$('#checkout_pandp').html(txt);
			}
		);
		//load in the new total price into the checkout
		$.post('shop_basket_functions.php',
			{
			  action: 'update_total_price', pandp: $("#pandp").val()
			}, function(txt)
			{
		  	$('#checkout_total').html(txt);
			}
		);
}