var Fe = Fe || {
	version: "20080809",
	emptyFn: function() {}
};
if (Object.prototype.propertyIsEnumerable) {
	Fe.propertyIsEnumerable = function(A, B) {
		return Object.prototype.propertyIsEnumerable.call(A, B)
	}
} else {
	Fe.propertyIsEnumerable = function(A, C) {
		if (C in A) {
			for (var B in A) {
				if (B == C) {
					return true
				}
			}
		}
		return false
	}
}
Fe.isArray = function(A) {
	return (A && typeof A.length == "number" && typeof A.splice != "undefined" && !Fe.propertyIsEnumerable(A, "length"))
};
Fe.isObject = function(A) {
	return (A && (typeof(A) == "object" || typeof(A) == "function")) || false
};
Fe.trim = function(A) {
	return A.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g, "")
};
Fe.format = function(I, K) {
	if (arguments.length > 1) {
		var E = Fe.format,
		H = /([.*+?^=!:${}()|[\]\/\\])/g,
		F = (E.left_delimiter || "{").replace(H, "\\$1"),
		A = (E.right_delimiter || "}").replace(H, "\\$1");
		var C = E._r1 || (E._r1 = new RegExp("#" + F + "([^" + F + A + "]+)" + A, "g")),
		B = E._r2 || (E._r2 = new RegExp("#" + F + "(\\d+)" + A, "g"));
		if (typeof(K) == "object") {
			return I.replace(C,
			function(L, N) {
				var M = K[N];
				if (typeof M == "function") {
					M = M(N)
				}
				return typeof(M) == "undefined" ? "": M
			})
		} else {
			if (typeof(K) != "undefined") {
				var J = Array.prototype.slice.call(arguments, 1);
				var D = J.length;
				return I.replace(B,
				function(L, M) {
					M = parseInt(M, 10);
					return (M >= D) ? L: J[M]
				})
			}
		}
	}
	return I
};
Fe.format.delimiter = function(C, A) {
	var B = Fe.format;
	B.left_delimiter = C || "{";
	B.right_delimiter = A || C || "}";
	B._r1 = B._r2 = null
};
Fe.each = function(E, A) {
	if (typeof A != "function") {
		return E
	}
	if (E) {
		if (E.length === undefined) {
			for (var B in E) {
				A.call(E[B], E[B], B)
			}
		} else {
			for (var C = 0, D = E.length; C < D; C++) {
				A.call(E[C], E[C], C)
			}
		}
	}
	return E
};
Fe.extend = function(F, D) {
	if (F && D && typeof(D) == "object") {
		for (var E in D) {
			F[E] = D[E]
		}
		var C = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"];
		for (var A = 0, B; A < C.length; A++) {
			B = C[A];
			if (Object.prototype.hasOwnProperty.call(D, B)) {
				F[B] = D[B]
			}
		}
	}
	return F
};
Fe.Browser = (function() {
	var C = navigator.userAgent;
	var H = 0,
	A = 0,
	F = 0,
	E = 0;
	var D = 0,
	I = 0,
	B = 0;
	if (typeof(window.opera) == "object" && /Opera(\s|\/)(\d+(\.\d+)?)/.test(C)) {
		A = parseFloat(RegExp.$2)
	} else {
		if (/MSIE (\d+(\.\d+)?)/.test(C)) {
			H = parseFloat(RegExp.$1)
		} else {
			if (/Firefox(\s|\/)(\d+(\.\d+)?)/.test(C)) {
				E = parseFloat(RegExp.$2)
			} else {
				if (navigator.vendor == "Netscape" && /Netscape(\s|\/)(\d+(\.\d+)?)/.test(C)) {
					B = parseFloat(RegExp.$2)
				} else {
					if (C.indexOf("Safari") > -1 && /Version\/(\d+(\.\d+)?)/.test(C)) {
						F = parseFloat(RegExp.$1)
					}
				}
			}
		}
	}
	if (C.indexOf("Gecko") > -1 && C.indexOf("KHTML") == -1 && /rv\:(\d+(\.\d+)?)/.test(C)) {
		I = parseFloat(RegExp.$1)
	}
	return {
		ie: H,
		firefox: E,
		gecko: I,
		netscape: B,
		opera: A,
		safari: F
	}
})();
window.FeBrowser = Fe.Browser;
Fe.isGecko = (navigator.userAgent.indexOf("Gecko") > -1 && navigator.userAgent.indexOf("KHTML") == -1 && /rv\:(\d+(\.\d+)?)/.test(navigator.userAgent)) ? RegExp.$1: 0;
Fe.isStrict = (document.compatMode == "CSS1Compat");
Fe.isIE = /MSIE (\d+(\.\d+)?)/.test(navigator.userAgent) ? RegExp.$1: 0;
Fe.isFirefox = /Firefox(\s|\/)(\d+(\.\d+)?)/.test(navigator.userAgent) ? RegExp.$2: 0;
Fe.isSafari = (navigator.userAgent.indexOf("Safari") > -1 && /Version\/(\d+(\.\d+)?)/.test(navigator.userAgent)) ? RegExp.$1: 0;
Fe.isWebkit = (navigator.userAgent.indexOf("KHTML") > -1 && /AppleWebKit\/([^\s]*)/.test(navigator.userAgent)) ? RegExp.$1: 0;
Fe.isOpera = (window.opera && /Opera(\s|\/)(\d+(\.\d+)?)/.test(navigator.userAgent)) ? RegExp.$2: 0;
Fe.G = function() {
	for (var A = [], B = arguments.length - 1; B > -1; B--) {
		var C = arguments[B];
		A[B] = null;
		if (typeof C == "object" && C && C.dom) {
			A[B] = C.dom
		} else {
			if ((typeof C == "object" && C && C.tagName) || C == window || C == document) {
				A[B] = C
			} else {
				if (typeof C == "string" && (C = document.getElementById(C))) {
					A[B] = C
				}
			}
		}
	}
	return A.length < 2 ? A[0] : A
};
Fe.Q = function(E, D, B) {
	if (typeof E != "string" || E.length <= 0) {
		return null
	}
	var J = [],
	B = (typeof B == "string" && B.length > 0) ? B.toLowerCase() : null,
	C = (Fe.G(D) || document);
	if (C.getElementsByClassName) {
		Fe.each(C.getElementsByClassName(E),
		function(K) {
			if (B !== null) {
				if (K.tagName.toLowerCase() == B) {
					J[J.length] = K
				}
			} else {
				J[J.length] = K
			}
		})
	} else {
		E = E.replace(/\-/g, "\\-");
		var A = new RegExp("(^|\\s{1,})" + Fe.trim(E) + "(\\s{1,}|$)"),
		H = (B === null) ? (C.all ? C.all: C.getElementsByTagName("*")) : C.getElementsByTagName(B),
		F = H.length,
		I = F;
		while (F--) {
			if (A.test(H[I - F - 1].className)) {
				J[J.length] = H[I - F - 1]
			}
		}
	}
	return J
};
Fe.hide = function() {
	Fe.each(arguments,
	function(A) {
		if (A = Fe.G(A)) {
			A.style.display = "none"
		}
	})
};
Fe.show = function() {
	Fe.each(arguments,
	function(A) {
		if (A = Fe.G(A)) {
			A.style.display = ""
		}
	})
};
Fe.toggle = function() {
	Fe.each(arguments,
	function(A) {
		if (A = Fe.G(A)) {
			A.style.display = A.style.display == "none" ? "": "none"
		}
	})
};
Fe.addClassName = function(C, D) {
	if (! (C = Fe.G(C))) {
		return
	}
	var A = C.className.split(" "),
	B = Fe.trim;
	if (!new RegExp("(^|\\s{1,})" + B(D) + "(\\s{1,}|$)").test(C.className)) {
		C.className = B(A.concat(D).join(" "))
	}
};
Fe.ac = Fe.addClassName;
Fe.removeClassName = function(B, C) {
	if (! (B = Fe.G(B))) {
		return
	}
	var A = Fe.trim,
	D = new RegExp("(^|\\s{1,})" + A(C) + "(\\s{1,}|$)", "g");
	B.className = A(B.className.replace(D, "$2"))
};
Fe.rc = Fe.removeClassName;
Fe.body = function() {
	var A = 0,
	J = 0,
	E = 0,
	C = 0,
	B = 0,
	K = 0;
	var F = window,
	D = document,
	I = D.documentElement;
	A = I.clientWidth || D.body.clientWidth;
	J = F.innerHeight || I.clientHeight || D.body.clientHeight;
	C = D.body.scrollTop || I.scrollTop;
	E = D.body.scrollLeft || I.scrollLeft;
	B = Math.max(D.body.scrollWidth, I.scrollWidth || 0);
	K = Math.max(D.body.scrollHeight, I.scrollHeight || 0, J);
	return {
		scrollTop: C,
		scrollLeft: E,
		documentWidth: B,
		documentHeight: K,
		viewWidth: A,
		viewHeight: J
	}
};
Fe.on = function(C, B, A) {
	if (! (C = Fe.G(C))) {
		return C
	}
	B = B.replace(/^on/, "").toLowerCase();
	if (C.attachEvent) {
		C[B + A] = function() {
			A.call(C, window.event)
		};
		C.attachEvent("on" + B, C[B + A])
	} else {
		C.addEventListener(B, A, false)
	}
	return C
};
Fe.un = function(C, B, A) {
	if (! (C = Fe.G(C))) {
		return C
	}
	B = B.replace(/^on/, "").toLowerCase();
	if (C.attachEvent) {
		C.detachEvent("on" + B, C[B + A]);
		C[B + A] = null
	} else {
		C.removeEventListener(B, A, false)
	}
	return C
};
Fe.css = function(C, H) {
	if (!C || !H) {
		return null
	}
	C = typeof C == "string" ? document.getElementById(C) : C;
	var B = !window.opera && navigator.userAgent.indexOf("MSIE") != -1;
	if (H == "float") {
		H = B ? "styleFloat": "cssFloat"
	}
	H = H.replace(/(-[a-z])/gi,
	function(I, J) {
		return J.charAt(1).toUpperCase()
	});
	if ("opacity" == H && B) {
		var A = C.style.filter;
		return A && A.indexOf("opacity=") >= 0 ? (parseFloat(A.match(/opacity=([^)]*)/)[1]) / 100) + "": "1"
	}
	var F = null;
	if (F = C.style[H]) {
		return F
	}
	if (C.currentStyle) {
		return C.currentStyle[H]
	} else {
		var E = C.nodeType == 9 ? C: C.ownerDocument || C.document;
		if (E.defaultView && E.defaultView.getComputedStyle) {
			var D = E.defaultView.getComputedStyle(C, "");
			if (D) {
				return D[H]
			}
		}
	}
	return null
};
if (!window.console || !console.firebug) {
	var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
	window.console = (typeof window.loadFirebugConsole == "function") ? window.loadFirebugConsole() : {};
	for (var i = 0; i < names.length; ++i) {
		window.console[names[i]] = function() {}
	}
}
if (typeof(HTMLElement) != "undefined" && !window.opera) {
	HTMLElement.prototype.__defineGetter__("children",
	function() {
		for (var B = [], C = 0, E, D = 0, A = this.childNodes.length; D < A; D++) {
			E = this.childNodes[D];
			if (E.nodeType == 1) {
				B[C++] = E;
				if (E.name) {
					if (!B[E.name]) {
						B[E.name] = []
					}
					B[E.name][B[E.name].length] = E
				}
				if (E.id) {
					B[E.id] = E
				}
			}
		}
		return B
	})
}
if (typeof(HTMLElement) != "undefined" && !window.opera) {
	HTMLElement.prototype.__defineGetter__("currentStyle",
	function() {
		return this.ownerDocument.defaultView.getComputedStyle(this, null)
	})
}
if (typeof(HTMLElement) != "undefined" && !window.opera) {
	HTMLElement.prototype.insertAdjacentHTML = function(A, B) {
		var C = this.ownerDocument.createRange();
		C.setStartBefore(this);
		C = C.createContextualFragment(B);
		switch (A) {
		case "beforeBegin":
			this.parentNode.insertBefore(C, this);
			break;
		case "afterBegin":
			this.insertBefore(C, this.firstChild);
			break;
		case "beforeEnd":
			this.appendChild(C);
			break;
		case "afterEnd":
			if (!this.nextSibling) {
				this.parentNode.appendChild(C)
			} else {
				this.parentNode.insertBefore(C, this.nextSibling)
			}
			break
		}
	}
}
if (Fe.isFirefox && window.Event) {
	Event.prototype.__defineSetter__("returnValue",
	function(A) {
		if (!A) {
			this.preventDefault()
		}
		return A
	});
	Event.prototype.__defineSetter__("cancelBubble",
	function(A) {
		if (A) {
			this.stopPropagation()
		}
		return A
	});
	Event.prototype.__defineGetter__("srcElement",
	function() {
		var A = this.target;
		while (A.nodeType != 1) {
			A = A.parentNode
		}
		return A
	});
	Event.prototype.__defineGetter__("fromElement",
	function() {
		var A;
		if (this.type == "mouseover") {
			A = this.relatedTarget
		} else {
			if (this.type == "mouseout") {
				A = this.target
			}
		}
		if (!A) {
			return
		}
		while (A.nodeType != 1) {
			A = A.parentNode
		}
		return A
	});
	Event.prototype.__defineGetter__("toElement",
	function() {
		var A;
		if (this.type == "mouseout") {
			A = this.relatedTarget
		} else {
			if (this.type == "mouseover") {
				A = this.target
			}
		}
		if (!A) {
			return
		}
		while (A.nodeType != 1) {
			A = A.parentNode
		}
		return A
	});
	Event.prototype.__defineGetter__("offsetX",
	function() {
		return this.layerX
	});
	Event.prototype.__defineGetter__("offsetY",
	function() {
		return this.layerY
	})
}
if (window.Document) {}
if (window.Node) {
	Node.prototype.replaceNode = function(A) {
		this.parentNode.replaceChild(A, this)
	};
	Node.prototype.removeNode = function(B) {
		if (B) {
			return this.parentNode.removeChild(this)
		} else {
			var A = document.createRange();
			A.selectNodeContents(this);
			return this.parentNode.replaceChild(A.extractContents(), this)
		}
	};
	Node.prototype.swapNode = function(B) {
		var C = this.nextSibling;
		var A = this.parentNode;
		node.parentNode.replaceChild(this, B);
		A.insertBefore(node, C)
	}
}
if (window.HTMLElement) {
	HTMLElement.prototype.__defineGetter__("all",
	function() {
		var A = this.getElementsByTagName("*");
		var B = this;
		A.tags = function(C) {
			return B.getElementsByTagName(C)
		};
		return A
	});
	HTMLElement.prototype.__defineGetter__("parentElement",
	function() {
		if (this.parentNode == this.ownerDocument) {
			return null
		}
		return this.parentNode
	});
	HTMLElement.prototype.__defineGetter__("children",
	function() {
		var C = [],
		A = 0,
		D;
		for (var B = 0; B < this.childNodes.length; B++) {
			D = this.childNodes[B];
			if (D.nodeType == 1) {
				C[A++] = D;
				if (D.name) {
					if (!C[D.name]) {
						C[D.name] = []
					}
					C[D.name][C[D.name].length] = D
				}
				if (D.id) {
					C[D.id] = D
				}
			}
		}
		return C
	});
	HTMLElement.prototype.__defineGetter__("currentStyle",
	function() {
		return this.ownerDocument.defaultView.getComputedStyle(this, null)
	});
	HTMLElement.prototype.__defineSetter__("outerHTML",
	function(B) {
		var A = this.ownerDocument.createRange();
		A.setStartBefore(this);
		var C = A.createContextualFragment(B);
		this.parentNode.replaceChild(C, this);
		return B
	});
	HTMLElement.prototype.__defineGetter__("outerHTML",
	function() {
		var A;
		var B = this.attributes;
		var D = "<" + this.tagName;
		for (var C = 0; C < B.length; C++) {
			A = B[C];
			if (A.specified) {
				D += " " + A.name + '="' + A.value + '"'
			}
		}
		if (!this.canHaveChildren) {
			return D + ">"
		}
		return D + ">" + this.innerHTML + "</" + this.tagName + ">"
	});
	HTMLElement.prototype.__defineGetter__("canHaveChildren",
	function() {
		switch (this.tagName.toLowerCase()) {
		case "area":
		case "base":
		case "basefont":
		case "col":
		case "frame":
		case "hr":
		case "img":
		case "br":
		case "input":
		case "isindex":
		case "link":
		case "meta":
		case "param":
			return false
		}
		return true
	});
	HTMLElement.prototype.__defineSetter__("innerText",
	function(B) {
		var A = document.createTextNode(B);
		this.innerHTML = A;
		return A
	});
	HTMLElement.prototype.__defineGetter__("innerText",
	function() {
		var A = this.ownerDocument.createRange();
		A.selectNodeContents(this);
		return A.toString()
	});
	HTMLElement.prototype.__defineSetter__("outerText",
	function(B) {
		var A = document.createTextNode(B);
		this.outerHTML = A;
		return A
	});
	HTMLElement.prototype.__defineGetter__("outerText",
	function() {
		var A = this.ownerDocument.createRange();
		A.selectNodeContents(this);
		return A.toString()
	});
	HTMLElement.prototype.attachEvent = function(C, B) {
		var A = C.replace(/on/, "");
		B._ieEmuEventHandler = function(D) {
			window.event = D;
			return B()
		};
		this.addEventListener(A, B._ieEmuEventHandler, false)
	};
	HTMLElement.prototype.detachEvent = function(C, B) {
		var A = C.replace(/on/, "");
		if (typeof(B._ieEmuEventHandler) == "function") {
			this.removeEventListener(A, B._ieEmuEventHandler, false)
		} else {
			this.removeEventListener(A, B, true)
		}
	};
	HTMLElement.prototype.contains = function(A) {
		do {
			if (A == this) {
				return true
			}
		}
		while (A = A.parentNode);
		return false
	};
	HTMLElement.prototype.insertAdjacentElement = function(A, B) {
		switch (A) {
		case "beforeBegin":
			this.parentNode.insertBefore(B, this);
			break;
		case "afterBegin":
			this.insertBefore(B, this.firstChild);
			break;
		case "beforeEnd":
			this.appendChild(B);
			break;
		case "afterEnd":
			if (this.nextSibling) {
				this.parentNode.insertBefore(B, this.nextSibling)
			} else {
				this.parentNode.appendChild(B)
			}
			break
		}
	};
	HTMLElement.prototype.insertAdjacentHTML = function(B, D) {
		var C = this.ownerDocument.createRange();
		C.setStartBefore(this);
		var A = C.createContextualFragment(D);
		this.insertAdjacentElement(B, A)
	};
	HTMLElement.prototype.insertAdjacentText = function(B, C) {
		var A = document.createTextNode(C);
		this.insertAdjacentElement(B, A)
	};
	HTMLElement.prototype.attachEvent = function(C, B) {
		var A = C.replace(/on/, "");
		B._ieEmuEventHandler = function(D) {
			window.event = D;
			return B()
		};
		this.addEventListener(A, B._ieEmuEventHandler, false)
	};
	HTMLElement.prototype.detachEvent = function(C, B) {
		var A = C.replace(/on/, "");
		if (typeof(B._ieEmuEventHandler) == "function") {
			this.removeEventListener(A, B._ieEmuEventHandler, false)
		} else {
			this.removeEventListener(A, B, true)
		}
	}
}

