<a name="modifica"> </a>
<script type="text/javascript">
<!--
// http://www.marplo.net

function mods(id_com) {
  // Preia datele din etichetele HTML
  var data = document.getElementById("d"+id_com).innerHTML;
  var nume = document.getElementById("n"+id_com).innerHTML;
  var email = document.getElementById("e"+id_com).innerHTML;
  var coment = document.getElementById("c"+id_com).innerHTML;
  var site = document.getElementById("n"+id_com).getAttribute("href");

  // Transfera datele in campurile din formular
  document.fmod.mod_id.value = data;
  document.fmod.mod_nume.value = nume;
  document.fmod.mod_email.value = email;
  document.fmod.mod_coment.value = coment;
  document.fmod.mod_site.value = site;
  
  document.getElementById("mod").style.display='block';
  document.getElementById("fcom").style.display='none';
  document.fmod.mod_coment.focus();
}

// Functia pentru schimbarea clasei div-ului parinte a elementului cu "Sterge"
// Si pt. deschiderea ferestrei pop-up pt. stergere
function s_clase_popup(clasa, id_com) {
  // Determina elementul parinte de rang 2 (al primului parinte) si-i pune alta nume de clasa
  clasa.parentNode.parentNode.parentNode.className = 'clasa_del';

  // Deschide fereastra pop-up (child)
  window.open("comentarii/mod_del.php?id="+id_com, "sterge", "toolbar=0, menubar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, width=480, height=240, left=350, top=250");
}

// Functia pt. ascunderea elementelor cu classa "clasa_del"
function ascunde() {
  var clase = document.getElementsByClassName('clasa_del');
  var nr_clase = clase.length;
  for (var i=0; i<nr_clase; i++) {
	clase[i].style.display = 'none';
  }
}
//-->
</script>
<!-- Formularul pt. preluarea datelor pt. modificare -->
<br /><center>
<div id="mod" style="display:none">
<form name="fmod" action="comentarii/mod_del.php" method="post" onsubmit="return mod(this)">
  <fieldset style="width:320px; border-color:#dadafe;">
	<legend align="right" style="cursor:pointer;" onclick="OnOff('fcom', 'mod');">Inchide</legend>
	<input type="hidden" name="mod_id" />
	<input type="hidden" name="mod_fullurl" value="<?php $protocol = $_SERVER['HTTPS'] == 'on' ? 'https' : 'http'; echo $protocol.'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; ?>" />
	Nume: <input type="text" name="mod_nume" size="18" maxlength="42" /><br />
	E-mail:<input type="text" name="mod_email" size="18" maxlength="50" value=" " /><br />
	Site: &nbsp;&nbsp; <input type="text" name="mod_site" size="18" maxlength="70" value=" " /><br /><br />
	<a href="javascript: add_tag('<b>','</b>', 'mod_coment');" title="B"><img src="icos/bold.png" alt="B" border="0" /></a>
	<a href="javascript: add_tag('<i>','</i>', 'mod_coment');" title="I"><img src="icos/italic.png" alt="I" border="0" /></a>
	<a href="javascript: add_tag('<u>','</u>', 'mod_coment');" title="U"><img src="icos/underline.png" alt="U" border="0" /></a>
	<a href="javascript: set_url('mod_coment');" title="Url"><img src="icos/url.png" alt="Url" border="0" /></a> &nbsp; 
	<a href="javascript: add_smile(':-)', 'mod_coment');"><img src="icos/0.gif" alt=":-)" title=":-)" border="0" /></a>
	<a href="javascript: add_smile(':-(', 'mod_coment');"><img src="icos/1.gif" alt=":-(" title=":-(" border="0" /></a>
	<a href="javascript: add_smile(':-P', 'mod_coment');"><img src="icos/2.gif" alt=":-P" title=":-P" border="0" /></a>
	<a href="javascript: add_smile(':-D', 'mod_coment');"><img src="icos/3.gif" alt=":-D" title=":-D" border="0" /></a>
	<a href="javascript: add_smile(':-S', 'mod_coment');"><img src="icos/4.gif" alt=":-S" title=":-S" border="0" /></a>
	<a href="javascript: add_smile(':-O', 'mod_coment');"><img src="icos/5.gif" alt=":-O" title=":-O" border="0" /></a>
	<a href="javascript: add_smile(':)D', 'mod_coment');"><img src="icos/6.gif" alt=":)D" title=":)D" border="0" /></a>
	<a href="javascript: add_smile(':|H', 'mod_coment');"><img src="icos/7.gif" alt=":|H" title=":|H" border="0" /></a>
	<a href="javascript: add_smile(':():', 'mod_coment');"><img src="icos/8.gif" alt=":():" title=":():" border="0" /></a>
	<a href="javascript: add_smile(':-*', 'mod_coment');"><img src="icos/9.gif" alt=":-*" title=":-*" border="0" /></a><br />
	Comentariu :<br />
	<textarea name="mod_coment" id="mod_coment" cols="35" rows="6"></textarea><br />
	<input type="submit" value="Modifica" />
  </fieldset>
</form>
</div></center>