<!--
////////////////////////////////////////////////////////////////////////////////////
//
//    ATTENTION NETSCAPE NAVIGATOR 3.0 USERS!!!
//
//    If you see this text while using the site and you did NOT click on
//    View -> Source, you're using a buggy browser.
//
//    FOLLOW THESE STEPS
//
//    Read through these two steps before doing them.
//    1. Press your BACK BUTTON.
//    2. Click on REFRESH or RELOAD.
//
//    You should now be able to use the site without seeing this message.
//    This problem can however return if your browser does not cache this
//    document correctly.
//
//    UPGRADE YOUR BROWSER
//
//    Upgrade your browser to Netscape's latest and you will not have this
//    problem any more.
//
//    Netscape browsers can be found at http://home.netscape.com/
//
////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////
//
// overLIB 2002 (> 2.22)  --  Please leave this notice.
//
// By Pio Clemente -- Last modified 2002-08-31
// Based on overLIB 2.22 by Erik Bosrup -- See below
//
// Completely revised for better use with most recent browsers
//
////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////
//  overLIB 2.22  --  Please leave this notice.
//
//  By Erik Bosrup (erik@bosrup.com)  Last modified 1999-03-31
//  Portions by Dan Steinman, Landon Bradshaw and Gnowknayme.
//
//  Get the latest version at http://www.bosrup.com/web/overlib/
//
//  This script library was created for my personal usage from the start
//  but then it became so popular I made an easy to use version. It's that
//  version you're using now. Since this is free please don't try to sell
//  this solution to a company claiming it is yours. Give me credit where
//  credit is due and I'll be happy. And I'd love to see any changes you've
//  done to the code. Free to use - don't abuse.
////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////
// INIT
////////////////////////////////////////////////////////////////////////////////////
isCB = false // Capable Browser
isUB = false // Unable Browser (Opera & Konqueror)
isVC = false // Visibility Capable (IE, NS, KO)
isMC = false // Mouse Capable (IE, NS, KO)
isIe4 = false
isIe5 = false
isNs = false
isNs6 = false
isOp5 = false
isKo = false
isNs = (navigator.userAgent.indexOf('Mozilla')>-1 && navigator.userAgent.indexOf('MSIE')==-1)?true:false
isNs4 = (document.layers)?true:false
isNs6 = (isNs && parseInt(navigator.appVersion) >= 5)?true:false
isOp = (navigator.userAgent.indexOf('Opera')>-1)?true:false
isOp5 = ((navigator.userAgent.indexOf('Opera')>-1 && parseInt(navigator.appVersion)>=5) || navigator.userAgent.indexOf('Opera 5')>-1 || navigator.userAgent.indexOf('Opera 6') > -1)?true:false
isIe4 = (document.all)?true:false
isIe5 = (isIe4 && navigator.userAgent.indexOf('MSIE 5')>0)?true:false
isKo = (navigator.userAgent.indexOf('Konqueror')>-1)?true:false
isVC = (isIe4 || isNs || isKo)?true:false
if (isOp || isKo) {
        isUB = true
} else {
        if (isIe4 || isNs) isCB = true
}

////////////////////////////////////////////////////////////////////////////////////
// CONFIGURATION
////////////////////////////////////////////////////////////////////////////////////
if (typeof odWidth == 'undefined') var odWidth = 200 // Width of the popups in pixels
if (typeof odPadding == 'undefined') var odPadding = "0" // Padding
if (typeof odSpacing == 'undefined') var odSpacing = "0" // Spacing
if (typeof odOffsetX == 'undefined') var odOffsetX = 10 // How many pixels to the right/left of the cursor to show the popup
if (typeof odOffsetY == 'undefined') var odOffsetY = 10 // How many pixels to the below the cursor to show the popup
if (typeof odBorderW == 'undefined') var odBorderW = "1" // How thick the border should be in pixels
if (typeof odBorderC == 'undefined') var odBorderC = "#333399" // Border color, caption color and logo background
if (typeof odCaptionC == 'undefined') var odCaptionC = "#FFFFFF" // Color of the caption text
if (typeof odCloseC == 'undefined') var odCloseC = "#9999FF" // Color of "Close" when using Sticky
if (typeof odTextC == 'undefined') var odTextC = "#000000" // Content cell text color
if (typeof odTextB == 'undefined') var odTextB = "#CCCCFF" // Content cell background color
if (typeof odTextA == 'undefined') var odTextA = "CENTER" // Content cell alignement 
if (typeof odLogoImg == 'undefined') var odLogoImg = "" // Logoimg
if (typeof odLogoP == 'undefined') var odLogoP = "r" // Logopos
if (typeof odLogoW == 'undefined') var odLogoW = "0" // Logo Width
if (typeof odLogoH  == 'undefined') var odLogoH = "0" // Logoh
if ((odLogoW == "0") || odLogoH == "0") {
	odLogoW = "0"
	odLogoH = "0"
}

