//--------------------------------------------
// script vista quadro informazioni per testata
//--------------------------------------------
b=navigator.appName;
addScroll=false;
if (navigator.userAgent.indexOf('MSIE 5')>0) {addScroll = true;}
var off=0;
var txt="";
var pos1=0;
var pos2=0;
var col="";

document.onmousemove = mouseMove;
if (b == "Netscape") {document.captureEvents(Event.MOUSEMOVE)};

function viewinfo()
{
doIt=false;
if (b == "Netscape") 
	{}
else
	{if (document.all['hideinfo'].style.visibility=="hidden") {doIt=true;}}
if (doIt!=false)
	{
//	
// txt=testo
// ttl=titolo (puo' essere omesso)
// col=colore del testo
// pxx=posizione riquadro
// pot=posizione riquadro
// lll=lunghezza riquadro informazioni
// bgc=colore di fondo riquadro informazioni
//
	args=viewinfo.arguments;
	txt=args[0];
	ttl=args[1];
    col=args[2];
    pxx=args[3];
    pot=args[4];
    lll=args[5];
    bgc=args[6];


	writel='<table border="0" cellpadding="0" cellspacing="1" width="'+ lll + '" align="center">';
	writel = writel + '<tr><td height="1" bgcolor="black">'; 
	writel = writel +'<table border="0" cellpadding="2" cellspacing="1" width="100%" align="center">';

        if (ttl > ''){
		writel = writel + '<tr valign="center">'; 
		writel = writel + '<td bgcolor="' + col + '" height="16" width="' + lll + '" valign="center">';
		writel = writel + '<div align="center" valign="middle"><font face="verdana" size="1" color="#FFFFFF"><b>&nbsp;' + ttl +'&nbsp;</font></b></div>';
      	writel = writel + '</td>';
		writel = writel + '</tr>';
        }

	writel = writel + '<tr valign="center">';
	writel = writel + '<td bgcolor="' + bgc + '" colspan="2" height="1">';
	writel = writel + '<p align="center"><font face="verdana" color="' + col + '" size="1">' + txt + '</font></p>';
	writel = writel + '</td>';
	writel = writel + '</tr>';
	writel = writel + '</tr>';
	writel = writel + '</table>';
	writel = writel + '</td>';
	writel = writel + '</tr>';
    writel = writel + '</table>';


	if (b == "Netscape") 
		{
		}
	else 
		{
		document.all['hideinfo'].innerHTML=writel;
		}
	PopTip();
	}
}

function mouseMove(evn,pxx) {

if (b == "Netscape") 
	{
	}
else
	{
	pos1=event.x-pxx;
	pos2=event.y;
	}
if (b == "Netscape") 
	{
	}
else
	{
	if (document.all['hideinfo'].style.visibility=='visible') {PopTip();}
	}
}

function PopTip()
{
if (b == "Netscape") 
	{
	}
else 
	{
   theLayer = eval('document.all[\'hideinfo\']');
	if (theLayer)
		{
		pos1=event.x-pxx;
		pos2=event.y;
		if (addScroll)		
			{
			pos1=pos1+document.body.scrollLeft;
			pos2=pos2+document.body.scrollTop;
			}
		if ((pos1+120)>document.body.clientWidth)
			{
			pos1=pos1-250;			
			}

                if (pot == 0)
			{
			pot=pos2+15;			
			}
			
		
		pos1=pos1+document.body.scrollLeft;
		pos2=pos2+document.body.scrollTop;
		pot=pos2+15;	
//--		
		theLayer.style.pixelLeft=pos1+10;
		theLayer.style.pixelTop=pot;
		theLayer.style.visibility='visible';
		}
	}
}

//--------------------------------------------
// script nascondi quadro informazioni
//--------------------------------------------
function HideTip()
{
	args=HideTip.arguments;
	if (b == "Netscape") 
		{}
	else 
		{ document.all['hideinfo'].style.visibility='hidden'; }
}
//
//-----------------------------------------------------------
// richiamo finestre "pop-up" centrate
//-----------------------------------------------------------

function popup(str,nome,w,h,f)
{
t = (screen.height-h)/2
l = (screen.width-w)/2
msg = window.open(str,nome, 'width=' + w + ',height=' + h + ',top=' + t + ',left=' + l + f); 
} 


//--------------------------------------------
// chiude finestra di pop up
//--------------------------------------------

function closewindow()
{
chiudi=self.close
}

// -------------------------- END -----------------------