
function flashPlayer(file){
	var ih ='<object type="application/x-shockwave-flash" data="player_mp3_mini.swf" width="800" height="20">';
	ih += '<param name="movie" value="player_mp3_mini.swf">';
    ih += '<param name="bgcolor" value="#777777">';
	ih += '<param name="FlashVars" value="mp3='+file+'&loadingcolor=ff0000&autoplay=1">';
	ih += '</object>';
	var player=document.getElementById('player');
	player.innerHTML=ih;
	player.style.visibility='visible';
}

function stopPlayer(){
	var player=document.getElementById('player');
	player.innerHTML='';
	player.style.visibility='hidden';
}

function selected(el){
	var playlistTable = el.parentNode.parentNode.parentNode.parentNode;
	var trArray = playlistTable.getElementsByTagName('tr');
	for(i = 0; i < trArray.length; i++){
		trArray[i].className = 'blah';
	}
	var selectedTr = el.parentNode.parentNode;
	selectedTr.className = 'selected';
}

// open Popup in center
function getbrowserwidth(){if(navigator.userAgent.indexOf("MSIE")>0){return(document.body.clientWidth);}else{return window.outerWidth;}}
function getbrowserheight(){if(navigator.userAgent.indexOf("MSIE")>0){return(document.body.clientHeight);}else{return(window.outerHeight);}}
var popup = new Object();
function CenterPopup(URL, width, height){
	// get center of browser window
	var X = getbrowserwidth()/2;
	var Y = getbrowserheight()/2;
	popup = window.open(URL, 'PopUp','scrollbars=yes,width='+width+',height='+height+',top='+(window.screenTop+(Y-(height/2)))+',left='+(window.screenLeft+(X-(width/2))));
	popup.focus();
}

/*function playCount(song){
	var xhr; 
	if(window.XMLHttpRequest){     // Object of the current windows 
		xhr = new XMLHttpRequest();     // Firefox, Safari, ...
	}else if(window.ActiveXObject){   // ActiveX version
		xhr = new ActiveXObject("Microsoft.XMLHTTP");  // Internet Explorer 
	}
	xhr.onreadystatechange = function(){ // instructions to process the response
		if (xhr.readyState == 4){// Received, OK
			var myData = xhr.responseText;
			document.getElementById('count').innerHTML = myData;
		}
	}
	xhr.open('GET','playcount.php?song='+song, true);
	xhr.send(null);
}
*/