﻿function show(elem,link) {

    if (document.getElementById(elem).style.display != "none") {
        document.getElementById(elem).style.display = "none";
        document.getElementById(link).src = "../images/FrecciaGiuApriBox.gif"
    }
    else {
        document.getElementById(elem).style.display = "block";
        document.getElementById(link).src = "../images/FrecciaSuApriBox.gif"
    }
}


function rollover(img_name,img_src)
{
	document[img_name].src = img_src;
}


// Copyright 2001 by www.CodeBelly.com
// Please do *not* remove this notice.

var backImage = new Array(); // don't change this

// Enter the image filenames you wish to use.
// Follow the pattern to use more images.  The
// number in the brackets [] is the number you
// will use in the function call to pick each
// image.

// Note how backImage[3] = "" -- which would
// set the page to *no* background image.

backImage[0] = "../images/BGFoto1.jpg";
backImage[1] = "../images/BGFotoMaldini.jpg";
backImage[2] = "../images/BGFotoIbra.jpg";
backImage[3] = "../images/BGFotoDelpiero.jpg";
backImage[4] = "../images/BGFotoTotti.jpg";
backImage[5] = "../images/BGFotokaka.jpg";
backImage[6] = "../images/BGFotoSanSiro2.jpg";
backImage[100] = "";

// Do not edit below this line.
//-----------------------------

function changeBGImage(whichImage){
if (document.body){
document.body.background = backImage[whichImage];
}
}


var newWin = ""
function openWin(nomefile, TipoServizio, wndPar) {
    if (newWin == "") {
        //					alert(TipoServizio)
        newWin = window.open(nomefile, TipoServizio, wndPar);
    } else {
        if (newWin.closed) {
            //					alert('la wnd e stata chiusa, la riapro')
            newWin = window.open(nomefile, TipoServizio, wndPar);
        } else {
            //				alert('la wnd e aperta, la chiudo')
            newWin.focus();
            //		  alert('ho chiuso la wnd, la riapro')
            newWin.location = 'new';
        }
    }
}

function openwindow(PageHTM) {
    var wndW = 350
    var wndH = 50
    var wndPar = 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no'
    wndPar += ',width='
    wndPar += wndW
    wndPar += ',height='
    wndPar += wndH
    openWin(PageHTM, '', wndPar)
}


function openwindowvideo(PageHTM) {
    var wndW = 650
    var wndH = 300
    var wndPar = 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no'
    wndPar += ',width='
    wndPar += wndW
    wndPar += ',height='
    wndPar += wndH
    openWin(PageHTM, '', wndPar)
}



function lunchboxOpen(lunchID, testo, classe) {
    document.getElementById('lunch_' + lunchID).style.display = "block";
    document.getElementById('clasp_' + lunchID).innerHTML = "<a class=" + classe + " href=\"javascript:lunchboxClose('" + lunchID + "','" + testo + "','" + classe + "');\">Chiudi " + testo + "</a>";
}
function lunchboxClose(lunchID, testo, classe) {
    document.getElementById('lunch_' + lunchID).style.display = "none";
    document.getElementById('clasp_' + lunchID).innerHTML = "<a class=" + classe + "  href=\"javascript:lunchboxOpen('" + lunchID + "','" + testo + "','" + classe + "');\">" + testo + "</a>";
}
