/* ********************************************************************************************
**
** 	@package			QOL
**	@subpackage		Javascript
**	@author				Edd Hannay
**	@copyright		Copyright 2008, Outside Line.
**
******************************************************************************************** */

var qolTwtd = Class.create();

qolTwtd.prototype = {
	disabled: 0,	
	baseurl: '',
	/* ********************************************************************************************

	INITIALIZE (CONSTRUCTOR)

	******************************************************************************************** */
		
	initialize: function(base) {		
		this.baseurl = base;
		// Observe when the page is loaded so we can start playing ...
		Event.observe(window, "load", function(e) {			
			// Hide the 
			$('songselectsubmit').addClassName('hide');
			// Add an onchange  to the song selector
			$$("select#song").each(function(a) {
				// When changed, redirect the user
				a.observe("change", this.selectSong.bindAsEventListener(this));
			}.bind(this));			

			
		}.bindAsEventListener(this));
	},
	
	selectSong: function(e){
		window.location=this.baseurl+e.target.value;
	}
	

	/* ********************************************************************************************

	FIN

	******************************************************************************************** */
}