/** Dimensione di apertura e chiusura */

var classApChius='';
var htmlLastTen='';
var htmlList='';
/** Titoli */
var titoloLista='Tutti i commenti a:';
/** Stato del commentario */
var enabledStr='commentarioenabled';
var disabledStr='commentariodisabled';
var suspendedStr='commentariosuspended';
/** Messaggio di errore */
var errorMsg='<div class="txterror">Dati momentaneamente non disponibili</div>';
var disabledMsg='<div class="txterror">Commenti momentaneamente disabilitati</div>';
/** Lista vuota */
var emptyList='<tr id="0"><td colspan="4"><div class="txterror">Nessun commento inserito</div></td></tr>';
/** Loading */
var loadingMsg='<br><br><img src="http://images.alice.it/commenti/loading.gif">';
/** Dettaglio */
//var urlSquidDetail='http://static.commenti.alice.it.dev:8080/commenti/DetailCommento?';
var urlSquidDetail='http://static.commenti.alice.it/commenti/DetailCommento?';
var urlServletDetail='http://fep.commenti.alice.it/commenti/DetailCommento?';
/** Lista */
//var urlSquidList='http://static.commenti.alice.it.dev:8080/commenti/ListCommenti?';
//var urlServletList='http://fep.commenti.alice.it.dev/commenti/ListCommenti?';

var urlSquidList='http://static.commenti.alice.it/commenti/ListCommenti?';
var urlServletList='http://fep.commenti.alice.it/commenti/ListCommenti?';
//var urlServletList='http://fep.commenti.alice.it/commenti/ListCommenti?';
/** Tempo di timeout */
var timeouInterval=20000;
/** Num commenti pagina lista */
var perPageList=10;
/** Max num di numeri pagina in fondo alla lista */
var maxPageNumber=5;
if (pageType == 'lastTen' && commentarioID == 'na')
{
	commentarioID = GetCommentarioID();
}
abstractUrl = GetTemplateUrl('abstract');
if (abstractUrl.indexOf('?') == -1)
	abstractUrl += '?';
else
	abstractUrl += '&';
//alert('abstractUrl: '+abstractUrl);
if(width == 'na')
{
	width = GetCommentarioWidth();
	if(width=='' || width==undefined || width=='none')
		width='394';
}
/** Spazio bianco */
var nbSpace='&nbsp;';
/** Stringhe html da aggiungere al dettaglio */
var postDetail=	'';
var postDetailSuspended= '';
/*URL profilo utente*/
var urlPersonalArea="http://nick-amici.amici.alice.it/";
/** Stringhe html da aggiungere alla tabella nel caso di lista */
/**
* Scrive l'html per i bottoni della paginazione.
*/
function setPaginazString(_pageDisplay, _totPage){
	var totPageDef;
	if(_totPage)
		totPageDef=_totPage;
	else
		totPageDef=1;
	var preTabList='<table align="center" border="0" cellpadding="0" cellspacing="0">\n'+

			'	<thead>\n'+

			'	  <tr>\n'+

			'		<th class="tit">TITOLO</th>\n'+

			'		<th class="autore">AUTORE</th>\n'+

			'		<th class="data">DATA</th>\n'+

			'		<th class="ora">ORA</th>\n'+

			'	  </tr>\n'+

			'	</thead>\n'+

			'	<tfoot>\n'+

			'	  	<tr>\n'+
			'			<td colspan="4"><div class="left testogrigio">pagina '+ _pageDisplay +' di ' + totPageDef + '</div><div class="left" id="commenti_pagnumber"></div> <div class="right testoazzurro" id="commenti_pagprecsucc"></div></td>\n'+
			'		</tr>\n'+

			'	</tfoot>\n'+

			'	<tbody>';
	return preTabList;		
}
var postTabList='</tbody>\n'+

				'  </table>';
