fx.HeightMin = Class.create();
Object.extend(Object.extend(fx.HeightMin.prototype, fx.Layout.prototype), {
	increase: function() {
		this.el.style.height = this.now + "px";
	},

	toggle: function() {
		if (this.el.offsetHeight > 270) this.custom(this.el.offsetHeight, 270);
		else this.custom(270, this.el.scrollHeight);
	}
});

fx.TableOpacity = Class.create();
fx.TableOpacity.prototype = Object.extend(new fx.Base(), {
	initialize: function(el, options) {
		this.el = $(el);
		this.now = 1;
		this.increase();
		this.setOptions(options);
	},

	increase: function() {
		if (this.now == 1) this.now = 0.9999;
		if (this.now > 0 && this.el.style.visibility == "hidden") {
		    this.el.style.visibility = 'visible';
		    this.el.style.display    = '';
		}
		if (this.now == 0) {
		    this.el.style.visibility = 'hidden';
		    this.el.style.display    = 'none';
		}
		if (window.ActiveXObject) this.el.style.filter = "alpha(opacity=" + this.now*100 + ")";
		this.el.style.opacity = this.now;
	},

	toggle: function() {
		if (this.now > 0) this.custom(1, 0);
		else this.custom(0, 1);
	}
});

function initialiseSitemap() {
    var clickers = $('sitemapsClicker');
    var contents = $('sitemapsContent');
    contents.heightfx = new fx.Combo(contents, {height: true, opacity: true, delay: 100, onComplete: function(){if ($('sitemapsContent').offsetHeight > 0) $('sitemapsContent').style.height = '1%';} });
    contents.heightfx.toggle();
    if (typeof clickers.onclick == 'function') var exClick = clickers.onclick;
	clickers.onclick = function() {
		if (exClick) exClick();
		contents.heightfx.toggle();
	}
}