﻿function OnZoekClick()
{
    var zoekText = encodeURI(document.getElementById("txtZoek").value);
    
    var tjUrl = unescape(window.location.href.substring(0, (window.location.href.lastIndexOf("/")) + 1));
    if (tjUrl.charAt(tjUrl.length - 1) != '/') {
        tjUrl.concat("/");
    }
    var zoekUrl = tjUrl + "Zoeken.aspx?q=" + zoekText;
    
    window.location.href = zoekUrl;
}

function SubmitEnter(sender,e)
{
    var keycode;
    if (window.event) 
    {
        keycode = window.event.keyCode;
    }
    else if (e) 
    {
        keycode = e.which;
    }
    else 
    {
        return true;
    }

    if (keycode == 13)
    {
        //sender.form.submit();
        OnZoekClick();
        return false;
    }
    else
    {
        return true;
    }
}
