preObj = false;
preObjBar = false;

function keepMoving(objBar,id){
	//alert('sono entrato nella keepmoving');
	//set obj
	objBar.style.backgroundImage = 'url(images/open.gif)';
	var obj = (document.getElementById(id))? document.getElementById(id):null;
	//alert("l'oggetto è -->" + obj);
	if(obj == null){alert("l'oggetto è nullo");}else{releaseMoving(objBar,obj);}
	//search the opened obj
}

function releaseMoving(objBar,obj){
	//alert("sono entrato nella release moving con obj-->" + obj);
	if(preObj != obj && preObjBar != objBar){
		//alert("preObj("+preObj+") è diverso da obj");
		if(preObj && preObjBar){
			//alert("preObj non falso perciò chiudo");
			preObj.style.display = 'none';
			preObjBar.style.backgroundImage = 'url(images/open.gif)';
		}
		//alert("apro l'obj");
		objBar.style.backgroundImage = 'url(images/close.gif)';
		obj.style.display = 'block';
		preObjBar = objBar;
		preObj = obj;
	}else{
		objBar.style.backgroundImage = 'url(images/close.gif)';
		obj.style.display = 'block';
	}
}

function operaRescue(bn){
	if(navigator.appName == 'Opera'){	// && (http1 == 'home' || https1 == 'home')){

		var styleForComunicati = '';
		styleForComunicati += '<style>';
			styleForComunicati +='div#comunicatistampa{width:372px;height:70px;}';
			styleForComunicati +='div#comunicatistampa h2{padding-left:10px}';
			styleForComunicati +='div#comunicatistampa li{margin:0px 10px 0px 10px;}';
			styleForComunicati +='div#comunicatistampa_bg{ background-color:#FFFFFF;}';
			styleForComunicati +='div#lanciHomeGroup{width:384px;}';
			//styleForComunicati +='div#footer{margin:-1280px 0px 0px 20px;}';
			styleForComunicati +='div#frasi{width:auto;margin-top:30px;}';
		styleForComunicati += '</style>';
		document.getElementsByTagName('head')[0].innerHTML += styleForComunicati;

		var loginHeight = document.getElementById('login').offsetHeight;
		var navPosition = position(document.getElementById('nav'));
		var col_dx = document.getElementById('coldxOpera');
		col_dx.style.position = 'absolute';
		col_dx.style.left = navPosition[0] + navPosition[1] + 'px';
		col_dx.style.top =  navPosition[2] + 'px';//loginHeight + 'px';
		var bignewPosition = position(document.getElementById('bignew'));
		var bignewULPosition = position(document.getElementById('bignew').getElementsByTagName('ul')[0]);
		var breakinHeight = 0;
		if(bn){
			var breakin_obj = document.getElementById('breaking-news');
			var breakinHeight = document.getElementById('breaking-news-it').offsetHeight;
			breakin_obj.style.position = 'absolute';
			breakin_obj.style.left = bignewULPosition[0] + 'px';
			breakin_obj.style.top =  bignewPosition[2] + bignewPosition[3] + 'px';//loginHeight + 8 + 'px';
		}
		var comunicati_obj = document.getElementById('comunicatistampa');
		var comunicatiHeight = comunicati_obj.offsetHeight + 15;
		var lanci_obj = document.getElementById('lanciHomeGroup');		
		lanci_obj.style.position = 'absolute';
		lanci_obj.style.left = bignewULPosition[0] + 'px';
		lanci_obj.style.top = bignewPosition[2] + bignewPosition[3] + breakinHeight + comunicatiHeight + 'px';//loginHeight + 'px';
		comunicati_obj.style.position = 'absolute';
		comunicati_obj.style.left = bignewULPosition[0] + 'px';
		comunicati_obj.style.top =  bignewPosition[2] + bignewPosition[3] + breakinHeight + 5 + 'px';//+ loginHeight 
		var lanciHeight = 0;
		var num_div_lanci = document.getElementById('lanciHomeGroup').getElementsByTagName('div').length;
		for(i=0;i<num_div_lanci;i++){			
			//alert("numero"+i+"altezza ="+document.getElementById('lanciHomeGroup').getElementsByTagName('div')[i].offsetHeight);
			lanciHeight = lanciHeight + document.getElementById('lanciHomeGroup').getElementsByTagName('div')[i].offsetHeight;
			//alert("altezza totale ="+ lanciHeight );
			}
		lanciHeight = lanciHeight + 5;
		var footer_obj = document.getElementById('footer');		
		footer_obj.style.position = 'absolute';
		//footer_obj.style.left = bignewULPosition[0] + 'px';
		footer_obj.style.top = bignewPosition[2] + bignewPosition[3] + breakinHeight + comunicatiHeight + lanciHeight+ 'px';//loginHeight + 'px';
	}
}

function position(obj) {
	var width = height = 0;
	width = obj.offsetWidth;
	height = obj.offsetHeight;
	
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	//alert('ritorno le variabili curleft='+curleft+', curtop='+curtop+', mw='+mw+', mh='+mw+'');
	return [curleft,width,curtop,height];
}

/*if(navigator.appName == 'Opera' && (http1 == 'home' || https1 == 'home')){
	operaCss = document.createElement('link');
	operaCss.href = '/it_IT/static/css/opera_rescue.css';
	operaCss.rel = 'stylesheet';
	operaCss.type = 'text/css';
	operaCss.id = 'opera';
	//var css = '<link href="'+originalCss+'" rel="stylesheet" type="text/css" id="3a">';
	if(!document.getElementById('opera')){
		document.getElementsByTagName('head')[0].insertAdjacentElement('beforeEnd',operaCss);
		//document.getElementById('head').addChild(css);
	}
}*/

