<!--
var iversion = -1;
var roll = false;
var popUp;
var popUp2;

function closeWindow()
{
    if (!version() && popUp && !popUp.closed)
    {
        popUp.close();
    }
    if (!version() && popUp2 && !popUp2.closed)
    {
        popUp2.close();
    }
}

function openWindow (newpag, x, y, dx, dy)
{
    closeWindow();
    settings = "width=" + x + ",height=" + y + ",left=" + dx + ",top=" + dy + ",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0";
    popUp = window.open(newpag, "Winpagina", settings);
    if (!version() && popUp.focus())
    {
        popUp.focus();
    }
}

function openWindow2 (newpag, x, y, dx, dy)
{
    closeWindow();
    settings = "width=" + x + ",height=" + y + ",left=" + dx + ",top=" + dy + ",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,copyhistory=0";
    popUp2 = window.open(newpag, "Winpagina", settings);
    if (!version() && popUp2.focus())
    {
        popUp2.focus();
    }
}

function version()
{
    if (iversion != -1) return roll;

    if (navigator.appName.indexOf("Netscape") != -1)
    { // Netscape
        if (navigator.userAgent.indexOf("Mozilla/") != -1)
            iversion = parseFloat(navigator.appVersion)
        else
            iversion = 1;
            roll = (3<=iversion);
    }
    else
    {  // Not netscape.
        if (navigator.appName.indexOf("Internet Explorer") != -1)
        {
            if (navigator.userAgent.indexOf("Mozilla/") != -1)
                iversion = parseFloat(navigator.appVersion)
            else
                iversion = 1;
        }
        else
        {
            iversion = 1;
        }
        roll = (3<=iversion);
    }
    return roll;
}

if (version())
{
    but1n = new Image(101,49);
    but1s = new Image(101,49);
    but1n.src = "../images/home0.gif";
    but1s.src = "../images/home1.gif";
}

function chimg(pic,name)
{
    if (roll)
    {
        pic.src = name.src;
    }
}

function mClick(cell)
{
    if (event.srcElement.tagName == 'TD')
    {
        cell.children.tags('A')[0].click();
    }
}

selected=0;

function Validate_Form(theForm)
{
	if (theForm.naam.value == "")
	{
		alert("Heb je geen naam gekregen van je ouders.");
		theForm.naam.focus();
		return (false);
	}
	if (theForm.email.value == "")
	{
		alert("Vul je emailadres in anders weet je vriend niet van wie dit bericht komt..");
		theForm.email.focus();
		return (false);
	}
	lenAddr = theForm.email.value.length
	atIndx = theForm.email.value.indexOf("@")
	if (theForm.email.value.indexOf("@") < 3 || 
	    theForm.email.value.lastIndexOf(".") < atIndx + 3 || 
	    theForm.email.value.lastIndexOf(".") > lenAddr - 3 ||
	    theForm.email.value.indexOf(" ") > 0)
	{
		alert("Je email-adres is ongeldig.");
		theForm.email.focus();
		return (false);
	}
	if (theForm.naam_vriend.value == "")
	{
		alert("De naam van je vriend(in) is nog niet ingevuld.");
		theForm.naam_vriend.focus();
		return (false);
	}
	if (theForm.email_vriend.value == "")
	{
		alert("Hoe kan ik nu een email versturen zonder een emailadres?.");
		theForm.naam_vriend.focus();
		return (false);
	}
	lenAddr = theForm.email_vriend.value.length
	atIndx = theForm.email_vriend.value.indexOf("@")
	if (theForm.email_vriend.value.indexOf("@") < 3 ||
	    theForm.email_vriend.value.lastIndexOf(".") < atIndx + 3 ||
	    theForm.email_vriend.value.lastIndexOf(".") > lenAddr - 3 ||
	    theForm.email_vriend.value.indexOf(" ") > 0)
	{
		alert("Sorry, maar op dit adres woont niemand..");
		theForm.email_vriend.focus();
		return (false);
	}
	return (true);
}
//-->