var odlogoCell = ""
if ("" != odLogoImg) {
	odlogoCell += '<TD><img border="0" src="' + odLogoImg + '"'
	if (odLogoW != "0") odlogoCell += ' width="' + odLogoW + '" height="' + odLogoH + '"'
	odlogoCell += '></TD>'
}
// _odBorderW_ funge da valore per il padding della tabella esterna
// e per il padding (stile) della cella (per ns6)
// _odBorderC_ funge da valore per il colore della tabella esterna
// e della tabella interna
var borderTableS = '<TABLE width="' + odWidth + '" border="0" cellpadding="' + odBorderW + '"'
borderTableS += ' cellspacing="0" bgcolor="' + odBorderC + '"><TR valign="TOP">'
borderTableS += '<TD style="padding: ' + odBorderW + 'px;">'

//txt = "<TABLE WIDTH=" + odWidth + " BORDER=0 CELLPADDING=" + odBorderW + " CELLSPACING=0 BGCOLOR=" + odBorderC + "><TR>"
//txt += "<TD><TABLE WIDTH=100% height=100% BORDER=0 CELLPADDING=" + odPadding + " CELLSPACING=" + odSpacing + " BGCOLOR=" + odFcolor + "><TR>"


var contTableS = '<TABLE width="100%" border="0" cellpadding="' + odPadding + '"'
contTableS += ' cellspacing="' + odSpacing + '" BGCOLOR="' + odFcolor + '"><TR valign="TOP">'
//txt += "<TD><TABLE WIDTH=100% height=100% BORDER=0 CELLPADDING=" + odPadding + " CELLSPACING=" + odSpacing + " BGCOLOR=" + odFcolor + "><TR>"


var overCellS = '<TD class="overdivtxt" width="100%" align="' + odTextA + '">'
/*
overCellS += '<P style="text-align: ' + odTextA + '; color: ' + odTextC + ';'
if (isCB || isOp) overCellS += ' margin-top: ' + odPadding + 'px;'
overCellS += ' margin-left: ' + odPadding + 'px;'
overCellS += ' padding-right: ' + odPadding + 'px;'
if (!isNs4) overCellS += ' padding-bottom: ' + odPadding + 'px;'
overCellS += ' font-family: sans-serif; font-size: 12px; line-height: 13px;">'
*/
if (isKo) overCellS += '<img src="" border="0" width="1" height="' + odPadding + '"><BR>'
var overCellE = '<br>'
//var overCellE = ''
if (isNs4) overCellE +='<img src="" border="0" width="1" height="' + odPadding + '">'
//overCellE += '</P>'

//txt += "<TD class=\"overdivtxt\" width=\"100%\" align=center>" + text + "</TD>"

var endCell = '</TD>'
var endTable = '</TR></TABLE>'
var titleCellS = '<TR><TD bgcolor="' + odBorderC + '"'
titleCellS += (odLogoImg != "")?' colspan="2"':''
titleCellS += '>'
titleCellS += '<P style="font-weight: bold; color: ' + odCaptionC + ';'
titleCellS += ' margin-left: 3px;'
titleCellS += ' font-family: sans-serif; font-size: 12px; line-height: 15px;">'
var titleCellE = "</P></TD></TR>"

