/*
Netscape and Firefox on windows force downloads of mp3s when they are linked to directly.
This code generates link HTML for mp3 links depending on the user agent.  If the ua is
ns or firefox a link to an m3u file is generated, otherwise a direct link to the mp3 is
generated.
*/
function getAudioLink(filename) {
	
	var agt = navigator.userAgent.toLowerCase();
	var baseURL = location.hostname;

	if ( agt.indexOf("windows") != -1 && (agt.indexOf("firefox") != -1 | agt.indexOf("netscape") != -1) )
	{
		// agt is firefox or ns on windows
		//audiofileurl = "http://" + baseURL + "/stream.php?filename=" + filename;
		audiofileurl = "http://" + baseURL + "/stream.php?filename=" + filename;
		
		 
	} else {
		// all other cases
		audiofileurl = "http://" + baseURL + "/mp3/" + filename;
	
	}
	
	
	//return alert(audio_file);
	return open_window(audiofileurl, 350, 100);
	
}
	