function screenAdjust(){
	if(screen.width == '1280'){
		var bodyStyle = document.getElementsByTagName('body')[0].style;
		var divZero = document.getElementsByTagName('div')[0];
		var divFrst = divZero.getElementsByTagName('div')[0];
		var divScnd = divFrst.getElementsByTagName('div')[0];
		var divTrdt = divScnd.getElementsByTagName('div')[0];
		bodyStyle.paddingLeft = '40px';
		divZero.style.marginLeft = '-40px';
		divZero.style.width = screen.width + 'px';
		divTrdt.style.width = screen.width + 'px';
	}
}


function goTo(url)
{
	if (url) location.href = url;

};

function openMenuSx(){		
	var queryString = parent.location.search.substr(1);
	var variabili = new Array();
	var menu2 = '';
	var menu3 = '';
	if(queryString != ''){
		////alert('la query string non è vuota');
		variabili = queryString.split("&");
		////alert('splitto la query string in un array che diventa --> '+variabili+'');
		for(i=0;i<variabili.length;i++){
			if(variabili[i].indexOf("menu2") == 0){
				////alert('ho trovato menu2');
				menu2 = variabili[i].substr(variabili[i].indexOf("=")+1);
				////alert('menu2 = '+menu2+'');
			}
			if(variabili[i].indexOf("menu3") == 0){
				////alert('ho trovato menu3');
				menu3 = variabili[i].substr(variabili[i].indexOf("=")+1);
				////alert('menu3 = '+menu3+'');
			}
		}
	}
	////alert('sono arrivato qui !');
	if(menu2 != '' || menu3 != ''){
		////alert(menu2 + '  ' + menu3 + 'diversi da vuoto');
		if (document.getElementById(menu2)){
			document.getElementById(menu2).className = 'active';
		}			
		if (document.getElementById(menu2+'Ul')){
			document.getElementById(menu2+'Ul').style.display = '';
		}
		if (document.getElementById(menu2+'Li')){
			document.getElementById(menu2+'Li').className = 'active_only';
		}
		if (document.getElementById(menu3)){
			document.getElementById(menu3).className = 'active';
		}
		if (document.getElementById(menu3+'Ul')){
			document.getElementById(menu3+'Ul').style.display = '';
		}
		if (document.getElementById(menu3+'Li')){
			document.getElementById(menu3+'Li').className = 'active_only';
		}		
	}else{
		////alert("1. la query string è vuota provo a caricare la path");
		var url = parent.location.pathname;// se è tutto in pagina sostituire "parent" con "window"
		var queryString = parent.location.search.substr(1);
		var urlArray = new Array();
		urlArray = url.split('/');
		for (i=0;i<urlArray.length;i++){
			if (document.getElementById(urlArray[i])){
				document.getElementById(urlArray[i]).className = 'active';
			}
			if (document.getElementById(urlArray[i]+'Ul')){	
				document.getElementById(urlArray[i]+'Ul').style.display = '';
			}
			if (document.getElementById(urlArray[i]+'Li')){
				document.getElementById(urlArray[i]+'Li').className = 'active_only';
			}
		}
	}
}

function openMenuDx(id,id2){
	if (id != ''){
		document.getElementById(id).className = 'active';
	}
	if (document.getElementById(id+'Ul')){
		document.getElementById(id+'Ul').style.display = '';
	}
	if (id2 != ''){
		document.getElementById(id2).className = 'active';
	}
	if (document.getElementById(id2+'Ul')){
		document.getElementById(id2+'Ul').style.display = '';
	}
}

function brad(){
	var ul = document.getElementsByTagName('ul');
	for (j=0;j<ul.length;j++){
		if (ul.item(j).className == 'menu_sx'){
			var li = ul.item(j).getElementsByTagName('li');
			for (i=0;i<li.length;i++){
				if (li.item(i).className == 'active' || li.item(i).className == 'active_only'){
					var a = li.item(i).getElementsByTagName('a');
					document.write('&nbsp;&gt;&nbsp; <a href="'+a.item(0)+'">'+a.item(0).innerHTML+'</a>');
				}
			}
		}
	}
}

function HideDIV(d) { 
	if (document.getElementById(d)) {
		document.getElementById(d).style.display = "none"; 
	}
}
function DisplayDIV(d) { 
	if (document.getElementById(d)) {
		document.getElementById(d).style.display = "block"; 
	}
}	

function resizeFont(type){
	var originalCss = '/triennale/css/'+type+'.css';
	css = document.createElement('link');
	css.href = originalCss;
	css.rel = 'stylesheet';
	css.type = 'text/css';
	css.id = '3a';
	//var css = '<link href="'+originalCss+'" rel="stylesheet" type="text/css" id="3a">';
	if(!document.getElementById('3a')){
		document.getElementsByTagName('head')[0].insertAdjacentElement('beforeEnd',css);
		//document.getElementById('head').addChild(css);
	}else{
		var a3 = document.getElementById('3a');
		a3.href = originalCss;
	}
	setCookieRF(type);
}

function goToCondivi() {
   var w = 500;
   var h = 450;
   var l = Math.floor((screen.width-w)/2);
   var t = Math.floor((screen.height-h)/2);
   var stile = "top=" + t + ", left=" + l + ", width=" + w + ", height=" + h + ",location=yes, directories=no, status=yes, menubar=yes, toolbar=yes, scrollbars=yes, resizable=yes";

   window.open("/portal/tools/processCondividi.do?url="+location.href,"",stile);
 }
 
function goToContatti() {
	var url2 = location.pathname;
  var urlArray2 = new Array();
  urlArray2 = url2.split('/');
  var locale= urlArray2[0];  	
	window.open("/portal/tools/processContatti.do?locale="+locale,"");
 } 
 
 function gotoCountry (countrySelect,locale) {
 	var prefix = '';
 	var countryOptions, currentValue;
 	
 	countryOptions = countrySelect.options;
 	currentValue = countryOptions[countrySelect.selectedIndex].value;
 	if (currentValue=='') {
 		return;
 	}

	prefix = '/it_IT/azienda/eni-nel-mondo/eni_mondo_open.page';
 	
 	location.href=prefix+'?locale=it_IT&country='+currentValue;
 }
	
	
