function vediFoto (nome,  id) {
    return ingrandisciFoto (nome, id)
}

function ingrandisciFoto (nome, id) {
    if (pop_up) pop_up.close();
    var pop_up=window.open('foto.asp?nome=' + nome + '&ID=' + id ,'pop_up','resizable=no, menubar=no,toolbar=no,location=no,status=no,scrollbars=no,width=500,height=415,left=220,top=220')
    pop_up.focus();
}

function deleteComment(ID, messaggio) {
  if (confirm("Siete sicuri di voler cancellare DEFINITIVAMENTE il commento " + ID + " dall'archivio?\n\nTesto del messaggio:\n" + messaggio )){
    parent.location.replace("gestione_commenti.asp?action=deleteComment&ID=" + ID ); 
  }
  return;
}

function setHiddenComment(ID, messaggio) {
  if (confirm("Siete sicuri di NON voler rendere visibile sul sito il commento " + ID + "?\n\nTesto:\n" + messaggio )){
    parent.location.replace("gestione_commenti.asp?action=setHiddenComment&ID=" + ID ); 
  }
  return;
}

function setVisibleComment(ID, messaggio) {
  if (confirm("Siete sicuri di voler rendere visibile sul sito il commento " + ID + "?\n\nTesto:\n" + messaggio )){
    parent.location.replace("gestione_commenti.asp?action=setVisibleComment&ID=" + ID ); 
  }
  return;
}
var openWin = "";
function OpenComment(data, nome, msg) {
	chiudifinestra(openWin);
  openWin = window.open("","","resizable=yes, menubar=no,toolbar=no,location=no,status=no,scrollbars=yes,width=550,height=320,left=220,top=220");
  
  var html = "<html><head><title>Commento</title><link rel='stylesheet' href='incl/stile.css' type='text/css' media='screen' /></head><body><div id='comment'>";          
  openWin.document.write(html + "Il giorno " + data + ", " + nome + " scrive:<br><br>" + msg + "<br><br><a href='javascript:window.close()'>CHIUDI</a></div></body></html>");
  openWin.focus();                                   			    
}


function chiudifinestra(nome_f) {
	try {nome_f.close();} 
  catch(e){} 
}
