/* FUNCTIES VOOR DE HOOFDPAGINA */

// checkZoekInvoer
function checkZoekInvoer() {
	if (document.zoeker.zoek.value=="") {
		document.zoeker.zoek.value = 'Typ een woord';
		document.zoeker.zoek.focus();
		document.zoeker.zoek.select();
		return false;
	}
	else { return true }
}

// form_submit
function form_submit() {
	if (checkZoekInvoer()) {
		var zoekterm = document.zoeker.zoek.value;
		document.zoeker.submit()
	}
	else {return false}
}

// Foto
function Foto(href,breedte,hoogte,tekst) {
      var foto_url = href
      var Venster = window.open("","Foto","resizable=1,width=" +(breedte+100) + ",height="+(hoogte+100)+",left=100,top=50,screenX=100,screenY=100")
      Venster.document.write("<body bgcolor='black' TEXT='white' LINK='white' VLINK='white' ALINK='white'>")
      Venster.document.write("<CENTER><IMG SRC=" + foto_url + " WIDTH=" + breedte + " HEIGHT="+hoogte+" BORDER=1><BR>")
      Venster.document.write("<BR><B>" + tekst + "<P><FONT SIZE='-1'>&nbsp;<a href='javascript:window.close()'>sluit venster</a></B></FONT></center><P>&nbsp;<P>")
      Venster.document.write("</body>")
}

// openReageer
function openReageer(url) {
	var Venster = window.open(url,'Reageer','width=600,height=400,scrollbars=1,left=100,top=50,screenX=100,screenY=100')
}

// openRome
function openRome(strUrl) {
	window.open(strUrl, 'rome', 'fullscreen=1')
}

// openVenster
function openVenster(strUrl, breedte, hoogte) {
	window.open(strUrl, 'Venster', 'width=' + breedte + ',height=' + hoogte + ',scrollbars=1,left=100,top=50,screenX=100,screenY=100');
}

// makeEmail
/* Fuck die klotespammers! Pek en veren voor de reclameboys die mij nu nog weten te spammen! */
function makeEmail(strEmail, strSubject, strBody) {
	var strAt = /APESTAARTJE/;
	var strPunt = /PUNT/g;
	strEmail = strEmail.replace(strAt, '@');
	strEmail = strEmail.replace(strPunt, '.');
	this.location.href = 'mailto:' + strEmail + '?subject=' + strSubject + '&body=' + strBody;
}

// setText
function setText(id, txt) {
	if (document.getElementById) { //DOM	
		document.getElementById(id).innerHTML = txt ;
	}
	else if (document.all) { //IE4
		document.all[id].style.innerHTML = txt ;
	}
}

