function showImage(imgUrl, width, height) {
		// var width	= 800;
		// var height = 500;
		var left	 = (screen.width	- width)/2;
		var top		= (screen.height - height - 90)/2;
		var params = 'width='+width+', height='+height;
		params += ', top='+top+', left='+left;
		params += ', directories=no';
		params += ', location=no';
		params += ', menubar=no';
		params += ', resizable=yes';
		params += ', scrollbars=no';
		params += ', status=no';
		params += ', toolbar=no';
		window.open( "showimage.php?" + imgUrl, "Image", params);
}

function email()
{
	var string1 = "info";
	var string2 = "hoevesc";
	var string3 = "hoonzicht.";
	var string4 = "nl";
	var string5 = string1 + "@" + string2 + string3 + string4;
	document.write("<a href=" + "mai" + "lto:" + string5 + ">" + string5 + "</a>");
}

function openpopup(popurl, w, h, sizable)
{
	str = 'width='+(w+20)+',height='+(h+30);
	if ( sizable != true ) {
		str = str + ',scrollbars=no,resizable=no,status=no';
	} else {
		str = str + ',scrollbars=yes,resizable=yes,status=yes';
	}
	window.open(popurl,'',str);
}

// validates that the field value string has one or more characters in it
function isNotEmpty(elem) {
	var str = elem.value;
	var re = /.+/;
	if(!str.match(re)) {
		alert("Vul aub de benodigde velden in.");
		return false;
	} else {
		return true;
	}
}
	 
//validates that the entry is a positive or negative number
function isNumber(elem) {
	var str = elem.value;
	var re = /^[-]?\d*\.?\d*$/;
	str = str.toString( );
	if (!str.match(re)) {
		alert("Alleen getallen invoeren svp.");
		return false;
	}
	return true;
}
	 
// validates that the entry is 16 characters long when
// input field's maxlength attribute is set to 16
function isLen16(elem) {
	var str = elem.value;
	var re = /\b.{16}\b/;
	if (!str.match(re)) {
		alert("De invoer heeft niet de benodigde 16 karakters.");
		return false;
	} else {
			return true;
	}
}
	 
// validates that the entry is formatted as an email address
function isEMailAddr(elem) {
	var str = elem.value;
	var re = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;
	if (!str.match(re)) {
		alert("Geen geldig e-mailadres.");
		return false;
	} else {
		return true;
	}
}

function validateForm(form) 
{
	if(isNotEmpty(form.nameTextBox))
		if(isNotEmpty(form.achternaamTextBox))
			if(isNotEmpty(form.emailTextBox))
				return true;
	return false;			
}

