    var openIMG = new Image();
    var closedIMG = new Image();     
    openIMG.src = "images/aperto.gif";
    closedIMG.src = "images/chiuso.gif";
    var sheight=0;
    var swidth = 0;
    var sspeed=2;
    var resumesspeed=sspeed;
    
    // imposta la data in alto a destra
    function setdate()
        {
                  var MonthsOfYear = new Array(12);
                        MonthsOfYear[0] = "Gennaio";
                        MonthsOfYear[1] = "Febbraio";
                        MonthsOfYear[2] = "Marzo";
                        MonthsOfYear[3] = "Aprile";
                        MonthsOfYear[4] = "Maggio";
                        MonthsOfYear[5] = "Giugno";
                        MonthsOfYear[6] = "Luglio";
                        MonthsOfYear[7] = "Agosto";
                        MonthsOfYear[8] = "Settembre";
                        MonthsOfYear[9] = "Ottobre";
                        MonthsOfYear[10] = "Novembre";
                        MonthsOfYear[11] = "Dicembre";
                oggi = new Date;
                giorno = oggi.getDate();
                if (giorno<10) giorno = "0"+giorno;
                mese = oggi.getMonth();
                anno = oggi.getFullYear();
                document.getElementById('DivIntestazione_data_giorno').firstChild.data = giorno;
                document.getElementById('DivIntestazione_data_mese_anno').firstChild.data = MonthsOfYear[mese] + " " + anno;
        }
    // gestisce le news scorrevoli
    function start() 
        {
                if (document.all)
                        {
                            iemarqueeV(DivCorpoDestra_news_testo);
                            iemarqueeH(DivTopSponsor_lista);
                        }
                else
                        {
                            if (document.getElementById) ns6marqueeV(document.getElementById('DivCorpoDestra_news_testo'));
                            if (document.getElementById) ns6marqueeH(document.getElementById('DivTopSponsor_lista'));
                        }
        }
    function iemarqueeV(whichdiv)
        {
                Viediv=eval(whichdiv)
                sheight += 50;
                Viediv.style.pixelTop=20
                sizeupV=Viediv.offsetHeight
                ieslideV()
        }
        function iemarqueeH(whichdiv)
        {
                Hiediv=eval(whichdiv)
                swidth += 0;
                Hiediv.style.pixelLeft=0
                sizeupH=Hiediv.offsetWidth
                ieslideH()
        }
    function ns6marqueeV(whichdiv)
        {
                Vns6div=eval(whichdiv)
                sheight += 50;
                Vns6div.style.top=20 + "px";
                sizeupV=Vns6div.offsetHeight;
                ns6slideV();
        }
        function ns6marqueeH(whichdiv)
        {
                Hns6div=eval(whichdiv)
                swidth += 0;
                Hns6div.style.left=0 + "px";
                sizeupH=Hns6div.offsetWidth;
                ns6slideH();
        }    
    function ieslideV()
        {
                if (Viediv.style.pixelTop>=sizeupV*(-1)){
                        Viediv.style.pixelTop-=sspeed
                        setTimeout("ieslideV()",100)
                }
                else{
                        Viediv.style.pixelTop=sheight
                        ieslideV()
                }
        }
    function ns6slideV()
        {
                if (parseInt(Vns6div.style.top)>=sizeupV*(-1))
                {
                        theTop = parseInt(Vns6div.style.top)-sspeed;
                        Vns6div.style.top = theTop + "px";
                        setTimeout("ns6slideV()",100)
                }
                else {
                        Vns6div.style.top = sheight + "px";
                        ns6slideV();
                }
        }
    function ieslideH()
        {
                if (Hiediv.style.pixelLeft>=(sizeupH/3)*(-1))
                {
                        Hiediv.style.pixelLeft-=sspeed
                        setTimeout("ieslideH()",100)
                }
                else{
                        Hiediv.style.pixelLeft=swidth
                        ieslideH()
                }
        }
    function ns6slideH()
        {
                if (parseInt(Hns6div.style.left)>=(sizeupH/3)*(-1))
                {
                        theLeft = parseInt(Hns6div.style.left)-sspeed;
                        Hns6div.style.left = theLeft + "px";
                        setTimeout("ns6slideH()",100)
                }
                else {
                        Hns6div.style.left = swidth + "px";
                        ns6slideH();
                }
        }
    //gestisce la lista dello storico
    function showAll() 
        {  
            //document.getElementById("dicembre").style.display ="none";
	    //document.getElementById("novembre").style.display ="none";
	    //document.getElementById("ottobre").style.display ="none";
            //document.getElementById("settembre").style.display ="none";
            //document.getElementById("agosto").style.display ="none";
            //document.getElementById("luglio").style.display ="none";
            document.getElementById("giugno").style.display ="none";
            document.getElementById("maggio").style.display ="none";
            document.getElementById("aprile").style.display ="none";
            document.getElementById("marzo").style.display ="none";
            document.getElementById("febbraio").style.display ="none";
            document.getElementById("gennaio").style.display ="none";
        }
    function showBranch(branch)
                    {
                        var objBranch = document.getElementById(branch).style;
                        if(objBranch.display=="block")
                            objBranch.display="none";
                        else
                            objBranch.display="block";
                    }
    function swapFolder(IMG)
                    {
                        var objIMG = document.getElementById(IMG);
                        if (objIMG.src.indexOf('images/chiuso.gif')>-1)
                                objIMG.src = openIMG.src;
                        else
                                objIMG.src = closedIMG.src;
                    }
    // gestisce gli sponsor
    function showSponsorTop()
        {
            var i = 0;
            var rnd_x= 0;
            var max = 0;
            var listaSponsorAlt = new Array(6);
            var listaSponsorLogo = new Array(6);
            var listaSponsorLink = new Array(6);
            max = listaSponsorAlt.length;
            var randomnumber=Math.floor(Math.random()*(max));
            var sponsor = '';
            
            listaSponsorAlt[0] = "Mafel";
            listaSponsorLogo[0] = "http://www.concorezzo.org/images/mafel_logo.gif";
            listaSponsorLink[0] = "http://www.mafel.com";
            listaSponsorAlt[1] = "Paleari Centro Stampa";
            listaSponsorLogo[1] = "http://www.concorezzo.org/images/paleari_2k8.gif";
            listaSponsorLink[1] = "http://www.palearicentrostampa.it";
            listaSponsorAlt[2] = "Hoana Cafè";
            listaSponsorLogo[2] = "http://www.concorezzo.org/images/hoana_cafe_logo.gif";
            listaSponsorLink[2] = "http://www.concorezzo.org/images/hoana_cafe_logo.gif";
            listaSponsorAlt[3] = "ADR Studio Arbitrale";
            listaSponsorLogo[3] = "http://www.concorezzo.org/images/adr_logo_2k9.gif";
            listaSponsorLink[3] = "http://www.concorezzo.org/Pagina.aspx?p=131";
            listaSponsorAlt[4] = "Consulenza Risorse Umane & Professional Coach";
            listaSponsorLogo[4] = "http://www.concorezzo.org/images/coaching_logo2010.gif";
            listaSponsorLink[4] = "http://www.cristianbonfanti.it";
	        listaSponsorAlt[5] = "I.C.E.T. Costruzioni";
            listaSponsorLogo[5] = "http://www.concorezzo.org/images/icet_2010.gif";
            listaSponsorLink[5] = "http://www.icetgroup.it/IT/index.asp";
            listaSponsorAlt[6] = "LEDA Circuiti";
            listaSponsorLogo[6] = "http://www.concorezzo.org/images/leda_2010.gif";
            listaSponsorLink[6] = "http://www.concorezzo.org/images/leda_2010.gif";
            for (i=0;i<=max;i++)
                {
                   if (listaSponsorAlt[randomnumber] !="") { sponsor +='<a target="_blank" href="' + listaSponsorLink[randomnumber] + '"> <img alt="' + listaSponsorAlt[randomnumber] + '" border="0" src="' + listaSponsorLogo[randomnumber] + '" width="xx" height="yy"></a>';}
                   randomnumber +=1;
                   if (randomnumber > max) randomnumber = 0;   
                } 
             document.getElementById('DivTopSponsor_lista').innerHTML = ((sponsor + sponsor + sponsor).replace(/xx/g,"100")).replace(/yy/g,"58");
             document.getElementById('DivCorpoDestra_Sponsor').innerHTML = (sponsor.replace(/xx/g,"200")).replace(/yy/g,"116");

        }