function show(id) {
	var o = document.getElementById(id);
	if (o) o.style.display = "block";
	//else alert("Non trovato: " + id);
}

function hide(id) {
        var o = document.getElementById(id);
        if (o) o.style.display = "none";
	//else alert("Non trovato: " + id);
}

function showHide(id) {
    var o = document.getElementById(id)
    if (o.style.display == "none")
	show(id);
    else
	hide(id);
}

function switchTo(id)
{
	hide("tipologia");
	hide("classificazione");
	hide("citta");
    hide("mesi");
	show(id);
}

function switchToImage(id, hotel, text)
{
    var o = document.getElementById("foto");
    if (!o) alter("Elemento 'foto' non trovato");
    else {
            o.src = "../hoteldata/" + hotel + "/m" + id + ".jpg";
            o.title = text
            o.alt = text
    }
    o = document.getElementById("didascaliaFoto");
    if (!o) alter("Elemento 'didascaliaFoto' non trovato");
    else {
        o.innerHTML = text;
    }
}

function goToUrl(url)
{
    if (url.length == 0) return;
    location.href = url;
}

function init()
{
	if (typeof(startup) != 'undefined') startup();
	//else alert("La funzione 'startup' non e' definita");
}