function centra(livello, dimensione) /* Centra in orizzontale */
   {
   if (document.layers)
      {
      document.layers[livello].width=dimensione;
      document.layers[livello].pageX =(window.innerWidth/2)-(document.layers[livello].width/2);
      }
   else
      if (document.all)
         {
		 delive = eval("document.all."+livello);
         delive.width=dimensione;
         delive.style.posLeft =(document.body.clientWidth/2)-(delive.width/2);
         }
      else
	     if (document.getElementById)// && (navigator.userAgent.toLowerCase.indexOf("gecko")!=-1)
            {
            document.getElementById(livello).width=dimensione;
            document.getElementById(livello).style.left =(window.innerWidth/2)-(document.getElementById(livello).width/2);
            }
   }

function centratop(livello) /* Centra in verticale */
   {
   if (document.layers)
      {
      document.layers[livello].height=40;
      document.layers[livello].pageY =(window.innerHeight/2)-(document.layers[livello].height/2);
      }
   else
      if (document.all)
         {
         document.all.primo.height=40;
         document.all.primo.style.posTop =(document.body.clientHeight/2)-(document.all.primo.height/2);
         }
      else
         if (document.getElementById && (navigator.userAgent.toLowerCase.indexOf("gecko")==-1))
            {
            document.getElementById(livello).height=40;
            document.getElementById(livello).style.top =(window.innerHeight/2)-(document.getElementById(livello).height/2);
            }
   }
