// 1 - home
// 2 - femminile
// 4 - maschile
// 8 - commenti
// 16 - 
// 32 - 
// 64 - 
// 128 - 
// 256 - 

voci = new Array (
new Array ("index.htm", "HOME", 32, ""),
new Array ("../index.htm", "HOME", 1+2+4, ""),
new Array ("../../index.htm", "HOME", 8, ""),

new Array ("indexf.htm", "CALCIO A 5 FEMMINILE", 1+2, ""),
new Array ("../indexf.htm", "CALCIO A 5 FEMMINILE", 8, ""),
new Array ("femminile/indexf.htm", "CALCIO A 5 FEMMINILE", 32, ""),

new Array ("indexm.htm", "CALCIO A 5 MASCHILE", 1+4, ""),
new Array ("../indexm.htm", "CALCIO A 5 MASCHILE",16, ""),
new Array ("maschile/indexm.htm", "CALCIO A 5 MASCHILE", 32, ""),

new Array ("stagioni.htm", "Stagioni", 2, ""),
new Array ("../stagioni.htm", "Stagioni", 8, ""),
new Array ("squadra.htm", "Squadra", 2, ""),
new Array ("calendario.htm", "Calendario", 2, ""),
new Array ("classifica.htm", "Classifica", 2, ""),
new Array ("statistiche.htm", "Statistiche", 2, ""),
new Array ("../campi.htm", "Indirizzi dei campi da gioco", 2, ""),
new Array ("archivio.htm", "Archivio commenti", 2, ""),

new Array ("mstagioni.htm", "Stagioni", 4, ""),
new Array ("msquadra.htm", "Squadra", 4, ""),
new Array ("mcalendario.htm", "Calendario", 4, ""),
new Array ("mclassifica.htm", "Classifica", 4, ""),
new Array ("mstatistiche.htm", "Statistiche", 4, ""),
new Array ("../campi.htm", "Indirizzi dei campi da gioco", 4, "")
);

stdDiv = 0;

function startPage (tdId, divClass, level)
{
	var cont = 0;
	var cur = 0;
   var fileName = this.location.href.substr (this.location.href.lastIndexOf ("/") + 1);

   if (fileName == '')
      fileName = "index.htm";
    
   window.onresize = onResize;
   window.onload = onResize;

	// document.writeln('<SCRIPT type="text/javascript" for="window" event="onbeforeprint">onPrint ("hi");</SCRIPT>');
	// document.writeln('<SCRIPT type="text/javascript" for="window" event="onafterprint">onPrint ("lo");</SCRIPT>');
	document.writeln('<table class="full"><tr><td id="side"><div class="menu"><p><br></p>');

	while (cont < voci.length)
		{
      if (voci[cont][2] & level)
	   	if (voci[cont][0] == fileName && cur == 0)
            cur = cont;
         else
			   {
			   document.writeln('<p><a href="'+voci[cont][0]+'">'+voci[cont][1]);
			   if (voci[cont][3] != "")
			      document.writeln('  <img src="'+voci[cont][3]+'" border="0">');
			   document.writeln('</a></p>');
			   }
		cont ++;
		}
	document.writeln('</div></td><td id="'+tdId+'">');
	if (divClass != '')
		{
		stdDiv = 1;
		document.writeln('<div class="'+divClass+'">');
		}
   if (cur != 0)
     	document.writeln();
}   

function endPage ()
{
	if (stdDiv == 1)
		document.writeln('</div>');
	document.writeln('</td></tr></table>');
}

function bufOpen ()
{
   return (window.open ("", "bufWin", "dependent"));
}

function imgL (foto)
{
	document.writeln('<div class="fotoL">');
	document.writeln('<p><img src="'+foto+'"></p>');
	document.writeln('</div>');
}

function imgR (foto)
{
	document.writeln('<div class="fotoR">');
	document.writeln('<p><img src="'+foto+'"></p>');
	document.writeln('</div>');
}

function swf (movie)
{
	document.writeln (
      '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+
      'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0"'+
      'width="100%" height="100%">'+
      '  <param name="movie" value="'+ movie + '">'+
      '  <param name="bgcolor" value="#68b5ff">'+
      '<embed id="NSmovie" src="' + movie + '" bgcolor="#68b5ff" width="100%" height="100%"'+
      'name="movie" type="application/x-shockwave-flash"'+
      'pluginspage="http://www.macromedia.com/go/getflashplayer">'+
      '</object>');
}


function setWidth (destId, w)
{
   dest = document.getElementById (destId);
   if (dest)
      {
      dest.style.width = w;
      if (dest.offsetWidth != w)
         dest.style.width = dest.offsetWidth;
      return (dest.style.width);
      }
   return (0);
}      

function onResize ()
{
   dest = document.getElementById ('centrata');
   if (dest)
      {
      sidebar = document.getElementById ('side');
      dest.style.marginLeft = (document.body.offsetWidth - sidebar.offsetWidth - dest.offsetWidth) / 2;
      dest.style.marginTop = (document.body.offsetHeight - dest.offsetHeight) / 2;
      }
   dest = document.getElementById ('NSmovie');
   if (dest)
      dest.height = document.body.offsetHeight;
}

//Funzione per aprire una nuova finestra del browser
function NuovaFinestra(Sorgente,NomeFinestra,Proprieta) {
  window.open(Sorgente,NomeFinestra,Proprieta)
}

