var newWinOffset = 0 // Position of first pop-up

function PlayerOpen(name) {
	var winWidth = 320;
	var winHeight = 130;
  	var width = screen.width;
	var height = screen.height;
	var posY = height / 2 - winHeight / 2;
	var posX = width / 2 - winWidth / 2;
	PlayWin = window.open('','mp3player','width=' + winWidth + ',height=' + winHeight +',top=' + posY +',left=' + posX +',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,titlebar=no,personalbar=no');
	PlayWin.focus();
	var pattern = / /g;
	var pattern2 = /\'/g;
	var filename = name.replace(pattern,'%20');	
	var filename = filename.replace(pattern2,'%27');	
	var winContent = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
	winContent += '<html xmlns="http://www.w3.org/1999/xhtml">';
	winContent += '<head>';
	winContent += '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
	winContent += '<title>Alcyone Prophet - ' + name + '</title>';
	winContent += '</head>';
	winContent += '<body>';
	winContent += '<script language="JavaScript" type="text/javascript"><!--';
	winContent += 'AC_AX_RunContent(\'width\',\'300\',\'height\',\'42\',\'src\',\'mp3s/Alcyone%20Prophet%20-%2' + filename + '.mp3\',\'autostart\',\'true\',\'loop\',\'false\',\'controller\',\'true\',\'bgcolor\',\'#FF9900\',\'autoplay\',\'true\');';
	winContent += '//--></script>';
	winContent += '<noscript>';
	winContent += '<object width="300" height="42">';
	winContent += '  <param name="src" value="mp3s/Alcyone%20Prophet%20-%20' + filename + '.mp3" />';
	winContent += '  <param name="autoplay" value="true" />';
	winContent += '  <param name="controller" value="true" />';
	winContent += '  <param name="bgcolor" value="#FF9900" />';
	winContent += '  <embed src="mp3s/Alcyone%20Prophet%20-%20&' + filename + '.mp3" autostart="True" loop="False" width="300" height="42" controller="true" bgcolor="#000000"></embed>';
	winContent += '</object>';
	winContent += '</noscript>';
	winContent += '</body>';
	winContent += '</html>';
	PlayWin.document.write(winContent); 
	PlayWin.document.close(); // "Finalizes" new window 
}