﻿// JScript File
function Search()
{
    window.location.href='zoek.aspx?searchtext='+ document.getElementById("SearchInput").value ;
}

function jsPost(strFields, FormId) {
    urlstring=""
    var FieldList = new Array();
    FieldList = strFields.split(';');
    for (tel = 1; tel <= FieldList.length; tel++){
        var myId="field" + FieldList[tel-1]
        var myField=document.getElementById(myId)
        var myFieldValue=myField.value
        urlstring += "field" + FieldList[tel-1] + "=" + myFieldValue
        //document.getelementbyid('aspnetform').action='telmee.aspx'
        //document.aspnetForm.submit();
        //var myControlValue=document.getElementById(myControlId)
//var myValue=myControlValue.value
    }
    window.location.href='~/content.aspx?id=' + FormId + '&amp;action=post&amp;' + urlstring ;
//    ~/content.aspx?id=$1&amp;action=post
//    alert(urlstring);
//    Formulier/" & Me.Id & ".aspx
}
	
//function Enter(e) {
//if(e && e.which){ //if which property of event object is supported (NN4)
//e = e
//characterCode = e.which //character code is contained in NN4's which property
//}
//else{
//e = event
//characterCode = e.keyCode //character code is contained in IE's keyCode property
//}
//}

function Enter(e,btn) {

if(window.event){ 
characterCode = window.event.keyCode; //character code is contained in IE's keyCode property
}
else{
characterCode = e.which; //character code is contained in NN4's which property
}

if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
//Search();//submit the form
eval(document.getElementById(btn).href);
return false 
}
else{

return true 
}

    }
    
function Enterbis(e) {

if(window.event){ 
characterCode = window.event.keyCode; //character code is contained in IE's keyCode property
}
else{
characterCode = e.which; //character code is contained in NN4's which property
}

if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
Search();//submit the form
return false 
}
else{

return true 
}

    }

function LoginOnEnter(e,btn) {

if(window.event){ 
characterCode = window.event.keyCode; //character code is contained in IE's keyCode property
}
else{
characterCode = e.which; //character code is contained in NN4's which property
}

if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
eval(document.getElementById(btn).href);//submit the form
return false 
}
else{

return true 
}

    }
