function showHide(objName) {
    obj = document.getElementById(objName)
    if (obj.style.display == "none") {
        obj.style.display = "block";
    } else {
        obj.style.display = "none";
    }
}

function hide(objName) {
    obj = document.getElementById(objName)
    if (obj) {
        obj.style.display = "none";
    }
}

function show(objName) {
    obj = document.getElementById(objName)
    if (obj) {
        obj.style.display = "block";
    }
}

function AJAX_loadpage(page, divname) {
    var xmlHttp;
    try
    {
        // Firefox, Opera 8.0+, Safari
        xmlHttp=new XMLHttpRequest();
    }
    catch (e)
    {
        // Internet Explorer
        try
        {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e)
            {
            try
            {
                xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch (e)
            {
                alert("Il tuo browser non supporta AJAX!");
                return false;
            }
        }
    }
    
    xmlHttp.onreadystatechange=function() {
        if(xmlHttp.readyState==4) {
            var divnews = document.getElementById(divname);
            //Effetto fade in sulla news
            //opacity(idnews, 0, 100, 500);
            //Carico la news
            divnews.innerHTML = xmlHttp.responseText;
        }
   }
        
    xmlHttp.open("GET",page,true);
    xmlHttp.send(null);
}
