﻿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>";
}


function ConfirmChoice2(urlremover) { 

answer = confirm("Vuoi veramente rimuoverti dalla partita?  Ricorda che se non dai un preavviso di almeno 24 ore dall'inizio della partita, sarà considerato come un Bidone, e non potrai più partecipare ad una partita per 2 mesi!  Confermi la tua Rimozione?")

    if (answer !="0") 
    {
        location = urlremover 
    }
}

function ConfirmChoice3(urlremover) {

    answer = confirm("Confermi la rimozione degli utenti esterni inseriti da te? Successivamente potrai comunque inserirli nuovamente nei posti ancora disponibili!")

    if (answer != "0") {
        location = urlremover
    }
}

function ConfirmCancelTeam(urlremover,testo) {

    answer = confirm(testo)

    if (answer != "0") {
        location = urlremover
    }
}

function ConfirmCancel(urlremover, testo) {

    answer = confirm(testo)

    if (answer != "0") {
        location = urlremover
    }
}


function openpopup(PageHTM, wid, hei) {
    var wndW = wid
    var wndH = hei
    var wndPar = 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes'
    wndPar += ',width='
    wndPar += wndW
    wndPar += ',height='
    wndPar += wndH
    window.open(PageHTM, 'contenuto', wndPar)
}

function openpopupmodal(PageHTM, wid, hei) {
    var wndW = wid
    var wndH = hei
    var wndPar = 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, modal=yes'
    wndPar += ',width='
    wndPar += wndW
    wndPar += ',height='
    wndPar += wndH
    window.showModalDialog(PageHTM, 'pagina', wndPar)
    window.location.reload();
}

function openpopupmodalpartite(PageHTM, wid, hei) {
    var wndW = 970;
    var wndH = 600;
    var wndPar = 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes'
    wndPar += ',width='
    wndPar += wndW
    wndPar += ',height='
    wndPar += wndH
    window.open(PageHTM, 'contenuto', wndPar)
}

function closewindows() {
    window.close();
}



function closeandRefresh() {
    window.close();
}


function codamico2(url) {
    alert(url);
}

function codamico(url) {
    var ca = {
        method: 'stream.share',
        u: url
    };

    FB.ui(ca, function (response) { console.log(response); });
}




/*!
jQuery(document).ready(function () {
    showPage(1);
})

// Slide navigation
function showPage(s) {
    // Get the selected slide element
    var selected = jQuery('#home_page' + s);

    // Get all the other slides
    var pages = jQuery('#home_pages_container .page:visible').not('#home_page' + s);

    // Show the selected slide and hide the others
    pages.fadeOut('fast', function () { selected.fadeIn('fast'); });

    // Activate the corresponding tab
    jQuery('#home_nav_container .active').removeClass('active');
    jQuery('#home_nav_container #tab-' + s).addClass('active');

    return false;
}

window.onload = function () {
    SetMainBodyHeight();
}
*/
