var mp = false;
function createMediaPlayer(file) {
	var so = new SWFObject('embed/mediaplayer.swf','mediaPlayer','220','19','8');
	so.addParam('allowscriptaccess','always');
	so.addParam('allowfullscreen','true');
	so.addVariable('width','220');
	so.addVariable('height','19');
	so.addVariable('file', file);
	so.addVariable('autostart','true');
	so.addVariable('javascriptid','mediaPlayer');
	so.addVariable('enablejs','true');
	so.write('playerContainer');
	mp = true;
}

function sendEvent(swf,typ,prm) { 
	thisMovie(swf).sendEvent(typ,prm); 
};
function getUpdate(typ,pr1,pr2,swf) {};
function thisMovie(swf) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[swf];
	} else {
		return document[swf];
	}
};

function playSong(file) {
	if (!mp) {
		mp = true;
		createMediaPlayer(file);
	} else {
		thisMovie('mediaPlayer').loadFile({file:file});
	}
};

