function go2week(restaurant_id, week)
{
        if(week=='0'){
                document.getElementById('ez_a_het').src='./data/pics/ez_a_het_akt.png';
                document.getElementById('jovo_het').src='./data/pics/jovo_het.png';
                document.getElementById('days').weeknow.value='0';
                document.getElementById('act').innerHTML="Összes";
        }else{
                document.getElementById('ez_a_het').src='./data/pics/ez_a_het.png';
                document.getElementById('jovo_het').src='./data/pics/jovo_het_akt.png';
                document.getElementById('days').weeknow.value='7';
                document.getElementById('act').innerHTML="Összes";
        }
        
    var xmlHttp = createRequestObject();
    if(xmlHttp)
    {
/*        xmlHttp.onreadystatechange=function()
        {
            if(xmlHttp.readyState==4)
            { */
/*            }
        } */
        //alert("ajax.php?type=go2week&mrestaurant_id=" + restaurant_id + "&week=" + week);
        xmlHttp.open("GET","ajax.php?type=go2week&mrestaurant_id=" + restaurant_id + "&week=" + week,false);
        xmlHttp.send(null);
                document.getElementById('list_order_div').innerHTML = xmlHttp.responseText;
    }
}

function daymenu(restaurant_id, day)
{        
    var xmlHttp = createRequestObject();
    if(xmlHttp)
    {
        xmlHttp.onreadystatechange=function()
        {
            if(xmlHttp.readyState==4)
            {
                document.getElementById('list_order_div').innerHTML = xmlHttp.responseText;
            }
        }
        //alert("ajax.php?mrestaurant_id=" + restaurant_id);
        xmlHttp.open("GET","ajax.php?type=daymenu&mrestaurant_id=" + restaurant_id + "&day=" + day + "&week=" + document.getElementById('days').weeknow.value,true);
        xmlHttp.send(null);
    }
}

function mysel_akt(){
        if(document.getElementById('sel_drop').style.display=='block'){
                document.getElementById('sel_drop').style.display='none';
        }else{
                document.getElementById('sel_drop').style.display='block';
        }
}

function mysel(rid,obj){
        var i=obj.id;
        document.getElementById('sel_drop').style.display='none';
        //document.getElementById('days').daynow.value=i.charAt(1);
        document.getElementById('act').innerHTML=obj.innerHTML;
        daymenu(rid,i.charAt(1));
}
