<!--
/*MSClass (Class Of Marquee Scroll - General Uninterrupted Scrolling(JS)) Ver 2.9 BETA*\

@ Code By : Yongxiang Cui(333) E-Mail:zhadan007@21cn.com http://www.popub.net
@ Update　: 2011-11-18 (Ver 2.9.111118 BETA)
@ Download: http://www.popub.net/script/MSClass.html

\***==================Please keep the above copyright information==================***/

/**====================The following instructions can be deleted====================**\
　Explain:
　　include <script type="text/javascript" src="MSClass.js"></script> 
　Create Examples:
　　I
　　new Marquee("Marquee") 
　　new Marquee("Marquee","top")
　　......
　　new Marquee("Marquee",0,1,760,52)
　　new Marquee("Marquee","top",1,760,52,50,5000)
　　......
　　new Marquee("Marquee",0,1,760,104,50,5000,3000,52)
　　new Marquee("Marquee",null,null,760,104,null,5000,null,-1)

　　II
　　var Marquee1 = new Marquee("Marquee")　*required 
　　Marquee1.Direction = "top";　or　Marquee1.Direction = 0; 
　　Marquee1.Step = 1; 
　　Marquee1.Width = 760; 
　　Marquee1.Height = 52; 
　　Marquee1.Timer = 50; 
　　Marquee1.DelayTime = 5000; 
　　Marquee1.WaitTime = 3000; 
　　Marquee1.ScrollStep = 52; 
　　Marquee1.Start(); 

　　III
　　new Marquee( 
　　{ 
　　　MSClassID : "Marquee", 
　　　Direction : "top", 
　　　Step　 : 1, 
　　　Width　 : 760, 
　　　Height　 : 52, 
　　　Timer　 : 50, 
　　　DelayTime : 5000, 
　　　WaitTime : 3000, 
　　　ScrollStep: 52, 
　　　AutoStart : 1 
　　}); 

　Parameters:
　　ID　　　　　 "Marquee"　Container ID　　　(required) 
　　Direction　　(0)　　　　Scroll direction　(optional,Default 0)(Values:0 Up, 1 Down, 2 Left, 3 Right, -1 Vertical alternate, 4 Transverse alternate) 
　　Step　　　　 (1)　　　　Scrolling step　　(optional,Default 2) 
　　Width　　　　(760)　　　Visual width　　　(optional,Default is container width) 
　　Height　　　 (52)　　　 Visual height　　 (optional,Default is container height) 
　　Timer　　　　(50)　　　 Running timer　　 (optional,Default 30) 
　　DelayTime　　(5000)　　 Pause delay time　(optional,Default 0 - not pause) 
　　WaitTime　　 (3000)　　 Waiting time　　　(optional,Default 0 - not wait) 
　　ScrollStep　 (52)　　　 Scroll spacing　　(optional,Default is visual width or visual height) 
　　SwitchType　 (0)　　　　Wheel show type 　(optional,Default 0 - scroll)(Values:0 Scroll, 1 Cut in, 2 Fade in)

\***all rights reserved:Yongxiang Cui(333) E-Mail:zhadan007@21cn.com Website:http://www.popub.net***/ 