// carica la finestra per aggiungere il sito nei preferiti 
function bookmark()
{
	var ua=navigator.userAgent.toLowerCase();
	var isKonq=(ua.indexOf('konqueror')!=-1);
	var isSafari=(ua.indexOf('webkit')!=-1);
	var isMac=(ua.indexOf('mac')!=-1);
	var buttonStr=isMac?'Command/Cmd':'CTRL';
	
	if(window.external && (!document.createTextNode ||
	  (typeof(window.external.AddFavorite)=='unknown'))) {
		window.external.AddFavorite(location.href,document.title); // IE
	} else if(window.sidebar){ // firefox
		//alert('ok');
		//alert(location.href + ' ' + document.title);
		window.sidebar.addPanel(document.title, location.href,"");
	} else if(isKonq) {
	  //alert('Per aggiungere questa pagina come nuovo segnalibro premere CTRL + B');
	  // //alert('You need to press CTRL + B to bookmark our site');
	} else if(window.opera) {
	  //void(0); // non fai niente (Opera 7+)
	  alert('Per aggiungere questa pagina nei preferiti premere '+buttonStr+' + D');
	} else if(window.home || isSafari) { // Firefox, Netscape, Safari, iCab
	  alert('Per aggiungere questa pagina nei preferiti premere '+buttonStr+' + D');
	  ////alert('You need to press '+buttonStr+' + D to bookmark our site');
	} else if(!window.print || isMac) { // IE5/Mac e Safari 1.0
	  //alert('Per aggiungere questa pagina nei preferiti premere Command/Cmd + D');  
	  ////alert('You need to press Command/Cmd + D to bookmark our site');    
	}
} 
//Stampa Nuova
//funzione per la stampa della pagina con header e corpo centrale col_centro
function print_preview () {
	
	//var disp_setting="toolbar=no,location=no,directories=no,menubar=yes"; 
	var divs = document.getElementsByTagName('div');

	for(i=0;i<divs.length;i++){

		if(divs.item(i).className == 'col_centro'){

			var itemCol_centro = divs.item(i);

			i = divs.length;

		}

	}
	var htmlBody = itemCol_centro.innerHTML;
	//alert(htmlBody);
	var boxStampa = '<div id="printf" align="right" style="visibility:visible;"><img src="images/print.gif" border="0"/><a href="#" style="" onClick="window.print()">Print Page</a>&#160;&#160;<img src="images/close_print.gif" border="0"/><a href="#" style="" onClick="window.close()">Close Window</a></div>';

	//var htmlBody = document.getElementById('container').innerHTML;
	var docprint=window.open("","","");
	docprint.document.open();
	docprint.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" href="/it_IT/static/css/sIFR-print.css"/></head><body>'+boxStampa+'<div id="container"><div id="contenuti"><div class="col_centro">'+htmlBody+'</div></div></div></body></html>');
	//docprint.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" href="/it_IT/static/css/sIFR-print.css"/></head><body>');
	//docprint.document.write(htmlBody);
	//docprint.document.write('</body></html>');
	//docprint.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="/it_IT/static/css/print.css"/><link rel="stylesheet" href="/it_IT/static/css/sIFR-print.css"/></head><body>prova per la stampa</body></html>');
	docprint.document.close();
	//docprint.focus();
	//docprint.window.print();
}	

//Fine Stampa Nuova
//funzione per la stampa della pagina con header e corpo centrale col_centro
function print_preview_old () {
	
	//var disp_setting="toolbar=no,location=no,directories=no,menubar=yes"; 
	var divs = document.getElementsByTagName('div');
	for(i=0;i<divs.length;i++){
		if(divs.item(i).className == 'col_centro'){
			var itemConteiner = divs.item(i);
			i = divs.length;
		}
	}
	var headHTML = document.getElementsByTagName('head')[0].innerHTML;
	var htmlBody = itemConteiner.innerHTML;
	var boxStampa = '<div id="printf"><img src="images/print.gif" alt="stampa" border="0"/>&nbsp;';
	if(document.all){
		boxStampa += '<a href="javascript:window.print();" accesskey="p">Stampa</a></div>';
	}else{boxStampa += '<a href="javascript:location.reload();" accesskey="p">Stampa</a></div>';}
	var docprint = window.open('','','');
	docprint.focus();
	docprint.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n');
	docprint.document.write('<html xmlns="http://www.w3.org/1999/xhtml">\n');
	docprint.document.write('<head>\n');
	docprint.document.write('<link type="text/css" href="/it_IT/static/css/print.css" rel="stylesheet" media="print">');
	docprint.document.write(headHTML);
	docprint.document.write('<style>div#bookmark{display:none;visibility:hidden;}</style>');
	docprint.document.write('</head>\n');
	docprint.document.write('<body>\n');
	docprint.document.write('<div id="container"><div class="col_centro">\n');
	docprint.document.write(boxStampa);
	if(!document.all){docprint.document.write('<script language="javascript">window.print();</script>\n');}
	docprint.document.write(htmlBody);
	docprint.document.write('</html>');
	//window.setTimeout("docprint.print()", 2000);
	if(document.all){//for IE
		docprint.location.reload(true);
	}
	//docprint.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="/it_IT/static/css/print.css"/><link rel="stylesheet" href="/it_IT/static/css/sIFR-print.css"/></head><body>prova per la stampa</body></html>');
	//docprint.document.close();
}	

