var br;
br=0;
if (document.layers) {br=1} //NN4
if (document.all) {br=2} //IE 
if (document.getElementById) {br=3} //NN6 IE5+ OPERA5+

NS6 = (document.getElementById&&!document.all)
IE = (document.all)
NS = (navigator.appName=="Netscape" && navigator.appVersion.charAt(0)=="4")


function centra(obj,largh){
var winlargh;
var newcentro;
   if (window.innerWidth) {
       winlargh=window.innerWidth;
   } else if (window.document.body.clientWidth) {
              winlargh=window.document.body.clientWidth;
          }
   //alert (br);
   newcentro=Math.round((winlargh/2)-(largh/2));
   if (newcentro<0) {
      newcentro=0;
   }

   if (br==1) {
      coma="document.layers[obj].left=newcentro";
      eval(coma);
      } else if (br==2) {
               coma="document.all[obj].style.pixelLeft=newcentro";
               eval(coma);
             }
   if (br==3) {coma="document.getElementById(obj).style.pixelLeft=newcentro";eval(coma)}

//document.layers[obj].left=newcentro;
}


function sh(obj){
var winlargh;
var newcentro;
   
   if (br==1) {      
      coma="document.layers[obj].visibility='show'";
      eval(coma);
      } else if (br==2) {
               coma="document.all[obj].style.visibility='visible'";
               eval(coma);
             }
   if (br==3) {coma="document.getElementById(obj).style.visibility='visible'";eval(coma)}

//document.layers[obj].left=newcentro;
}

function hd(obj){
var winlargh;
var newcentro;
   
   if (br==1) {      
      coma="document.layers[obj].visibility='hide'";
      eval(coma);
      } else if (br==2) {
               coma="document.all[obj].style.visibility='hidden'";
               eval(coma);
             }
   if (br==3) {coma="document.getElementById(obj).style.visibility='hidden'";eval(coma)}

//document.layers[obj].left=newcentro;
}

function fin(nome,w,h,stringa,print,language) {
wn=80+parseInt(w);
hn=120+parseInt(h);
	
if (hn>550) {
    hn=550;
}	
if (wn>750) {
    wn=750;
}
w=String(wn);
h=String(hn);

mywin=window.open("", "Image", "resizable=yes,toolbar=no,directories=no,menubar=no,scrollbars=yes,width="+wn+",height="+hn);
mywin.document.writeln("<HTML><HEAD><TITLE>"+stringa+"</TITLE>");
mywin.document.writeln("</HEAD><BODY>");

mywin.document.writeln("<style>");
mywin.document.writeln("<!--");
mywin.document.writeln("BODY,P,SPAN,DIV,A {font-family:arial,verdana,helvetica,sans-serif}");
mywin.document.writeln("span.titolo {font-size:35px;font-weight:bold;font-style:italic;color='#ffffff'}");
mywin.document.writeln("span.ombra {font-size:35px;font-weight:bold;font-style:italic;color='#000000'}");
mywin.document.writeln("//--> ");
mywin.document.writeln("</style>");

mywin.document.writeln("<body bgcolor='#E8F19F'>");
mywin.document.writeln("<div id='titolo' style='position:absolute; width:314px; height:54px; z-index:2; left: 74px; top: 38px'><span class='titolo'>"+stringa+"</span></div>");
mywin.document.writeln("<div id='ombra' style='position:absolute; width:314px; height:54px; z-index:1; left: 77px; top: 41px'><span class='ombra'>"+stringa+"</span></div>");

mywin.document.writeln("<table><tr><td align='center'>");
mywin.document.writeln("<table cellspacing='0' cellpadding='15'><tr><td align='center' bgcolor='#FFFFFF'>");
mywin.document.writeln("<table cellspacing='0' cellpadding='3'><tr><td align='center' bgcolor='#000000'>");
mywin.document.writeln("<img src='"+nome+"' border='0' alt=''>");
mywin.document.writeln("</td></tr></table>");
mywin.document.writeln("</td></tr></table>");
mywin.document.writeln("<input type='button' onClick='self.close()' value='Chiudi finestra'>");
if (print==1) {
mywin.document.writeln("<input type='button' onClick='window.print()' value='Stampa finestra'>");
}
mywin.document.writeln("</td></tr>");
mywin.document.writeln("</table>");

mywin.document.writeln("</BODY></HTML>");
mywin.document.close();
mywin.focus();
}

function fineng(nome,w,h,stringa,print,language) {
wn=80+parseInt(w);
hn=120+parseInt(h);
	
if (hn>550) {
    hn=550;
}	
if (wn>750) {
    wn=750;
}
w=String(wn);
h=String(hn);

mywin=window.open("", "Image", "resizable=yes,toolbar=no,directories=no,menubar=no,scrollbars=yes,width="+wn+",height="+hn);
mywin.document.writeln("<HTML><HEAD><TITLE>"+stringa+"</TITLE>");
mywin.document.writeln("</HEAD><BODY>");

mywin.document.writeln("<style>");
mywin.document.writeln("<!--");
mywin.document.writeln("BODY,P,SPAN,DIV,A {font-family:arial,verdana,helvetica,sans-serif}");
mywin.document.writeln("span.titolo {font-size:35px;font-weight:bold;font-style:italic;color='#ffffff'}");
mywin.document.writeln("span.ombra {font-size:35px;font-weight:bold;font-style:italic;color='#000000'}");
mywin.document.writeln("//--> ");
mywin.document.writeln("</style>");

mywin.document.writeln("<body bgcolor='#E8F19F'>");
mywin.document.writeln("<div id='titolo' style='position:absolute; width:314px; height:54px; z-index:2; left: 74px; top: 38px'><span class='titolo'>"+stringa+"</span></div>");
mywin.document.writeln("<div id='ombra' style='position:absolute; width:314px; height:54px; z-index:1; left: 77px; top: 41px'><span class='ombra'>"+stringa+"</span></div>");

mywin.document.writeln("<table><tr><td align='center'>");
mywin.document.writeln("<table cellspacing='0' cellpadding='15'><tr><td align='center' bgcolor='#FFFFFF'>");
mywin.document.writeln("<table cellspacing='0' cellpadding='3'><tr><td align='center' bgcolor='#000000'>");
mywin.document.writeln("<img src='"+nome+"' border='0' alt=''>");
mywin.document.writeln("</td></tr></table>");
mywin.document.writeln("</td></tr></table>");
mywin.document.writeln("<input type='button' onClick='self.close()' value='Close Window'>");
if (print==1) {
mywin.document.writeln("<input type='button' onClick='window.print()' value='Print'>");
}
mywin.document.writeln("</td></tr>");
mywin.document.writeln("</table>");

mywin.document.writeln("</BODY></HTML>");
mywin.document.close();
mywin.focus();
}