<!--
// vot vot, see on see karm kood mille kallal pixli poisid palju närvirakke kulutasid

	function n2ita_komntr(check, id){
		if (document.getElementById(check+"komntr#"+id).style.display == ""){
			show = "none";
		}
		else{
			show = "";
		}
		document.getElementById(check+"komntr#"+id).style.display = show;
	}

	function prelaadipildid() {
	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=prelaadipildid.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}

	function lae_pildid(){

	prelaadipildid('./pildid/s_genk.gif', './pildid/u_lisak.gif', './pildid/s_k_pkt.gif');
	}

	function kommenteeri(check, id){
		if (document.getElementById(check+"kommenteeri#"+id).style.display == ""){
			show = "none";
		}
		else{
			show = "";
		}
		document.getElementById(check+"kommenteeri#"+id).style.display = show;
		document.getElementById(check+"kommenteeri#"+id).innerHTML = '<form method="post" action="sodila.php" name="nimi'+id+'" style="margin:0"><table class="lisatable" width="318" border="0" cellspacing="0" cellpadding="0"><input type="hidden" name="lisa_kommentaar" value="1" /><input type="hidden" name="uudiseID" value="'+id+'" /><tr><td bgcolor="#D7D7D7" width="1" rowspan="2"><img src="pildid/px.gif" width="1" height="1"></td><td bgcolor="#DEECDE" width="316" valign="top" colspan="3"><textarea class="s_komment_vorm" cols="10" rows="4" size="12" name="komment_vorm"></textarea></td><td bgcolor="#D7D7D7" width="1" rowspan="2"><img src="pildid/px.gif" width="1" height="1"></td></tr><tr><td bgcolor="#DEECDE" height="13" width="200" align="left" valign="top"><img src="pildid/px.gif" width="6" height="1"><input type="text" name="link_nimi" class="s_komment_gen_link" style="width:60px" onfocus="if (value == \'lingi nimi\') {value =\'\'}" onblur="if(value == \'\') {value = \'lingi nimi\'}" value="lingi nimi"><input type="text" name="link_url" class="s_komment_gen_link" style="width:130px" onfocus="if (value == \'url\') {value =\'\'}" onblur="if(value == \'\') {value = \'url\'}" value="url"><br></td><td bgcolor="#DEECDE" width="80" align="left" valign="top"><A href="javascript:void(0)" onclick="gen_link('+id+');" onmouseover="window.status=\'Genereeri link\'; return true" onmouseout="window.status=\'\'; return true"><img src="./pildid/s_genk.gif" width="38" height="12" border="0"></a></td><td bgcolor="#DEECDE" width="36" align="left" valign="top"><input type="image" value="submit" src="./pildid/u_lisak.gif" width="30" height="12" border="0" onmouseover="window.status=\'Lisa kommentaar\'; return true" onmouseout="window.status=\'\'; return true"></td></tr><tr><td width="318" colspan="5" height="1" bgcolor="#D7D7D7"><img src="pildid/px.gif" width="1" height="1"></td></tr></form></table>';
	}

	function gen_link(id) {
	obj = document.forms['nimi'+id];
	obj.komment_vorm.value += '[link="'+ obj.link_url.value +'"]'+ obj.link_nimi.value +'[/link]' + ' ';
	obj.komment_vorm.focus();
}

function kinnita(linginimi, nimi)
{
	var tekst = 'Kas tõesti kustutan kogu';
    if (tekst == '' || typeof(window.opera) != 'undefined') {
        return true;
    }

    var kinnitatud = confirm(tekst + ' \n' + nimi + '-i teate?!');
    if (kinnitatud) {
        linginimi.href += '&kinnitatud=1';
    }

    return kinnitatud;
}
//-->