// --------------------------------------------------------------------------------------
// INIZIO CODICE JS FORNITO DA COMES
// --------------------------------------------------------------------------------------

var ua = navigator.userAgent
var ps = navigator.productSub 
var dom = (document.getElementById)? 1:0
var ie4 = (document.all&&!dom)? 1:0
var ie5 = (document.all&&dom)? 1:0
var nn4 =(navigator.appName.toLowerCase() == "netscape" && parseInt(navigator.appVersion) == 4)
var nn6 = (dom&&!ie5)? 1:0
var sNav = (nn4||nn6||ie4||ie5)? 1:0
var cssFilters = ((ua.indexOf("MSIE 5.5")>=0||ua.indexOf("MSIE 6")>=0)&&ua.indexOf("Opera")<0)? 1:0
var Style=[],Text=[],Count=0,sbw=0,move=0,hs="",mx,my,scl,sct,ww,wh,obj,sl,st,ih,iw,vl,hl,sv,evlh,evlw,tbody
var HideTip = "eval(obj+sv+hl+';'+obj+sl+'=0;'+obj+st+'=-800')"
var doc_root = ((ie5&&ua.indexOf("Opera")<0||ie4)&&document.compatMode=="CSS1Compat")? "document.documentElement":"document.body"
var PX = (nn6)? "px" :"" 

if(sNav) {
	window.onresize = ReloadTip
	document.onmousemove = MoveTip
	if(nn4) document.captureEvents(Event.MOUSEMOVE) 
}	
if(nn4||nn6) {
	mx = "e.pageX"
	my = "e.pageY"
	scl = "window.pageXOffset"
	sct = "window.pageYOffset"	
	if(nn4) {
		obj = "document.TipLayer."
		sl = "left"
		st = "top"
		ih = "clip.height"
		iw = "clip.width"
		vl = "'show'"
		hl = "'hide'"
		sv = "visibility="
	}
	else obj = "document.getElementById('TipLayer')."
} 
if(ie4||ie5) {
	obj = "TipLayer."
	mx = "event.x"
	my = "event.y"
	scl = "eval(doc_root).scrollLeft"
	sct = "eval(doc_root).scrollTop"
	if(ie5) {
		mx = mx+"+"+scl 
		my = my+"+"+sct
	}
}
if(ie4||dom){
	sl = "style.left"
	st = "style.top"
	ih = "offsetHeight"
	iw = "offsetWidth"
	vl = "'visible'"
	hl = "'hidden'"
	sv = "style.visibility="
}
if(ie4||ie5||ps>=20020823) {
	ww = "eval(doc_root).clientWidth"
	wh = "eval(doc_root).clientHeight"
}	 
else { 
	ww = "window.innerWidth"
	wh = "window.innerHeight"
	evlh = eval(wh)
	evlw = eval(ww)
	sbw=15
}	
/*
function applyCssFilter(){
	if(cssFilters&&FiltersEnabled) { 
		var dx = " progid:DXImageTransform.Microsoft."
		TipLayer.style.filter = "revealTrans()"+dx+"Fade(Overlap=1.00 enabled=0)"+dx+"Inset(enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=in enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=out enabled=0)"+dx+"Iris(irisstyle=DIAMOND,motion=in enabled=0)"+dx+"Iris(irisstyle=DIAMOND,motion=out enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=in enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=out enabled=0)"+dx+"Iris(irisstyle=STAR,motion=in enabled=0)"+dx+"Iris(irisstyle=STAR,motion=out enabled=0)"+dx+"RadialWipe(wipestyle=CLOCK enabled=0)"+dx+"RadialWipe(wipestyle=WEDGE enabled=0)"+dx+"RadialWipe(wipestyle=RADIAL enabled=0)"+dx+"Pixelate(MaxSquare=35,enabled=0)"+dx+"Slide(slidestyle=HIDE,Bands=25 enabled=0)"+dx+"Slide(slidestyle=PUSH,Bands=25 enabled=0)"+dx+"Slide(slidestyle=SWAP,Bands=25 enabled=0)"+dx+"Spiral(GridSizeX=16,GridSizeY=16 enabled=0)"+dx+"Stretch(stretchstyle=HIDE enabled=0)"+dx+"Stretch(stretchstyle=PUSH enabled=0)"+dx+"Stretch(stretchstyle=SPIN enabled=0)"+dx+"Wheel(spokes=16 enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=0,motion=forward enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=0,motion=reverse enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=1,motion=forward enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=1,motion=reverse enabled=0)"+dx+"Zigzag(GridSizeX=8,GridSizeY=8 enabled=0)"+dx+"Alpha(enabled=0)"+dx+"Dropshadow(OffX=3,OffY=3,Positive=true,enabled=0)"+dx+"Shadow(strength=3,direction=135,enabled=0)"
	}
}
*/
function stm(t,s) {
  if(sNav) {
  	if(t.length<2||s.length<25) {
		var ErrorNotice = "DHTML TIP MESSAGE VERSION 1.2 ERROR NOTICE.\n"
		if(t.length<2&&s.length<25) alert(ErrorNotice+"It looks like you removed an entry or more from the Style Array and Text Array of this tip.\nTheir should be 25 entries in every Style Array even though empty and 2 in every Text Array. You defined only "+s.length+" entries in the Style Array and "+t.length+" entry in the Text Array. This tip won't be viewed to avoid errors")
		else if(t.length<2) alert(ErrorNotice+"It looks like you removed an entry or more from the Text Array of this tip.\nTheir should be 2 entries in every Text Array. You defined only "+t.length+" entry. This tip won't be viewed to avoid errors.")
		else if(s.length<25) alert(ErrorNotice+"It looks like you removed an entry or more from the Style Array of this tip.\nTheir should be 25 entries in every Style Array even though empty. You defined only "+s.length+" entries. This tip won't be viewed to avoid errors.")
 	}
  	else {
		var ab = "" ;var ap = ""
		var titCol = (s[0])? "COLOR='"+s[0]+"'" : ""
		var txtCol = (s[1])? "COLOR='"+s[1]+"'" : ""
		var titBgCol = (s[2])? "BGCOLOR='"+s[2]+"'" : ""
		var txtBgCol = (s[3])? "BGCOLOR='"+s[3]+"'" : ""
		var titBgImg = (s[4])? "BACKGROUND='"+s[4]+"'" : ""	
		var txtBgImg = (s[5])? "BACKGROUND='"+s[5]+"'" : ""
		var titTxtAli = (s[6] && s[6].toLowerCase()!="left")? "ALIGN='"+s[6]+"'" : ""
		var txtTxtAli = (s[7] && s[7].toLowerCase()!="left")? "ALIGN='"+s[7]+"'" : ""   
		var add_height = (s[15])? "HEIGHT='"+s[15]+"'" : ""
		if(!s[8])  s[8] = "Verdana,Arial,Helvetica"
		if(!s[9])  s[9] = "Verdana,Arial,Helvetica"					
		if(!s[12]) s[12] = 1
		if(!s[13]) s[13] = 1
		if(!s[14]) s[14] = 200
		if(!s[16]) s[16] = 0
		if(!s[17]) s[17] = 0
		if(!s[18]) s[18] = 10
		if(!s[19]) s[19] = 10
		hs = s[11].toLowerCase() 
		if(ps==20001108){
		if(s[2]) ab="STYLE='border:"+s[16]+"px solid"+" "+s[2]+"'"
		ap="STYLE='padding:"+s[17]+"px "+s[17]+"px "+s[17]+"px "+s[17]+"px'"}
		var closeLink=(hs=="sticky")? "<TD ALIGN='right'><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"'><A HREF='javascript:void(0)' ONCLICK='stickyhide()' STYLE='text-decoration:none;color:"+s[0]+"'><B>Close</B></A></FONT></TD>":""
		var title=(t[0]||hs=="sticky")? "<TABLE WIDTH='100%' BORDER='0' CELLPADDING='0' CELLSPACING='0'><TR><TD "+titTxtAli+"><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"' "+titCol+"><B>"+t[0]+"</B></FONT></TD>"+closeLink+"</TR></TABLE>" : ""
		var txt="<TABLE "+titBgImg+" "+ab+" WIDTH='"+s[14]+"' BORDER='0' CELLPADDING='"+s[16]+"' CELLSPACING='0' "+titBgCol+" ><TR><TD>"+title+"<TABLE WIDTH='100%' "+add_height+" BORDER='0' CELLPADDING='"+s[17]+"' CELLSPACING='0' "+txtBgCol+" "+txtBgImg+"><TR><TD "+txtTxtAli+" "+ap+" VALIGN='top'><FONT SIZE='"+s[13]+"' FACE='"+s[9]+"' "+txtCol +">"+t[1]+"</FONT></TD></TR></TABLE></TD></TR></TABLE>"
		if(nn4) {
			with(eval(obj+"document")) {
				open()
				write(txt)
				close()
			}
		}
		else eval(obj+"innerHTML=txt")
		tbody = {
			Pos:s[10].toLowerCase(), 
			Xpos:s[18],
			Ypos:s[19], 
			Transition:s[20],
			Duration:s[21], 
			Alpha:s[22],
			ShadowType:s[23].toLowerCase(),
			ShadowColor:s[24],
			Width:parseInt(eval(obj+iw)+3+sbw)
		}
		if(ie4) { 
			TipLayer.style.width = s[14]
	 		tbody.Width = s[14]
		}
		Count=0	
		move=1
 	 }
  }
}

