//var vc_bid = 42311;
var vc_border_style = "";
//var vc_bidok = false;
function vc_click(id, act){
 var vcd = document.getElementById('vcd_'+id);
 if (act && vcd.style.display != 'none')
  act = false;
 if (act){
  //var curl = 'http://edit.splinder.com/myblog/view_comments/'+vc_bid+'/'+id;
	var curl = 'http://www.splinder.com/myblog/comment/list/'+id+'?popup=1';
  if (vcd.innerHTML == ''){
   var cedit = '<a href="http://heracleum.altervista.org/res/hmed/" target="_blank"></a>';
   vcd.innerHTML = '<iframe name="vci_'+id+'" frameborder="NO" src="" style="width:100%; height:1000px; border:0px solid #003399;'+vc_border_style+'">Impossibile visualizzare commenti qui</iframe><div class="vc_bar" style="text-align:center">'+ cedit +'  <a href="javascript: ;" onclick="vc_click('+id+',false)">[Chiudi]</a></div>';
  }
  document.vc_frm.target = 'vci_'+id;
  document.vc_frm.action = curl;
  document.vc_frm.submit();
  //if (document.all) eval('vci_'+id).location.href = curl;
  vcd.style.display = 'inline';
 }else{
  vcd.innerHTML = '';
  vcd.style.display = 'none';
 }
}
function ccmts(id){
 var csrc = document.getElementById('vcl_'+id).innerHTML;
 var cnum;

/*
 if (!vc_bidok){
  cnum = csrc.indexOf("/list/")+6;
  vc_bid = csrc.substring( cnum, csrc.indexOf("?", cnum) );
  vc_bidok = true;
 }
*/

 cnum = csrc.substring( csrc.lastIndexOf("(")+1, csrc.lastIndexOf(")") );
 if (cnum.length>4)
  cnum = 0;
 var cstr = (cnum==0)?'Video, bio e commenti': ((cnum>1)?'<b>'+cnum+'</b> Video, bio e commenti':'Video, bio e commenti');
 //var lnk = 'http://www.splinder.com/myblog/view_comments/'+vc_bid+'/'+id;
 var lnk = 'http://www.splinder.com/myblog/comment/list/'+id+'?popup=1';
 var ns = '<a href="javascript: ;" onclick="vc_click('+id+', true); return false;" title="Visualizza i commenti direttamente qui sotto" style="padding-left:8px">'+cstr+'</a>&nbsp;';
 document.getElementById('vcl_'+id).innerHTML = ns;
}


function progress(prc){
 var pb = document.getElementById('prbar');
 pb.style.width = prc+'%';
}
function loadingComplete(){
 progress(100);
 setTimeout('lcompl()', 2000);
}
function lcompl(){
 var ldn = document.getElementById('loading');
 ldn.style.display = 'none';
}
function createProgressBar(){
document.write('<div id="loading" style="position:absolute; top:290; width:100%; font-family: Georgia, serif; text-align:center; font-size: 8px; z-index: 100;">');
document.write(' <div style="width:212px; background-color:buttonface; font-size: 22px; border: 2px outset; text-align:center; margin:auto; padding:3px">Loading blog...<br>');
document.write('  <div id="prbarcont" style="width:200px; height: 18px; padding:1px;  border: 1px inset; text-align:left; margin:auto; font-size: 18px;">');
document.write('   <div id="prbar" style="width:1px; height:100%; background-color: highlight;  font-size: 18px;"></div>');
document.write('</div></div></div>');
}