var exp = {
	alpha : {
		fadeIn : function(e,a,s,f) {
			e = typeof e == 'object' ? e : $(e);
			var o = exp.alpha.get(e), d = a > o * 100 ? 1 : -1;
			exp.alpha.set(e, o);
			clearInterval(e.ai);
			e.ai=setInterval(function(){exp.alpha.executeFadeIn(e,a,d,s,f)}, 20);
		},
		executeFadeIn : function(e,a,d,s,f) {
			var o = Math.round(e.style.opacity * 100);
			if(o >= a){
				clearInterval(e.ai);
				if(f) f();
			} else {
				var n = o + Math.ceil(Math.abs(a-o)/s) * d;
				exp.alpha.set(e, n);
			}
		},
		fadeOut : function(e,a,s,f) {
			e = typeof e == 'object' ? e : $(e);
			var o = exp.alpha.get(e);
			exp.alpha.set(e, o);
			clearInterval(e.ai);
			e.ai=setInterval(function(){exp.alpha.executeFadeOut(e,a,s,f)}, 20);
		},
		executeFadeOut : function(e,a,s,f) {
			var o = e.style.opacity * 100;
			if(o <= a){
				clearInterval(e.ai);
				if(f) f();
			} else {
				var n = Math.floor(o - Math.abs(o - a)/s);
				exp.alpha.set(e, n);
			}
		},
		set : function(e, s) {
			$(e).style.opacity = s / 100;
			$(e).style.filter = "alpha(opacity=" + s + ")";
		},
		get : function(e) {
			var o = parseInt(exp.style(e, "opacity")) * 100;
			if(isIE()) {
				o = parseInt(exp.style(e, "filter").substr(exp.style(e, "filter").indexOf("=") + 1));
			}
			return o;
		}
	},
	style : function(obj, par) {
		obj = $(obj);
		if (obj.currentStyle) return obj.currentStyle[par.replace(/-/g,'')];
		return document.defaultView.getComputedStyle(obj,null).getPropertyValue(par.toLowerCase());
	},
	scroll : {
		move : function(e,d,s) {
			e = typeof e == 'object' ? e : $(e);
			var l = d == 1 ? parseInt(e.scrollWidth) : 0;
			e.si = setInterval(function(){exp.scroll.executeMove(e,l,d,s)}, 20);
		},
		executeMove : function(e,l,d,s){
			var c = parseInt(e.scrollLeft) + (d == 1 ? parseInt(e.offsetWidth) : 0);
			if(c == l) {
				exp.scroll.clear(e);
			} else {
				e.scrollLeft += s * d;
			}
		},
		clear : function(e){
			e = typeof e == 'object' ? e : $(e);
			clearInterval(e.si)
		}
	},
	expand : {
		move : function(e,d,w,s,f) {
			e = typeof e == 'object' ? e : $(e);
			e.si = setInterval(function(){exp.expand.executeMove(e,d,w,s,f)}, 20);
		},
		executeMove : function(e,d,w,s,f){
			var c = parseInt(e.offsetWidth);
			if((d == 1 && c >= w) || (d != 1 && c <= w)) {
				exp.expand.clear(e,f);
			} else {
				e.style.width = (parseInt(exp.style(e, "width")) + (s * d)) + "px";
			}
		},
		moveV : function(e,d,h,s,f) {
			e = typeof e == 'object' ? e : $(e);
			e.si = setInterval(function(){exp.expand.executeMoveV(e,d,h,s,f)}, 20);
		},
		executeMoveV : function(e,d,h,s,f){
			var c = parseInt(e.offsetHeight);
			if((d == 1 && c >= h) || (d != 1 && c <= h)) {
				exp.expand.clear(e,f);
			} else {
				e.style.height = (parseInt(exp.style(e, "height")) + (s * d)) + "px";
			}
		},
		clear : function(e,f){
			e = typeof e == 'object' ? e : $(e);
			clearInterval(e.si)
			if(f) f();
		}
	},
	slide : {
		right : function(e,s,d,f){
			e = typeof e == 'object' ? e : $(e);
			clearInterval(e.si);
			var h = d == 1 ? 0 : -parseInt(e.offsetWidth);
			e.si = setInterval(function() {
				exp.slide.slideRight(e,s,d,h,f);
			}, 20);
		},
		slideRight : function(e,s,d,h,f){
			var oh = (parseInt(e.style.left));
			if(oh == h) {
				clearInterval(e.si);
				if(f) {
					f();
				}
			} else {
				if(oh != h) {
					e.style.left = oh + (Math.ceil(Math.abs(h - oh) / s)) * d + 'px';
				}
			}
		}
	},
	homeslide : {
		// e = elem, h = height, t = time between
		set : function(e,t,s) {
			e = $(e);
			e.style.position = "relative";
			e.style.top = "0";
			
			var c = null;
			for(var i = 0; i < e.childNodes.length; i++) {
				c = e.childNodes[i];
				if(c.tagName != undefined) {
					break;
				}
			}
			setTimeout(function() {
				e.si = setInterval(function() {
					exp.homeslide.slide(e,c.offsetHeight,t,c,s);
				}, 20);
			}, t);
		},
		slide : function(e,h,t,c,s) {
			e = $(e);
			if(parseInt(e.style.top) <= -h) {
				exp.homeslide.clear(e,t,c,s);
			} else {
				e.style.top = (parseInt(e.style.top) - Math.ceil((h - Math.abs(parseInt(e.style.top))) * (s / 100))) + "px";
				var ooo = h - Math.abs(parseInt(e.style.top))
				//e.style.top = "-" + (Math.abs(parseInt(e.style.top)) + Math.ceil(ooo * s / 100)) + "px";
				//e.style.top = "-" + (Math.ceil(ooo * 0.9)) + "px";
			}
		},
		clear : function(e,t,c,s) {
			e = $(e);
			clearInterval(e.si);
			e.appendChild(c);
			e.style.top = "0";
			exp.homeslide.set(e,t,s);
		}
	}
};




















