// <!CDATA[

function OnMouseOut(id, imgNormale){
    document.getElementById("Img" + id).setAttribute("src", imgNormale);
    document.getElementById("Img" + id).style.border = "1px solid #c0c0c0";
}

function TableOnMouseOver(id){
    //se l'id nuovo della tabella è diverso dall'id vecchio cambia sfondo
    idOld = (document.getElementById("idCasellaVideo_OLD").getAttribute("value"));
    if((id)!=(idOld)){
        document.getElementById("TABLE" + id).style.backgroundImage = "url('Images/tabVideo_on.gif')";
        document.getElementById("TABLE" + id).style.cursor = "hand";
        //se l'id non è il predefinito (200) rimette lo sfondo vecchio alla tabella con id old
        if (idOld != 200){
            document.getElementById("TABLE" + idOld).style.backgroundImage = "url('Images/tabVideo.gif')";
            document.getElementById("TABLE" + idOld).style.cursor = "pointer"
        }
    }
    document.getElementById("idCasellaVideo_OLD").setAttribute("value", id);
}

//function TableOnMouseOut(id){
//    document.getElementById("TABLE" + id).style.backgroundImage = "url('Images/tabVideo.png')";
//    document.getElementById("TABLE" + id).style.cursor = "pointer";
//}

function CaricaVideo(idVideo){
    document.location.href=("video_watch.aspx?video=" + idVideo);
}

function CaricaVideoDiQuestaCategoriaSelezionata(idCategoria){
    document.location.href=("video.aspx?categoria=" + idCategoria);
}

function CaricaInutilitaDiQuestaCategoriaSelezionata(idCategoriaInutile){
    document.location.href=("InutilArea.aspx?categoria=" + idCategoriaInutile);
}

function ApriMessaggio(IdMessaggio){
    window.open('Messaggio.aspx?IdMessaggio='+IdMessaggio,'Messaggio','scrollbars=yes,resizable=no,width=200,height=200,status=no,location=no,toolbar=no');
    document.location.href='areaprivata.aspx';
}

function fCercaHeader(){
    //document.location.href="search.aspx?value=" + document.getElementById("txtCercaHeader").getAttribute("value")
    stringa = document.getElementById("TxtCercaHeader").value;
    document.location.href="search.aspx?value=" + stringa;
}

function fCerca(){
    //document.location.href="search.aspx?value=" + document.getElementById("txtCerca").getAttribute("value")
    stringa = document.getElementById("txtCerca").value;
    document.location.href="search.aspx?value=" + stringa;
}
// ]]>
