window.onload = function () {
	if( arguments.callee.actions){
		for(var ii=0;ii < arguments.callee.actions.length;ii++){
			if(typeof arguments.callee.actions[ii] === "function"){
				arguments.callee.actions[ii]();
			}		
		}
	}
};

function addLoadEvent(func){
	if(window.onload.actions === undefined)window.onload.actions = Array();
	window.onload.actions.push(func);
}

if (typeof addLoadEvent == 'function'){
	addLoadEvent(function(){
    	clearmsg();
	});
}

function clearmsg(){
	var timeout = 3000;
	alerts = $$('.alert') || false;
	if(alerts){
		setTimeout(function(){
			alerts.each(function(alert, i){
				alert.setStyle({display: "none"});
			});
		}
		,timeout);
	}
}

function goToURL() {
	var i, args=goToURL.arguments; document.returnValue = false;
	for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}


function showNewImg(img) {
	document.getElementById('content_image').innerHTML='<img src="/www/filelib/image/webpage/large/'+img+'" alt="'+img+'"/>'; 
}

function sendForm() {
	
		fout = '';
	
		if (document.form.organisatie.value == "") { 
			fout += '- U bent vergeten uw organisatie in te vullen<br />'
		} 
		
		if (document.form.contactpersoon.value == "") { 
			fout += '- U bent vergeten uw contactpersoon in te vullen<br />'
		} 
		
		if (document.form.email.value == "") { 
			fout += '- U bent vergeten uw emailadres in te vullen<br />'
		} 
		
		if (document.form.telefoon.value == "") { 
			fout += '- U bent vergeten uw telefoonnummer in te vullen<br />'
		}
		
	
		if (fout == '') {
			
			document.form.submit();
			
		} else {
			
			document.getElementById('form_hint').style.display = 'block'; 
			document.getElementById('form_hint').innerHTML = '<p><strong>U heeft het formulier niet volledig ingevuld</strong>:<br />'+fout+'</p>';
			
		}
		

		
	
}