var SlideEffect = (function() {
	this.config = {
		width: 100,
		speed: 10,
		auto: true
	};
	var L = 10;
	var E = 0;
	var H = 0;
	var O = false;
	var Q = null;
	var P = null;
	var Y = "right";
	var N,
	D,
	C,
	B,
	T;
	var Z,
	V,
	L,
	K;
	function U(a) {
		var a = a || {};
		Z = a.width || config.width;
		V = a.speed || config.speed;
		if (a.auto === false) {
			K = false
		} else {
			K = config.auto
		}
		H = D.offsetWidth;
		if (H >= N.offsetWidth) {
			C.innerHTML = D.innerHTML
		}
	}
	function X(f, c, b, h, a, d) {
		if (f != "" && Fe.G(f)) {
			N = Fe.G(f)
		} else {
			return
		}
		if (c != "" && Fe.G(c)) {
			D = Fe.G(c)
		} else {
			return
		}
		if (b != "" && Fe.G(b)) {
			C = Fe.G(b)
		} else {
			return
		}
		if (h != "" && Fe.G(h)) {
			B = Fe.G(h)
		} else {
			return
		}
		if (a != "" && Fe.G(a)) {
			T = Fe.G(a)
		} else {
			return
		}
		U(d);
		if (H >= N.offsetWidth) {
			Fe.on(B, "mousedown", W);
			Fe.on(B, "mouseup", I);
			Fe.on(B, "mouseout", I);
			Fe.on(T, "mousedown", M);
			Fe.on(T, "mouseup", A);
			Fe.on(T, "mouseout", A);
			if (K) {
				N.onmouseover = function() {
					clearInterval(P)
				};
				N.onmouseout = S;
				S()
			}
		}
	}
	function W() {
		clearInterval(Q);
		if (O) {
			return
		}
		if (K) {
			clearInterval(P)
		}
		O = true;
		Y = "left";
		Q = setInterval(J, V)
	}
	function J() {
		if (N.scrollLeft <= 0) {
			N.scrollLeft = H
		}
		N.scrollLeft -= L
	}
	function I() {
		if (Y == "right") {
			return
		}
		clearInterval(Q);
		if (N.scrollLeft % Z != 0) {
			E = -(N.scrollLeft % Z);
			F()
		} else {
			O = false
		}
		if (K) {
			S()
		}
	}
	function M() {
		clearInterval(Q);
		if (O) {
			return
		}
		if (K) {
			clearInterval(P)
		}
		O = true;
		Y = "right";
		R();
		Q = setInterval(R, V)
	}
	function R() {
		if (N.scrollLeft >= H) {
			N.scrollLeft = 0
		}
		N.scrollLeft += L
	}
	function A() {
		if (Y == "left") {
			return
		}
		clearInterval(Q);
		if (N.scrollLeft % Z != 0) {
			E = Z - N.scrollLeft % Z;
			F()
		} else {
			O = false
		}
		if (K) {
			S()
		}
	}
	function S() {
		clearInterval(P);
		P = setInterval(function() {
			M();
			A()
		},
		3000)
	}
	function F() {
		if (E == 0) {
			O = false;
			return
		}
		var a,
		b = L;
		if (Math.abs(E) < Z / 2) {
			b = Math.round(Math.abs(E / L));
			if (b < 1) {
				b = 1
			}
		}
		if (E < 0) {
			if (E < -b) {
				E += b;
				a = b
			} else {
				a = -E;
				E = 0
			}
			N.scrollLeft -= a;
			setTimeout(F, V)
		} else {
			if (E > b) {
				E -= b;
				a = b
			} else {
				a = E;
				E = 0
			}
			N.scrollLeft += a;
			setTimeout(F, V)
		}
	}
	return {
		play: X,
		autoPlay: S,
		moveUp: W,
		moveUpStop: I,
		moveUpStop: I,
		moveDown: M,
		moveDownStop: A,
		moveDownStop: A
	}
})();

function imageResize(B, H, F, C) {
	if (B.width <= H && B.height <= F) {
		return
	}
	if (B.width > 0 && B.height > 0) {
		var A = B.width;
		var E = B.height;
		var D = Math.min(H / A, F / E);
		B.style.height = "";
		B.style.width = "";
		B.height = Math.ceil(E * D);
		B.width = Math.ceil(A * D);
		if (C) {
			
			B.style.marginTop = ((F - B.height) / 2) + "px"
		}
	} else {
		B.style.height = "";
		B.style.width = "";
		B.style.width = H;
		B.style.height = F
	}
}

