function go(goLink)
{
	location.href = goLink;
}

function setStatus(ssText)
{
	//alert(window.status);
	window.status = ssText;
	return true;
}

function checkBTW()
{
	if(document.OrderForm.KlantenLand.options[document.OrderForm.KlantenLand.selectedIndex].getAttribute("vat") == "true")
	{
		document.getElementById("vattekst").innerHTML = "VAT will be charged";
		if (document.getElementById("EurDiv") && document.getElementById("CurDiv"))
		{
			document.getElementById("EurDiv").style.display = "block";
			document.getElementById("CurDiv").style.display = "block";
		}
		//alert("VAT will be charged");
	}
	else
	{
		document.getElementById("vattekst").innerHTML = "VAT will <u><b>NOT</b></u> be charged";
		if (document.getElementById("EurDiv") && document.getElementById("CurDiv"))
		{
			document.getElementById("EurDiv").style.display = "none";
			document.getElementById("CurDiv").style.display = "none";
		}
		//alert("VAT will not be charged");
	}

}

function checkMailingForm()
{
	ErrorValue = "";
	
	document.getElementById("rowError").style.display = "none";
	
	document.getElementById("rowName").className = "infoveld";
	document.getElementById("rowEmail").className = "infoveld";
	
	if(document.mailingForm.naam.value == "")
	{
		document.getElementById("rowName").className = "infoveld_high";
		ErrorValue += "- Please fill in your name\n";
	}

	if(document.mailingForm.email.value == "" || document.mailingForm.email.value.indexOf("@") == -1)
	{
		document.getElementById("rowEmail").className = "infoveld_high";
		ErrorValue += "- Please fill in your e-mail address\n";
	}
	

	if(ErrorValue == "")
	{
		document.mailingForm.submit();
	}
	else
	{
		document.getElementById("rowError").style.display = "block";
	}
}

function checkSearchForm()
{
	if(document.searchForm.q.value != "")
	{
		document.searchForm.submit();
	}
}


function checkContactForm()
{
	ErrorValue = "";
	
	document.getElementById("rowError").style.display = "none";
	
	document.getElementById("rowName").className = "infoveld";
	document.getElementById("rowEmail").className = "infoveld";
	document.getElementById("rowTelephone").className = "infoveld";	
	
	if(document.contactForm.naam.value == "")
	{
		document.getElementById("rowName").className = "infoveld_high";
		ErrorValue += "- Please fill in your Name\n";
	}

	if(document.contactForm.email.value == "" || document.contactForm.email.value.indexOf("@") == -1)
	{
		document.getElementById("rowEmail").className = "infoveld_high";
		ErrorValue += "- Please fill in your e-mail address\n";
	}
	
	if(document.contactForm.phone_number.value == "")
	{
		document.getElementById("rowTelephone").className = "infoveld_high";
		ErrorValue += "- Please fill in your phone number\n";
	}

	if(ErrorValue == "")
	{
		document.contactForm.submit();
	}
	else
	{
		document.getElementById("rowError").style.display = "block";
	}
}



function checkInfoForm()
{
	ErrorValue = "";
	
	document.getElementById("rowError").style.display = "none";
	
	document.getElementById("rowName").className = "infoveld";
	document.getElementById("rowEmail").className = "infoveld";
	document.getElementById("rowTelephone").className = "infoveld";	
	
	if(document.informationForm.naam.value == "")
	{
		document.getElementById("rowName").className = "infoveld_high";
		ErrorValue += "- Please fill in your name\n";
	}

	if(document.informationForm.email.value == "" || document.informationForm.email.value.indexOf("@") == -1)
	{
		document.getElementById("rowEmail").className = "infoveld_high";
		ErrorValue += "- Please fill in your e-mail address\n";
	}
	
	if(document.informationForm.phone_number.value == "")
	{
		document.getElementById("rowTelephone").className = "infoveld_high";
		ErrorValue += "- Please fill in your phone number\n";
	}

	if(ErrorValue == "")
	{
		document.informationForm.submit();
	}
	else
	{
		document.getElementById("rowError").style.display = "block";
	}
}


