﻿$(document).ready(function() {
    $("#myMenu").css("display", "none");
    $("#myMenuZona").css("display", "none");
    //Patch per reimpostare l'altezza delle 3 zone in maniera identica
    //(capitava che zona centrale fosse più alta e lasciasse dei buchi nel background delle zona laterali)
    var zonaCentrale = $(".selettore_zona_centrale");
    var zonaSx = $(".selettore_zona_sx");
    var zonaDx = $(".selettore_zona_dx");
    var maxHeight = 0;
    if (zonaCentrale && zonaCentrale.height() > maxHeight) {
        maxHeight = zonaCentrale.height();
    }
    if (zonaSx && zonaSx.height() > maxHeight) {
        maxHeight = zonaSx.height();
    }
    if (zonaDx && zonaDx.height() > maxHeight) {
        maxHeight = zonaDx.height();
    }
    if (maxHeight > 0) {
        if (zonaCentrale) {
            zonaCentrale.css("height", maxHeight + "px");
        }
        if (zonaSx) {
            zonaSx.css("height", maxHeight + "px");
            var zonaSxCont = zonaSx.find("#ctl00_zonColonnaSx_zona_colonnaSx1_container, #ctl00_zonColonnaSx_editor_zona_colonnaSx1_container");
            zonaSxCont.css("height", maxHeight + "px");
        }
        if (zonaDx) {
            zonaDx.css("height", maxHeight + "px");
            var zonaDxCont = zonaDx.find("#ctl00_zonColonnaDx_zona_colonnaDx1_container, #ctl00_zonColonnaDx_editor_zona_colonnaDx1_container");
            zonaDxCont.css("height", maxHeight + "px");
        }
    }
    //Fine patch per reimpostare le altezze
});


Shadowbox.init({
    language:   "it",
    players: ['img', 'html', 'iframe', 'qt', 'wmp', 'swf', 'flv']

});





//Per la convalida del Postback da form
function presetPostback(idHiddenField) {
    var oHidden = document.getElementById(idHiddenField);
    if (oHidden) {
        oHidden.value = "1";    
    }
    return; 
}

