function imgChange(obj,img){
    obj.src = img;
}
function divBgChange(obj,img){
    obj.style.backgroundImage = 'url('+img+')';
}
function show_hide01(field01,field02,method){
    if(method == 'hideall'){
        document.getElementById(field01).style.display = 'none';
        document.getElementById(field02).style.display = 'none';
    } else if(method == 'open'){
        document.getElementById(field01).style.display = '';
        document.getElementById(field02).style.display = 'none';
    } else {
        document.getElementById(field01).style.display = 'none';
        document.getElementById(field02).style.display = '';
    }
}
function show_hide02(field,method){
    if(method == 'open'){
        document.getElementById(field).style.display = '';
    } else {
        document.getElementById(field).style.display = 'none';
    }
}
function toggle_div(id){
    if(document.getElementById(id).style.display == 'none'){
        document.getElementById(id).style.display = '';
    } else {
        document.getElementById(id).style.display = 'none';
    }
}
function toggle_div2(id_1,id_2,method){
    if(method == 'open'){
        document.getElementById(id_1).style.display = 'none';
        document.getElementById(id_2).style.display = '';
    } else {
        document.getElementById(id_1).style.display = '';
        document.getElementById(id_2).style.display = 'none';
    }
}
function str_replace(zoek,vervang,string){
    var array = string.split(zoek);
    var new_string = '';
    for(i=0; i<array.length; i++){
        if(i != 0){
            new_string += vervang;
        }
        new_string += array[i];
    }
    return new_string;
}
function vervang_ajax(string){
    string = str_replace("&","[EN]",string);
    string = str_replace("'","[COMMA]",string);
    return string;
}
function imgChange(obj,img){
    obj.src = img;
}
function divBgChange(obj,img){
    obj.style.backgroundImage = 'url('+img+')';
}
function randomNum(nummer) {
    var numberChars = "0123456789";
    var lowerChars = "abcdefghijklmnopqrstuvwxyz";
    var upperChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    var charSet = numberChars+lowerChars+upperChars;
    var charSetArr = charSet.split('');
    var return_ = '';
    for(i=0; i<nummer; i++){
        return_ += charSetArr[Math.floor(Math.random()*charSetArr.length)];
    }
    return(return_);
}