function checkBestelForm()
{

	ErrorValue = "";
	
	document.OrderForm.vatveld.value = document.OrderForm.KlantenLand.options[document.OrderForm.KlantenLand.selectedIndex].getAttribute("vat");


	document.getElementById("rowError").style.display = "none";
	
	document.getElementById("rowNaam").className = "";
	document.getElementById("rowAchternaam").className = "";
	document.getElementById("rowEmail").className = "";
	document.getElementById("rowStraat").className = "";
	document.getElementById("rowHuisnr").className = "";
	document.getElementById("rowPostcode").className = "";
	document.getElementById("rowPlaats").className = "";
	document.getElementById("rowTelefoon").className = "";
	document.getElementById("rowLand").className = "";
	document.getElementById("rowMethod").className = "";


	if(document.OrderForm.KlantenNaam.value == "")
	{
		ErrorValue += "- Please fill in your name\n";
		document.getElementById("rowNaam").className = "veldhigh";
	}

	if(document.OrderForm.KlantenAchternaam.value == "")
	{
		ErrorValue += "- Please fill in your surname\n";
		document.getElementById("rowAchternaam").className = "veldhigh";
	}

	if(document.OrderForm.KlantenStraat.value == "")
	{
		ErrorValue += "- Please fill in your street\n";
		document.getElementById("rowStraat").className = "veldhigh";
	}
	
	if(document.OrderForm.KlantenHuisnummer.value == "")
	{
		ErrorValue += "- Please fill in your housenumber\n";
		document.getElementById("rowHuisnr").className = "veldhigh";
	}

	if(document.OrderForm.KlantenPostcode.value == "")
	{
		ErrorValue += "- Please fill in your zip code\n";
		document.getElementById("rowPostcode").className = "veldhigh";
	}
	
	if(document.OrderForm.KlantenPlaats.value == "")
	{
		ErrorValue += "- Please fill in your city\n";
		document.getElementById("rowPlaats").className = "veldhigh";
	}

	if(document.OrderForm.KlantenTelefoon.value == "")
	{
		ErrorValue += "- Please fill in your phone number\n";
		document.getElementById("rowTelefoon").className = "veldhigh";
	}

	if(document.OrderForm.KlantenEmail.value == "" || document.OrderForm.KlantenEmail.value.indexOf("@") == -1)
	{
		ErrorValue += "- Please fill in your e-mail address\n";
		document.getElementById("rowEmail").className = "veldhigh";
	}
	
	if(document.OrderForm.KlantenLand.options[document.OrderForm.KlantenLand.selectedIndex].value == "")
	{
		ErrorValue += "- Please choose a country\n";
		document.getElementById("rowLand").className = "veldhigh";
	}

	if(getCheckedValue(document.OrderForm.KlantenPayMentMethod) == "")
	{
		ErrorValue += "- Please choose a payment method\n";
		document.getElementById("rowMethod").className = "veldhigh";
	}	
	

	if(ErrorValue == "")
	{
		document.OrderForm.submit();
	}
	else
	{
		document.getElementById("rowError").style.display = "block";
		//alert(ErrorValue)
	}
}





function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}

function setCheckedValue(radioObj, newValue) {
	if(!radioObj)
		return;
	var radioLength = radioObj.length;
	if(radioLength == undefined) {
		radioObj.checked = (radioObj.value == newValue.toString());
		return;
	}
	for(var i = 0; i < radioLength; i++) {
		radioObj[i].checked = false;
		if(radioObj[i].value == newValue.toString()) {
			radioObj[i].checked = true;
		}
	}
}





function checkOnRequestForm()
{


	ErrorValue = "";
	
	document.getElementById("rowError").style.display = "none";
	
	document.getElementById("rowName").className = "infoveld";
	document.getElementById("rowAddress").className = "infoveld";
	document.getElementById("rowZipcode").className = "infoveld";
	document.getElementById("rowCity").className = "infoveld";
	document.getElementById("rowCountry").style.backgroundColor = "#FFFFFF";
	document.getElementById("rowEmail").className = "infoveld";
	document.getElementById("rowTelephone").className = "infoveld";	



if(document.getElementById("rowOffer"))
	document.getElementById("rowOffer").className = "infoveld";	
	
	if(document.contactForm.naam.value == "")
	{
		document.getElementById("rowName").className = "infoveld_high";
		ErrorValue += "- Please fill in your Name\n";
	}

	if(document.contactForm.adres.value == "")
	{
		document.getElementById("rowAddress").className = "infoveld_high";
		ErrorValue += "- Please fill in your address\n";
	}

	if(document.contactForm.postcode.value == "")
	{
		document.getElementById("rowZipcode").className = "infoveld_high";
		ErrorValue += "- Please fill in your zip code\n";
	}

	if(document.contactForm.city.value == "")
	{
		document.getElementById("rowCity").className = "infoveld_high";
		ErrorValue += "- Please fill in your city\n";
	}

	if(document.contactForm.country.selectedIndex < 1)
	{
		document.getElementById("rowCountry").style.backgroundColor = "#FFD6D6";
		ErrorValue += "- Please fill in your country\n";
	}

	if(document.contactForm.email.value == "" || document.contactForm.email.value.indexOf("@") == -1)
	{
		document.getElementById("rowEmail").className = "infoveld_high";
		ErrorValue += "- Please fill in your e-mail address\n";
	}
	
	if(document.contactForm.phone_number.value == "")
	{
		document.getElementById("rowTelephone").className = "infoveld_high";
		ErrorValue += "- Please fill in your phone number\n";
	}

if(document.contactForm.offer)
{
	if(document.contactForm.offer.value == "")
	{
		document.getElementById("rowOffer").className = "infoveld_high";
		ErrorValue += "- There is no offer\n";
	}
}

	//if(document.contactForm.article.value == "")
	//{
	//	document.getElementById("rowOffer").className = "infoveld_high";
	//	ErrorValue += "- There is no article\n";
	//}




	if(ErrorValue == "")
	{
		document.contactForm.submit();
	}
	else
	{
		document.getElementById("rowError").style.display = "block";
	}

}
