// JavaScript Document

function showtr(id)
{
	if(document.getElementById(id).style.display == 'none' && document.getElementById(id).style.visibility == 'hidden')
	{
		document.getElementById(id).style.display = '';
		document.getElementById(id).style.visibility = '';
	} 
	else 
	{
		document.getElementById(id).style.display = 'none';
		document.getElementById(id).style.visibility = 'hidden'
	}
}

function check_aanm_nieuws()
{

	if(document.nieuwsbrief.itemEmailadres.value == 'E-mailadres' || document.nieuwsbrief.itemEmailadres.value == '')
	{
		alert('Vul een geldig e-mailadres in');
		return false;
	}
	
	if(document.nieuwsbrief.itemEmailadres.value.indexOf("@") == -1 || document.nieuwsbrief.itemEmailadres.value.indexOf(".") == -1)
	{
		alert('Dit e-mailadres is ongeldig');
		return false;
	}	

	return true;
}

/* POPUP venster */
var win=null;
function PopUp(mypage,myname,w,h,pos,infocus)
{
	if(pos == "random")
	{
		mlt = (screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
		mtp=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
	}

	if(pos == "center")
	{
		mlt = (screen.width)?(screen.width-w)/2:100;
		mtp=(screen.height)?(screen.height-h)/2:100;
	}
	else if((pos != 'center' && pos != "random") || pos == null)
	{
		mlt=0;
		mtp=20;
	}

	settings="width=" + w + ",height=" + h + ",top=" + mtp + ",left=" + mlt + ",scrollbars=yes";
	// ,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no
	
	win = window.open(mypage,myname,settings);
	win.focus();
}
