function validBelmij(){
	
    //	var email   = document.frm.email;
    //	AtPos       = email.value.indexOf("@");
    //	StopPos     = email.value.lastIndexOf(".");
	
    if(document.belmij.naam.value == "" || document.belmij.naam.value == "Vul uw naam in"){
        alert ("U dient 'Naam' in te vullen.");
        document.belmij.naam.focus();
    //	}else if ( StopPos == -1 || StopPos < AtPos)
    //		{
    //			alert("U dient een correct e-mailadres in te vullen");
    //			document.formbel.email.focus();
    }else if(document.belmij.telefoon.value == "" || document.belmij.telefoon.value == "Telefoon" || document.belmij.telefoon.value.toString().replace(/\D/g,"").split("").length!=10){
        alert ("U dient een correct telefoonnummer in te vullen.");
        document.belmij.telefoon.focus();
    }else{
        document.belmij.action = "inspiratiecentrum.php";
        document.belmij.submit();
    }
}

//function isValidEmail(str) {
//	return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
//}

function validContact(){

    var valid   = true;
    var email   = document.contactform.nn_email;
    AtPos       = email.value.indexOf("@");
    StopPos     = email.value.lastIndexOf(".");

    if(document.contactform.nn_naam.value == ""){
        alert ("U dient 'Naam' in te vullen.");
        document.contactform.nn_naam.focus();
    }else if (document.contactform.nn_adres.value == ""){
        alert ("U dient 'Straatnaam + huisnr' in te vullen.");
        document.contactform.nn_adres.focus();
    }else if (document.contactform.nn_postcode.value == ""){
        alert ("U dient 'Postcode' in te vullen.");
        document.contactform.nn_postcode.focus();
    }else if (document.contactform.nn_woonplaats.value == ""){
        alert ("U dient 'Woonplaats' in te vullen.");
        document.contactform.nn_woonplaats.focus();
    }else if (contactform.nn_geslacht && !contactform.nn_geslacht[0].checked && !contactform.nn_geslacht[1].checked && valid){
        alert ("U dient 'MV' in te vullen.");
        document.contactform.nn_geslacht.focus();
    }else if(document.contactform.nn_telefoon.value == "" || document.contactform.nn_telefoon.value.toString().replace(/\D/g,"").split("").length!=10){
        alert ("U dient een correct telefoonnummer in te vullen.");
        document.contactform.nn_telefoon.focus();
    }else if ( StopPos == -1 || StopPos < AtPos){
        alert("U dient een correct e-mailadres in te vullen");
        document.contactform.nn_email.focus();
    }else{
        document.contactform.action = "";
        document.contactform.method = "post";
        document.contactform.submit();
    }
}

function isValidEmail(str) {
    return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}




function buttonHover(id){
    document.getElementById(id).style.color="#000000";
    document.getElementById(id).style.cursor="pointer";
}

function buttonOut(id){
    document.getElementById(id).style.color="#000000";
}

var translate   = new Array();
translate["nl"] = {
    "aanhef":"U dient een AANHEF in te vullen.",
    "field1":"U dient een ",
    "field2":" in te vullen.",
    "postcode":"U dient een correcte postcode in te vullen",
    "email":"U dient een correct E-MAILADRES in te vullen"
};

var velden      = new Array();
velden["nl"]    = new Array("naam","plaats","telefoon","e-mail","opmerking");


function validCT(lang)
{
    var form    = document.nn_form;
    var valid   = true;

    if(!form.nn_geslacht[0].checked && !form.nn_geslacht[1].checked && valid)
    {
        alert(translate[lang]["aanhef"]);
        valid = false;
    }
    var fields = new Array("naam","plaats","telefoon","email");
    for(var i =0; i<fields.length;i++)
    {
        if(form["nn_"+fields[i]] && form["nn_"+fields[i]].value == "" && valid)
        {
            alert(translate[lang]["field1"]+velden[lang][i].toUpperCase()+translate[lang]["field2"]);
            form["nn_"+fields[i]].focus();
            valid = false;
            break;
        }
    }
    if(form["nn_opmerking"] && form["nn_opmerking"].value == "" && valid)
    {
        alert(translate[lang]["field1"]+"UW VRAAG"+translate[lang]["field2"]);
        form["nn_opmerking"].focus();
        valid = false;
    }

    if(form.nn_postcode){
        var postcode = form.nn_postcode.value.split("");
        if(valid && ((parseInt(postcode[0])/1 != postcode[0]/1) || (parseInt(postcode[1])/1 != postcode[1]/1) || (parseInt(postcode[2])/1 != postcode[2]/1) || (parseInt(postcode[3])/1 != postcode[3]/1)))
        {
            alert(translate[lang]["postcode"]);
            form.nn_postcode.focus();
            valid = false;
        }
    }

    AtPos   = form.nn_email.value.indexOf("@");
    StopPos = form.nn_email.value.lastIndexOf(".");
    if ((StopPos == -1 || StopPos < AtPos) && valid)
    {
        alert(translate[lang]["email"]);
        form.nn_email.focus();
        valid = false;
    }

    if(valid)
    {
        form.action = "";
        form.submit();
    }
}
function validNN(location)
{
    var form    = document.nn_form;
    var valid   = true;

    if(form.nn_geslacht && !form.nn_geslacht[0].checked && !form.nn_geslacht[1].checked && valid)
    {
        alert("U dient een AANHEF in te vullen.");
        valid = false;
    }
    var fields = new Array("voornaam","achternaam","naam");
    for(var i =0; i<fields.length;i++)
    {
        if(form["nn_"+fields[i]] && form["nn_"+fields[i]].value == "" && valid)
        {
            alert("U dient een "+fields[i].toUpperCase()+" in te vullen.");
            eval("form.nn_"+fields[i]).focus();
            valid = false;
            break;
        }
    }

    AtPos   = form.nn_email.value.indexOf("@");
    StopPos = form.nn_email.value.lastIndexOf(".");
    if ((StopPos == -1 || StopPos < AtPos) && valid)
    {
        alert("Je dient een correct E-MAILADRES in te vullen");
        form.nn_email.focus();
        valid = false;
    }

    if(valid)
    {
        form.action = location;
        form.method = "post";
        form.submit();
    }
}
