/* TESTA RISOLUZIONE */
var expDays = 0;
var page = "vari/risoluz.htm";
var windowprops =
"width=350,height=330,location=no,toolbar=no,menubar=no,scrollbars=no,directories=no,resizable=yes";
function GetCookie (name) { 
var arg = name + "="; 
var alen = arg.length; 
var clen = document.cookie.length; 
var i = 0; 
while (i < clen) { 
var j = i + alen; 
if (document.cookie.substring(i, j) == arg) 
return getCookieVal (j); 
i = document.cookie.indexOf(" ", i) + 1; 
if (i == 0) break; 
} 
return null;
}
function SetCookie (name, value) { 
var argv = SetCookie.arguments; 
var argc = SetCookie.arguments.length; 
var expires = (argc > 2) ? argv[2] : null; 
var path = (argc > 3) ? argv[3] : null; 
var domain = (argc > 4) ? argv[4] : null; 
var secure = (argc > 5) ? argv[5] : false; 
document.cookie = name + "=" + escape (value) + 
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
((path == null) ? "" : ("; path=" + path)) + 
((domain == null) ? "" : ("; domain=" + domain)) + 
((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) { 
var exp = new Date(); 
exp.setTime (exp.getTime() - 1); 
var cval = GetCookie (name); 
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function amt(){
var count = GetCookie('count')
if(count == null) {
SetCookie('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
}
}
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function checkCount() {
var count = GetCookie('count');
if (count == null) {
count=1;
SetCookie('count', count, exp);
window.open(page, "", windowprops);
}
else {
count++;
SetCookie('count', count, exp);
}
}
// End -->



/* TEST BROWSER */
<!-- begin hiding from old browsers.
// copyright (c) Joshua Nicholas Tolson jtnt@mindspring.com
// http://www.geocities.com/sunsetstrip/alley/3680/index.html
// Are we using Internet Explorer or no?
if (navigator.appName.substring(0,9) == "Microsoft") {
// Non faccio niente.
}
// Good. We are probably using Netscape.
else {
ApriFinestraBrowser() ;
}
//Done hiding from old browsers. -->




/* APRI FINESTRA BROWSER */
function ApriFinestraBrowser() 
{
msg=open("vari/browser.htm","browser","toolbar=no,directories=no,menubar=no,width=450,height=300,resizable=yes");
}



/* APRI FINESTRA SECONDARIA*/
function ApriFinestra() {
 msg=open ("../vari/sommario/menu.htm","menudinamico","toolbar=no,directories=no,scrollbars=no,menubar=no,width=185,height=290,resizable=yes");
}


/* APRI FINESTRA SECONDARIA DA INDICE */
function ApriFinestraDaIndice() {
 msg=open ("vari/sommario/menu.htm","menudinamico","toolbar=no,directories=no,scrollbars=no,menubar=no,width=180,height=260,resizable=yes");
}


/*APRI FINESTRA CREDITS OGNI TOT GIORNI */
var expDays = 1;
var page = "../vari/credits.htm";
var windowprops =
"width=450,height=390,location=no,toolbar=no,menubar=no,scrollbars=no,directories=no,resizable=yes";
function GetCookie (name) { 
var arg = name + "="; 
var alen = arg.length; 
var clen = document.cookie.length; 
var i = 0; 
while (i < clen) { 
var j = i + alen; 
if (document.cookie.substring(i, j) == arg) 
return getCookieVal (j); 
i = document.cookie.indexOf(" ", i) + 1; 
if (i == 0) break; 
} 
return null;
}
function SetCookie (name, value) { 
var argv = SetCookie.arguments; 
var argc = SetCookie.arguments.length; 
var expires = (argc > 2) ? argv[2] : null; 
var path = (argc > 3) ? argv[3] : null; 
var domain = (argc > 4) ? argv[4] : null; 
var secure = (argc > 5) ? argv[5] : false; 
document.cookie = name + "=" + escape (value) + 
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
((path == null) ? "" : ("; path=" + path)) + 
((domain == null) ? "" : ("; domain=" + domain)) + 
((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) { 
var exp = new Date(); 
exp.setTime (exp.getTime() - 1); 
var cval = GetCookie (name); 
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function amt(){
var count = GetCookie('count')
if(count == null) {
SetCookie('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
}
}
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function checkCount() {
var count = GetCookie('count');
if (count == null) {
count=1;
SetCookie('count', count, exp);
window.open(page, "", windowprops);
}
else {
count++;
SetCookie('count', count, exp);
}
}
// End -->




/*Apre finestra RISOLUZIONE ogni tot giorni */
var expDays = 1;
var page = "../vari/risoluz.htm";
var windowprops =
"width=450,height=390,location=no,toolbar=no,menubar=no,scrollbars=no,directories=no,resizable=yes";
function GetCookieR (name) { 
var arg = name + "="; 
var alen = arg.length; 
var clen = document.cookie.length; 
var i = 0; 
while (i < clen) { 
var j = i + alen; 
if (document.cookie.substring(i, j) == arg) 
return getCookieValR (j); 
i = document.cookie.indexOf(" ", i) + 1; 
if (i == 0) break; 
} 
return null;
}
function SetCookieR (name, value) { 
var argv = SetCookieR.arguments; 
var argc = SetCookieR.arguments.length; 
var expires = (argc > 2) ? argv[2] : null; 
var path = (argc > 3) ? argv[3] : null; 
var domain = (argc > 4) ? argv[4] : null; 
var secure = (argc > 5) ? argv[5] : false; 
document.cookie = name + "=" + escape (value) + 
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
((path == null) ? "" : ("; path=" + path)) + 
((domain == null) ? "" : ("; domain=" + domain)) + 
((secure == true) ? "; secure" : "");
}
function DeleteCookieR (name) { 
var exp = new Date(); 
exp.setTime (exp.getTime() - 1); 
var cval = GetCookieR (name); 
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function amt(){
var count = GetCookieR('count')
if(count == null) {
SetCookieR('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookieR('count')
SetCookieR('count',newcount,exp)
return count
}
}
function getCookieValR(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function checkCountR() {
var count = GetCookieR('count');
if (count == null) {
count=1;
SetCookieR('count', count, exp);
window.open(page, "", windowprops);
}
else {
count++;
SetCookieR('count', count, exp);
}
}
// End -->



/* Apri Finestra animazione*/
function ApriFinestraAnimazione() 
{
msg=open("testi/flash.htm","flash","location=no,toolbar=no,menubar=no,scrollbars=no,directories=no,width=525,height=336,resizable=no");
}



/* Apri Finestra animazione da Index*/
function ApriFinestraAnimazioneDaIndex() 
{
msg=open("testi/flash.htm","flash","location=no,toolbar=no,menubar=no,scrollbars=no,directories=no,width=525,height=336,resizable=no");
}



/* PING PONG SULLA STATUS BAR */
<!--
/* MjM'S JAVA CODENAME = PINGPONG
   This JavaScript Code was written by MjM for Hyperchat UK
   I am not responsible for any damage caused by my code.
   This code can be modified as long as the Author's Name is still attached.
   Email : MjM@hyperchat.co.uk © Copyright 1996
*/
var yourwords = "* Questa è un'animazione. Per te da Peradàm *";
var buffer1="                        ";
var buffer2="                        ";
var message1=buffer1+yourwords+buffer2;
var dir = "left";
var speed = 30;
function pingpong()
{
if (dir == "left")
  {
    message2=message1.substring(2,message1.length)+"  ";
    window.status=message2;
    setTimeout("pingpong();",speed);
    message1=message2;
    if (message1.substring(0,1) == "*") dir="right";
  }
else
  {
    message2="  "+message1.substring(0,message1.length-2);
    window.status=message2;
    setTimeout("pingpong();",speed);
    message1=message2;
    if (message1.substring(message1.length-1,message1.length) == "*") dir="left";
  }
}
// -->





/* TESTO MULTICOLORE */
<!--
// ------------- Browser Detector ---------------
// Possible values for browser are:
//  "netscape"
//  "opera"     <--(ewww)
//  "msie"      <--(double ewww)
//  "robot"
//  "unknown"
// Possible values for version are:
//  any numerical value (3, 2.02, 4.04, etc.)
//  0 if unable to determine

var browser = "unknown";
var version = 0;

if (navigator.userAgent.indexOf("Opera") >= 0)
 browser = "opera";
else if (navigator.userAgent.indexOf("obot") >= 0)
 browser = "robot";
else if (navigator.appName.indexOf("etscape") >= 0)
 browser = "netscape";
else if (navigator.appName.indexOf("icrosoft") >= 0)
 browser = "msie";

version = parseFloat(navigator.appVersion);
if (isNaN(version)) version = 0;
if ((browser == "msie")&&(version == 2)) version = 3;

// ------------------ Gradient Output --------------------
// Syntax for use:

//     gradient(TEXT_STRING_HERE,HEXCODES_STRING_HERE);

//  use in similar way you would use document.write();
//  note, it cannot be used to return a string value.
//  gradient() takes two arguements. the first will
//  be the original pure text string. (no htmlcodes)
//  the second argument is a string of color hexcodes
//  seperated with spaces thru which the text should
//  progress. for example say you wanted to print out
//  the string "color gradient", and you wanted it to
//  progress from blue to red. a color code for blue
//  is 4444FF, and a color code for red is FF4444.
//  taking those two codes, and the original string,
//  somewhere in the body of the document you would
//  write within a <Script> tag the following:
//  gradient("color gradient","4444FF FF4444");
//  if however, you wanted it to progress thru three
//  or more colors, its as simple as adding them to the
//  string of color codes. it is important to remember
//  however that the string must be color HEXCODES, and
//  not merely just color names, (e.x- "red", "yellow")
//  if this seems like too much trouble, then perhaps
//  you should try something simple like ripping off
//  some annoying status bar text scroller. =̃
//  one last thing. if you overuse this script, i can
//  pretty much gaurantee people will hate your webpage.
//  the fact is, this javascript is memory intensive. if
//  you overdo it, you're crashing some visitors' browsers.
//  ------------------------------------------------------

// lookup table
var tohex = new Array(256);
var hex = "0123456789ABCDEF";
var count = 0;
for (x=0; x<16; x++) {
 for (y=0; y<16; y++) {
 tohex[count] = hex.charAt(x) + hex.charAt(y);
 count++;
 }
}

//ColorCode constructor
function ColorCode(hexcode) {
  if (hexcode.length == 7) {
    this.r = parseInt(hexcode.substring(1,3),16);
    this.g = parseInt(hexcode.substring(3,5),16);
    this.b = parseInt(hexcode.substring(5,7),16);
  }
  else if (hexcode.length == 6) {
    this.r = parseInt(hexcode.substring(0,2),16);
    this.g = parseInt(hexcode.substring(2,4),16);
    this.b = parseInt(hexcode.substring(4,6),16);
  }
  else {
    this.r = this.g = this.b = 0;
    alert("Error: ColorCode constructor failed");
  }
  if (isNaN(this.r)||isNaN(this.g)||isNaN(this.b))
    alert("Error: ColorCode constructor failed");
}

// ColorList constructor
function ColorList(hexcodes) {
  var i = 0;
  var c = 0;
  this.codes = new Array(Math.round(hexcodes.length/7));
  while (i < hexcodes.length) {
    if (isNaN(parseInt(hexcodes.substring(i,i+6),16))) ++i;
    else {
      this.codes[c] = new ColorCode(hexcodes.substring(i,i+6));
      i += 7;
      ++c;
    }
  }
  this.len = c;
}

function interpolate (x1, y1, x3, y3, x2) {
  if (x3 == x1) return y1
  else return (x2-x1)*(y3-y1)/(x3-x1) + y1
}

// x=index of letter, y=number of letters, z=number of colors
function lowcolorindex (x, y, z) {
  if (y == 1) return 0
  else return Math.floor( (x*(z-1))/(y-1) )
}

function hicolorindex (x, y, z, low) { 
  if ( low*(y-1) == x*(z-1) ) return low
  else if (y == 1) return 0
  else return Math.floor( (x*(z-1))/(y-1) + 1 )
}

function gradient (thetext,thecolors) {
  if (((browser == "netscape")||(browser == "msie")||(browser == "opera"))&&(version>=3.0)) {
    var colors = new ColorList(thecolors);
    var numcolors = colors.len;
    var numchars = thetext.length;
    var rr = 0;
    var gg = 0;
    var bb = 0;
    var lci = 0; //lower color index
    var hci = 0; //high color index
    for (i=0; i<numchars; ++i) {
      lci = lowcolorindex(i, numchars, numcolors);
      hci = hicolorindex(i, numchars, numcolors, lci);
      rr = Math.round(interpolate( lci/(numcolors-1), colors.codes[lci].r, hci/(numcolors-1), colors.codes[hci].r, i/(numchars-1)));
      gg = Math.round(interpolate( lci/(numcolors-1), colors.codes[lci].g, hci/(numcolors-1), colors.codes[hci].g, i/(numchars-1)));
      bb = Math.round(interpolate( lci/(numcolors-1), colors.codes[lci].b, hci/(numcolors-1), colors.codes[hci].b, i/(numchars-1)));
      if (browser == "opera") {
        rr = 255 - rr;
        gg = 255 - gg;
        bb = 255 - bb;
      }
	document.write(thetext.charAt(i).fontcolor(tohex[rr]+tohex[gg]+tohex[bb]));
    }
  }
  else document.write(thetext); // unrecognized browser, better not to attempt anything fancy
}
      
//-->






/* TESTO CHE SFUMA */
          ie4 = ((navigator.appName == "Microsoft Internet Explorer") &&
(parseInt(navigator.appVersion) >= 4 ))
          ns4 = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4 ))
          if (ns4) {
            layerRef="document.layers";
            styleRef="";
          } else {
            layerRef="document.all";
            styleRef=".style";
          }
/*
 <whew> After 2 days of researching and parsing the codes of others
 i finally was able to make a text fade-in/out script <g>
 Unfortunately, this can only do 3 colors, Red, Green and Blue.
 But don't worry, I'm working on it so that it'll work with any color
 and background. And do excuse the extra codes... this is my
 first script. Anyway, feel free to use the script but do pls include this little
 copyright...
 Emmanuel C. Halos - agent_teg@ThePentagon.com Copyright 1997
 script created : 23 December 1997

 "What a Cold Christmas this is going to be...."  btw, the script works for IE4 and NS4 :)
 */

          var convert = new Array();
          var hexbase = new Array("0", "1", "2", "3", "4", "5", "6", "7", 
                                  "8", "9", "A", "B", "C", "D", "E", "F");
          var value=0;
          var rgb;

          for (x=0; x<16; x++) {
                for (y=0; y<16; y++) {
                        convert[value] = hexbase[x] + hexbase[y];
                        value++;
                }
           }

          function changeContent(wColor,message) {
            rgb = "#"+convert[wColor]+"0000";
            if (ns4) {
                eval(layerRef + '["Last"]' + styleRef + '.document.write("<font color="+rgb+">"+message+"</font>")');
                eval(layerRef + '["Last"]' + styleRef + '.document.close()');
            } else {
                eval('Last.innerHTML="<font color="+rgb+">"+message+"</font>"');
            }
          }

          function Fade(wColor, inout, speed, textDisp, topx, leftx) {
            if (ns4) {
                    eval(layerRef + '["Last"]' + styleRef + '.top = topx'); 
                    eval(layerRef + '["Last"]' + styleRef + '.left = leftx'); 
            } else {
                    eval(layerRef + '["Last"]' + styleRef + '.posTop = topx')
                    eval(layerRef + '["Last"]' + styleRef + '.posLeft = leftx');
            }

            if (inout == 1) {
                if (wColor < 255) {
                  wColor+=speed;
                  if (wColor > 255) wColor=255; 
                  changeContent(wColor, textDisp);
                 
setTimeout("Fade("+wColor+","+inout+","+speed+",'"+textDisp+"',"+topx+","+leftx+")",0);
                }
            } else {
                if (wColor > 0) {
                  wColor-=speed;
                  if (wColor < 0) wColor=0;
                  changeContent(wColor, textDisp);
                 
setTimeout("Fade("+wColor+","+inout+","+speed+",'"+textDisp+"',"+topx+","+leftx+")",0);
                } 
            }
          }
/*
 * Statement : Fade("Last", initialvalue [0-255], fade[fadein=1,fadeout=0], speed, textDisp string);
 */
        function introduction() {
          Fade(255, 0, 4, '<span class=BigLet>Q</span><span class=small>uesta animazione</span><span class=BigLet> è </span><span class=small>fornita da HTML.it</span>', 50, 150);
          setTimeout("Fade(0, 1, 4, '<span class=small>funziona con IE 4, NS 4 e versioni successive</span>', 170, 120)",7000);
          setTimeout("Fade(255, 0, 4, '<span class=small>Vuoi inserirla nel tuo sito?</span>', 120, 170)",19000);
          setTimeout("Fade(0, 1, 4, '<span class=small>.. e firma il libro degli ospiti</span>', 70, 100)",28000);
          setTimeout("Fade(255, 0, 4, '<span class=small>Author: <a href=http://www2.mozcom.com/~halos>Teg</a></span>', 170, 90)",38000);
          setTimeout("Fade(0, 1, 4, '<span class=small>Scrivi ad HTML.it <a href=mailto:peogs@tin.it>peogs@tin.it</a></span>', 170, 50)",48000);
        }




/* TESTO DINAMICO SULLO SFONDO  */
<!-- 
var message=new Array()
message[0]="Servizi per il Web"
message[1]="Siti per le aziende"
message[2]="Newsletter animate"
message[3]="Formazione personalizzata"
message[4]="Consulenze marketing - comunicazione"

var tickerpadding=0
var fnt="Verdana"
var fntsize=14
var fntcolor="#D08F0F"
var fntsizelastletter=24
var fntcolorlastletter="#006699"
var fntweight=6
var standstill=5000
var speed=80
var leftposition=10
var topposition=-5
var tickerwidth
var tickerheight
var i_substring=0
var i_presubstring=0
var i_message=0
var messagecontent=""
var messagebackground=""
var messagepresubstring=""
var messageaftersubstring=""
fntweight=fntweight*100
function initiateticker() {
	if (document.all) {	
		tickerheight = document.body.clientHeight-5
    	tickerwidth = document.body.clientWidth-5
		document.all.ticker.style.posLeft=leftposition
		document.all.ticker.style.posTop=topposition
		showticker()
	}
	if (document.layers) {
		tickerheight = window.innerHeight-10
    	tickerwidth = window.innerWidth-10
		document.ticker.left=leftposition
		document.ticker.top=topposition
		showticker()
	}
}

function getmessagecontent() {
		messagepresubstring=message[i_message].substring(0,i_presubstring)
		messageaftersubstring=message[i_message].substring(i_presubstring,i_substring)
		messagecontent="<table border=0 cellpadding="+tickerpadding+" width="+tickerwidth+" height="+tickerheight+"><tr><td valign=top>"
		messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsize+"pt;font-weight:"+fntweight+"'>"	
		messagecontent+="<font color='"+fntcolor+"'>"
		messagecontent+=messagepresubstring
		messagecontent+="</font>"
		messagecontent+="</span>"
		messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsizelastletter+"pt;font-weight:900'>"	
		messagecontent+="<font color='"+fntcolorlastletter+"'>"
		messagecontent+=messageaftersubstring
		messagecontent+="</font>"
		messagecontent+="</span>"
		messagecontent+="</td></tr></table>"
}

function showticker() {
	if (i_substring<=message[i_message].length-1) {
			i_substring++
			i_presubstring=i_substring-1
			if (i_presubstring<0) {i_presubstring00}
			getmessagecontent()
		if (document.all) {
			ticker.innerHTML=messagecontent
			var timer=setTimeout("showticker()", speed)
		}
		if (document.layers) {
			document.ticker.document.write(messagecontent)
			document.ticker.document.close()
			var timer=setTimeout("showticker()", speed)
		}
	}
	else {
		clearTimeout(timer)
		var timer=setTimeout("changemessage()", standstill)
	}
}

function changemessage() {
	i_substring=0
	i_presubstring=0
	i_message++
	if (i_message>message.length-1) {
		i_message=0
	}
	showticker()
}

// - End of JavaScript - -->