// JavaScript Document

var ns6=document.getElementById&&!document.all
var ie=document.all

function showinfo(info) {
	if (ie) eval("document.all.showinfo").innerHTML=info
	else if (ns6) document.getElementById('showinfo').innerHTML=info
}

function clearinfo() {
	if (ie) eval("document.all.showinfo").innerHTML=''
	else if (ns6) document.getElementById('showinfo').innerHTML='<span style="color: white;">.</span>'
}

//Specify affected tags. Add or remove from list:
var tgs = new Array( 'div','td','tr');

//Specify spectrum of different font sizes:
var szs = new Array( 'xx-small','x-small','11px','small','medium','large','x-large','xx-large' );
var startSz = 2;

function ts( trgt,inc ) {
	if (!document.getElementById) return
	var d = document,cEl = null,sz = startSz,i,j,cTags;
	
	sz += inc;
	if ( sz < 0 ) sz = 0;
	if ( sz > 6 ) sz = 6;
	startSz = sz;
		
	if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];

	cEl.style.fontSize = szs[ sz ];

	for ( i = 0 ; i < tgs.length ; i++ ) {
		cTags = cEl.getElementsByTagName( tgs[ i ] );
		for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
	}
}


function popitup(url, popwidth, popheight) {

	if(navigator.appName == "Microsoft Internet Explorer") {
		screenY = window.screen.availHeight;
		screenX = window.screen.availWidth;
	}
	else {
		screenY = window.outerHeight;
		screenX = window.outerWidth;
	}
	popleft = Math.round((screenX/2) - (popwidth/2));
	poptop = Math.round((screenY/2) - (popheight/2));


	newwindow=window.open(url,'name','height='+popheight+',width='+popwidth+',left = '+popleft+',top = '+poptop);
	if (window.focus) {newwindow.focus()}
	return false;
}

function setAsterisk(field) {
	if (field.value.length == 0) field.className = 'inputAsterisk';
	else field.className = 'formInput';
}

function validate_required(field,alerttxt) {
	with (field) {
		if (value==null||value=="") {
			alert(alerttxt);
			return false
		}
		else {return true}
	}
}

function validate_email(field,alerttxt)	{
	with (field) {
		apos=value.indexOf("@")
		dotpos=value.lastIndexOf(".")
		if (apos<1||dotpos-apos<2) {
			alert(alerttxt);
			return false
		}
		else {return true}
	}
}	

function validate_form(thisform) {
	with (thisform) {
		if (validate_required(Naam,"Gelieve uw naam op te geven...")==false) {
			Naam.focus();
			return false
		}
		if (validate_required(Voornaam,"Gelieve uw voornaam op te geven...")==false) {
			Voornaam.focus();
			return false
		}
		if (validate_required(Email,"Gelieve uw e-mail adres op te geven...")==false) {
			Email.focus();
			return false
		}
		if (validate_email(Email,"Uw e-mail adres is ongeldig...")==false) {
			Email.focus();
			return false
		}
	}
}

