function EP_eventHandler(evt) 
{
	// write the event to the text-area in the HTML page
	EP_logEvent(evt);
	
	switch(evt) {
		
		case 'MP3_LOADING':
			
			break;
		case 'MP3_BUFFERING':

			break;
		case 'MP3_PLAYING':
			
			// get track info
			var t = EP_getTrackInfo('ep_player');

			// write the event to the text-area in the HTML page
			EP_logEvent('playlistIndex: '+t.playlistIndex);
			EP_logEvent('location: '+t.location);
			EP_logEvent('title: '+t.title);
			EP_logEvent('annotation: '+t.annotation);
			EP_logEvent('creator: '+t.creator);
			EP_logEvent('info: '+t.info);
			EP_logEvent('image: '+t.image);
			EP_logEvent('album: '+t.album);
			EP_logEvent('trackNum: '+t.trackNum);
			EP_logEvent('link: '+t.link);
			EP_logEvent('----------------------------');

			break;			
		case 'MP3_PREV':

			break;				
		case 'MP3_NEXT':

			break;			
		case 'MP3_SELECT':
		
			// write the event to the text-area in the HTML page
			EP_logEvent("Select MP3 (#"+EP_getTrackInfo('ep_player').playlistIndex+") from playlist ...");
			
			break;
		case 'MP3_PAUSED':

			break;
		case 'MP3_COMPLETE':

			break;			
		case 'MP3_STOPPED':

			break;						
		default:
			break;
	}
}

////////////////////////////////////////////////

// write the event to the text-area in the HTML page
function EP_logEvent(evt) 
{
	ep_form.events.value += '>'+evt+'\n';
}
