function comboInit(thelist, theinput)
{
    theinput = document.getElementById(theinput);  
    var idx = thelist.selectedIndex;
    var content = thelist.options[idx].innerHTML;  
    if(theinput.value == ""){
        if (idx == 0) theinput.value = "";
        else theinput.value = content;
    }
}
function combo(thelist, theinput)
{
    theinput = document.getElementById(theinput);
    var idx = thelist.selectedIndex;
    var content = thelist.options[idx].innerHTML;
    if (idx == 0) theinput.value = "";
    else theinput.value = content;
}
function dateadjust(e, s)
{
    if (e.code === "Backspace" || e.code === "Delete") return s;

    var r='';
    r = s.replace(/[^0-9]/g,"");
   
    if(r.length>8)r=r.substring(0,8);
    
    if (r.length > 3) r=r.slice(0, 2)+'/'+r.slice(2,4)+'/'+r.slice(4);
    else if (r.length > 1) r=r.slice(0, 2)+'/'+r.slice(2);

    return r;
}
