GE_Player = function(el) {
	this.el = $(el);
	this.rootName = null;
	this.w = null;	//player width
	this.d = null;	//dark color
	this.l = null;	//light color
	this.init();
}

GE_Player.prototype.init = function() {
	var tmphref = unescape(this.el.href);
	this.rootName = tmphref.substring(0,tmphref.length-4);
	this.el.href = 'javascript:(void)';
	Event.observe(this.el, "click", this.write.bind(this));
}

GE_Player.prototype.write = function() {
	this.getStyle();
	var so = new SWFObject( "http://www.ge.com/html_view/flash/audio.swf", "audioPlayer", (this.w)?this.w:110, "20", "8", "#FFFFFF");
    so.addParam("wmode", "transparent");
	if (this.w) so.addVariable("player_width", this.w);
	if (this.d) so.addVariable("color_dark", this.d);
	if (this.l) so.addVariable("color_light", this.l);
	so.addVariable("flv_path", this.rootName + ".flv");
	so.addVariable("title", this.el.title);
	so.write(this.el.parentNode);
}

GE_Player.prototype.getStyle = function() {
	if (this.el.className.indexOf('customPlayer')>-1) {
		this.el.removeClassName('g_boxed_link');
		this.el.setStyle({display:'block',visibility:'hidden'});
		this.w = parseInt(this.el.getStyle('width'));
		this.d = this.el.getStyle('background-color');
		this.l = this.el.getStyle('color');
	}
};

//GE_Main.mapFnToCSS('bhv_audioPlayer',
//	function(el) {
//		new GE_Player(el);
//	}
//);