////////////////////////////////////////////////////////////////////////////////////
// END CONFIGURATION
////////////////////////////////////////////////////////////////////////////////////
var VISIBLE = "visible"
var HIDDEN = "hidden"
if (isNs4) {
	VISIBLE = "show"
	HIDDEN = "hide"
}
//alert(navigator.userAgent + '\n\n' + navigator.appVersion + '\n\nisIe4 = ' + isIe4 + '\nisIe5 = ' + isIe5 + '\nisNs = ' + isNs + '\nisNs4 = ' + isNs4 + '\nisNs6 = ' + isNs6 + '\nisOp = ' + isOp + '\nisOp5 = ' + isOp5 + '\nisKo = ' + isKo + '\nisCapableBrowser = ' + isCB + '\nisUncapableBrowser = ' + isUB)
//if (isKo) alert('Spiacente!\nIl tuo browser non è in grado\ndi visualizzare le info connesse\nai link blu contenuti\nin questa pagina.')
var x = 0;
var y = 0;
var snow = 0;
var sw = 0;
var cnt = 0;
var dir = 1;
var tr = 1;
if (isNs4) odOverL = document.overDiv
else {
	if (isIe4) odOverL = overDiv.style
	else odOverL = document.getElementById('overDiv').style
}
//alert("odOverL.top = " + odOverL.left)
if (isCB || isUB) document.onmousemove = mouseMove
if (isNs4) document.captureEvents(Event.MOUSEMOVE)
//alert(menu[0])
////////////////////////////////////////////////////////////////////////////////////
// END INIT
////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////
// Public functions to be used on pages.
////////////////////////////////////////////////////////////////////////////////////

// CENTER POPUPS
function dcs(text) { dts(2,text) } // Simple
function dcc(text, title) { dtc(2,text,title) } // Caption
function scc(text,title) { stc(2,text,title) } // Sticky caption

// RIGHT POPUPS
function drs(text) { dts(1,text) } // Simple
function drc(text, title) { dtc(1,text,title) } // Caption
function src(text,title) { stc(1,text,title) } // Sticky caption

// LEFT POPUPS
function dls(text) { dts(0,text) } // Simple
function dlc(text, title) { dtc(0,text,title) } // Caption
function slc(text,title) { stc(0,text,title) } // Sticky caption

// Clears popups if appropriate
function nd() {
if ( cnt >= 1 ) sw = 0
if ( sw == 0 ) {
	snow = 0;
	hideObject(odOverL)
} else cnt++
}

//
// Non public functions. These are called by other functions etc.
//

// Simple popup
function dts(d,text) {
txt = borderTableS + contTableS


txt += (odLogoP == "l")?odlogoCell:""
txt += overCellS + text + overCellE + endCell
if (odLogoP == "r")	txt += odlogoCell
txt += endTable + endCell + endTable

win = layerWrite(txt);
dir = d;
disp();
}

// Caption popup
function dtc(d,text,title) {
txt = borderTableS + contTableS
txt += titleCellS + title + titleCellE
txt += (odLogoP == "l")?odlogoCell:""
txt += overCellS + text + overCellE + endCell
if (odLogoP == "r")	txt += odlogoCell
txt += endTable + endCell + endTable
/*
txt = "<TABLE WIDTH=" + width + " BORDER=0 CELLPADDING=" + border + " CELLSPACING=0 BGCOLOR=\""+backcolor+"\"><TR>"
txt += "<TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=" + padding + " CELLSPACING=" + spacing + "><TR>"
if (logoimg != "") {
	if (logopos == "l") {
		txt += "<TD><img src=\"" + logoimg
		if (logow != "0") {
			txt += " width=" + logow + " height=" + logoh
		}
		txt += "></td>"
	}
}
//txt += "<TD><SPAN ID='PTT'><B><FONT COLOR=\'" + capcolor + "\'>" + title + "</FONT></B></SPAN></TD>"
if (logoimg != "") {
	if (logopos == "r") {
		txt += "<TD><img src=\"" + logoimg
		if (logow != "0") {
			txt += " width=" + logow + " height=" + logoh
		}
		txt += "></td>"
	}
}
txt += "</TR></TABLE>"
txt += "<TABLE WIDTH=100% BORDER=0 CELLPADDING=" + padding + " CELLSPACING=" + spacing + " BGCOLOR=\""+fcolor+"\"><TR>"
txt += "<TD><SPAN ID=\"PST\"><FONT COLOR=\"" + textcolor + "\">" + text + "</FONT><SPAN></TD>"
txt += "</TR></TABLE></TD>"
txt += "</TR></TABLE>"
*/
win = layerWrite(txt);
dir = d;
disp();
}

