function popup (URL, w, h) {
	var putItThere = null; 
	var chasm = screen.availWidth;
	var mount = screen.availHeight;
	var ie = /msie/i;
	if (!w) w = 320;
	if (!h) h = 180;
	var windowName = 'popup' + Math.floor(Math.random()*1000);

	var features =
		'width=' + w + 
		',height=' + h + 
		',left=' + ((chasm - w - 10) * .5) + 
		',top=' + ((mount - h - 150) * .5) + 
		',directories=no' +
		',location=no' +
		',menubar=no' +
		',scrollbars=no' +
		',status=no' +
		',toolbar=no' +
		',resizable=no';
	
	if (!new_window) 
	{
		var new_window = window.open (URL, windowName, features);
		if (new_window) new_window.focus();
	}
}

function play(trackNum) {
	if(hasRightVersion)
		popup('media.html?trackNum='+trackNum);
	else
		popup('mp3s/'+trackList[trackNum]);
}