//defaults value
var DEF_RURL = document.location;
var DEF_ERRURL = document.location;
var DEF_SITECODE = 'CO';
var DEF_SUBSCRIBE_SCRIPT = 'http://du.ilsole24ore.com/DU/iniziaRegistrazione.aspx';
var DEF_LOGIN_SCRIPT = 'http://du.ilsole24ore.com/du/authfiles/logincentrale.aspx';
var DEF_LOGOFF_SCRIPT = 'http://du.ilsole24ore.com/du/authfiles/logoff.aspx';
var DEF_USERPROFILE_SCRIPT = 'http://du.ilsole24ore.com/DU/Areautente/profiloutente.aspx';
var isAuthenticated = false;
var friendlyName = null;
var PopupAuthenticationTimeout=60000; //milliseconds

var colorPulsantiera = new Array();
colorPulsantiera[0]="#329900"; // Esperto Risponde
colorPulsantiera[1]="#6C7795"; // Banche Dati
colorPulsantiera[2]="#336799"; // Mobile
colorPulsantiera[3]="#FE9900"; // Shopping 24 o Libri
colorPulsantiera[4]="#D85D1A"; // Casa24  
colorPulsantiera[5]="#59B72F"; // Radio24
colorPulsantiera[6]="#33CCFF"; // Viaggi24
colorPulsantiera[7]="#003466"; // Formazione 
colorPulsantiera[8]="#A2ABB2"; // Periodici
colorPulsantiera[9]="#666666"; // nullo

var bg = new Array();
bg[0] = "img/bg_blu_top.gif";
bg[1] = "http://www.services.ilsole24ore.com/testata/testata/back_bar_banchedati.gif";
bg[2] = "img/bg_blu_top.gif";
bg[3] = "img/bg_blu_top.gif";
bg[4] = "img/bg_blu_top.gif";
bg[5] = "img/bg_blu_top.gif";
bg[6] = "img/bg_blu_top.gif";
bg[7] = "img/bg_blu_top.gif";
bg[8] = "img/bg_blu_top.gif";
bg[9] = "http://www.services.ilsole24ore.com/testata/testata/back_bar_white.gif"//"img/bg_blu_top.gif"; // nullo


       
// Modified from Bill Dortch's Cookie Functions (hidaho.com) 
// (found in JavaScript Bible)
function setCookie(name,value,days,path,domain,secure) {
  var expires, date;
  if (typeof days == "number") {
    date = new Date();
    date.setTime( date.getTime() + (days*24*60*60*1000) );
		expires = date.toGMTString();
  }
  document.cookie = name + "=" + escape(value) +
    ((expires) ? "; expires=" + expires : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
}

// Modified from Jesse Chisholm or Scott Andrew Lepera ?
// (found at both www.dansteinman.com/dynapi/ and www.scottandrew.com/junkyard/js/)
function getCookie(name) {
  var nameq = name + "=";
  var c_ar = document.cookie.split(';');
  for (var i=0; i<c_ar.length; i++) {
    var c = c_ar[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameq) == 0) return unescape( c.substring(nameq.length, c.length) );
  }
  return null;
}