function MoveTip(e) {
	if(move) {
		var X,Y,MouseX = eval(mx),MouseY = eval(my); tbody.Height = parseInt(eval(obj+ih)+3)
		tbody.wiw = parseInt(eval(ww+"+"+scl)); tbody.wih = parseInt(eval(wh+"+"+sct))
		switch(tbody.Pos) {
			case "left" : X=MouseX-tbody.Width-tbody.Xpos; Y=MouseY+tbody.Ypos; break
			case "center": X=MouseX-(tbody.Width/2); Y=MouseY+tbody.Ypos; break
			case "float": X=tbody.Xpos+eval(scl); Y=tbody.Ypos+eval(sct); break	
			case "fixed": X=tbody.Xpos; Y=tbody.Ypos; break		
			default: X=MouseX+tbody.Xpos; Y=MouseY+tbody.Ypos
		}

		if(tbody.wiw<tbody.Width+X) X = tbody.wiw-tbody.Width
		if(tbody.wih<tbody.Height+Y+sbw) {
			if(tbody.Pos=="float"||tbody.Pos=="fixed") Y = tbody.wih-tbody.Height-sbw
			else Y = MouseY-tbody.Height
		}


		if(X<0) X=0 
		eval(obj+sl+"=X+PX;"+obj+st+"=Y+PX")
		ViewTip()
	}
}

