function postVote(url){
$.ajax({
        type: "GET",
	url: url,
	dataType: "xml",
	success: function(xml) {
          $(xml).find('s').each(function(){          
           var s = $(this).text();
           if (s=="e"){
           	 alert("Kļuda, nevar saglabāt vērtējumu!");
           }else if (s=="n"){
           	alert("Jūs jau esat novērtējis!");
           }else if (s=="o"){
	           var val = $(this).attr('val');
           	$("#vote_buttons").html("Vērtējums saglabāts.");
           	$("#vote_result").html("Kopējais vērtējums:"+val);
           }
           
          });	
 
 
	}
});
}

function DraugiemSay( title, url, titlePrefix ){
 window.open(
 'http://www.draugiem.lv/say/ext/add.php?title=' + encodeURIComponent( title ) +
 '&link=' + encodeURIComponent( url ) +
 ( titlePrefix ? '&titlePrefix=' + encodeURIComponent( titlePrefix ) : '' ),
 '',
 'location=1,status=1,scrollbars=0,resizable=0,width=530,height=400'
 );
 return false;
}


