// JavaScript Document
function addBookmark( title, url )
{
	if (title == undefined)
		title = document.title;

	if (url == undefined)
		url = top.location.href;
		
	if (window.sidebar) // firefox
		window.sidebar.addPanel(title, url, '');
	else if(window.opera && window.print) // opera
	{
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	} 
	else if(document.all) // ie
		window.external.AddFavorite(url, title);
	else if (navigator.appName=="Netscape") //Netscape
		alert( 'To bookmark this site press "Ctrl+D".' );
	else
		alert( 'Your browser doesn\'t support this feature' );
}


function voteSong (songId) {
$.ajax({
  type: "GET",
  url: "ajax-vote.php",
  data: "songId="+songId,
  success: function(msg){
    document.getElementById('topManele').innerHTML = msg;
	//document.getElementById('voteHere'+songId).innerHTML = 'votat';
	//a = document.getElementById('votes'+songId).innerHTML;
	//document.getElementById('votes'+songId).innerHTML = parseInt(a) + parseInt(1);
	//alert( msg );
	}
});
}

function voteArtist (artistId) {
$.ajax({
  type: "GET",
  url: "ajax-vote-artist.php",
  data: "artistId="+artistId,
  success: function(msg){
    document.getElementById('topArtisti').innerHTML = msg;
	//document.getElementById('voteHere'+songId).innerHTML = 'votat';
	//a = document.getElementById('votes'+songId).innerHTML;
	//document.getElementById('votes'+songId).innerHTML = parseInt(a) + parseInt(1);
	//alert( msg );
	}
});
}