<!--
// Written by Sebastian Brencic
// www.labin.com


function komentiraj(idarticle,comment,idModuli) 
  {
			var dvelement = document.getElementById('novikomentar');
            try
              {
				 comment=comment.trim();
				 comment = comment.replace(/%0A/g, '<br />');
				 if (comment!=''){
				 dvelement.innerHTML = "<img src='grafika/progressimgred.gif' style='border:none;' />";
				 comment = comment.replace(/\n/g, '<br />\n');
                 http.open('GET', 'comment_process.asp?id='+idarticle+'&comment='+comment+'&idModuli='+idModuli);
                 http.onreadystatechange = handleResponseTextCommentV;
				 var inner = "<strong>Vaš komentar je snimljen. Zahvaljujemo!</strong> <br />Za upisivanje novog komentara \"refreshajte\" stranicu (F5).";
				 dvelement.innerHTML = inner;
		   		 http.send(null);} else { 
				 alert('Unesite komentar!');
				 }
				 }
	 
	    catch(e){}
	    finally{}
 }
function handleResponseTextCommentV() 
  {
     try
         {
             if((http.readyState == 4)&& (http.status == 200))
                {
    	          	  var response = http.responseText;
					  var update = response.replace(/_novi_red_/g,"<br />");
					  var objList = document.getElementById('korisnikovipodaci');
					  var objKomentar = document.getElementById('korisnikovkomentar');
					  objList.style.display = '';
					  objKomentar.innerHTML = update;
			             }
	        }
        
	catch(e){alert("Došlo je do greške!");}
	finally{}
}