function Marquee() {
	var c = this,
	b = arguments,
	a;
	if (! (c instanceof b.callee)) {
		return (typeof b[0] == "object" && b[0].length && b.length < 5) || (typeof b[0] != "object" && b.length < 5) ? alert("Set mode does not accept!") : new Marquee(b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8], b[9], b[10], b[11], b[12])
	}
	c.$ = function(d) {
		return document.getElementById(d)
	};
	c.t = (c.F = ["MSClass 2.9.111118 BETA", "Class Of Marquee Scroll", "General Uninterrupted Scrolling(JS)", "http://www.popub.net/script/MSClass.html", "Yongxiang Cui(333) zhadan007@21cn.com"]).join("\n");
	c.a = b[0]["MSClass"] || b[0] || b[0][0];
	c.b = (c.c = typeof c.a == "object" ? c.$(c.a[0]) || c.$(c.a.MSClassID) : c.$(c.a)) && c.constructor.toString().substr(73737 >> 333, 123 >>> 4) == c.F[1].substr(79 >>> 99, 14 >> 97);
	if (!c.c || !c.b) {
		return alert("The [" + (c.a.MSClassID || c.a[0] || c.a) + "] initialization error!") || (c.c = -1)
	}
	if (c.c.nodeName == "UL" || c.c.nodeName == "OL" || c.c.nodeName == "DL") {
		c.a = [0, c.c.id];
		c.c = c.c.parentNode
	}
	c.BakStep = c.I = c.j = 1 + (c.i = c.Bound = -1);
	c.Direction = b[1] || b[0]["Direction"] || 0;
	c.Step = b[2] || b[0]["Step"] || 1;
	c.Width = c.W = (a = b[3] || b[0]["Width"] || 0) == 0 ? parseInt(c.c.style.width) : a;
	c.Height = c.H = (a = b[4] || b[0]["Height"] || 0) == 0 ? parseInt(c.c.style.height) : a;
	c.Timer = (a = b[5] || b[0]["Timer"] || 0) < 20 ? (a * 10 || 20) : a;
	c.DelayTime = (a = b[6] || b[0]["DelayTime"] || 0) <= 120 ? a * 1000: a;
	c.WaitTime = (a = b[7] || b[0]["WaitTime"] || 0) <= 120 ? (a * 1000 || 800) : a;
	c.ScrollStep = b[8] || b[0]["ScrollStep"] || 0;
	c.SwitchType = b[9] || b[0]["SwitchType"] || 0;
	c.HiddenID = b[10] || b[0]["HiddenID"];
	c.PrevBtn = c.$(b[11] || b[0]["PrevBtnID"]) || 0;
	c.NextBtn = c.$(b[12] || b[0]["NextBtnID"]) || 0;
	c.c.style.overflow = c.c.style.overflowX = c.c.style.overflowY = "hidden";
	if (b.length >= 5 || b[0]["AutoStart"]) {
		c.Start()
	}
}
Marquee.prototype.Start = function() {
	if (this.c == -1 || this.i >= 0) {
		if (this.i == 2) {
			this.Continue()
		}
		return false
	}
	var l = this,
	b,
	w,
	X,
	Y,
	ah,
	ac,
	z,
	o = 0,
	g = "active",
	ag = Marquee,
	Q = 0,
	s = [],
	k = 0,
	O = 0,
	d = 0,
	ad = {
		rollbackleft: -2,
		altertop: -1,
		alterup: -1,
		top: 0,
		up: 0,
		bottom: 1,
		down: 1,
		left: 2,
		right: 3,
		alterleft: 4,
		rollbacktop: 5
	},
	R = [],
	h = 0,
	T = 0,
	v = 0,
	Z = 0,
	J = 0,
	C = 0,
	a = 0,
	G = 0,
	V = 0,
	n = 0,
	K = 0,
	am = 0,
	E = 0,
	x = 0,
	u = 0,
	U = 0,
	ae = 0,
	c = [],
	ak = null,
	al = null,
	t = 0,
	p = 0,
	W = l.ScrollStep,
	D = 0,
	S = 0,
	B = [],
	af = 0,
	N = 0,
	P = 0;
	if (!ag.H) {
		window.$ ? 0: window.$ = l.$;
		ag.m = (document.all) ? 1: 0;
		ag.IsFF = navigator.userAgent.indexOf("Firefox") > 0;
		ag.H = function(m, j, i) {
			i ? 0: i = 0;
			return ag.m ? (m.currentStyle[j] != "auto" && m.currentStyle[j] != "medium" && m.currentStyle[j] != "0px" && m.currentStyle[j] != "30pt" && m.currentStyle[j] != "1em" && m.currentStyle[j] != "static") ? m.currentStyle[j] : i: (window.getComputedStyle(m, null)[j] != "auto" && window.getComputedStyle(m, null)[j] != "medium" && window.getComputedStyle(m, null)[j] != "0px" && window.getComputedStyle(m, null)[j] != "12px" && window.getComputedStyle(m, null)[j] != "static") ? window.getComputedStyle(m, null)[j] : i
		};
		var A = function(m) {
			var i = m || window.event;
			var j = i.keyCode || i.witch;
			if (j == 113) {
				alert(l.t)
			}
		};
		ag.m ? top.document.attachEvent("onkeydown", A) : top.document.addEventListener("keydown", A, true);
		ag.Tween = {
			def: function(i, m, j) {},
			inquad: function(i, m, j) {
				return m * (i /= j) * i
			},
			outquad: function(i, m, j) {
				return - m * (i /= j) * (i - 2)
			},
			inoutquad: function(i, m, j) {
				if ((i /= j / 2) < 1) {
					return m / 2 * i * i
				}
				return - m / 2 * ((--i) * (i - 2) - 1)
			},
			incubic: function(i, m, j) {
				return m * (i /= j) * i * i
			},
			outcubic: function(i, m, j) {
				return m * ((i = i / j - 1) * i * i + 1)
			},
			inoutcubic: function(i, m, j) {
				if ((i /= j / 2) < 1) {
					return m / 2 * i * i * i
				}
				return m / 2 * ((i -= 2) * i * i + 2)
			},
			inquart: function(i, m, j) {
				return m * (i /= j) * i * i * i
			},
			outquart: function(i, m, j) {
				return - m * ((i = i / j - 1) * i * i * i - 1)
			},
			inoutquart: function(i, m, j) {
				if ((i /= j / 2) < 1) {
					return m / 2 * i * i * i * i
				}
				return - m / 2 * ((i -= 2) * i * i * i - 2)
			},
			inquint: function(i, m, j) {
				return m * (i /= j) * i * i * i * i
			},
			outquint: function(i, m, j) {
				return m * ((i = i / j - 1) * i * i * i * i + 1)
			},
			inoutquint: function(i, m, j) {
				if ((i /= j / 2) < 1) {
					return m / 2 * i * i * i * i * i
				}
				return m / 2 * ((i -= 2) * i * i * i * i + 2)
			},
			insine: function(i, m, j) {
				return - m * Math.cos(i / j * (Math.PI / 2)) + m
			},
			outsine: function(i, m, j) {
				return m * Math.sin(i / j * (Math.PI / 2))
			},
			inoutsine: function(i, m, j) {
				return - m / 2 * (Math.cos(Math.PI * i / j) - 1)
			},
			inexpo: function(i, m, j) {
				return (i == 0) ? 0: m * Math.pow(2, 10 * (i / j - 1))
			},
			outexpo: function(i, m, j) {
				return (i == j) ? m: m * ( - Math.pow(2, -10 * i / j) + 1)
			},
			inoutexpo: function(i, m, j) {
				if (i == 0) {
					return 0
				}
				if (i == j) {
					return m
				}
				if ((i /= j / 2) < 1) {
					return m / 2 * Math.pow(2, 10 * (i - 1))
				}
				return m / 2 * ( - Math.pow(2, -10 * --i) + 2)
			},
			incirc: function(i, m, j) {
				return - m * (Math.sqrt(1 - (i /= j) * i) - 1)
			},
			outcirc: function(i, m, j) {
				return m * Math.sqrt(1 - (i = i / j - 1) * i)
			},
			inoutcirc: function(i, m, j) {
				if ((i /= j / 2) < 1) {
					return - m / 2 * (Math.sqrt(1 - i * i) - 1)
				}
				return m / 2 * (Math.sqrt(1 - (i -= 2) * i) + 1)
			},
			inelastic: function(j, ap, ao) {
				var m = 1.70158;
				var an = 0;
				var i = ap;
				if (j == 0) {
					return 0
				}
				if ((j /= ao) == 1) {
					return ap
				}
				if (!an) {
					an = ao * 0.3
				}
				if (i < Math.abs(ap)) {
					i = ap;
					var m = an / 4
				} else {
					var m = an / (2 * Math.PI) * Math.asin(ap / i)
				}
				return - (i * Math.pow(2, 10 * (j -= 1)) * Math.sin((j * ao - m) * (2 * Math.PI) / an))
			},
			outelastic: function(j, ap, ao) {
				var m = 1.70158;
				var an = 0;
				var i = ap;
				if (j == 0) {
					return 0
				}
				if ((j /= ao) == 1) {
					return ap
				}
				if (!an) {
					an = ao * 0.3
				}
				if (i < Math.abs(ap)) {
					i = ap;
					var m = an / 4
				} else {
					var m = an / (2 * Math.PI) * Math.asin(ap / i)
				}
				return i * Math.pow(2, -10 * j) * Math.sin((j * ao - m) * (2 * Math.PI) / an) + ap
			},
			inoutelastic: function(j, ap, ao) {
				var m = 1.70158;
				var an = 0;
				var i = ap;
				if (j == 0) {
					return 0
				}
				if ((j /= ao / 2) == 2) {
					return ap
				}
				if (!an) {
					an = ao * (0.3 * 1.5)
				}
				if (i < Math.abs(ap)) {
					i = ap;
					var m = an / 4
				} else {
					var m = an / (2 * Math.PI) * Math.asin(ap / i)
				}
				if (j < 1) {
					return - 0.5 * (i * Math.pow(2, 10 * (j -= 1)) * Math.sin((j * ao - m) * (2 * Math.PI) / an))
				}
				return i * Math.pow(2, -10 * (j -= 1)) * Math.sin((j * ao - m) * (2 * Math.PI) / an) * 0.5 + ap
			},
			inback: function(i, an, m, j) {
				if (j == undefined) {
					j = 1.70158
				}
				return an * (i /= m) * i * ((j + 1) * i - j)
			},
			outback: function(i, an, m, j) {
				if (j == undefined) {
					j = 1.70158
				}
				return an * ((i = i / m - 1) * i * ((j + 1) * i + j) + 1)
			},
			inoutback: function(i, an, m, j) {
				if (j == undefined) {
					j = 1.70158
				}
				if ((i /= m / 2) < 1) {
					return an / 2 * (i * i * (((j *= (1.525)) + 1) * i - j))
				}
				return an / 2 * ((i -= 2) * i * (((j *= (1.525)) + 1) * i + j) + 2)
			},
			inbounce: function(i, m, j) {
				return m - ag.Tween.outbounce(j - i, m, j)
			},
			outbounce: function(i, m, j) {
				if ((i /= j) < (1 / 2.75)) {
					return m * (7.5625 * i * i)
				} else {
					if (i < (2 / 2.75)) {
						return m * (7.5625 * (i -= (1.5 / 2.75)) * i + 0.75)
					} else {
						if (i < (2.5 / 2.75)) {
							return m * (7.5625 * (i -= (2.25 / 2.75)) * i + 0.9375)
						} else {
							return m * (7.5625 * (i -= (2.625 / 2.75)) * i + 0.984375)
						}
					}
				}
			},
			inoutbounce: function(i, m, j) {
				if (i < j / 2) {
					return ag.Tween.inbounce(i * 2, m, j) * 0.5
				}
				return ag.Tween.outbounce(i * 2 - j, m, j) * 0.5 + m * 0.5
			}
		}
	}
	if (typeof l.W == "string" || typeof l.Width == "string") {
		l.Width = l.c.parentNode.scrollWidth * (parseInt(l.W) || parseInt(l.Width)) / 100
	}
	if (typeof l.H == "string" || typeof l.Height == "string") {
		l.Height = l.c.parentNode.scrollHeight * (parseInt(l.H) || parseInt(l.Height)) / 100
	}
	if (!isNaN(l.Width)) {
		l.c.style.width = l.Width + "px"
	}
	if (!isNaN(l.Height)) {
		l.c.style.height = l.Height + "px"
	}
	if (typeof l.Direction == "string") {
		l.Direction = ad[l.Direction.toString().toLowerCase()]
	}
	P = l.Direction > 1 ? 1: 0;
	b = P ? "<table cellspacing='0' cellpadding='0' style='border-collapse:collapse;display:inline;'><tr><td noWrap=true style='white-space: nowrap;word-break:keep-all;'>MSCLASS_TEMP_HTML</td><td noWrap=true style='white-space: nowrap;word-break:keep-all;'>MSCLASS_TEMP_HTML</td></tr></table>": "<table cellspacing='0' cellpadding='0' style='border-collapse:collapse;'><tr><td>MSCLASS_TEMP_HTML</td></tr><tr><td>MSCLASS_TEMP_HTML</td></tr></table>";
	w = P ? l.Width: l.Height;
	ah = P ? "scrollWidth": "scrollHeight";
	Y = P ? "scrollLeft": "scrollTop";
	X = P ? "left": "top";
	l.n = l.c.innerHTML;
	if (l.Step.length) {
		o = (function(i) {
			l.Step = l.Step[0] < 1 ? parseFloat(l.Step[0].toString().replace("0.", "")) : parseFloat(l.Step[0]);
			for (aj in ag.Tween) {
				var j = ++j || 0;
				if ((aj.substr(4) == i || i.substr(4) == aj || aj == i || i == j) && j >= 0) {
					Q = j;
					return aj
				}
			}
		})(l.Step[1].toString().toLowerCase()).toString()
	}
	if (l.Step < 1) {
		o = l.Step
	}
	if (l.Step >= w) {
		l.SwitchType = 5
	}
	l.BakStep = l.Step;
	switch (l.SwitchType) {
	case 0:
		l.ScrollStep = l.ScrollStep || w;
		break;
	case 1:
		W = l.ScrollStep = w;
		af = p = 1;
		break;
	case 3:
		l.I = ae = 1;
		break;
	case 4:
		W = W || 1;
		D = 1;
		break;
	case 5:
		p = 2;
		Q = o = 0;
		W = W || 1;
		D = l.ScrollStep < 10 ? 1: 0;
		break;
	default:
		l.SwitchType == 2 ? k = 1: G = ag.m ? l.SwitchType: 1 - (k = 1);
		if (W > 0) {
			af = N = 1 - (k = 0);
			l.ScrollStep = w
		}
		if (ag.m && G > 0) {
			l.c.style.filter = "revealTrans(Duration=" + (l.DelayTime / 1000 * 0.2) + ",Transition=" + (G - 10) + ")";
			if (G >= 33 || G < 10) {
				l.c.filters.revealTrans.Transition = Math.round(Math.random() * 22)
			}
			l.c.filters.revealTrans.apply();
			l.c.filters.revealTrans.play()
		}
		l.Step = w;
		Q = o = 1 - (p = 1)
	}
	if (l.HiddenID) {
		var ab = (typeof l.HiddenID) == "string" ? [l.HiddenID] : l.HiddenID;
		for (aj = 0; aj < ab.length; aj++) {
			var I = l.$(ab[aj]);
			if (I && I.style.display == "none") {
				T = 1;
				s[aj] = [I, ag.H(I, "position", "static"), ag.H(I, "top")];
				I.style.position = "absolute";
				I.style.visibility = "hidden";
				I.style.top = "-10000px";
				I.style.display = "block"
			}
		}
	} (l.G = function() {
		if (typeof l.a == "object" && (!l.a.length || l.a.length > 0)) {
			al = l.$(l.a[1]) || l.$(l.a.ContentID);
			if (al) {
				if (al.tagName == "UL" || al.tagName == "OL") {
					al.style.fontSize = al.style.border = al.style.padding = "0";
					ag.H(al, "lineHeight") == "normal" ? al.style.lineHeight = "1.15": 0;
					if (P && ag.m) {
						al.style.width = "100000px"
					}
				}
				al.style.display = "inline-block";
				al.style.margin = al.style.padding = 0;
				al.style.listStyle = "none";
				for (var au = 0, at = al.childNodes.length; au < at; au++) {
					var aC = al.childNodes[au];
					if (aC.nodeType == 1) {
						aC.style.listStyle = "none";
						if (P) {
							var ar = parseInt(aC.style.marginLeft = ag.H(aC, "marginLeft")),
							m = parseInt(aC.style.marginRight = ag.H(aC, "marginRight")),
							ao = parseInt(aC.style.borderLeftWidth = ag.H(aC, "borderLeftWidth")),
							aA = parseInt(aC.style.borderRightWidth = ag.H(aC, "borderRightWidth"));
							if (ag.H(aC, "display") != "table-cell") {
								aC.style.styleFloat = aC.style.cssFloat = "left";
								aC.style.display = "inline";
								t += (B[B.length] = aC[ah] + ar + m + ao + aA)
							} else {
								ag.IsFF ? t += (B[B.length] = aC[ah]) : t += (B[B.length] = aC[ah] + ao + aA)
							}
						} else {
							aC.style.display = "block";
							aC.style.clear = "both"
						}
						if (ae) {
							c[c.length] = aC
						}
					}
				}
				S = B.length;
				l.Direction <= 1 ? t = al[ah] : 0;
				P ? (al.style.width = t + "px") || (al.style.height = l.Height + "px") : (al.style.height = t + "px") || (al.style.width = l.Width + "px");
				J = parseInt(l.c[ah] / (l.ScrollStep || w));
				Z = l.Counter = 1;
				if (typeof l.a == "object" && (!l.a.length || l.a.length > 1)) {
					var aw = l.$(l.a[2]) || l.a[2] || l.$(l.a.TabID);
					if (aw && (aw.length || aw.tagName)) {
						var av = (l.a[3] || l.a.TabEvent || "onmouseover").toString().toLowerCase(); (av == "onmouseover" || av == "onclick") ? 0: av = "onmouseover";
						var ap = (l.a[4] || l.a.TabTimeout || 0);
						l.ScrollStep = l.ScrollStep || w;
						var az = Math.ceil(t / l.ScrollStep);
						var an = az * l.ScrollStep - t;
						if (an > 0) {
							for (var au = al.childNodes.length - 1; au >= 0; au--) {
								var aC = al.childNodes[au];
								if (aC.nodeType == 1) {
									P ? aC.style.marginRight = parseInt(ag.H(aC, "marginRight")) + an + "px": aC.style.marginBottom = parseInt(ag.H(aC, "marginBottom")) + an + "px";
									t += an;
									break
								}
							}
						}
						for (var ax = 0, aq = aw.length || 1, ay = 0, aB = aw; ax < aq; ax++) {
							if (aq > 1) {
								aB = l.$(aw[ax])
							}
							aB.style.margin = aB.style.padding = 0;
							aB.style.listStyle = "none";
							if (aB.tagName == "UL") {
								aB.style.fontSize = "0"
							}
							J = aB.childNodes.length;
							for (var au = 0; au < J; au++) {
								if (aB.childNodes[au].nodeType == 1) {
									if (az == ay || az <= 1) {
										aB.childNodes[au].style.display = "none";
										continue
									}
									aB.childNodes[au].style.fontSize = ag.H(aB.childNodes[au], "fontSize", "12px");
									aB.childNodes[au].style.overflow = "hidden";
									R[ay] = aB.childNodes[au];
									R[ay][av] = (function(i) {
										return function() {
											U = setTimeout(function() {
												v = 1;
												for (var aD = 0; aD < R.length; aD++) {
													R[aD].className = ""
												}
												R[i].className = g;
												f(i)
											},
											ap)
										}
									})(ay);
									R[ay].onmouseout = (function(i) {
										return function() {
											clearTimeout(U);
											if (v) {
												v = 0;
												if (l.i == 0) {
													clearInterval(x);
													x = setInterval(E, l.Timer)
												} else {
													clearTimeout(u);
													u = setTimeout(q, l.DelayTime)
												}
												F(i)
											}
										}
									})(ay);
									ay += 1
								}
							}
						}
						J = ay;
						a = J > 1 ? 1: 0;
						if (R.length > 0) {
							R[0].className = g
						}
						if (J > 0 && az > J) {
							C = az - J;
							for (var at = 0; at < R.length; at++) {
								R[at].onmouseover = R[at].onmouseout = function() {}
							}
							J = az;
							alert("The [" + l.c.id + "] pages or tab numbers less [" + C + "] than actual pages!") || 0
						}
					}
				}
				P ? al.style.height = l.Height + "px": al.style.width = l.Width + "px";
				if (!ae && (p == 0 || p == 2) && !k && G == 0 && l.Direction >= 0 && l.Direction <= 3) {
					P ? al.style.width = t * 2 + "px": al.style.height = t * 2 + "px";
					al.innerHTML += al.innerHTML
				} else {
					P ? al.style.width = t + "px": al.style.height = t + "px"
				}
			}
		}
	})();
	if (!Z && ae) {
		for (var aj = 0, ai = l.c.childNodes.length; aj < ai; aj++) {
			if (l.c.childNodes[aj].nodeType == 1) {
				c[c.length] = l.c.childNodes[aj]
			}
		}
	}
	if (!Z && !ae && (l.Direction == 0 || l.Direction == 1)) {
		l.c.innerHTML = b.replace(/MSCLASS_TEMP_HTML/g, l.c.innerHTML)
	} else {
		if (!Z && !ae && (l.Direction == 2 || l.Direction == 3)) {
			l.c.noWrap = true;
			l.c.style.whiteSpace = "nowrap"; (l.ScrollStep == 0 && l.DelayTime == 0) ? l.c.innerHTML += l.c.innerHTML: l.c.innerHTML = b.replace(/MSCLASS_TEMP_HTML/g, l.c.innerHTML)
		} else {
			if (l.Direction >= 4 || l.Direction <= -1) {
				if (l.Direction == 5 || l.Direction == -2) {
					V = 1
				}
				l.Direction = 22 % l.Direction;
				l.I = 1
			}
		}
	}
	h = l.I;
	ac = l.ScrollStep;
	z = l.Direction;
	Z ? l.c.style.position = ag.H(l.c, "position", "relative") : 0;
	if (af) {
		l.E = document.createElement("div");
		l.E.style.width = l.Width + "px";
		l.E.style.height = l.Height + "px";
		l.E.style.position = "absolute";
		l.E.style[X] = l.Direction % 2 ? -w + "px": w + "px";
		P ? l.E.style.top = "0": l.E.style.left = "0";
		l.E.innerHTML = l.c.innerHTML;
		l.E.style.overflow = l.E.style.overflowX = l.E.style.overflowY = "hidden";
		l.c.appendChild(l.E)
	}
	var M = (Q > 0 && p == 0) ? 3: p,
	E = function() {
		o > 0 ? l.Step = Math.ceil((l.ScrollStep - d) * o) : 0;
		y[M]()
	},
	F = function(j) {
		if (l.i == 2) {
			return false
		}
		if (V) {
			z = z > 1 ? 2: 0
		}
	},
	f = function(j) {
		if (l.i == 2 || (p == 1 && j + 1 == l.Counter)) {
			return false
		}
		l.Pause();
		if (p == 0) {
			var m = parseInt(l.c[Y] / ac) + 1;
			if (j + 1 == m && l.c[Y] % ac == 0) {
				return false
			}
			if (m > J) {
				m -= J
			}
			j += 1;
			v = 1;
			if (j <= m) {
				l.ScrollStep = ac * (m - j) + l.c[Y] % ac;
				l.Direction = P ? 3: 1
			} else {
				if (j - m == J - 1) {
					if (Q == 24) {
						o = "inelastic"
					}
					if (Q == 27 || Q == 26) {
						o = "inback"
					}
				}
				if (m <= 2 && j == J && Q == 23) {
					o = "inelastic"
				}
				l.ScrollStep = ac * (j - m) - l.c[Y] % ac;
				l.Direction = P ? 2: 0
			}
			l.Counter = j
		} else {
			if (p == 1) {
				if (l.i == 0 && h) {
					l.Direction = P ? 5 - l.Direction: 1 - l.Direction;
					z = l.Direction
				}
				if (af && !N) {
					l.Direction % 2 ? l.E.style[X] = -w + l.c[Y] + "px": l.E.style[X] = w + l.c[Y] + "px";
					j == J ? l.E[Y] = 1 - (l.Counter = 1) : l.E[Y] = w * j
				}
				l.Counter = j + 1
			} else {
				if (p == 2) {
					l.c[Y] = j * l.Step;
					return false
				}
			}
		}
		if (l.ScrollStep > 0) {
			q(0, j)
		}
	},
	aa = function(m) {
		clearTimeout(O);
		var an = m || l.c,
		i = N ? 100: 5,
		j = N ? -5: 5; (function() {
			ag.m ? an.style.filter = "alpha(opacity=" + i + ")": an.style.opacity = i / 100;
			i += j; (j < 0 ? i >= 0: i <= 100) ? O = setTimeout(arguments.callee, l.Timer) : j < 0 ? an.style.visibility = "hidden": 0
		})()
	},
	q = function(m, j) {
		var an = l.Direction % 2;
		if (k) {
			aa()
		}
		if (N) {
			var ao = j >= 0 ? j: l.Counter;
			l.E[Y] = l.c[Y];
			j >= 0 ? l.c[Y] = j * l.Step: 0;
			l.E.style[X] = ao == J ? 0: w * ao + "px";
			l.E.style.visibility = "visible";
			aa(l.E)
		}
		if (G > 0) {
			if (G >= 33 || G < 10) {
				l.c.filters.revealTrans.Transition = Math.round(Math.random() * 22)
			}
			l.c.filters.revealTrans.apply();
			l.c.filters.revealTrans.play()
		}
		if (l.j) {
			u = setTimeout(q, l.DelayTime)
		} else {
			clearInterval(x);
			n = K = d = l.i = 0;
			if (h && o > 0) {
				if ((l.Direction == 2 || l.Direction == 0) && l.c[ah] - w - l.c[Y] < l.ScrollStep) {
					l.ScrollStep = l.c[ah] - w - l.c[Y]
				}
				if (an && l.c[Y] < l.ScrollStep) {
					l.ScrollStep = l.c[Y]
				}
			}
			if (Z && !v) {
				an ? l.Counter -= 1: l.Counter += 1;
				if (h && p == 1 && l.Counter > J) {
					l.Counter = 1
				}
				if (l.Counter > J) {
					h ? l.Counter -= 1: l.Counter -= J
				}
				if (l.Counter <= 0) {
					h ? l.Counter = 1: l.Counter = J
				}
				an && V ? l.Counter = 1: 0;
				if (a && C == 0) {
					for (var j = 0; j < J; j++) {
						R[j].className = ""
					}
					R[l.Counter - 1].className = g
				}
			}
			if (h && (ae || J > 1)) {
				if ((Q == 22 || Q == 24) && ((!an && l.Counter == 2) || (an && l.Counter == J - 1))) {
					o = "outelastic"
				}
				if ((Q == 23 || Q == 24) && (ae || (!an && l.Counter == J) || (an && l.Counter == 1))) {
					o = "inelastic"
				}
				if ((Q == 25 || Q == 27) && ((!an && l.Counter == 2) || (an && l.Counter == J - 1))) {
					o = "outback"
				}
				if ((Q == 26 || Q == 27) && (ae || (!an && l.Counter == J) || (an && l.Counter == 1))) {
					o = "inback"
				}
			}
			if (h && l.Bound >= 0) {
				l.Bound = -1;
				l.UnBound()
			}
			if (D) {
				l.ScrollStep = L(an)
			}
			x = setInterval(E, l.Timer);
			l.OnScroll()
		}
	},
	r = function() {
		clearInterval(x);
		n = K = d = 1 - (l.i = 1);
		l.ScrollStep = ac;
		l.Direction = z;
		if (v) {
			return false
		}
		if (h) {
			if (p == 1) {} else {
				if (l.c[Y] == 0 || l.c[Y] >= l.c[ah] - w) {
					if (ae) {
						H()
					} else {
						if (V) {
							l.ScrollStep = z % 2 ? ac: l.c[Y]
						}
						l.Bound = l.Direction;
						l.OnBound();
						z = l.Direction = P ? 5 - l.Direction: 1 - l.Direction
					}
				}
			}
		}
		l.OnPause();
		u = setTimeout(q, l.DelayTime)
	},
	L = function(ao) {
		for (var m = 0, j = 0; m < W; m++) {
			var an = (an = l.c.getAttribute("nownum") / 1 + 1 || 1) > S ? 1: an;
			l.c.setAttribute("nownum", an);
			if (ao) {
				an = S - an + 1
			}
			j += B[an - 1]
		}
		return j
	},
	H = function() {
		if (W > 0) {
			if (ak) {
				aa(ak)
			}
		}
		var j = !Z ? l.c: al,
		an = l.Direction % 2;
		var m = an ? c.length - 1: 0;
		ak = c[m].cloneNode(true);
		l.ScrollStep = c[m][ah];
		if (W > 0) {
			ag.m ? ak.style.filter = "alpha(opacity = 0)": ak.style.opacity = 0
		}
		an ? j.insertBefore(ak, j.childNodes[0]) : j.appendChild(ak);
		j.removeChild(c[m]);
		an ? l.c[Y] = l.ScrollStep: l.c[Y] = l.c[ah] - w - l.ScrollStep;
		if (an) {
			c.unshift(ak);
			c.pop()
		} else {
			c.push(ak);
			c.shift()
		}
	},
	e = function() {
		l.y = (t * 2 || l.c[ah]) / 2;
		if (p == 0 && l.y <= w + l.Step && !h) {
			if (Z) {
				var j = l.c.getAttribute("fixnum") / 1 + 1 || 1;
				l.c.setAttribute("fixnum", j);
				if (j < 5) {
					l.G();
					setTimeout(e, 0)
				}
			} else {
				l.c.innerHTML = l.n
			}
			return false
		}
		if (h) {
			l.Bound = P ? 5 - l.Direction: 1 - l.Direction
		}
		if (T) {
			for (aj = 0; aj < s.length; aj++) {
				var i = s[aj][0];
				i.style.position = s[aj][1];
				i.style.display = "none";
				i.style.visibility = "visible";
				i.style.top = s[aj][2]
			}
		}
		if (l.DelayTime > 0 && l.PrevBtn) {
			l.PrevBtn.onclick = function() {
				l.Run(P ? 5 - l.Direction: 1 - l.Direction)
			}
		}
		if (l.DelayTime > 0 && l.NextBtn) {
			l.NextBtn.onclick = function() {
				l.Run(l.Direction)
			}
		}
		l.c[Y] = l.i = n = K = 0;
		if (ae) {
			if (!l.Direction % 2) {
				l.c[Y] = l.c[ah]
			}
			H()
		}
		if (af) {
			l.E[Y] = l.ScrollStep
		}
		am = Math.round(l.ScrollStep / l.Step);
		if (l.WaitTime >= 60000) {
			l.i = 1;
			if (l.WaitTime == 100000) {
				l.DelayTime = 3600000
			}
			l.WaitTime = 3600000;
			return
		}
		setTimeout(function() {
			if ((l.ScrollStep >= 0 && l.l) || (l.DelayTime == 0 && l.ScrollStep == -2 && l.l)) {
				l.l()
			}
			q()
		},
		l.WaitTime - 800)
	},
	y = [function() {
		var i = l.Direction % 2;
		d += l.Step;
		if ((d >= l.ScrollStep && l.DelayTime > 0) || (h && d > l.Step && (l.c[Y] <= 0 || l.c[Y] >= l.c[ah] - w))) {
			i ? l.c[Y] -= l.ScrollStep + l.Step - d: l.c[Y] += l.ScrollStep + l.Step - d;
			r();
			return
		}
		switch (i) {
		case 0:
			if (l.c[Y] >= l.y && !h) {
				l.c[Y] -= l.y
			}
			l.c[Y] += l.Step;
			break;
		case 1:
			if (l.c[Y] <= l.Step && !h) {
				l.c[Y] += l.y
			}
			l.c[Y] -= l.Step
		}
	},
	function() {
		if (N || k) {
			r();
			return l.c[Y] = l.Counter == 1 ? 0: w * (l.Counter - 1)
		}
		var i = l.Direction % 2;
		Q > 0 ? d += n: d += l.Step;
		if ((Q == 0 && d >= l.ScrollStep && l.DelayTime > 0) || (Q > 0 && n > am)) {
			i ? l.E.style[X] = (parseInt(l.E.style[X]) - (l.ScrollStep - l.Step - d)) + "px": l.E.style[X] = (parseInt(l.E.style[X]) + (l.ScrollStep - l.Step - d)) + "px";
			r();
			l.c[Y] = l.E[Y];
			i ? l.E.style[X] = -w + l.c[Y] + "px": l.E.style[X] = w + l.c[Y] + "px";
			l.Counter == J ? l.E[Y] = 0: l.E[Y] = w * l.Counter
		} else {
			if (Q > 0) {
				K += (l.Step = Math.round(ag.Tween[o](n++, l.ScrollStep, am)) - K)
			}
			i ? l.E.style[X] = (parseInt(l.E.style[X]) + l.Step) + "px": l.E.style[X] = (parseInt(l.E.style[X]) - l.Step) + "px"
		}
	},
	function() {
		l.Step = l.ScrollStep;
		switch (l.Direction % 2) {
		case 0:
			if (l.c[Y] >= l.y && !h) {
				l.c[Y] -= l.y
			}
			l.c[Y] += l.Step;
			break;
		case 1:
			if (l.c[Y] <= l.Step && !h) {
				l.c[Y] += l.y
			}
			l.c[Y] -= l.Step
		}
		r()
	},
	function() {
		d += n;
		if (n <= am) {
			K += (l.Step = Math.round(ag.Tween[o](n++, l.ScrollStep, am)) - K);
			if (l.c[Y] <= l.Step && !h) {
				l.c[Y] += l.y
			}
			l.Direction % 2 ? l.c[Y] -= l.Step: l.c[Y] += l.Step
		} else {
			if (l.c[Y] > l.y && !h) {
				l.c[Y] -= l.y
			}
			r()
		}
	}];
	l.Run = function(j) {
		if (l.i == 1) {
			var i = -1;
			if (typeof arguments[0] == "number") {
				i = arguments[0]
			}
			if (typeof arguments[0] == "string") {
				z = i = ad[arguments[0].toString().toLowerCase()]
			}
			if (i < 0 || i > 3) {
				alert("Parameters wrong set!");
				return false
			}
			if (l.Bound == i) {
				return false
			}
			l.Direction = i;
			if (typeof arguments[0] == "string" || h) {
				z = l.Direction
			}
			l.Play()
		}
	};
	l.OnBound = l.UnBound = l.OnScroll = l.OnPause = function() {};
	l.Play = function() {
		clearTimeout(u);
		u = setTimeout(q, arguments[0])
	};
	l.ReStart = function(i) {
		window.onresize = null;
		setTimeout(function() {
			window.onresize = function() {
				l.ReStart()
			}
		},
		1000);
		l.Reset();
		l.Start()
	};
	l.Reset = l.Destroy = function() {
		l.Stop();
		l.c.innerHTML = l.n;
		l.c.setAttribute("fixnum", l.c[Y] = l.Play = l.ReStart = l.Reset = l.Continue = l.Stop = l.Pause = l.i = n = K = 0);
		l.i = -1
	};
	l.Continue = function() {
		if (l.i == 2 && !arguments[0]) {
			l.i = d > 1 ? 0: 1;
			x = setInterval(E, l.Timer);
			return false
		}
		if (l.i == 0) {
			clearInterval(x);
			x = setInterval(E, l.Timer)
		}
		if (l.i == 1) {
			l.Play(l.DelayTime)
		}
	};
	l.Stop = function() {
		if (l.i != 2) {
			l.Pause();
			l.i = 2
		}
	};
	l.Pause = l.Terminate = function() {
		clearTimeout(U);
		clearInterval(x);
		clearTimeout(u)
	};
	setTimeout(e, 800)
};
Marquee.prototype.l = function() {
	var h = this,
	g = null,
	i = null,
	j = 0,
	k = 0,
	c = 0,
	e = 0,
	b = h.Direction > 1 ? "scrollLeft": "scrollTop",
	a = function(l) {
		var l = l || window.event;
		if (h.DelayTime != 0 || (l.which && l.which != 1) || (l.button && l.button != 1) || h.i == 2 || h.i == -1) {
			return false
		}
		if (j == 0) {
			h.i = j = 1;
			h.Pause();
			l.stopPropagation ? l.stopPropagation() : l.cancelBuble = true;
			l.preventDefault ? l.preventDefault() : l.returnValue = false;
			c = h.c[b];
			k = h.Direction > 1 ? window.event ? l.clientX: l.pageX: window.event ? l.clientY: l.pageY;
			g = l.srcElement || l.target;
			i = g.style.cursor;
			g.style.cursor = "move";
			if (Marquee.m) {
				g.setCapture();
				document.attachEvent("onmousemove", f);
				document.attachEvent("onmouseup", d)
			} else {
				document.addEventListener("mousemove", f, false);
				document.addEventListener("mouseup", d, false)
			}
		}
	},
	f = function(m) {
		var m = m || window.event;
		e = h.Direction > 1 ? window.event ? m.clientX: m.pageX: window.event ? m.clientY: m.pageY;
		var l = k - e + c;
		if (l <= 0 || l >= h.y) {
			l <= 0 ? h.c[b] += h.y: h.c[b] = h.y - l;
			k = h.Direction > 1 ? window.event ? m.clientX: m.pageX: window.event ? m.clientY: m.pageY;
			c = h.c[b];
			l = k - e + c
		}
		h.c[b] = l
	},
	d = function(l) {
		if (Marquee.m) {
			g.releaseCapture();
			document.detachEvent("onmousemove", f);
			document.detachEvent("onmouseup", d)
		} else {
			document.removeEventListener("mousemove", f, false);
			document.removeEventListener("mouseup", d, false)
		}
		j = h.j = 0;
		g.style.cursor = i;
		h.Continue()
	};
//	if (!h.I) {
//		Marquee.m ? h.c.attachEvent("onmousedown", a) : h.c.addEventListener("mousedown", a, false)
//	}
	h.c.onmouseover = function() {
		if ((h.i == 0 && h.DelayTime > 0) || h.i == 2 || h.i == -1) {
			return false
		}
		h.j = 1;
		h.Pause()
	};
	h.c.onmouseout = function() {
		if (h.j) {
			h.j = 0;
			h.Continue()
		}
	}
};

//-->
