function addLoadEvent(func) {   
	var oldonload = window.onload;   
	if (typeof window.onload != 'function') {   
		window.onload = func;   
	} else {   
		window.onload = function() {   
			if (oldonload) {   
				oldonload();   
			}   
			func();   
		}   
	}
}

//sliders
var SL = {
	e:'', em:'', ec:[], ei:[], c:[], ct:0, t:0, i:0,
	s:25, d:10,
	I:function(i) {
		this.e = document.getElementById(i);
		var e = this.e.getElementsByTagName('div');
		for (var i = 0; i < e.length; i++)
			if (e[i].className == 'sl_cont_main')
				this.em = e[i];
			else if (e[i].className == 'sl_cont') {
				this.c.push(this.ct);
				this.ct += e[i].clientWidth;
				this.ec.push(e[i]);
			}
			else if (e[i].className == 'sl_item' || e[i].className == 'sl_item_over') {
				eval("e[i].onmouseover = function() { SL.A("+this.ei.length+"); };");
				this.ei.push(e[i]);
			}
	},
	A:function(i) {
		if (this.t)
			clearTimeout(this.t);
		//this.ei[this.i].style.filter = "alpha(opacity:50)";
		this.ei[this.i].className = "sl_item";
		this.i = i;
		//this.ei[i].style.filter = "alpha(opacity:100)";
		this.ei[i].className = "sl_item_over";
		this.G(this.c[i]);
	},
	P:function() {
		if (this.i > 0)
			this.A(this.i - 1);
	},
	N:function() {
		if (this.i < this.ei.length - 1)
			this.A(this.i + 1);
	},
	G:function(c) {
		if (this.em.scrollLeft != c) {
			var d = this.em.scrollLeft < c ? 1 : -1;
			var s = Math.min(this.s, Math.abs(this.em.scrollLeft - c));
			var dl = Math.abs(this.em.scrollLeft - c);
			var de = this.d;
			de = Math.min(de, 100);
			s = Math.max(s, 1)
			this.em.scrollLeft += d * s;
			this.t = setTimeout("SL.G("+c+")", de);
		}
	}
}
//window.onload = function() { SL.I('sl_1'); }
//addLoadEvent(function() { SL.I('sl_1'); });

/*var Acc = {
	i:0, id:'', e:[], oh:[], d:5, s:30, f:0, t:0,
	open: function(i) {
		if (i != this.t) {
			this.e[this.f].style.height = '0px';
			this.e[this.t].style.height = this.oh[this.t] + 'px';
			this.f = this.t;
			this.t = i;
			this.move();
		}
	},
	init: function(id) {
		this.id = id;
		var e = document.getElementById(id);
		e = e.getElementsByTagName('div');
		var k = 0;
		for (var i = 0; i < e.length; i++)
			if (e[i].className == 'ac_content') {
				e[i].style.display = 'block';
				this.oh[this.e.length] = e[i].clientHeight;
				e[i].style.height = this.e.length ? 0 : (e[i].clientHeight + 'px');
				this.e.push(e[i]);
			}
			else if (e[i].className == 'ac_title')
				eval("e[i].onmouseover = function() { Acc.open("+(k++)+"); };");
	},
	move: function() {
		var s = Math.min(this.e[this.f].clientHeight, this.s);
		if (s > 0) {
			this.e[this.f].style.height = (this.e[this.f].clientHeight - s) + 'px';
			this.e[this.t].style.height = (this.e[this.t].clientHeight + s) + 'px';
			setTimeout("Acc.move()", this.d);
		}
	}
}
//window.onload = function() { Acc.init('acc1'); }
//addLoadEvent(function() { Acc.init('acc1'); });*/