function ViewTip() {
  	Count++
	if(Count == 1) {
		if(cssFilters&&FiltersEnabled) {	
			for(Index=28; Index<31; Index++) { TipLayer.filters[Index].enabled = 0 }
			for(s=0; s<28; s++) { if(TipLayer.filters[s].status == 2) TipLayer.filters[s].stop() }
			if(tbody.Transition == 51) tbody.Transition = parseInt(Math.random()*50)
			var applyTrans = (tbody.Transition>-1&&tbody.Transition<24&&tbody.Duration>0)? 1:0
			var advFilters = (tbody.Transition>23&&tbody.Transition<51&&tbody.Duration>0)? 1:0
			var which = (applyTrans)?0:(advFilters)? tbody.Transition-23:0 
			if(tbody.Alpha>0&&tbody.Alpha<100) {
	  			TipLayer.filters[28].enabled = 1
	  			TipLayer.filters[28].opacity = tbody.Alpha
			}
			if(tbody.ShadowColor&&tbody.ShadowType == "simple") {
	  			TipLayer.filters[29].enabled = 1
	  			TipLayer.filters[29].color = tbody.ShadowColor
			}
			else if(tbody.ShadowColor&&tbody.ShadowType == "complex") {
	  			TipLayer.filters[30].enabled = 1
	  			TipLayer.filters[30].color = tbody.ShadowColor
			}
			if(applyTrans||advFilters) {
				eval(obj+sv+hl)
	  			if(applyTrans) TipLayer.filters[0].transition = tbody.Transition
	  			TipLayer.filters[which].duration = tbody.Duration 
	  			TipLayer.filters[which].apply()
			}
		}
 		eval(obj+sv+vl)
		if(cssFilters&&FiltersEnabled&&(applyTrans||advFilters)) TipLayer.filters[which].play()
		if(hs == "sticky") move=0
  	}
}

function stickyhide() {
	eval(HideTip)
}

function ReloadTip() {
	 if(nn4&&(evlw!=eval(ww)||evlh!=eval(wh))) location.reload()
	 else if(hs == "sticky") eval(HideTip)
}

function htm() {
	if(sNav) {
		if(hs!="keep") {
			move=0; 
			if(hs!="sticky") eval(HideTip)
		}	
	} 
}

        function tendina (ident, num){
        var elem;         
        if(document.getElementById) 
        { var elem = document.getElementById(num);
        } else if (document.all)
        { var elem = document.all[num]; 
        } 
 if (window.XMLHttpRequest) {
        if (document.getElementById(ident).style.display=='none') {
         document.getElementById(ident).style.display='table-row'; 
                } else { 
                document.getElementById(ident).style.display='none'; 
                }        
        } else {
        if (document.getElementById(ident).style.display=='none') {
  document.getElementById(ident).style.display='block';
         } else {
         document.getElementById(ident).style.display='none';
         };
        };
 }


// --------------------------------------------------------------------------------------
// FINE CODICE JS FORNITO DA COMES
// --------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------
// INIZIO CODICE PER alert STAMPA PAGINA
// --------------------------------------------------------------------------------------

var IE = document.all?true:false //creo una variabile la quale è valorizzata a true se il broswer è IE o false se è un altro

var xCoords = 0
var yCoords = 0
var x = '';

function over(obj,idDiv){
	//alert('sono entrato');
	if (!IE) document.captureEvents(Event.MOUSEMOVE) //NETSCAPE(MOZILLA FIREFOX) catturo l'evento movimento del mouse;
	document.onmousemove = getMouseCoords;
	//alert('prendo le coordinate');
	//alert('xCoords = ' + xCoords + 'px; yCoords = ' + yCoords + 'px'); 
	document.getElementById(idDiv).style.visibility = 'visible';
	//alert('visualizzo il div --> ' + document.getElementById(idDiv));
	 if (xCoords < 0 || yCoords < 0){
		document.getElementById('alert').style.display = 'none';
	} else { //altrimenti via all'integrazione con il box
		document.getElementById('alert').style.left = xCoords + 'px';
		document.getElementById('alert').style.top = yCoords - 100 + 'px';
		//document.getElementById('alert').innerHTML = 'xCoords = ' + xCoords + '<br />yCoords = ' + yCoords;
	}
	window.clearTimeout(x);
	x = window.setTimeout("out()", 3000);

	return true
}

function out(){
	//alert('ci sono i 3 secondi sono scaduti');
	document.getElementById('alert').style.visibility = 'hidden';
}

function getMouseCoords(e) {
	if (IE) { // prendo la posizione del mouse se il broswer è IE
		xCoords = event.clientX + document.documentElement.scrollLeft;
		yCoords = event.clientY + document.documentElement.scrollTop;
	} else {   // prendo la posizione del mouse se il broswer è MF
		xCoords = e.pageX
		yCoords = e.pageY
	}  
	// possibili valori negativi in Nescape 4
}

// --------------------------------------------------------------------------------------
// FINE CODICE PER alert STAMPA PAGINA
// --------------------------------------------------------------------------------------

	// Variabili globali per l'inclusione Ajax
	var ajaxRequest = false;
	var globalDivObject = null;

	// ------------------------------------------------------------------------------------
	// ajaxInclude ()
	// Funzioni per l'inclusione Ajax
	// ------------------------------------------------------------------------------------
	function ajaxInclude (url,divId) {
		
		//window.alert ("ajaxInclude() - Start "+url);
		
		if (divId==null || divId=='') {
			globalDivObject = null;
			ajaxError ("Div Id Not Defined");
			return;
		}

		globalDivObject = document.getElementById(divId);
		
		if (url==null || url=='') {
			ajaxError ('URL not defined');
			return;
		}
		    
		if(window.XMLHttpRequest && !(window.ActiveXObject)) {
			try {
				ajaxRequest = new XMLHttpRequest();
			} catch(e) {
				ajaxRequest = false;
			}
		} else if(window.ActiveXObject) {
			try {
				ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
			} catch(e) {
				try {
					ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
				} catch(e) {
					ajaxRequest = false;
				}
			}
		}
	
		if(ajaxRequest) {
			ajaxRequest.onreadystatechange = new Function ("processInclude();");
			ajaxRequest.open("GET", url, true);
			ajaxRequest.send(null);
		} else {
			ajaxError ("Ajax not supported");
		}

		//window.alert ("ajaxInclude() - End");
	}

	
	// ------------------------------------------------------------------------------------
	// processInclude ()
	// Gestisce la risposta Ajax per l'inclusione
	// ------------------------------------------------------------------------------------
	function processInclude() {
		
		if ( ajaxRequest==null ) return;

		if (ajaxRequest.readyState == 4) {
			if (ajaxRequest.status == 200) {
				var response = ajaxRequest.responseText;
				globalDivObject.innerHTML = response;				
			} else {
				ajaxError ("Error retrieving Content (Code "+ajaxRequest.status+")");
			}
		}
	}
	
	// ------------------------------------------------------------------------------------
	// ajaxError ()
	// ------------------------------------------------------------------------------------
	function ajaxError (message) {
		
		if (globalDivObject==null) {
			message = "AJAX ERROR\n"+message;
			window.alert (message);
		} else{
			message = "<strong>AJAX ERROR<br/>"+message+"</strong>";
			globalDivObject.innerHTML = message;
		}
	}
	

