/* Compressed by the perl version of jsmin. */
/* JavaScript::Minifier 0.01 */

function init()
{try{if(_initComments)
_initComments();}catch(e)
{}
try{if(_initLcomments)
_initLcomments();}catch(e)
{}
try{if(_initImages)
_initImages();}catch(e)
{}
try{if(_initVotes)
_initVotes();}catch(e)
{}
try{if(_initSetH)
window.setTimeout("_initSetH()",5000)}catch(e)
{}}
function catchErr(evt)
{}
addLoadEvent(init);function _initImages()
{if(pPars['blogID'])
{var dopt_img={setName:'channel',rowName:'item',statusAttr:null,okValue:null,errorAttr:null,randomizeURL:true};var dataS_img=new DataSetHolder(dopt_img);dataS_img.addListener("onDataError",catchErr);var opt_img={gridStyle:'',gridWidth:'100%',titleStyle:'',titleContent:'',cellStyle:'',cellWidth:'100%',cellHeight:'auto',numRows:3,numCols:1,footerStyle:'',footerContent:'',renderingFunction:function(dati,cell,recordIndex)
{var res='';if(dati){if(dati.author){res="";}
else{dati.author="";}
res='<a href="'+dati['guid']+'"><img width="110" border="0" title="'+escape(dati['url'])+'" src="'+dati['link']+'"/></a>';}
return res;}};var theGrid=new _dadanet._classes.TmplGridWindow('ultimefoto',opt_img);theGrid.create();theGrid.bindDataSource(dataS_img);dataS_img.bindTo("/thewall.xml",null,"GET");}}
function _initLcomments()
{var dopt={setName:'channel',rowName:'lastcomments',statusAttr:null,okValue:null,errorAttr:null};dataSL=new DataSetHolder(dopt);dataSL.addListener("onDataError",catchErr);var fopt={tmplID:'templateLC',formatMap:{dtcomment:[/^(\d{4})-(\d{2})-(\d{2})(.+)$/,'$3/$2/$1 $4']}};formatterL=new DataFormatter('lcommenti','formatterL',fopt);formatterL.bindDataSource(dataSL);dataSL.bindTo("/commenti/0.xml",null,"GET");}
var _Voting=0;function regVote(){regvote=1;}
function showDesc(which,idpost){if(regvote!=1){var vholder=document.getElementById("votedesc_"+idpost);var actualvote=document.getElementById("showvote_"+idpost);if(which=="default"){var text=defaulttext;actualvote.style.display="block";}else{actualvote.style.display="none";var text=which.getAttribute("title");}
vholder.innerHTML=text;}}
function removeRoll(votedesc){var listitems=$('stars').getElementsByTagName('LI');for(i=1;i<listitems.length;i++){listitems[i].style.display="none";}}
function displayTotal(score,votedesc,idpost){score=Math.round(score);var x=(score*70)/10;x=Math.round(x);if(x<7){$("showvote_"+idpost).style.width="0";}
if(x>=7&&x<21){$("showvote_"+idpost).style.width="16px";}
if(x>=21&&x<35){$("showvote_"+idpost).style.width="32px";}
if(x>=35&&x<49){$("showvote_"+idpost).style.width="48px";}
if(x>=49&&x<63){$("showvote_"+idpost).style.width="64px";}
if(x>=63){$("showvote_"+idpost).style.width="80px";}
$("showvote_"+idpost).style.display="block";$("votedesc_"+idpost).innerHTML=votedesc;}
function PostVoting(idpost,pt_sign,pt_vote,votedesc,num){if(_Voting==0){removeRoll();displayTotal(num,votedesc,idpost);_Voting=idpost;var url="/cgi-bin/sn_blog/vote.cgi";var parms="votedesc="+votedesc+"&idpost="+idpost+"&pt_sign="+pt_sign+"&vote="+pt_vote+"rand="+Math.random();var req=new Ajax.Request(url,{method:'get',parameters:parms,onSuccess:_PostVoted});}}
function _PostVoted(transport){try{if(_Voting>0){var xmldoc=transport.responseXML;var nomeNode=xmldoc.getElementsByTagName("post_pt_vote");var score=nomeNode[0].firstChild.nodeValue*1;nomeNode=xmldoc.getElementsByTagName("post_pt_counter");var counter=nomeNode[0].firstChild.nodeValue*1;var postVotingDiv=document.getElementById("votedesc_"+idpost);if(document.getElementById(postVotingDiv)){var newcontent="";if(score>=0&&document.getElementById('content_goodvoting_'+idpost)){score="+"+score;newcontent=document.getElementById('content_goodvoting_'+idpost).innerHTML;}
else if(score<0&&document.getElementById('content_badvoting_'+idpost))
newcontent=document.getElementById('content_badvoting_'+idpost).innerHTML;if(newcontent!="")
newcontent=newcontent.replace("#SCORE#",score);document.getElementById('postVotingDiv_'+idpost).innerHTML=newcontent;}
else{alert("Voto raggiunto : "+score);}}}
catch(z)
{}
_Voting=0;}
function _initTags()
{return;if(pPars['blogID'])
{var pars="res_type=sn_blog&res_ancestors=sn_blog:blog:"+pPars['blogID']+"&step=10&no_css=1";var req=new Ajax.Request("/cgi-bin/sn_tags/cloud.chm",{method:'get',parameters:pars,onLoading:function(){},onComplete:SliderTags})}}
function SliderTags(transport){var HTMLdoc=transport.responseText;o=$('tagcloud');testo='';o.innerHTML=HTMLdoc;try{}catch(e)
{}}