// from Bill Dortch's Cookie Functions (hidaho.com) 
function deleteCookie(name,path,domain) {
  if (getCookie(name)) {
    document.cookie = name + "=" +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}

function setCookieRitorno() {
	if (getCookie("URLRIT") == null) {
		setCookie("URLRIT",document.location,180,"/");
	}
	return true;
}

function deleteCookieRitorno() {
	if (getCookie("URLRIT") != null) {
		deleteCookie("URLRIT");
	}
	return true;
}



function draw_piede_websystem(homepage){
	document.write("<table width='768' border='0' cellspacing='0' cellpadding='0'>");
	document.write("<tr><td colspan='2'><img src='http:\/\/www.ilsole24ore.com\/img\/pix.gif' width='1' height='2' alt='' border='0'></td></tr>");
	document.write("<tr>");
	document.write("<td class='copy' align='center' bgColor='#ffedcc' height='20' colspan='2'>&nbsp;<b>IL SOLE 24 ORE - &copy; Tutti i diritti riservati</b></td>");
	document.write("</tr>");
	document.write("<tr>");
	document.write("<td height='20' width='50%' class='txtpiede'><a href='#' onClick='setHomePage(\"" + homepage + "\")' class='txtpiede'>Fai di questa pagina la tua homepage</a></td>");
	document.write("<td height='20' class ='txtpiede' align='right' style='padding-right:3px;'><a href='http://websystem.ilsole24ore.com' target='_blank' class='linkpiede'>Per la pubblicità su questo sito </a>");
	document.write("</td></tr></table>");
}


function draw_space(){
	document.write("<TABLE WIDTH='768' BORDER='0' CELLSPACING='0' CELLPADDING='0'>");
	document.write("<TR><TD><img src='http:\/\/www.ilsole24ore.com\/img\/pix.gif' width='1' height='20' alt='' border='0'></TD></TR>");
	document.write("</TABLE>");
	}

function draw_servizi(){
	document.write("<TABLE WIDTH='768' BORDER='0' CELLSPACING='0' CELLPADDING='0'>");
	//document.write("<TR><TD><img src='http:\/\/www.ilsole24ore.com\/img\/pix.gif' width='1' height='20' alt='' border='0'></TD></TR>");
	document.write("<TR><TD colspan=5 bgColor='#ffedcc'><img src='http:\/\/www.ilsole24ore.com\/img\/pix.gif' width='1' height='5' alt='' border='0'></TD></TR><TR>");
	document.write("<TD align=center><a class='menudx' href='http://redir.ilsole24ore.com/redir.asp?id=7'>Chi Siamo</a></TD>");
	document.write("<TD align=center><a class='menudx' href='http://redir.ilsole24ore.com/redir.asp?id=8'>Area abbonati</a></TD>");
	document.write("<TD align=center><a class='menudx' href='http://newsletters.ilsole24ore.com'>Newsletter</a></TD>");
	document.write("<TD align=center><a class='menudx' href='http://redir.ilsole24ore.com/redir.asp?id=6'>Contattaci</a></TD>");
	document.write("<TD align=center><a class='menudx' href='http://redir.ilsole24ore.com/redir.asp?id=5'>Tutti i servizi</a></TD>");
	document.write("</TR></TABLE>");
}

//Disegna l'area del logo, del form di login e dei servizi
function draw_testa(){
	
document.write('<TABLE cellSpacing="0" cellpadding="0" border="0">');
document.write('<TR>');
document.write('<TD width="20" bgcolor="">');
document.write('<IMG width="20" height="1" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix.gif"\/>');
document.write('<\/TD>');
document.write('<TD id="cellFormAuth" width="123" bgcolor="">');
document.write('<\/TD>');
document.write('<TD width="500" class="txtgrigio">');
document.write('<IMG width="6" height="2" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix.gif"\/>');
document.write('<A href="http:\/\/www.ilsole24ore.com">');
document.write('<IMG width="306" height="59" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/Logo_sole.gif"\/>');
document.write('<\/A>');
document.write('<BR\/>');
document.write('<IMG width="1" height="4" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix.gif"\/>');
document.write('<BR\/>');
document.write('<IMG width="52" height="1" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix.gif"\/>');
document.write('<SCRIPT language=JavaScript>document.write(doClock("W0","%20","D1","%20","M0","%20","Y0","%20ore%20","H0","%3A","N0"));</SCRIPT>');
document.write('<\/TD>');
document.write('<TD valign="top" align="right">');
document.write('<!--&lt;TD vAlign=top align=left&gt;-->');
document.write('<TABLE width="205" cellspacing="0" cellpadding="0" border="0">');
document.write('<TBODY>');
document.write('<TR>');
document.write('<TD width="90" valign="top">');
document.write('<TABLE cellspacing="0" cellpadding="0" border="0">');
document.write('<TBODY>');
document.write('<TR>');
document.write('<TD height="5">');
document.write('<IMG width="90" height="5" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix.gif"\/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD align="left">');
document.write('<A class="menudx" href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=7">');
document.write('Chi siamo');
document.write('<\/A>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD class="pixel">');
document.write('<IMG width="90" height="1" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix_head_left.gif"\/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD align="left">');
document.write('<A class="menudx" href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=8">');
document.write('Club Abbonati');
document.write('<\/A>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD class="pixel">');
document.write('<IMG width="90" height="1" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix_head_left.gif"\/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD align="left">');
document.write('<A class="menudx" href="http:\/\/newsletters.ilsole24ore.com">');
document.write('Newsletter');
document.write('<\/A>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD class="pixel">');
document.write('<IMG width="90" height="1" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix_head_left.gif"\/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD align="left">');
document.write('<A class="menudx" href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=6">');
document.write('Contattaci');
document.write('<\/A>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD class="pixel">');
document.write('<IMG width="90" height="1" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix_head_left.gif"\/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD align="left">');
document.write('<A class="menudx" href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=5">');
document.write('Tutti i servizi');
document.write('<\/A>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD class="pixel">');
document.write('<IMG width="90" height="1" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix_head_left.gif"\/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<\/TBODY>');
document.write('<\/TABLE>');
document.write('<\/TD>');
document.write('<TD width="5">');
document.write('<IMG width="5" height="1" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix.gif"\/>');
document.write('<\/TD>');
document.write('<TD width="105" valign="top">');
document.write('<TABLE cellspacing="0" cellpadding="0" border="0">');
document.write('<TBODY>');
document.write('<TR>');
document.write('<TD>');
document.write('<IMG width="105" height="34" border="0" src="http:\/\/www.ilsole24ore.com\/img\/giornale.gif"\/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD>');
document.write('<TABLE width="105" cellspacing="0" cellpadding="0" border="0">');
document.write('<TBODY>');
document.write('<TR>');
document.write('<TD width="9" valign="top">');
document.write('<IMG width="9" height="11" border="0" src="http:\/\/www.ilsole24ore.com\/img\/fre.gif"\/>');
document.write('<\/TD>');
document.write('<TD>');
document.write('<A target="_blank"');
document.write('href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=61" class="menudx" valign="top">');
document.write('Edizione odierna                             <\/A>');
document.write('<\/TD>');
document.write('<TD>');
document.write('<IMG width="12" height="12" border="0" src="http:\/\/www.services.ilsole24ore.com\/testata\/testata\/icopay_12x12.gif"\/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<!--&lt;tr&gt;');
document.write('&lt;td valign=&quot;top&quot; width=&quot;9&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;testata_file\/fre.gif&quot; width=&quot;9&quot; height=&quot;11&quot;&gt;&lt;\/td&gt;');
document.write('&lt;td colspan=&quot;2&quot; &gt;&lt;A valign=&quot;top&quot; class=menudx href=&quot;http:\/\/du.ilsole24ore.com\/du\/login.aspx?SiteCode=QO&amp;RURL=http%3A%2F%2Fedicola.ilsole24ore.com%2FhomeVal.jsp%3Fpaper%3DSO%2Csole');
document.write('&quot; target=&quot;_blank&quot;&gt;Domani in edicola&lt;\/A&gt;&lt;\/td&gt;');
document.write('&lt;\/tr&gt;-->');
document.write('<TR>');
document.write('<TD width="9" valign="top">');
document.write('<IMG width="9" height="11" border="0" src="http:\/\/www.ilsole24ore.com\/img\/fre.gif"\/>');
document.write('<\/TD>');
document.write('<TD>');
document.write('<A target="_blank"');
document.write('href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=42" class="menudx" valign="top">');
document.write('Come abbonarsi<\/A>');
document.write('<\/TD>');
document.write('<TD\/>');
document.write('<\/TR>');
document.write('<\/TBODY>');
document.write('<\/TABLE>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<\/TBODY>');
document.write('<\/TABLE>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<\/TBODY>');
document.write('<\/TABLE>');
document.write('<!--&lt;\/TD&gt;-->');
document.write('<\/TD>');
document.write('<TD width="20">');
document.write('<IMG width="20" height="1" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix.gif"\/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<\/TABLE>');
document.write('<\/TABLE>');

}

//Disegna l'area di navigazione 1 e 2
function draw_pulsantiera()
{
document.write('<TABLE width="768" cellspacing="0" cellpadding="0" border="0" bgcolor="#666666">');
document.write('<TBODY>');
document.write('<TR>');
document.write('<TD>');
document.write('<IMG width="20" height="1" border="0" alt="" src="http://www.services.ilsole24ore.com/testata/testata/pix.gif"\/>');
document.write('<\/TD>');
document.write('<TD>');
document.write('<TABLE cellspacing="0" cellpadding="0" border="0">');
document.write('<TBODY>');
document.write('<TR>');
document.write('<TD id="cellSearchForm" valign="top"><IMG height=1 alt="" src="http://www.services.ilsole24ore.com/testata/testata/pix.gif" width=123 border=0>');
document.write('<\/TD>');
document.write('<TD width="100%" valign="top">');
document.write('<!-- Metabox AreaNavigazione1 -->');
document.write('<TABLE width="625" cellspacing="0" cellpadding="0" border="0" bgcolor="#666666">');
document.write('<TBODY>');
document.write('<TR>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=9" class="topbianco">');
document.write('Esperto Risponde<\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/separetor_bar_grig.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http:\/\/www.banchedati.ilsole24ore.com" class="topbianco">');
document.write('Banche Dati<\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/separetor_bar_grig.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http:\/\/www.mobile.ilsole24ore.com" class="topbianco">');
document.write('Mobile<\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/separetor_bar_grig.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http:\/\/www.shopping24.ilsole24ore.com" class="topbianco">');
document.write('Shopping24<\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/separetor_bar_grig.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http:\/\/www.casa24.ilsole24ore.com" class="topbianco">');
document.write('Casa24<\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/separetor_bar_grig.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http:\/\/www.radio24.ilsole24ore.com" class="topbianco">');
document.write('Radio24 <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/separetor_bar_grig.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http:\/\/www.Viaggi24.ilsole24ore.com" class="topbianco">');
document.write('Viaggi24<\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/separetor_bar_grig.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=15" class="topbianco">');
document.write('Formazione<\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/separetor_bar_grig.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http:\/\/www.professionisti24.ilsole24ore.com" class="topbianco">');
document.write('Professionist P.A.<\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/separetor_bar_grig.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=10" class="topbianco">');
document.write('Periodici<\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/pix-dark-grey.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<\/TBODY>');
document.write('<\/TABLE>');
document.write('<!-- Fine Metabox AreaNavigazione1 -->');

document.write('<\/TD>');
document.write('<\/TR>');
document.write('<\/TBODY>');
document.write('<\/TABLE>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<\/TBODY>');
document.write('<\/TABLE>');
}


//Disegna l'area del logo, del form di login e dei servizi
function draw_testa_System(){
document.write('<TABLE cellSpacing="0" cellpadding="0" border="0" width="768" >');
document.write('<TR>');
document.write('<TD width="20" bgcolor="">');
document.write('<IMG width="20" height="1" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix.gif"\/>');
document.write('<\/TD>');
document.write('<TD id="cellFormAuth" width="140" bgcolor="">');
document.write('<\/TD>');
document.write('<TD width="358" class="txtgrigio" align="center">');
document.write('<IMG width="6" height="2" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix.gif"\/>');
document.write('<A href="http:\/\/www.ilsole24ore.com">');
document.write('<IMG width="306" height="59" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/Logo_sole.gif"\/>');
document.write('<\/A>');
document.write('<BR\/>');
document.write('<IMG width="1" height="4" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix.gif"\/>');
document.write('<BR\/>');
document.write('<IMG width="52" height="1" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix.gif"\/>');
document.write('<SCRIPT language=JavaScript>document.write(doClock("W0","%20","D1","%20","M0","%20","Y0","%20ore%20","H0","%3A","N0"));</SCRIPT>');
document.write('<\/TD>');
document.write('<TD valign="top" align="right">');
document.write('<!--&lt;TD vAlign=top align=left&gt;-->');
document.write('<TABLE width="205" cellspacing="0" cellpadding="0" border="0">');
document.write('<TBODY>');
document.write('<TR>');
document.write('<TD width="90" valign="top">');
document.write('<TABLE cellspacing="0" cellpadding="0" border="0">');
document.write('<TBODY>');
document.write('<TR>');
document.write('<TD height="5">');
document.write('<IMG width="90" height="5" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix.gif"\/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD align="left">');
document.write('<A class="menudx" href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=7">');
document.write('Chi siamo');
document.write('<\/A>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD class="pixel">');
document.write('<IMG width="90" height="1" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix_head_left.gif"\/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD align="left">');
document.write('<A class="menudx" href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=8">');
document.write('Area Abbonati');
document.write('<\/A>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD class="pixel">');
document.write('<IMG width="90" height="1" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix_head_left.gif"\/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD align="left">');
document.write('<A class="menudx" href="http:\/\/newsletters.ilsole24ore.com">');
document.write('Newsletter');
document.write('<\/A>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD class="pixel">');
document.write('<IMG width="90" height="1" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix_head_left.gif"\/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD align="left">');
document.write('<A class="menudx" href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=6">');
document.write('Contattaci');
document.write('<\/A>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD class="pixel">');
document.write('<IMG width="90" height="1" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix_head_left.gif"\/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD align="left">');
document.write('<A class="menudx" href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=5">');
document.write('Tutti i servizi');
document.write('<\/A>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD class="pixel">');
document.write('<IMG width="90" height="1" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix_head_left.gif"\/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<\/TBODY>');
document.write('<\/TABLE>');
document.write('<\/TD>');
document.write('<TD width="5">');
document.write('<IMG width="5" height="1" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix.gif"\/>');
document.write('<\/TD>');
document.write('<TD width="105" valign="top">');
document.write('<TABLE cellspacing="0" cellpadding="0" border="0">');
document.write('<TBODY>');
document.write('<TR>');
document.write('<TD>');
document.write('<IMG width="105" height="34" border="0" src="http:\/\/www.ilsole24ore.com\/img\/giornale.gif"\/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD>');
document.write('<TABLE width="105" cellspacing="0" cellpadding="0" border="0">');
document.write('<TBODY>');
document.write('<TR>');
document.write('<TD width="9" valign="top">');
document.write('<IMG width="9" height="11" border="0" src="http:\/\/www.ilsole24ore.com\/img\/fre.gif"\/>');
document.write('<\/TD>');
document.write('<TD>');
document.write('<A target="_blank"');
document.write('href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=61" class="menudx" valign="top">');
document.write('Edizione odierna<\/A>');
document.write('<\/TD>');
document.write('<TD>');
document.write('<IMG width="12" height="12" border="0" src="http:\/\/www.services.ilsole24ore.com\/testata\/testata\/icopay_12x12.gif"\/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<!--&lt;tr&gt;');
document.write('&lt;td valign=&quot;top&quot; width=&quot;9&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;testata_file\/fre.gif&quot; width=&quot;9&quot; height=&quot;11&quot;&gt;&lt;\/td&gt;');
document.write('&lt;td colspan=&quot;2&quot; &gt;&lt;A valign=&quot;top&quot; class=menudx href=&quot;http:\/\/du.ilsole24ore.com\/du\/login.aspx?SiteCode=QO&amp;RURL=http%3A%2F%2Fedicola.ilsole24ore.com%2FhomeVal.jsp%3Fpaper%3DSO%2Csole');
document.write('&quot; target=&quot;_blank&quot;&gt;Domani in edicola&lt;\/A&gt;&lt;\/td&gt;');
document.write('&lt;\/tr&gt;-->');
document.write('<TR>');
document.write('<TD width="9" valign="top">');
document.write('<IMG width="9" height="11" border="0" src="http:\/\/www.ilsole24ore.com\/img\/fre.gif"\/>');
document.write('<\/TD>');
document.write('<TD>');
document.write('<A target="_blank"');
document.write('href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=42" class="menudx" valign="top">');
document.write('Come abbonarsi <\/A>');
document.write('<\/TD>');
document.write('<TD\/>');
document.write('<\/TR>');
document.write('<\/TBODY>');
document.write('<\/TABLE>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<\/TBODY>');
document.write('<\/TABLE>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<\/TBODY>');
document.write('<\/TABLE>');
document.write('<!--&lt;\/TD&gt;-->');
document.write('<\/TD>');
document.write('<TD width="20">');
document.write('<IMG width="20" height="1" border="0" alt="" src="http:\/\/www.ilsole24ore.com\/img\/pix.gif"\/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<\/TBODY>');
document.write('<\/TABLE>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<\/TBODY>');
document.write('<\/TABLE>');

}


//Disegna l'area di navigazione 1 e 2
function draw_pulsantiera_System()
{
	
	
document.write('<TABLE width="768" cellspacing="0" cellpadding="0" border="0" bgcolor="#666666">');
document.write('<TBODY>');
document.write('<TR>');

document.write('<TD>');


document.write('<\/TD>');

document.write('<TD width="100%" valign="top">');
document.write('<!-- Metabox AreaNavigazione1 -->');
document.write('<TABLE width="768" cellspacing="0" cellpadding="0" border="0" bgcolor="#666666">');
//document.write('<TBODY>');
document.write('<TR>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=9" class="topbianco">');
document.write('Esperto Risponde <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/separetor_bar_grig.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http:\/\/www.banchedati.ilsole24ore.com" class="topbianco">');
document.write('Banche Dati <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/separetor_bar_grig.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http:\/\/www.mobile.ilsole24ore.com" class="topbianco">');
document.write('Mobile<\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/separetor_bar_grig.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http:\/\/www.shopping24.ilsole24ore.com" class="topbianco">');
document.write('Shopping24<\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/separetor_bar_grig.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http:\/\/www.casa24.ilsole24ore.com" class="topbianco">');
document.write('Casa24 <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/separetor_bar_grig.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http:\/\/www.radio24.ilsole24ore.com" class="topbianco">');
document.write('Radio24 <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/separetor_bar_grig.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http:\/\/www.viaggi24.ilsole24ore.com" class="topbianco">');
document.write('Viaggi24<\/A>');

document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/separetor_bar_grig.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=15" class="topbianco">');
document.write('Formazione <\/A>');
document.write('<IMG  border="0" src="http:\/\/www.services.ilsole24ore.com/testata/testata/ico_nuovo2.gif"/><\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/separetor_bar_grig.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http://www.professionisti24.ilsole24ore.com/" class="topbianco">');
document.write('Professionisti e P.A.<\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/separetor_bar_grig.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center">');
document.write('<A href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=10" class="topbianco">');
document.write('Periodici<\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" hspace="4" height="20" border="0"');
document.write('src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/pix-dark-grey.gif" alt=""\/>');
document.write('<\/TD>');
document.write('<\/TR>');

document.write('<\/TABLE><TABLE cellspacing="0" cellpadding="0" border="0">');
document.write('<TBODY>');

document.write('<TR>');
document.write('<TD id="cellSearchForm" valign="top" ><IMG height=1 alt="" src="http://www.services.ilsole24ore.com/testata/testata/pix.gif" width=123 border=0>');
document.write('<\/TD>');
document.write('<TD colspan="20" id="sezioni">');
document.write('<!-- Fine Metabox AreaNavigazione1 -->');

}


function draw_testata(){
	draw_testa();
	draw_pulsantiera();
}


function draw_testata_System(){
	
	
	draw_pulsantiera_System();
		
	if (isAuthenticated && this.ShowWellcomeMessage){
		if(this.TestataBassa || authenticated_user()){
			document.getElementById("spnFriendlyName").innerHTML = friendlyName.length<=20?friendlyName:friendlyName.substring(0,17) + "...";
			document.getElementById("lnkLogoff").href = this.LogoutUrl + "?RURL=" + escape(this.LoginRURL);
			document.getElementById("lnkUserProfile").href = this.UserProfileUrl + "?SiteCode=" + this.SiteCode + "&RURL=" + escape(this.LoginRURL);
		}
	}
	if (!isAuthenticated && this.ShowLoginForm){
		if (this.TestataBassa || auth_form())
		{		
			var f = document.forms["authUser"];
			if (getCookie("URLRIT") != null) {	
			        if (document.location.href.indexOf("index") < 0) 
			        	f.elements["RURL"].value = getCookie("URLRIT");
			        else
			        	f.elements["RURL"].value = this.LoginRURL;       	
			        }
			else
				f.elements["RURL"].value = this.LoginRURL;       
			f.elements["ERRURL"].value = this.ERRURL;
			f.elements["SC"].value = this.SiteCode;
			f.action = this.LoginUrl;
			
			document.getElementById("lnkSubscribe").href = this.SubscribeUrl + "?SiteCode=" + this.SiteCode + "&RURL=" + escape(this.SubscribeRURL) + "&ERRURL=" + escape(this.ERRURL);
			
			if (this.CheckIfAuthenticated && f!="undefined")
				setTimeout(CheckPopupAuthentication,PopupAuthenticationTimeout);
		}
	}
		
	if (this.ShowSearchForm)
		DrawSearchForm();
	
	
}

function testata(canale){
	document.write('<TR>');
	document.write('<TD colspan="5">');
	draw_testata(canale);
	document.write('</TD>');
	document.write('</TR>');
}


function DrawSearchForm(){

	var content = '';
	var cell = document.getElementById("cellSearchForm");
	if (cell==null)
		return false;
	content += '<FORM onsubmit="javascript:SubmitSimpleSearch(document.all.SearchForm.querytext.value.toLowerCase());" action="http:\/\/search.ilsole24ore.com\/fc" method="get" name="SearchForm" id="frmAltv"\/>';	
	content += '<TABLE height="29" cellSpacing="0" cellPadding="0" width="143" border="0">';
	
	content += '<TBODY><TR>';
	content += '<TD align="center" bgColor="#666666" colSpan="4" whidth="143">';
	content += '<IMG  height="2" alt="" src="http:\/\/www.ilsole24ore.com\/img\/separetor_ricerca.gif" width="100"  border="0"><\/TD><\/TR>';
	content += '<TR><TD class="titbianco" align="middle"><B>CERCA</B></TD>';
	content += '<TD><IMG height="27" src="http:\/\/www.services.ilsole24ore.com\/testata\/testata\/pix.gif" width="3"><\/TD>';
	content += '<TD vAlign="center" width="67">';
	content += '<SCRIPT>';
	content += 'if (navigator.appName.indexOf(&quot;Netscape&quot;) != -1){document.write(&quot;&lt;input type=\'cerca\' name=\'querytext\' size=\'10\' maxlength=\'50\' class=\'input\'&gt;&quot;)}else{document.write(&quot;&lt;input type=\'cerca\' name=\'querytext\' size=\'12\' maxlength=\'50\' class=\'input\'&gt;&quot;)}<\/SCRIPT>';
	content += '<INPUT type="cerca" class="input2" maxlength="50" size="10" name="querytext"\/>';
	content += '<\/TD>';
	content += '<TD vAlign="center" align="left" width="63">';
	content += '<INPUT id="vai2" style="WIDTH: 14px; HEIGHT: 14px" type="image" alt="" hspace="4" src="http:\/\/www.services.ilsole24ore.com\/testata\/testata\/freccia_su_grigio.gif" border="0" name="vai2">';
	content += '<\/TD><\/TR>';
	
	content += '<INPUT type="hidden" value="Find" name="Method"\/>'; 
	content += '<INPUT type="hidden" value="24ore.com" name="Channel"\/>';
	content += '<INPUT type="hidden" name="BooleanQuery"\/>';
	content += '<INPUT type="hidden" name="RankTerms"\/>'; 
	content += '<INPUT type="hidden" value="1" name="Page"\/>';
	content += '<INPUT type="hidden" value="10" name="PageSize"\/>';
	content += '<INPUT type="hidden" value="500" name="ResultMaxDocs"\/>'; 
	content += '<INPUT type="hidden" name="Text"\/>';
	content += '<INPUT type="hidden" name="Field"\/>'; 
	content += '<INPUT type="hidden" name="GhostQuery"\/>'; 
	content += '<INPUT type="hidden" name="QueryXML"\/>';
	content += '<INPUT type="hidden" value="0" name="SearchType"\/>';
	content += '<INPUT type="hidden" value="static" name="cmd"\/>'; 
	content += '<INPUT type="hidden" value="30" name="chId"\/>';
	content += '<INPUT type="hidden" value="/h2oesp/h2oesp_engine.jsp" name="path"\/>';
	content += '<INPUT type="hidden" value="24ore.com" name="channels"\/>'; 
	content += '<INPUT type="hidden" value="24ore.com" name="canale"\/>';
	content += '<INPUT type="hidden" value="words" name="rank"\/>';
	content += '<INPUT type="hidden" name="data_da"\/>';
	content += '<INPUT type="hidden" name="data_a"\/>';
	content += '<INPUT type="hidden" value="0" name="start"\/>'; 
	content += '<INPUT type="hidden" value="0" name="start_doc"\/>'; 
	content += '<\/TBODY><\/TABLE><\/FORM>';


	//content += '<TD valign="top">';
	/*content += '<FORM onsubmit="javascript:SubmitSimpleSearch(document.all.SearchForm.querytext.value.toLowerCase());" action="http:\/\/search.ilsole24ore.com\/fc" method="get" name="SearchForm" id="frmAltv"\/>';
	content += '<INPUT type="hidden" value="Find" name="Method"\/>';
	content += '<INPUT type="hidden" name="Channel" value="24ore.com"\/>';
	content += '<INPUT type="hidden" name="BooleanQuery" value=""\/>';
	content += '<INPUT type="hidden" name="RankTerms" value=""\/>';
	content += '<INPUT type="hidden" name="Page" value="1"\/>';
	content += '<INPUT type="hidden" name="PageSize" value="10"\/>';
	content += '<INPUT type="hidden" name="ResultMaxDocs" value="500"\/>';
	content += '<INPUT type="hidden" name="Text" value=""\/>';
	content += '<INPUT type="hidden" name="Field" value=""\/>';
	content += '<INPUT type="hidden" name="GhostQuery" value=""\/>';
	content += '<INPUT type="hidden" name="QueryXML" value=""\/>';
	content += '<INPUT type="hidden" name="SearchType" value="0"\/>';
	content += '<INPUT type="hidden" name="cmd" value="static"\/>';
	content += '<INPUT type="hidden" name="chId" value="30"\/>';
	content += '<INPUT type="hidden" name="path" value="\/h2oesp\/h2oesp_engine.jsp"\/>';
	content += '<INPUT type="hidden" name="channels" value="24ore.com"\/>';
	content += '<INPUT type="hidden" name="canale" value="24ore.com"\/>';
	content += '<INPUT type="hidden" name="rank" value="words"\/>';
	content += '<INPUT type="hidden" name="data_da" value=""\/>';
	content += '<INPUT type="hidden" name="data_a" value=""\/>';
	content += '<INPUT type="hidden" name="start" value="0"\/>';
	content += '<INPUT type="hidden" name="start_doc" value="0"\/>';
	content += '<TABLE cellspacing="0" cellpadding="0" border="0">';
	content += '<TBODY>';
	content += '<TR>';
	content += '<TD colspan="2">';
	content += '<IMG width="123" height="3" border="0" alt="" src="http:\/\/www.services.ilsole24ore.com\/testata\/testata\/pix.gif"\/>';
	content += '<\/TD>';
	content += '<\/TR>';
	content += '<TR>';
	content += '<TD colspan="2">';
	content += '<FONT class="topbianco">';
	content += '<B>';
	content += 'CERCA<\/B>';
	content += '<\/FONT>';
	content += '<\/TD>';
	content += '<\/TR>';
	content += '<TR>';
	content += '<TD width="80" valign="top">';
	content += '<SCRIPT>';
	content += 'if (navigator.appName.indexOf(&quot;Netscape&quot;) != -1){document.write(&quot;&lt;input type=\'cerca\' name=\'querytext\' size=\'10\' maxlength=\'50\' class=\'input\'&gt;&quot;)}else{document.write(&quot;&lt;input type=\'cerca\' name=\'querytext\' size=\'12\' maxlength=\'50\' class=\'input\'&gt;&quot;)}          <\/SCRIPT>';
	content += '<INPUT type="cerca" class="input" maxlength="50" size="10" name="querytext"\/>';
	content += '<\/TD>';
	content += '<TD width="63" valign="middle">';
	content += '<INPUT type="image" hspace="4" border="0"';
	content += 'style="width: 14px; height: 14px;" id="vai2" name="vai2" alt="" src="http:\/\/www.services.ilsole24ore.com\/testata\/testata\/freccia_su_grigio.gif"\/>';
	content += '<!--';
	content += '&lt;a href=&quot;javascript:document.forms[\'SearchForm\'].submit();&quot;&gt;&lt;img src=&quot;http:\/\/www.services.ilsole24ore.com\/testata\/testata\/freccia_su_grigio.gif&quot; alt=&quot;&quot; name=&quot;vai2&quot; id=&quot;vai2&quot; width=&quot;14&quot; height=&quot;14&quot; hspace=&quot;4&quot; border=&quot;0&quot;&gt;&lt;\/a&gt;';
	content += '-->';
	content += '<\/TD>';
	content += '<\/TR>';
	content += '<\/TBODY>';
	content += '<\/TABLE>';
	content += '<\/FORM>';*/
	//content += '<\/TD>';
	
	cell.innerHTML = content;
	 
	return true;

}

function draw_testata_bassa_anonimo(){
document.write('<TABLE width="728" cellspacing="0" cellpadding="0" border="0" ID="Table1">');
document.write('<TBODY>');
document.write('<FORM action="" method="post" name="authUser" onsubmit="setCookieRitorno()">');
document.write('<INPUT type="hidden" value="BYPOST" name="realSubmit" ID="realSubmit" \/>');
document.write('<INPUT type="hidden" name="RURL" value="" \/>');
document.write('<INPUT type="hidden" name="ERRURL" value="" \/>');
document.write('<INPUT type="hidden" name="SC" value="" \/>');
//document.write('<TABLE width="95%" cellspacing="0" cellpadding="0" border="0" ID="Table1">');
//document.write('<TBODY>');
document.write('<TR>');
document.write('<TD width="163" height="43" rowspan="2">');
document.write('<A target="_top" href="http:\/\/www.ilsole24ore.com"><IMG width="163" height="43" border="0" alt="Home www.ilsole24ore.com" src="http:\/\/www.ilsole24ore.com\/img\/logo_sole.jpg" \/><\/A>');
document.write('<\/TD>');
document.write('<TD colspan="2">');
document.write('&nbsp;');
document.write('<\/TD>');
document.write('<TD valign="bottom" align="right" class="login">');
document.write('<B>Username <\/B>');
document.write('<\/TD>');
document.write('<TD>');
document.write('&nbsp;');
document.write('<\/TD>');
document.write('<TD valign="bottom" align="right" class="login">');
document.write('<B>Password <\/B>');
document.write('<\/TD>');
document.write('<TD colspan="5">');
document.write('&nbsp;');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR>');
document.write('<TD width="250" style="padding-left: 10px;" class="login">');
document.write('<SCRIPT language=JavaScript>document.write(doClock("W0","%20","D1","%20","M0","%20","Y0","%20ore%20","H0","%3A","N0"));</SCRIPT>');
document.write('<\/TD>');
document.write('<TD width="10">');
document.write('&nbsp;');
document.write('<\/TD>');
document.write('<TD align="right">');
document.write('<INPUT type="text" class="input" maxlength="50" size="8" name="txtUsername" \/>');
document.write('<\/TD>');
document.write('<TD>');
document.write('&nbsp;');
document.write('<\/TD>');
document.write('<TD align="right">');
document.write('<INPUT type="password" class="input" maxlength="50" size="8" name="txtPassword" \/>');
document.write('<\/TD>');
document.write('<TD>');
document.write('<INPUT type="image" hspace="4" border="0" style="width: 14px; height: 14px;" id="vai" name="vai" alt="" src="http://www.services.ilsole24ore.com/testata/testata/freccia_su_rosa.gif" \/>');
document.write('<\/TD>');
document.write('<TD width="10">');
document.write('<IMG width="15" src="http://www.services.ilsole24ore.com/testata/testata/pix.gif" \/>');
document.write('<\/TD>');
document.write('<TD nowrap="yes">');
document.write('<A style="text-decoration: underline;" target="_top" class="login" id="lnkSubscribe" href="">');
document.write('<B>Registrati <\/B><\/A>');
document.write('<\/TD>');
document.write('<TD width="10">');
document.write('<IMG width="10" src="http://www.services.ilsole24ore.com/testata/testata/pix.gif" \/>');
document.write('<\/TD>');
document.write('<TD>');
document.write('<A style="text-decoration: underline;" target="_top" class="login" href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=11">');
document.write('<B>Vantaggi <\/B><\/A>');
document.write('<\/TD>');
document.write('<\/TR>');
//document.write('<\/TBODY>');
//document.write('<\/TABLE>');
document.write('<\/form>');
document.write('<\/TBODY>');
document.write('<\/TABLE>');
}

function draw_testata_bassa_autenticato(){
document.write('<TABLE width="728" cellspacing="0" cellpadding="0" border="0" ID="Table1">');
document.write('<TBODY>');
document.write('<TR>');
document.write('<TD width="163" height="43" rowspan="2">');
document.write('<A href="http:\/\/www.ilsole24ore.com"><IMG width="163" height="43" border="0" alt="Home www.ilsole24ore.com" src="http:\/\/www.ilsole24ore.com\/img\/logo_sole.jpg" \/>');
document.write('<\/A>');
document.write('<\/TD>');
document.write('<TD>');
document.write('&nbsp;');
document.write('<\/TD>');
document.write('<TD>');
document.write('&nbsp;');
document.write('<\/TD>');
document.write('<TD valign="bottom" align="right" class="login">');
document.write('&nbsp;');
document.write('<\/TD>');
document.write('<TD>');
document.write('&nbsp;');
document.write('<\/TD>');
document.write('<TD valign="bottom" align="right" class="login">');
document.write('&nbsp;');
document.write('<\/TD>');
document.write('<TD colspan="3">');
document.write('&nbsp;');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<TR> <!--&lt;td&gt;&amp;nbsp;&lt;\/td&gt;-->');
document.write('<TD width="250" style="padding-left: 10px;" class="login">');
document.write('<SCRIPT language=JavaScript>document.write(doClock("W0","%20","D1","%20","M0","%20","Y0","%20ore%20","H0","%3A","N0"));</SCRIPT>');
document.write('<\/TD>');
document.write('<TD width="10">');
document.write('&nbsp;');
document.write('<\/TD>');
document.write('<TD align="right" style="line-height: 13px;" class="login">');
document.write('<B>Benvenuto:&nbsp;');
document.write('<SPAN id="spnFriendlyName" class="txtalfquot"><\/SPAN>');
document.write('<\/B>');
document.write('<\/TD>');
document.write('<TD>');
document.write('<INPUT type="image" hspace="4" border="0" style="width: 10px; height: 14px;" id="vai" name="vai" alt="" src="http:\/\/www.services.ilsole24ore.com\/testata\/testata\/pix.gif" \/>');
document.write('<\/TD>');
document.write('<TD valign="top" nowrap="yes" style="line-height: 16px;">');
document.write('<LI style="">');
document.write('<A id="lnkUserProfile" style="text-decoration: underline;" class="login" href="">');
document.write('<B>Il Mio Profilo <\/B><\/A>');
document.write('<\/LI>');
document.write('<\/TD>');
document.write('<TD width="1">');
document.write('&nbsp;');
document.write('<\/TD>');
document.write('<TD valign="top" style="line-height: 16px;">');
document.write('<LI style="">');
document.write('<A id="lnkLogoff" style="text-decoration: underline;" class="login" href="">');
document.write('<B>Logout <\/B><\/A>');
document.write('<\/LI>');
document.write('<\/TD>');
document.write('<TD width="1">');
document.write('&nbsp;');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<\/TBODY>');
document.write('<\/TABLE>');
deleteCookieRitorno();

}

function draw_testata_easy(){
	//sistemata dimensioni testatina
	document.write('<center><TABLE cellSpacing="0" cellPadding="0" width="728" border="0">');
	document.write('<FORM name="authUser"  action="http://du.ilsole24ore.com/DU/AuthFiles/logincentrale.aspx"  method="post">');
	document.write('<INPUT type="hidden" value="/" name="URL"> ');
	document.write('<TBODY>');
	document.write('<TR>');
	document.write('<TD width="163" height="43" rowSpan="2"><!-- inserire logo-->');
	document.write('<A  href="http://www.ilsole24ore.com" target="_top">');
	document.write('<IMG height="43"  alt="Home www.ilsole24ore.com" src="http:\/\/www.ilsole24ore.com\/img\/logo_sole.jpg" width="163" border="0"></A></TD>');
	document.write('<TD width="250">&nbsp;</TD>');
	document.write('<TD class="login" vAlign="bottom" align="right">&nbsp;</TD>');
	document.write('<TD>&nbsp;</TD>');
	document.write('<TD class="login" vAlign="bottom" align="right">&nbsp;</TD>');
	document.write('<TD colSpan="5">&nbsp;</TD></TR>');
	document.write('<TR><!--<td>&nbsp;</td>-->');
	document.write('<TD colspan="9" class="login" style="PADDING-LEFT: 10px" align="right">');
	document.write(' <SCRIPT language="JavaScript">document.write(doClock("W0","%20","D1","%20","M0","%20","Y0","%20ore%20","H0","%3A","N0"));</SCRIPT>');
	document.write('</TD>');
	document.write('</TR>');
	document.write('<INPUT type="hidden" value="BYPOST"  name="realSubmit">');
	document.write('<INPUT type="hidden" value="http://www.ilsole24ore.com/fc?cmd=sez&amp;sezId=9234&amp;refresh=true"  name="Rurl">');
	document.write('<INPUT type="hidden"   value="http://www.ilsole24ore.com/fc?cmd=error&amp;chId=31&amp;"  name="ErrURL"> ');
	document.write('<INPUT type="hidden" value="QO" name="SC"> ');
	document.write('</FORM></TABLE></center>');
	
}



function draw_pulsantiera_bassa(){
document.write('<TABLE width="768" cellspacing="0" cellpadding="0" border="0" bgcolor="#666666" ID="Table1">');
document.write('<TBODY>');

document.write('<TR>');

document.write('<TD valign="middle" nowrap="nowrap" align="center" id="esperto">');
document.write('<A href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=9" class="topbianco">Esperto');
document.write('Risponde <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1"  height="20" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/separetor_bar_grig.gif?cmd=art&amp;codid=22.0.1640629897" alt="" \/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center" id="banche">');
document.write('<A href="http:\/\/www.banchedati.ilsole24ore.com" class="topbianco">Banche Dati <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1"  height="20" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/separetor_bar_grig.gif?cmd=art&amp;codid=22.0.1640629897" alt="" \/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center" id="mobile">');
	
document.write('<A href="http:\/\/www.mobile.ilsole24ore.com" class="topbianco">Mobile <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1"  height="20" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/separetor_bar_grig.gif?cmd=art&amp;codid=22.0.1640629897" alt="" \/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center" id="shopping">');
document.write('<A href="http:\/\/www.shopping24.ilsole24ore.com" class="topbianco">Shopping24 <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" height="20" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/separetor_bar_grig.gif?cmd=art&amp;codid=22.0.1640629897" alt="" \/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center" id="casa">');
document.write('<A href="http:\/\/www.casa24.ilsole24ore.com" class="topbianco">Casa24 <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" height="20" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/separetor_bar_grig.gif?cmd=art&amp;codid=22.0.1640629897" \/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center" id="radio">');
document.write('<A href="http:\/\/www.radio24.ilsole24ore.com" class="topbianco">Radio24 <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1"  height="20" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/separetor_bar_grig.gif?cmd=art&amp;codid=22.0.1640629897" \/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center" id="tv">');
document.write('<A href="http:\/\/www.viaggi24.ilsole24ore.com/" class="topbianco">Viaggi24 <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1"  height="20" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/separetor_bar_grig.gif?cmd=art&amp;codid=22.0.1640629897" \/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center" id="formazione">');
document.write('<A href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=15" class="topbianco">Formazione <\/A>');
document.write('<IMG  border="0" src="http:\/\/www.services.ilsole24ore.com/testata/testata/ico_nuovo2.gif"/><\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1"  height="20" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/separetor_bar_grig.gif?cmd=art&amp;codid=22.0.1640629897" \/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center" id="libri">');
document.write('<A href="http:\/\/www.professionisti24.ilsole24ore.com" class="topbianco">Professionisti P.A. <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1"  height="20" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/separetor_bar_grig.gif?cmd=art&amp;codid=22.0.1640629897" \/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center" id="periodici">');
document.write('<A href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=10" class="topbianco">Periodici <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1"  height="20" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/pix-dark-grey.gif?cmd=art&amp;codid=22.0.1640629819" \/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<\/TBODY>');
document.write('<\/TABLE>');

}

function draw_pulsantiera_bassa_sfumata(){
	//alert("ciao");
document.write('<TABLE width="768" cellspacing="0" cellpadding="0" border="0" bgcolor="#666666" ID="Table1">');
document.write('<TBODY>');

document.write('<TR>');

document.write('<TD valign="middle" nowrap="nowrap" align="center" id="esperto" height="21" style="padding-bottom:4px" >');
document.write('<A href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=9" class="topbianco">Esperto');
document.write('Risponde <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1"  height="25" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/separetor_bar_grig.gif?cmd=art&amp;codid=22.0.1640629897" alt="" \/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center" id="banche" height="21" style="padding-bottom:4px ">');
document.write('<A href="http:\/\/www.banchedati.ilsole24ore.com" class="topbianco">Banche Dati <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1"  height="25" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/separetor_bar_grig.gif?cmd=art&amp;codid=22.0.1640629897" alt="" \/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center" id="mobile" height="21" style="padding-bottom:4px ">');
	
document.write('<A href="http:\/\/www.mobile.ilsole24ore.com" class="topbianco">Mobile <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1"  height="25" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/separetor_bar_grig.gif?cmd=art&amp;codid=22.0.1640629897" alt="" \/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center" id="shopping" height="21" style="padding-bottom:4px ">');
document.write('<A href="http:\/\/www.shopping24.ilsole24ore.com" class="topbianco">Shopping24 <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" height="25" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/separetor_bar_grig.gif?cmd=art&amp;codid=22.0.1640629897" alt="" \/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center" id="casa" height="21" style="padding-bottom:4px ">');
document.write('<A href="http:\/\/www.casa24.ilsole24ore.com" class="topbianco">Casa24 <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1" height="25" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/separetor_bar_grig.gif?cmd=art&amp;codid=22.0.1640629897" \/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center" id="radio" height="21" style="padding-bottom:4px ">');
document.write('<A href="http:\/\/www.radio24.ilsole24ore.com" class="topbianco">Radio24 <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1"  height="25" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/separetor_bar_grig.gif?cmd=art&amp;codid=22.0.1640629897" \/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center" id="tv" height="21" style="padding-bottom:4px ">');
document.write('<A href="http:\/\/www.viaggi24.ilsole24ore.com/" class="topbianco">Viaggi24 <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1"  height="25" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/separetor_bar_grig.gif?cmd=art&amp;codid=22.0.1640629897" \/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center" id="formazione" height="21" style="padding-bottom:4px ">');
document.write('<A href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=15" class="topbianco">Formazione <\/A>');
document.write('<IMG  border="0" src="http:\/\/www.services.ilsole24ore.com/testata/testata/ico_nuovo2.gif"/><\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1"  height="25" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/separetor_bar_grig.gif?cmd=art&amp;codid=22.0.1640629897" \/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center" id="libri" height="21" style="padding-bottom:4px ">');
document.write('<A href="http:\/\/www.professionisti24.ilsole24ore.com" class="topbianco">Professionist P.A. <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1"  height="25" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/separetor_bar_grig.gif?cmd=art&amp;codid=22.0.1640629897" \/>');
document.write('<\/TD>');
document.write('<TD valign="middle" nowrap="nowrap" align="center" id="periodici" height="21" style="padding-bottom:4px ">');
document.write('<A href="http:\/\/redir.ilsole24ore.com\/redir.asp?id=10" class="topbianco">Periodici <\/A>');
document.write('<\/TD>');
document.write('<TD width="1" align="center">');
document.write('<IMG width="1"  height="25" border="0" src="http:\/\/www.ilsole24ore.com\/SoleOnLine3\/Assets\/Metabox\/pix-dark-grey.gif?cmd=art&amp;codid=22.0.1640629819" \/>');
document.write('<\/TD>');
document.write('<\/TR>');
document.write('<\/TBODY>');
document.write('<\/TABLE>');

}

function auth_form()
{
	var content  = '';
	var cell = document.getElementById("cellFormAuth");
	if (cell==null)
		return false;
		
	//HTML DEFINITION	
	content  = '<!-- login -->';
	content += '<FORM action="" method="post" name="authUser" onsubmit="setCookieRitorno()">';
	content += '<INPUT value="" name="URL" type="hidden"/>';
	content += '<INPUT value="BYPOST" name="realSubmit" type="hidden"/>';
	content += '<INPUT type="hidden" name="RURL" value=""/>';
	content += '<INPUT type="hidden" name="ERRURL" value=""/>';
	content += '<INPUT type="hidden" name="SC" value=""/>';
	content += '<TABLE cellpadding="0" cellspacing="0" border="0">';
	content += '<TBODY>';
	content += '<TR>';
	content += '<TD valign="top" rowspan="6">';
	content += '<IMG border="0" alt="" height="81" width="1" src="http://www.services.ilsole24ore.com/testata/testata/pix.gif"/>';
	content += '</TD>';
	content += '<TD class="login" valign="top" align="right">';
	content += '<B>Username</B></TD>';
	content += '<TD></TD>';
	content += '</TR>';
	content += '<TR>';
	content += '<TD align="right">';
	content += '<SCRIPT>if (navigator.appName.indexOf(&quot;Netscape&quot;) != -1){document.write(&quot;&lt;input type=\'text\' name=\'txtUsername\' size=\'8\' maxlength=\'50\' class=\'input\'&gt;&quot;)}else{document.write(&quot;&lt;input type=\'text\' name=\'txtUsername\' size=\'10\' maxlength=\'50\' class=\'input\'&gt;&quot;)}</SCRIPT>';
	content += '<INPUT class="input1" maxlength="50" size="8" name="txtUsername" type="text" />';
	content += '</TD>';
	content += '<TD></TD>';
	content += '</TR>';
	content += '<TR>';
	content += '<TD class="login" align="right">';
	content += '<B>Password</B>';
	content += '</TD>';
	content += '<TD></TD>';
	content += '</TR>';
	content += '<TR>';
	content += '<TD align="right">';
	content += '<SCRIPT>if (navigator.appName.indexOf(&quot;Netscape&quot;) != -1){document.write(&quot;&lt;input type=\'password\' name=\'txtPassword\' size=\'8\' maxlength=\'50\' class=\'input1\'&gt;&quot;)}else{document.write(&quot;&lt;input type=\'password\' name=\'txtPassword\'  maxlength=\'50\' class=\'input1\'&gt;&quot;)}</SCRIPT>';
	content += '<INPUT class="input1" maxlength="50" size="8" name="txtPassword" type="password" />';
	content += '</TD>';
	content += '<TD valign="middle">';
	content += '<!--&lt;a href=&quot;javascript:document.forms[\'authUser\'].submit();&quot;&gt;&lt;img src=&quot;/img/freccia_su_rosa.gif&quot; alt=&quot;&quot; name=&quot;vai&quot; id=&quot;vai&quot; width=&quot;14&quot; height=&quot;14&quot; hspace=&quot;4&quot; border=&quot;0&quot;&gt;&lt;/a&gt;-->';
	content += '<INPUT border="0" hspace="4" style="width: 14px; height: 14px;" id="vai" name="vai" alt="" src="http://www.services.ilsole24ore.com/testata/testata/freccia_su_rosa.gif" type="image"/>';
	content += '</TD>';
	content += '</TR>';
	content += '<TR>';
	content += '<TD valign="top" colspan="2">';
	content += '<A style="text-decoration:underline;" id="lnkSubscribe" class="login" href=""><B>Registrati</B></A>';
	content += '<IMG border="0" alt="" height="1" width="10" src="http://www.services.ilsole24ore.com/testata/testata/pix.gif"/>';
	content += '<A style="text-decoration: underline;" class="login" href="http://redir.ilsole24ore.com/redir.asp?id=11"><B>Vantaggi</B></A>';
	content += '</TD>';
	content += '</TR>';
	content += '<TR>';
	content += '<TD colspan="2">';
	content += '<IMG border="0" alt="" height="1" width="1" src="http://www.services.ilsole24ore.com/testata/testata/pix.gif"/>';
	content += '</TD>';
	content += '</TR>';
	content += '</TBODY>';
	content += '</TABLE>';
	content += '</FORM>';
	content += '<!-- fine login -->';

	// END OF HTML DEFINITION
	
	cell.innerHTML = content;
	
	return true;
	
}

function authenticated_user()
{
	var content = '';
	var cell = document.getElementById("cellFormAuth");
	if (cell==null)
		return false;
		
	// HTML definition for Form
	content =  '<TABLE cellpadding="0" cellspacing="0" border="0">';
	content += '<TBODY>';
	content += '<TR>';
	content += '<TD valign="top" rowspan="7">';
	content += '<IMG border="0" alt="" height="81" width="1" src="http://www.services.ilsole24ore.com/testata/testata/pix.gif"/>';
	content += '</TD>';
	content += '<TD>';
	content += '<IMG border="" alt="" height="10" width="1" src="http://www.services.ilsole24ore.com/testata/testata/pix.gif"/>';
	content += '</TD>';
	content += '</TR>';
	content += '<TR>';
	content += '<TD style="line-height: 13px;" class="login" valign="top">';
	content += '<B>Benvenuto:<BR/>';
	content += '<SPAN id="spnFriendlyName" class="txtalfquot"></SPAN></B>';
	content += '</TD>';
	content += '</TR>';
	content += '<TR>';
	content += '<TD style="line-height: 16px;" valign="bottom" colspan="2">';
	content += '<LI><A style="text-decoration: underline;" class="login" id="lnkUserProfile" href=""><B>Il Mio Profilo</B></A><IMG border="0" alt="" height="1" width="10" src="http://www.services.ilsole24ore.com/testata/testata/pix.gif"/></LI>';
	content += '<LI><A style="text-decoration: underline;" class="login" id="lnkLogoff" href=""><B>Logout</B></A><IMG border="0" alt="" height="1" width="10" src="http://www.services.ilsole24ore.com/testata/testata/pix.gif"/></LI>';
	content += '</TD>';
	content += '<TR>';
	content += '<TR>';
	content += '<TD>';
	content += '<IMG border="0" alt="" height="1px" width="1" src="http://www.services.ilsole24ore.com/testata/testata/pix.gif"/>';
	content += '</TD>';
	content += '</TR>';
	content += '</TBODY>';
	content += '</TABLE>';
	//END OF HTML DEFINITION
	
	cell.innerHTML = content;
	
	deleteCookieRitorno();
	return true;
}


function disegna_testata_bassa(){
	
	this.ShowLoginForm = true;
	this.ShowWellcomeMessage = true;
	if (!isAuthenticated)
		draw_testata_bassa_anonimo();
	else
		draw_testata_bassa_autenticato();
	
}
	

	
function disegna_pulsantiera_bassa(){
	if(this.Sfumata)
		draw_pulsantiera_bassa_sfumata();
	else
		draw_pulsantiera_bassa();
	
	if (isAuthenticated && this.ShowWellcomeMessage){
		if(this.TestataBassa || authenticated_user()){
			document.getElementById("spnFriendlyName").innerHTML = friendlyName.length<=20?friendlyName:friendlyName.substring(0,17) + "...";
			document.getElementById("lnkLogoff").href = this.LogoutUrl + "?RURL=" + escape(this.LoginRURL);
			document.getElementById("lnkUserProfile").href = this.UserProfileUrl + "?SiteCode=" + this.SiteCode + "&RURL=" + escape(this.LoginRURL);
		}
	}
	if (!isAuthenticated && this.ShowLoginForm){
		if (this.TestataBassa || auth_form())
		{		
			var f = document.forms["authUser"];
			if (getCookie("URLRIT") != null) {	
			        if (document.location.href.indexOf("index") < 0) 
			        	f.elements["RURL"].value = getCookie("URLRIT");
			        else
			        	f.elements["RURL"].value = this.LoginRURL;       	
			        }
			else
				f.elements["RURL"].value = this.LoginRURL;       
			f.elements["ERRURL"].value = this.ERRURL;
			f.elements["SC"].value = this.SiteCode;
			f.action = this.LoginUrl;
			
			document.getElementById("lnkSubscribe").href = this.SubscribeUrl + "?SiteCode=" + this.SiteCode + "&RURL=" + escape(this.SubscribeRURL) + "&ERRURL=" + escape(this.ERRURL);
			
			if (this.CheckIfAuthenticated && f!=undefined)
				setTimeout(CheckPopupAuthentication,PopupAuthenticationTimeout);
		}
	}
		
	
		
	if(this.Canale != null && this.Canale != "")
		this.HighLigthSelectionPulsantira(this.Canale);
}
	
	

function disegna_testata(){

	if (!this.TestataBassa)
		if (!this.LineSystem){
			
			draw_testata();
			
		}else{
			
			draw_testata_System();
		}
	else
	{
		if (this.listaCanali){
			this.ShowLoginForm = true;
			this.ShowWellcomeMessage = true;
			if (!isAuthenticated)
				draw_testata_bassa_anonimo();
			else
				draw_testata_bassa_autenticato();
			
			if(this.Sfumata)
				draw_pulsantiera_bassa_sfumata();
			else
				draw_pulsantiera_bassa();
		}
		else{
			draw_testata_easy();
			if(this.Pulsantieraeasy){
				if(this.Sfumata)
				    draw_pulsantiera_bassa_sfumata();
				else
				    draw_pulsantiera_bassa();
			}
			
		}
	}

	if (isAuthenticated && this.ShowWellcomeMessage){
		if(this.TestataBassa || authenticated_user()){
			document.getElementById("spnFriendlyName").innerHTML = friendlyName.length<=20?friendlyName:friendlyName.substring(0,17) + "...";
			document.getElementById("lnkLogoff").href = this.LogoutUrl + "?RURL=" + escape(this.LoginRURL);
			document.getElementById("lnkUserProfile").href = this.UserProfileUrl + "?SiteCode=" + this.SiteCode + "&RURL=" + escape(this.LoginRURL);
		}
	}
	if (!isAuthenticated && this.ShowLoginForm){
		if (this.TestataBassa || auth_form())
		{		
			var f = document.forms["authUser"];
			if (getCookie("URLRIT") != null) {	
			        if (document.location.href.indexOf("index") < 0) 
			        	f.elements["RURL"].value = getCookie("URLRIT");
			        else
			        	f.elements["RURL"].value = this.LoginRURL;       	
			        }
			else
				f.elements["RURL"].value = this.LoginRURL;       
			f.elements["ERRURL"].value = this.ERRURL;
			f.elements["SC"].value = this.SiteCode;
			f.action = this.LoginUrl;
			
			document.getElementById("lnkSubscribe").href = this.SubscribeUrl + "?SiteCode=" + this.SiteCode + "&RURL=" + escape(this.SubscribeRURL) + "&ERRURL=" + escape(this.ERRURL);
			
			if (this.CheckIfAuthenticated && f!=undefined)
				setTimeout(CheckPopupAuthentication,PopupAuthenticationTimeout);
		}
	}
		
	if (this.ShowSearchForm)
		DrawSearchForm();
	
	if (this.Channel!=null)
		this.HighLigthSelection(this.Channel);
		
	if(this.Canale != null && this.Canale !="")
		this.HighLigthSelectionPulsantira(this.Canale);
		
}

function changebackground(value,channelDescription){
	//alert("changebackground");
	
	if(channelDescription != "ES")
		document.getElementById("esperto").style.background = "url(" + bg[value] + ")";
	if(channelDescription != "BC")
		document.getElementById("banche").style.background = "url(" + bg[value] + ")";
	if(channelDescription != "MB")
		document.getElementById("mobile").style.background = "url(" + bg[value] + ")";
	if(channelDescription != "SP")
		document.getElementById("shopping").style.background = "url(" + bg[value] + ")";
	if(channelDescription != "CA")
		document.getElementById("casa").style.background = "url(" + bg[value] + ")";
	if(channelDescription != "RA")
		document.getElementById("radio").style.background = "url(" + bg[value] + ")";
	if(channelDescription != "TV")
		document.getElementById("tv").style.background = "url(" + bg[value] + ")";
	if(channelDescription != "FO")
		document.getElementById("formazione").style.background = "url(" + bg[value] + ")";
	if(channelDescription != "LI")
		document.getElementById("libri").style.background = "url(" + bg[value] + ")";
	if(channelDescription != "PR")
		document.getElementById("periodici").style.background = "url(" + bg[value] + ")";
	if(channelDescription != "nullo")
		document.getElementById("periodici").style.background = "url(" + bg[value] + ")";
	
	//alert(document.getElementById("esperto").style.background)
	
	}


function __highligthPulsantiera(channelDescription){
	
	switch(channelDescription){
		case "ES":
		    document.getElementById("esperto").style.backgroundColor = colorPulsantiera[0];
		    changebackground(0,channelDescription);
		break;
		case "BC":
		    document.getElementById("banche").style.backgroundColor  = colorPulsantiera[1];
		    changebackground(1,channelDescription);
		break;
		case "MB":
		 document.getElementById("mobile").style.backgroundColor  = colorPulsantiera[2];
		 changebackground(2,channelDescription);
		break;
		case "SP":
		 document.getElementById("shopping").style.backgroundColor  = colorPulsantiera[3];
		 changebackground(3,channelDescription);
		break;
		case "CA":
		 document.getElementById("casa").style.backgroundColor  = colorPulsantiera[4];
		 changebackground(4,channelDescription);
		break;
		case "RA":
		 document.getElementById("radio").style.backgroundColor  = colorPulsantiera[5];
		 changebackground(5,channelDescription);
		break;
		case "TV":
		 document.getElementById("tv").style.backgroundColor  = colorPulsantiera[6];
		 changebackground(6,channelDescription);
		break;
		case "FO":
		 document.getElementById("formazione").style.backgroundColor  = colorPulsantiera[7];
		 changebackground(7,channelDescription);
		break;
		case "LI":
		 document.getElementById("libri").style.backgroundColor  = colorPulsantiera[5];
		 changebackground(5,channelDescription);
		break;
		case "PR":
		 document.getElementById("periodici").style.backgroundColor  = colorPulsantiera[8];
		 changebackground(8,channelDescription);
		break;
		default:
		changebackground(9,"nullo");
	}
	
	
	
}



//Evidenzia il canale corrente
function __highligth(channelDescription){

	var td = document.getElementsByTagName("TD");
	
	for (i=0; i<td.length; i++){
		if (td[i].className =='toolpad' && td[i].innerHTML.indexOf(channelDescription)>=0){
			td[i].setAttribute("background", "http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/back_bar_white.gif");
			if (channelDescription!="Home")
				td[i-1].innerHTML = '<IMG height=29 alt="" src="http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/separetor_bg.gif" width=2 border=0>'
			
			//td[i].background = 'http://www.ilsole24ore.com/SoleOnLine3/Assets/Metabox/back_bar_white.gif';
			break;
		}
	}

}

//Object __PageHeader definition
function __PageHeader(){
	this.ShowLoginForm = false;			//Mostra il form per il login
	this.ShowSearchForm = false;		//Mostra il form per la ricerca
	this.TestataBassa = false;
	this.listaCanali = true;
	this.ShowWellcomeMessage = true;	//Mostra il saluto con il nome utente
	
	this.LoginRURL = DEF_RURL;			//pagina di ritorno dal login
	this.ERRURL = DEF_ERRURL;			//ERRURL per form di login e registrazione
	this.SiteCode = DEF_SITECODE;		//SiteCode
	this.LoginUrl = DEF_LOGIN_SCRIPT;	//action del form di login
	this.SubscribeUrl = DEF_SUBSCRIBE_SCRIPT;	//url di avvio registrazione
	this.SubscribeRURL = DEF_RURL;				//url di ritorno dalla registrazione (es. secondo livello)
	this.LogoutUrl = DEF_LOGOFF_SCRIPT;			//url di ritorno dal logout
	this.UserProfileUrl = DEF_USERPROFILE_SCRIPT;	//url del link il mio profilo
	this.Channel = null;	 //canale da "accendere" nella pulsantiera
	this.CheckIfAuthenticated = false;		//flag per l'avvio del timer per il controllo se autenticato
	this.Canale = null;
	this.Sfumata =true;
	
	//aggiunto parametro per pubblicita sotto pulsantiere
	this.LineSystem = false;
	this.Pulsantieraeasy=false;
	this.DrawHeader = disegna_testata;
	this.DrawHeader2= draw_testa_System;
	this.DrawHeader3= draw_testata_System; //disegna la pulsantiera
	this.DrawHeaderBassa1= disegna_testata_bassa;
	this.DrawPulsantieraBassa2= disegna_pulsantiera_bassa;
	this.DrawHeaderEasy = draw_testata_easy;// disegna la testata senza login
	this.HighLigthSelection = __highligth;
	this.HighLigthSelectionPulsantira = __highligthPulsantiera;
	GetUserStatus();
}


//disegna il piede
function disegna_piede(){
	/*
	esempio di utilizzo
	
	var piede = new __PageFooter();
	piede.HomePage =location.pathname;
	piede.tipoPiedeNew = true;
	piede.DrawFooter();
	*/
	if(this.Servizi){
		draw_space();
		draw_servizi();
	}
	else {
		draw_space();
	}
	
	draw_piede_websystem(this.HomePage);
	
}

//Object __PageFooter  definition
function __PageFooter(){
	this.HomePage=null;
	this.Servizi=false;
	this.DrawFooter= disegna_piede;
	}

/*
Recupera le informazioni dell'utente stabilendo se si tratta di una connessione anonima o no
*/
function GetUserStatus(){
	var allCookies = document.cookie;	//all cookies
	var soleAuthStart = allCookies.indexOf("SoleAuth");
	
	if (soleAuthStart>=0){
		var soleAuth = allCookies.substring(soleAuthStart,allCookies.indexOf(";", soleAuthStart));
		if (soleAuth!="SoleAuth=") {
			isAuthenticated = true;
			SetFriendlyName();	
		}
	}
}

function SetFriendlyName(){
	var allCookies = document.cookie;	//all cookies
	var soleUserStart = allCookies.indexOf("SoleUser="); //Start of SoleUser
	
	if (soleUserStart>0){	//SoleUser present
		var soleUser;	
		if (allCookies.indexOf(";", soleUserStart)>=0)
			soleUser = allCookies.substring(soleUserStart,allCookies.indexOf(";",soleUserStart)); //SoleUser content
		else
			soleUser = allCookies.substring(soleUserStart);
		
		var aSoleUser = soleUser.substring(soleUser.indexOf("=")+1).split(','); 
		
		for (i=0; i<aSoleUser.length; i++)
		{
			if (aSoleUser[i].toLowerCase().indexOf('friendlyname=')>=0){
				isAuthenticated = true;
				friendlyName = aSoleUser[i].substring(aSoleUser[i].indexOf('=')+1);
				break;
			}
		}
	}	
	else{
		isAuthenticated = false;
		friendlyName = null;
	}
		
}

//Controllo periodico se autenticato
function CheckPopupAuthentication(){
	var allCookies = document.cookie;	//all cookies
	var soleAuthStart = allCookies.indexOf("SoleAuth="); //Start of SoleAuth
	
	if (soleAuthStart>0){	//SoleAuth present
		var soleAuth = allCookies.substring(soleAuthStart,allCookies.indexOf(";",soleAuthStart));
		
		var aSoleAuth = soleAuth.split('=')
		if (aSoleAuth[1].length>0){	//SoleAuth valid
			document.location.reload();
			return;
		}
	}
	
	// riattivo il check		
	setTimeout(CheckPopupAuthentication,PopupAuthenticationTimeout);	
}
                   