if (window != top)
{
	top.location.href = location.href;
}
function opendemo()
{
	window.open('http://demo.roosternet.nl/','demoschool','width=720,height=534,toolbar=yes,location=yes,directories=yes,status=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes');
}
function checkcontactform()
{
	document.getElementById('contactform').naam.style.backgroundColor = '#ffffff';
	document.getElementById('contactform').email.style.backgroundColor = '#ffffff';
	document.getElementById('contactform').vragen.style.backgroundColor = '#ffffff';
	if (trim(document.getElementById('contactform').naam.value) == '')
	{
		document.getElementById('contactform').naam.focus();
		document.getElementById('contactform').naam.style.backgroundColor = '#a3bacc';
		alert('Vul aub uw naam in.');
		return false;
	}
	else if (isEmail(trim(document.getElementById('contactform').email.value)) == false)
	{
		document.getElementById('contactform').email.focus();
		document.getElementById('contactform').email.style.backgroundColor = '#a3bacc';
		alert('Vul aub een correct e-mail adres in.');
		return false;
	}
	else if (trim(document.getElementById('contactform').vragen.value) == '')
	{
		document.getElementById('contactform').vragen.focus();
		document.getElementById('contactform').vragen.style.backgroundColor = '#a3bacc';
		alert('Vul aub uw vraag of opmerking in.');
		return false;
	}
	else
	{
		return true;
	}
}
function trim(str)
{
	return str.replace(/(^\s*)|(\s*$)/g, "");
}
function isEmail(strval)
{
	if (strval.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
	{
		return true;
	}
	else
	{
		return false;
	}
}
function openpopup(soort)
{
	window.open('/smswapdemo/' + soort + '1.html',soort,'width=210,height=535,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=yes');
}
function andersdisable(yesno)
{
	document.getElementById('contactform').anders.disabled = yesno;
}
