﻿function OnClientClick(Index, menuid, param) {
    var ServerControID = 'btnSubmit';
    var IndexControlID = 'txtHidden';
    var txtParam = 'txtParam';

    var iMenuID = 'txtMenuID';
    var objButton = document.getElementById(ServerControID);
    if (objButton) {
        document.getElementById(IndexControlID).value = Index;
        document.getElementById(iMenuID).value = menuid;

        if (typeof param != "undefined") {
            document.getElementById(txtParam).value = param;
        }
        objButton.click();
    }
    return false;
}

function swapimage(src) {
    src = src.replace('/tumb', '');
    document.getElementById('imgMain').src = src;
}

function wisselFotos() {
    var iFoto1;
    var iFoto2;

    iFoto1 = Math.floor(Math.random() * asFotos1.length);
    document.getElementById("imgFoto1").filters[0].apply();
    document.getElementById("imgFoto1").src = "/img/voertuigen/" + asFotos1[iFoto1];
    document.getElementById("imgFoto1").filters[0].play();

    iFoto2 = Math.floor(Math.random() * asFotos2.length);
    document.getElementById("imgFoto2").filters[0].apply();
    document.getElementById("imgFoto2").src = "/img/werkmaterieel/" + asFotos2[iFoto2];
    document.getElementById("imgFoto2").filters[0].play();
}