function setCookieHP(checked,which){
	var expire = new Date();
	expire.setTime(expire.getTime() + (60*60*24*31*1000));
	if(checked == true){
		document.cookie = 'nome' + '='+which+'' + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()));
	}else{eraseCooKie(which);}
}

function  eraseCooKie(which){
	var expire = new Date();
	expire.setTime(expire.getTime() - (1000*60*60*24));
	document.cookie= 'nome' + '='+which+'' + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()));
}

function getCookieHP(){
	if (document.cookie.length > 0) {
		var source = new Array();
		source = document.cookie.split('=');
		//alert(source);
		for(i=0;i<source.length;i++){
			//alert(source[i]);
			if(source[i].indexOf('tab') == 0){
				nTab = source[i].substr(3,1);
				//alert(nTab);
				var idImg = 'img' + source[i].substr(0,4);
				//alert(idImg);
				var objImg = document.getElementById(idImg);
				//alert(document.getElementById(idImg));
				//alert(tabc);
				if(objImg){
					m_over(nTab,objImg);
				}
			}else if (document.getElementById("imgtab1")){
				document.getElementById("imgtab1").src="images/menu/tab1selected.jpg";
	  	}
		}
	}
}

	// ------------------------------------------------------------------------------------
	// goLogin ()
	// Gestione della login da Home Page
	// ------------------------------------------------------------------------------------
	function goLogin(mode,selection_area) {
		
		// Ricava il nome del sito
		var hostName = location.href;
		hostName = hostName.substring(hostName.indexOf('//')+2);
		hostName = hostName.substring(0,hostName.indexOf('/'));

		// Ricava la locale del sito		
		var locale = location.href;
		locale = locale.substring(locale.indexOf('//')+2);
		locale = locale.substring(locale.indexOf('/')+1);
		locale = locale.substring(0,locale.indexOf('/'));
		
		if (mode) {
			
			//controllo la tipologia di login selezionata per cercare il link di tipo password
			var selectedType = selection_area.options[selection_area.selectedIndex].innerHTML;			
			
			// Nel caso di login di tipo password riscrivo la url altrimenti prendo il valore dalla option
			if (selectedType == 'Password') {
						if (hostName == 'ensv11wr.eni.it:21090') {
							var destination = 'https://st-cbasic.eni.it/up-cns/LoginUp-Consumer.jsp?TARGET2=https://ensv11wr.eni.it:21443/public/redirect.html';
						}
					  else if (hostName == 'st-eni.eni.it') {
					  	var destination = 'https://st-cbasic.eni.it/up-cns/LoginUp-Consumer.jsp?TARGET2=https://st-eni.eni.it/public/redirect.html';
					  }
					  else {
					  	var destination = 'https://cbasic.eni.it/up-cns/LoginUp-Consumer.jsp?TARGET2=https://www.eni.it/public/redirect.html';
					  	//var destination = 'https://basic.eni.it/up-password/LoginUp-Password.jsp?TARGET2=https://www.eni.it/public/redirect.html';
					  }
			}
			
			// Ricava dalla combo l'URL di destinazione
			else {				
				var destination = selection_area.options[selection_area.selectedIndex].value;
			}
			
		} else {
			// L'URL di destinazione viene passata come parametro
			var destination = selection_area;
		}
		
		if (destination!=null) {
			// Genera il Cookie di atterraggio
			var targetAppl = 'https://'+hostName+'/'+locale+'/reserved/home-shadow.page';
			var cookieValue = "targetappl="+targetAppl+";path=/"; 
			document.cookie= cookieValue;
		
			window.location.href = destination;
		}
	}

function toSubmit(idM,idY){
	var valueM = document.getElementById(idM).value;
	var valueY = document.getElementById(idY).value;
	if(valueM != '' && valueY == ''){
		alert("ATTENZIONE: Se scegli il mese devi selezionare anche l'anno");
		return false;
	}else{
		document.archivio_form.submit();
	}
}

function setCookieRF(type){
	if(type != ''){
		document.cookie = 'rf-to' + '='+type+'' + '; path=/';
	}
}

function getCookieRF(){
	if (document.cookie.length > 0) {
		var source = new Array();
		source = document.cookie.split(';');
		//alert(source[0]);
		for(i=0;i<source.length;i++){
			if(source[i].indexOf('rf') == 0){
				//alert('ok');
				var rfto = source[i].substr(source[i].indexOf("=")+1);
				//alert(rfto);
				resizeFont(rfto);
			}else if(source[i].charAt(0) == ' ' && source[i].indexOf(' rf') == 0){
				var rfto = source[i].substr(source[i].indexOf("=")+1);
				//alert(rfto);
				resizeFont(rfto);
			}
		}
	}	
}

function changeIMG(that){
	if(that.className == 'exp'){
		that.src = 'images/minimized.gif';
		that.className = 'min';
	}else{changeClass(that);}
}

