function checkAgree(akkoord){
	if(akkoord.checked == 1){
		//alert(akkoord.checked)
		document.getElementById('bevestigknop').disabled = false
	}else{
		document.getElementById('bevestigknop').disabled = true
	}
}
function ismaxlength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)
}

function checkland(land){
	
	if(land != "Nederland"){
		document.getElementById('gebruiker_telefoon').maxLength = 15;
		document.getElementById('gebruiker_postcode').maxLength = 8;
	}else{
		document.getElementById('gebruiker_telefoon').maxLength = 12;
		document.getElementById('gebruiker_postcode').maxLength = 5;
	}
}

function checkNumber(textBox)
{
	while (textBox.value.length > 0 && (isNaN(textBox.value) || textBox.value < 0.1)) {
		textBox.value = textBox.value.substring(0, textBox.value.length - 1)
	}
	
	textBox.value = textBox.value;
}

function checkUrl(textBox)
{
	  str = textBox.value;
	  
	  strnieuw = str.replace("http://www.","");
	  strnieuw = str.replace("http://www","");
	  strnieuw = str.replace("http://","");
	  strnieuw = strnieuw.replace("http","");
	  strnieuw = strnieuw.replace("www.","")
	  strnieuw = strnieuw.replace("www","");
	  strnieuw = strnieuw.replace(".nl","");
	  strnieuw = strnieuw.replace(".be","");
	  strnieuw = strnieuw.replace(".de","");
	  strnieuw = strnieuw.replace(".com","");
	  strnieuw = strnieuw.replace(".co.uk","");
	  strnieuw = strnieuw.replace(".org","");
	  
	  textBox.value = strnieuw;

}

function anderscheck(option){
	
	if(option.value == "Anders"){
		
		document.getElementById('andersgarantie').style.display='';
		
	}else{
		
		document.getElementById('andersgarantie').style.display='none';
	}
		
}

function leverwijzecheck(option){
	
	if(option.value == "Anders"){
		
		document.getElementById('andersleverwijze').style.display='';
		
	}else{
		
		document.getElementById('andersleverwijze').style.display='none';
	}
		
}

function checkwizard(value){
	
	if(value == 40 || value == 41){
		
		window.location='/plaats-advertentie/?wizard='+value;
		
	}
}
