 function openImageWindow(imageSrc,imageTitle) { 
	var w = 5, h = 5; 
	if (document.all) { 	
		w = document.body.clientWidth; 
		h = document.body.clientHeight; 
	} 
	else if (document.layers) { 
		w = window.innerWidth; 
		h = window.innerHeight; 
     	} 
	
	var popW = 5, popH = 5; 
	var leftPos = (w-popW)/2, topPos = (h-popH)/2; 

	fileName = 'view.asp?imagesrc=' + escape(imageSrc) + '&' + escape(imageTitle);
	myWindowHandle = window.open(fileName,'windowName','directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no,copyhistory=no,top=' + topPos + ',left=' + leftPos);
 }
 
 function setWidth(obj,maxwidth) { 
	if (maxwidth>0) {
			var nWidth=parseInt(obj.width); 
			if (nWidth > maxwidth) {return maxwidth;}
	} 
	return false; 
 } 

 function PopUp (wwwurl){
	window.open(wwwurl, "fietsland", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, height=500, width=500, screenX=100, screenY=100, top=100, left=100,")
 } 
 function verify() {
	var themessage = "Je bent verplicht de volgende velden in te vullen: ";
	if (document.fietsland.Titel.value=="") {
		themessage = themessage + "\n - Titel";
	}
	if (document.fietsland.Naam.value=="") {
		themessage = themessage + "\n - Naam";
	}
	if (document.fietsland.Email.value=="") {
		themessage = themessage + "\n - Email";
	}
	if (document.fietsland.Bericht.value=="") {
		themessage = themessage + "\n - Bericht";
	}
	//alert if fields are empty and cancel form submit
	if (themessage == "Je bent verplicht de volgende velden in te vullen: ") {
		document.fietsland.submit();
	}else {
		alert(themessage);
		return false;
  	}
 }

 function setMessageFocus() {
	if (typeof document.fietsland != 'undefined' && typeof document.fietsland.Bericht != 'undefined') {
		document.fietsland.Bericht.focus();
	}
 }

 function insertSmiley(s) {
	if (typeof document.fietsland != 'undefined' && typeof document.fietsland.Bericht != 'undefined') {
		document.fietsland.Bericht.value += s;
	}
        setMessageFocus()
 } 