/** Stringhe html da aggiungere alla tabella nel caso di last ten */
var hrefTutti='';
var preTabLastTen=	'';
var preTabLastTenSuspended=	'';
var postTabLastTen=	'		</tbody>\n'+
					'		</table>\n';
/** Num caratteri titolo */
var numCharTit='def';
/** Num caratteri autore */
var numCharAut='def';
function setVar()
{
	if (width=='394')
	{
		classApChius='394';
	}
	else if (width=='434')
	{
		classApChius='434';
		numCharTit='25';
		numCharAut='20';
	}
	else
	{
		numCharTit='25';
		numCharAut='20';
	}
	htmlLastTen='<div class="apertura'+classApChius+'"><div id="tabella_commenti" ></div></div><div class="chiusura'+classApChius+'"></div>';
	htmlList='<div class="aper'+classApChius+'notest"><div id="bgdetail" class="boxsfum"></div><div id="boxcommandloading"></div></div><div class="chiusura'+classApChius+'"></div><br clear="all"><div class="apertura'+classApChius+'"><br><div id="tabella_commenti" ></div></div><div class="chiusura'+classApChius+'"></div>';
	postDetail=	'<div class="int">\n'+
				'	<div class="right">\n'+
				'	 <a href="'+ abstractUrl +'type=write&commentarioID='+commentarioID+'" id="btnScrivi"><img src="http://images.alice.it/commenti/bott_scrivi_commento.gif" alt="Scrivi un commento" border="0" type="image" vspace="6" /></a>\n'+
				'	</div>\n'+
				' </div>';
	hrefTutti=abstractUrl + 'commentarioID=' + commentarioID + '&type=list&start=0&perPage='+perPageList;
	preTabLastTen=	'<table align="center" border="0" cellpadding="0" cellspacing="0">\n'+
					'	 <thead>\n'+
					'		<tr>\n'+
					'		  <th colspan="4" class="top"><div class="right">\n'+
					'			  <a href="'+ abstractUrl +'type=write&commentarioID='+commentarioID+'"><img src="http://images.alice.it/commenti/bott_scrivi_commento.gif" alt="Scrivi un commento" border="0" type="image" vspace="6" /></a>\n'+
					'			</div>Gli ultimi commenti</th>\n'+
					'		</tr>\n'+
					'		<tr>\n'+
					'		  <th class="tit">TITOLO</th>\n'+
					'		  <th class="autore">AUTORE</th>\n'+
					'		  <th class="data">DATA</th>\n'+
					'		  <th class="ora">ORA</th>\n'+
					'		</tr>\n'+
					'	  </thead>\n'+
					'	  <tfoot>\n'+
					'		<tr>\n'+
					'		  <td colspan="4"><span class="testoazzurro"><a href="'+hrefTutti+'">Tutti i Commenti</a> | &raquo; </span></td>\n'+
					'		</tr>\n'+
					'	  </tfoot>\n'+
					'	  <tbody>';
	preTabLastTenSuspended=	'<table align="center" border="0" cellpadding="0" cellspacing="0">\n'+
					'	 <thead>\n'+
					'		<tr>\n'+
					'		  <th colspan="4" class="top"><div class="right">\n'+
					'			  &nbsp;\n'+
					'			</div>Gli ultimi commenti</th>\n'+
					'		</tr>\n'+
					'		<tr>\n'+
					'		  <th class="tit">TITOLO</th>\n'+
					'		  <th class="autore">AUTORE</th>\n'+
					'		  <th class="data">DATA</th>\n'+
					'		  <th class="ora">ORA</th>\n'+
					'		</tr>\n'+
					'	  </thead>\n'+
					'	  <tfoot>\n'+
					'		<tr>\n'+
					'		  <td colspan="4"><span class="testoazzurro"><a href="'+hrefTutti+'">Tutti i Commenti</a> | &raquo; </span></td>\n'+
					'		</tr>\n'+
					'	  </tfoot>\n'+
					'	  <tbody>';
}