function updateContentHeight() {

    var navigation = document.getElementById("navigation");
    var content = document.getElementById("content");

    if (parseInt(navigator.appVersion) > 3) {

        try {

            if (navigation == null) return;
            if (content == null) return;

            var HEIGHT = 395;
            var contentH = content.offsetHeight + 30;

            if (contentH < HEIGHT) {
                contentH = HEIGHT;
                content.style.height = (contentH - 60) + "px";
            }

            navigation.style.height =  contentH + "px";

        } catch(e) {
            alert("Errore: " + e.message);
        }
    }
}

function menuClick(_link) {
    location.href = _link;
}

function openWindow(_target)
{
    var width="650";
    if (_target == "twitter") {
        width="790";
    } else if (_target == "delicious") {
        width="850";
    }
    var pop = window.open('',_target,'toolbar=no,scrollbars=yes,width='+width+',height=420,top=50,left=50');
    pop.focus();
}

function openProduct()
{
    var pop = window.open('',"product",'toolbar=no,scrollbars=yes,width=1000,height=550,top=50,left=50');
    pop.focus();
}

function swithConfig(checklogin) {
    if (checklogin == null) {
        checklogin = true;
    }
    var login = document.getElementById("login");
    var data = document.getElementById("data");

    if (checklogin) {
        data.style.display = "none";
        login.style.display = "inline";
    } else {
        data.style.display = "inline";
        login.style.display = "none";
    }
    
}

