/*é*/
function connect() {
    var f = $('f_login_client');
    if ( f.login.value != '' && f.pass.value != '' ) {
        f.submit();
    }
}

function show_reservation_details(id_order)  {
    var wd = 750;
    var ht = 650;
    var x = (screen.availWidth - wd) / 2;
    var y = 140;
    var newWin     = window.open('reservation-details.html?id_order='+id_order,'','height='+ht+',width='+wd
            + ',menubar=no,scrollbars=yes,status=yes,toolbar=no,location=no,'
			+ 'resizable=yes,screenx='+x+',screeny='+y+',top='+y+',left='+x);
    newWin.focus();
}

function handleResponse(xhr) {
    if (xhr.readyState == 4 && xhr.status == 200)
    {
        try {
            var res = eval('(' + xhr.responseText + ')');
        }
        catch (e) {
            alert(xhr.responseText);
            return;
        }
        // cancel order
        if ( res && res.result == true && res.action == 'cancel_order' ) {
            $('status_'+res.id_order).innerHTML = $('cancelled').value;
            $('action_'+res.id_order).innerHTML = '';
        }
    }
}
