
function loadAndExecuteJs ( src ) {
    
    var head = document.getElementsByTagName('head').item(0);

    var scriptTag = document.getElementById('loadScript');
    if(scriptTag) head.removeChild(scriptTag);
    
    script = document.createElement('script');
    script.src = src;
    script.type = "text/javascript";
    script.id = "loadScript";
    head.appendChild(script);

}

function voteForRiffLeaveRating ( url, rating ) {
	loadAndExecuteJs ( url + "?rating=" + rating );
}

function proReviewHelp() {
	alert ( "To Get a Pro music review click on the performer (pop-up window with your song will be opened).\nAnd click on the Get Pro Review button then." );
}

function openListeningPopup ( popup_name ) {
	window.open("about:blank", popup_name, "top=100,left=100,width=601,height=690px,location=yes,resizable=no,directories=no,menubar=no,scrollbars=yes,status=yes,titlebar=no,toolbar=no");
}

function pokeEmbedUrlArea() {
 var x;
 x=document.getElementById("copy_embed_url");
 x.focus();
 x.select();
}