function confirmDelete(){
	return confirm('Weet u het zeker?','Ja','Nee')
}

function SubmitAanvraag(theForm){
	var c_Kopen_Huren = false;
	for (var i=0; i < document.mailForm.Kopen_Huren.length; i++){
		if (document.mailForm.Kopen_Huren[i].checked){
			c_Kopen_Huren = true;
		}
	}
	var c_Type = false;
	for (var i=0; i < document.mailForm.Type.length; i++){
		if (document.mailForm.Type[i].checked){
			c_Type = true;
		}
	}
	var filter  = /^[\w\.-]+@[\w\.-]+\.[a-zA-Z]{2,4}$/;
	if(document.mailForm.Naam.value == "" || document.mailForm.Telefoon.value == "" || !filter.test(document.mailForm.Email.value) || c_Kopen_Huren == false  || document.mailForm.Provincie.value == "-1" || document.mailForm.Gemeente.value == "-1"|| c_Type == false){
		alert("Velden met een * zijn verplicht! Een zo volledig mogelijk ingevuld scherm leid tot een beter resultaat!");
		return false;
	}
	return true;
}

function changePicture(pictureName,picturePlaceName){
	if (document.all){
		document.getElementById(picturePlaceName).style.filter="blendTrans(duration=1)";
		document.getElementById(picturePlaceName).filters.blendTrans.Apply();
	}

	document.getElementById(picturePlaceName).src = pictureName;

	if (document.all){
		document.getElementById(picturePlaceName).filters.blendTrans.Play();
	}
}

function getLoan(price){
	var winl = ((screen.width) / 2) - 345;
	var wint = ((screen.height) / 2) - 250;

	windowName = "loanWindow";
	windowURL = "http://www.dhsfinance.be/getBeHypo.asp?reseller=immonline&price=" + price

	myWindow = window.open(windowURL, windowName,'toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=no, width=690, height=500,top='+wint+',left='+winl+'');
	myWindow.focus();
}

function XgetInfo(estateId){
	var winl = ((screen.width) / 2) - 345;
	var wint = ((screen.height) / 2) - 250;

	windowName = "infoWindow";
	windowURL = "getInfo.aspx?id=" + estateId

	myWindow = window.open(windowURL, windowName,'toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=no, width=690, height=500,top='+wint+',left='+winl+'');
	myWindow.focus();
}

function getInfo(url){
	var winl = ((screen.width) / 2) - 345;
	var wint = ((screen.height) / 2) - 250;

	windowName = "infoWindow";
	windowURL = url

	myWindow = window.open(windowURL, windowName,'toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=no, width=690, height=500,top='+wint+',left='+winl+'');
	myWindow.focus();
}