function changeClass(that){
	that.className = 'exp';
	that.src = 'images/expanded.gif';
}

	// ------------------------------------------------------------------------------------
	// Aggiunta js per pagina contatti
	// ------------------------------------------------------------------------------------
function spAccordionByObj(){
	var nElements = 0;
	var accordionElement = Array();
	var animAccordionElement = Array();
	
	this.setElementsCount = setElementsCount;
	this.accordionElement = accordionElement;
	this.switchElement = switchElement;
	this.createElement = createElement;
	this.attachAnimationOpenCloseToElement = attachAnimationOpenCloseToElement;
	

	function switchElement(i){
		//alert(animAccordionElement[i].getObjVisible());
		var okSwitch = true;
		for(var j=0;j<nElements;j++){
			if(animAccordionElement[j].getMoving()){
				okSwitch = false;
			}
		}
		if(okSwitch){
			if(animAccordionElement[i].getObjVisible()){
				animAccordionElement[i].hide();
				//accordionElement[i].setImageToClose();
			}else{
				for(var j=0;j<nElements;j++){
					if(animAccordionElement[j].getObjVisible()){
						animAccordionElement[j].hide();
						//accordionElement[j].setImageToClose();
					}
				}
				animAccordionElement[i].show();
				//accordionElement[i].setImageToOpen();
			}
		}
	}
	function setElementsCount(val){
		nElements = val;
	}
	function createElement(i){
		//alert("fatto");
		accordionElement[i] = new spAccordionElement();
	}
	function attachAnimationOpenCloseToElement(i){
		animAccordionElement[i] = new animationOpenClose();
		animAccordionElement[i].setTargetObj(accordionElement[i].getDivBody());
		//alert("fatto");
	}
	

	function spAccordionElement(){
		var m_divMain = null;
		var m_divTitleBar = null;
		var m_divBody = null;
		var m_openImage = null;
		var m_closeImage = null;
	
		this.divMain = divMain;
		this.divTitleBar = divTitleBar;
		this.divBody = divBody;
		this.getDivBody = getDivBody;
		this.setOpenImage = setOpenImage;
		this.setCloseImage = setCloseImage;
		this.setImageToClose = setImageToClose;
		this.setImageToOpen = setImageToOpen;
				
		function divMain(val){
			m_divMain = val;
		}
		function divTitleBar(val){
			m_divTitleBar = val;
		}
		function divBody(val){
			m_divBody = val;
		}
		function getDivBody(){
			return m_divBody;
		}
		function setOpenImage(val){
			m_openImage = val;
		}
		function setCloseImage(val){
			m_closeImage = val;
		}
		function setImageToClose(){
			m_divTitleBar.style.backgroundImage = m_closeImage;
		}
		function setImageToOpen(){
			m_divTitleBar.style.backgroundImage = m_openImage;
		}
		


	
	}
	
	function animationOpenClose(){
	
		var height = 0;
		var targetHeight = 0;
		var maxHeight = 0;
		var cutSpeed = 15;
		var objVisible = false;
		var moving = false;
		var targetObj = null;
	
		this.setTargetObj = setTargetObj;
		this.show = show;
		this.hide = hide;
		
		this.getObjVisible = getObjVisible;
		this.getMoving = getMoving;
	
		function setTargetObj(val)
		{
			targetObj = val;
			//alert(val.className);
		}
		function getObjVisible(){
			return objVisible;
		}
		function getMoving(){
			return moving;
		}

		
		function show(){
			if(!objVisible){
				targetObj.style.display='block';
				if (maxHeight == 0){
					maxHeight = parseInt(targetObj.offsetHeight);
				}
				height = 0;
				targetObj.style.height = '0px'
				targetHeight = maxHeight;
				objVisible = true;
				moving = true;
				cutInDiv();
			}
		}
		
		function cutInDiv(){
			height += cutSpeed;
			if(height>targetHeight){
				height=targetHeight;
			}
			targetObj.style.height = height+"px";
			if(height<targetHeight){
				setTimeout(cutInDiv,20);
			}else{
				targetObj.style.height = '';
				moving = false;
			}
		}
		
		
		function hide(){
			height = parseInt(targetObj.offsetHeight)
			maxHeight = height;
			targetHeight=0;
			cutOutDiv();
		}
		
		function cutOutDiv(){
			height -= cutSpeed;
			if(height<targetHeight){
				height=targetHeight;
			}
			targetObj.style.height = height+"px";;
			if(height>targetHeight){
				setTimeout(cutOutDiv,20);
			}else{
				//divObj.style.display="none";
				objVisible = false;
				moving = false;
			}
		}
		
		
	
	}



}

//--------------------------------------------------------
var accordionMappaBox = new spAccordionByObj();	
var nextElementCount = 0;

function isKnownElement(obj){
	var isK = 0;
	for(var j=0;j<nextElementCount;j++){
		if(obj == accordionMappaBox.accordionElement[j].getDivBody()){
			isK = j+1;
		}
	}
	return isK;
}

function clickMappa(objLink){
	divMappaObj = 0;
	var o = objLink;
	while(o.className!='box_landing_in'){
		o=o.parentNode;
	}
	for(var j=0;j<o.childNodes.length;j++){
		if(o.childNodes[j].className=="mappa"){
			divMappaObj = o.childNodes[j];
		}
	}
		
	var elem = isKnownElement(divMappaObj);
	if(elem==0){
		//alert(nextElementCount);
		accordionMappaBox.createElement(nextElementCount);
		accordionMappaBox.accordionElement[nextElementCount].divBody(divMappaObj);
		accordionMappaBox.attachAnimationOpenCloseToElement(nextElementCount);
		nextElementCount++;
		accordionMappaBox.setElementsCount(nextElementCount);
		elem = nextElementCount;
	}
	//alert(elem);
	accordionMappaBox.switchElement(elem-1);
}


