/*
devel, toogle button extensions for moo.fx pack
by Thomas Boley (http://www.wildbits.de)
based on moo.fx and moo.fx pack by by Valerio Proietti (http://mad4milk.net) 
2006-04-12
v 1.0

*/

aaron = Class.create();
aaron.prototype = {
	initialize: function(boxname,switchname,switchimageon,switchimageoff) {
		this.panelbox = boxname;
		this.paneltoogle = new fx.RememberHeight(boxname, {duration: 400});
		this.panelboxswitch =switchname;
		this.panelimageon=switchimageon;
		this.panelimageoff=switchimageoff;
	},
	myswitcher: function () {
		if ($(this.panelboxswitch).alt=='on') 
		{
			$(this.panelboxswitch).setAttribute('src',this.panelimageoff); // position off
			$(this.panelboxswitch).alt='off';
		}
		else {
			$(this.panelboxswitch).setAttribute('src',this.panelimageon); //position on
			$(this.panelboxswitch).alt='on';
		}
		this.paneltoogle.toggle();
	},
	mystartup: function () {
		
		if (this.paneltoogle.el.offsetHeight == 0)
		{
			$(this.panelboxswitch).setAttribute('src',this.panelimageoff); // position off
			$(this.panelboxswitch).alt='off';
		}
		
		else {
			$(this.panelboxswitch).setAttribute('src',this.panelimageon); //position on
			$(this.panelboxswitch).alt='on';
		}
	}
}