// Sticky
function stc(d,text, title) {
sw = 1;
cnt = 0;
txt = "<TABLE WIDTH="+odWidth+" BORDER=0 CELLPADDING="+border+" CELLSPACING=0 BGCOLOR=\"" + odBorderC + "\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><SPAN ID=\"PTT\"><B><FONT COLOR=\""+odCaptionC+"\">"+title+"</FONT></B></SPAN></TD><TD ALIGN=RIGHT><A HREF=\"/\" onMouseOver=\"cClick();\" ID=\"PCL\"><FONT COLOR=\"" + odCloseC + "\">Close</FONT></A></TD></TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=\"" + odTextB + "\"><TR><TD><SPAN ID=\"PST\"><FONT COLOR=\""+textcolor+"\">"+text+"</FONT><SPAN></TD></TR></TABLE></TD></TR></TABLE>"
layerWrite(txt);
dir = d;
disp();
snow = 0;
}

////////////////////////////////////////////////////////////////////////////////////
// Common calls
////////////////////////////////////////////////////////////////////////////////////

// Moves the layer
function mouseMove(e) {
if (!isKo && isIe4) {
	x=event.x;
	y=event.y;
}
if (isOp) {
	x=odWidth/2 + 50
	y=odWidth/2
//	x=odWidth/2 + document.body.scrollLeft + 50;
//	y=odWidth/2 + document.body.scrollTop;
}
if (isKo) {
	x=odWidth/2 + document.body.scrollLeft + 50;
	y=odWidth/2 + document.body.scrollTop;
}
//alert('x=' + x + '  y=' + y + menu[0])
if (!isKo && isNs) {
	x=e.pageX;
	y=e.pageY;
}
if (isIe5) {
	x=event.x+document.body.scrollLeft;
	y=event.y+document.body.scrollTop;
}
if (snow) 	{
	if (dir == 2) { moveTo(odOverL,x + odOffsetX - odWidth/2,y + odOffsetY); } // Center
	if (dir == 1) { moveTo(odOverL,x + odOffsetX,y + odOffsetY); } // Right
	if (dir == 0) { moveTo(odOverL,x - odOffsetX - odWidth,y + odOffsetY); } // Left
}
//window.status="x= " + x + " y=" + y
}

function disp() {
if (snow == 0) {
	newy = y + odOffsetY
	if (dir == 2) newx = x + odOffsetX - odWidth/2	// Center
	if (dir == 1) newx = x + odOffsetX				// Right
	if (dir == 0) newx = x + odOffsetX - odWidth	// Left
	moveTo(odOverL,newx,newy)
	showObject(odOverL);
	snow = 1;
}
// Here you can make the text goto the statusbar.
}

// Make an object visible
function showObject(obj) { if (isVC) obj.visibility = VISIBLE }

// Writes to a layer
function layerWrite(txt) {
if (isOp) {
//	alert(odWidth/2+10)
	var apriFin = "scrollbars=yes,left=" + parseInt(odWidth/2 + 50) + ",top=" + parseInt(odWidth/2) + ",width=" + parseInt(odWidth + 16) + ",height=100"
	var win = window.open("","help",apriFin)
	win.document.write("<HTML><HEAD></HEAD><BODY marginheight=0 marginwidth=0>" + txt + "</BODY></HTML>")
        win.document.close()
	return(win)
}
if (isNs4) {
	var lyr = document.overDiv.document
	lyr.write(txt)
	lyr.close()
	return
}
if (isIe4) {
	document.all["overDiv"].innerHTML = txt
	return
}
if (isCB) document.getElementById("overDiv").innerHTML = txt
}

// Hides an object
function hideObject(obj) { if (isVC) obj.visibility = HIDDEN }

// Moves a layer
function moveTo(obj,xL,yL) {
if (isOp) {
	win.focus()
	return
}
if (isVC) {
	obj.left = xL
	obj.top = yL
}
//alert(obj.left + ' ' + obj.top)
}

// The Close onMouseOver function for Sticky
function cClick() {
hideObject(odOverL);
sw=0;
}
// -->
