Browser = {
	IE: !!(window.attachEvent && !window.opera),
	Opera: !!window.opera,
	WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
	Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1,
	MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
};

var Class = {
	create: function() {
		return function() {
			this.initialize.apply(this,arguments);
		};
	}
};

Object.extend = function(destination,source) {
	for(var property in source)
		destination[property] = source[property];
	return destination;
};

Object.extend(Object,{
	isObject: function(object) {
		return typeof object == "object";
	},

	isFunction: function(object) {
		return typeof object == "function";
	},

	isString: function(object) {
		return typeof object == "string";
	},

	isNumber: function(object) {
		return typeof object == "number";
	},

	isNull: function(object) {
		return typeof object == "undefined";
	},

	evalScript: function(text) {
		var regex = /<script type="text\/javascript">(.*?)<\/script>/g;
		text = text.replace(/[\r\n]/g,'');
		match = regex.exec( text );
		while(match != null) {
			try{eval(match[1]);}catch(e){};
			match = regex.exec(text);
		};
	}
});

Native = Class.create();
Native.prototype = {
	initialize: function(elem) {
		if (Object.isString(elem)) elem = document.getElementById(elem);
		Object.extend(this,elem);
		this.elem = elem;
	}
};

Element = Class.create();
Element.prototype = Object.extend(new Native(),{
	getDimensions: function() {
		display = this.getStyle('display');
		if (display != 'none' && display != null) {
			var originalWidth = this.elem.offsetWidth;
			var originalHeight = this.elem.offsetHeight;
		} else {
			var els = this.elem.style;
			var originalVisibility = els.visibility;
			var originalPosition = els.position;
			var originalDisplay = els.display;
			els.visibility = 'hidden';
			els.position = 'absolute';
			els.display = 'block';
			var originalWidth = this.elem.clientWidth;
			var originalHeight = this.elem.clientHeight;
			els.display = originalDisplay;
			els.position = originalPosition;
			els.visibility = originalVisibility;
		};
		var result = [originalWidth,originalHeight];
		result.width = originalWidth;
		result.height = originalHeight;
		return result;
	},

	viewportOffset: function() {
		var valueT = this.elem.offsetTop;
		var valueL = this.elem.offsetLeft;
		var parentEl = this.elem.offsetParent;
		while(parentEl != null) {
			valueT += parentEl.offsetTop;
			valueL += parentEl.offsetLeft;
			if (parentEl.offsetParent == document.body && parentEl.style.position == 'absolute') break;
			parentEl = parentEl.offsetParent;
		};
		var result = [valueL,valueT];
		result.left = valueL;
		result.top = valueT;
		return result;
	},

	getOffsetParent: function() {
		if (this.elem.offsetParent) return Element(this.elem.offsetParent);
		if (this.elem == document.body) return this.elem;
		while((element = this.elem.parentNode) && element != document.body) {
			if (element.style.position != 'static') return Element(element);
		};
		return Element(document.body);
	},

	getTop: function() {
		return this.viewportOffset().top;
	},

	getLeft: function() {
		return this.viewportOffset().left;
	},

	getWidth: function() {
		return this.getDimensions().width;
	},

	getHeight: function() {
		return this.getDimensions().height;
	},

	hide: function() {
		this.style.display = 'none';
	},

	show: function() {
		this.style.display = '';
	},

	visible: function() {
		return this.style.display != 'none';
	},

	toggle: function() {
		this.style.display = (this.style.display == 'none') ? '' : 'none';
	},
	
	center: function() {
		size = this.getDimensions();
		this.style.top = (document.viewport.getscrollTop() + ((document.viewport.getHeight() - size.height) / 2)) + 'px';
		this.style.left = (document.viewport.getscrollLeft() + ((document.viewport.getWidth() - size.width) / 2)) + 'px';
	},

	getStyle: function(style) {
		style = (style == 'float' && this.elem.currentStyle) ? 'styleFloat' : style;
		style = (style == 'borderColor') ? 'borderBottomColor' : style;
		value = (this.elem.currentStyle) ? this.elem.currentStyle[style] : null;
		value = (!value && window.getComputedStyle)
			? document.defaultView.getComputedStyle(this.elem, null).getPropertyValue(style.replace(/([A-Z])/g,"-$1").toLowerCase())
			: value;
		if (style == 'opacity') return value ? parseFloat(value) : 1.0;
		return value == 'auto' ? null : value;
	},

	setStyle: function(property, value) {
		if (property == 'opacity') {
			if (window.ActiveXObject) this.elem.style.filter = "alpha(opacity=" + (value * 100) + ")";
			this.elem.style.opacity = value;
		} else this.elem.style[property] = value;
	},

	addEvent: function(type, fn) {
		var obj = this.elem;
		if (obj.addEventListener){
			obj.addEventListener(type,fn,false);
		}else if (obj.attachEvent){
			obj["e"+type+fn] = fn;
			obj[type+fn] = function(){obj["e"+type+fn](window.event);}
			obj.attachEvent("on"+type,obj[type+fn]);
		};
	},

	removeEvent: function(type, fn) {
		if (this.elem.removeEventListener) this.elem.removeEventListener((type == 'mousewheel' && window.gecko) ? 'DOMMouseScroll' : type,fn,false);
		else this.elem.detachEvent('on'+type,fn);
	},

	remove: function() {
		this.elem.parentNode.removeChild(this.elem);
	}
});

Function.prototype.bind = function(object) {
	var __method = this;
	return function() {
		return __method.apply(object, arguments);
	}
};
/*
Array.prototype.forEach = function(fn, bind) {
	for(var i = 0; i < this.length ; i++) fn.call(bind, this[i], i);
};

Array.prototype.test = function(item, from) {
	return this.indexOf(item, from) != -1;
};

Array.prototype.each = Array.prototype.forEach;
*/
Object.extend(String.prototype, {
	hexToRgb: function(array) {
		var hex = this.match(new RegExp('^[#]{0,1}([\\w]{1,2})([\\w]{1,2})([\\w]{1,2})$'));
		var rgb = [];
		for (var i = 1; i < hex.length; i++) {
			if (hex[i].length == 1) hex[i] += hex[i];
			rgb.push(parseInt(hex[i],16));
		};
		var rgbText = 'rgb(' + rgb.join(',') + ')';
		if (array) return [parseFloat(rgb[0]), parseFloat(rgb[1]), parseFloat(rgb[2])];
		else return rgbText;
	},

	ToRgb: function() {
		if (this.match(/^#[0-9a-f]{3,6}$/i)) return this.hexToRgb(true);
		return ((value = this.match(/(\d+),\s*(\d+),\s*(\d+)/))) ? [parseFloat(value[1]), parseFloat(value[2]), parseFloat(value[3])] : false;
	}
});

function $(el)
{
	return new Element(el);
};

document.viewport = {
	getWidth: function() {
		if (Browser.Opera || document.documentElement.clientHeight == 0 ||
			Browser.Gecko && !(document.body.clientHeight == document.body.offsetHeight &&
			document.body.clientHeight == document.body.scrollHeight))
			return document.body.clientWidth
		else if (Browser.WebKit) return self.innerWidth
		else return document.documentElement.clientWidth;
	},

	getHeight: function() {
		if (Browser.Opera || document.documentElement.clientHeight == 0 ||
			Browser.Gecko && !(document.body.clientHeight == document.body.offsetHeight && 
			document.body.clientHeight == document.body.scrollHeight))
			return document.body.clientHeight
		else if (Browser.WebKit) return self.innerHeight
		else return document.documentElement.clientHeight;
	},

	getscrollTop: function() {
		return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
	},

	getscrollLeft: function() {
		return window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft;
	}
};

document.getWidth = function() {
	if (window.innerWidth && window.scrollMaxX) return window.innerWidth + window.scrollMaxX
	else if (document.body.scrollWidth > document.body.offsetWidth) return document.body.scrollWidth
	else return document.body.offsetWidth;
}

document.getHeight = function() {
	if (window.innerHeight && window.scrollMaxY) return window.innerHeight + window.scrollMaxY
	else if (document.body.scrollHeight > document.body.offsetHeight) return document.body.scrollHeight
	else return document.body.offsetHeight;
}

Ajax = Class.create();
Ajax.prototype = {
	initialize: function(options) {
		this.options = {
			method: 'post',
			asynchronous: true,
			contentType: 'application/x-www-form-urlencoded',
			encoding: 'UTF-8',
			onComplete: function(){}
		};
		Object.extend(this.options,options || { });
		this.options.method = this.options.method.toLowerCase();
	}
};

GAjax = Class.create();
GAjax.prototype = Object.extend(new Ajax(),{
	xhr: function() {
		var xmlHttp=null;
		try{
			xmlHttp=new XMLHttpRequest();
		}catch (e){
			try{
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}catch (e){
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			};
		};
		return xmlHttp;
	},

	send: function(url,parameters,callback) {
		this._xhr = this.xhr();
		this._abort = false;
		if ( !Object.isNull( this._xhr ) ) {
			var wait = this._wait;
			if ( wait ) {
				var originalDisplay = wait.getStyle('display');
				var orginailVisibility = wait.getStyle('visibility');
				if (orginailVisibility == 'hidden') wait.setStyle('visibility','visible');
				else wait.setStyle('display','block');
			};
			option = this.options;
			if (option.method == 'get') {
				url += '?' + parameters;
				parameters = null;
			};
			var onreadystatechange = function(){
				if (this._xhr.readyState == 4) {
					if ( wait ) {
						if (orginailVisibility == 'hidden') wait.setStyle('visibility','hidden');
						else wait.setStyle('display',originalDisplay);
					};
					if (this._xhr.status == 200 && this._abort == false) callback(this._xhr);
				};
			};
			this._xhr.open(option.method,url,option.asynchronous);
			this._xhr.onreadystatechange = onreadystatechange.bind(this);
			if (option.method == 'post') this._xhr.setRequestHeader("Content-Type",option.contentType + '; charset=' + option.encoding);
			this._xhr.send(parameters);
		};
	},

	autoupdate: function(url,interval,getrequest,callback) {
		this._xhr = this.xhr();
		this.interval = interval * 1000;
		if (!Object.isNull(this._xhr)) {
			this.url = url;
			this.getrequest = getrequest;
			this.callback = callback;
			this._abort = false;
			this._getupdate();
		};
	},

	_getupdate: function() {
		if (this._abort == false) {
			var parameters = this.getrequest();
			var url = this.url;
			var option = this.options;
			if (option.method == 'get') {
				url += '?' + parameters;
				parameters = null;
			};
			var xhr = this._xhr;
			var temp = this;
			xhr.open(option.method,url,option.asynchronous);
			xhr.onreadystatechange = function() {
				if (xhr.readyState == 4 && xhr.status == 200) {
					temp.callback(xhr);
					this.timeinterval = window.setTimeout(temp._getupdate.bind(temp),temp.interval);
				};
			};
			if (option.method == 'post') xhr.setRequestHeader("Content-Type",option.contentType + '; charset=' + option.encoding);
			xhr.send(parameters);
		};
	},

	getRequestBody: function(pForm) {
		var nParams = new Array();
		for (var n = 0 ; n < pForm.elements.length ; n++) {
			if ((pForm.elements[n].checked == true && pForm.elements[n].type == "radio")
				|| (pForm.elements[n].checked == true && pForm.elements[n].type == "checkbox")
				|| (pForm.elements[n].type != "radio" && pForm.elements[n].type != "checkbox")) {
				var pParam = pForm.elements[n].name;
				pParam += "=";
				pParam += encodeURIComponent(pForm.elements[n].value);
				nParams.push(pParam);
			};
		};
		return nParams.join("&");
	},

	toJSON: function(src) {
		try{
			if (src.length > 4) return eval('(' + src + ')');
		} catch (e) { };
		return null;
	},

	inintLoading: function(loading,center) {
		this._wait = $(loading);
		if (center) this._wait.center();
	},

	abort: function() {
		clearTimeout(this.timeinterval);
		this._abort = true;
	}
});

_form = function(){};
_form.prototype = {};

GForm = Class.create();
GForm.prototype = Object.extend(new _form(), {
	initialize: function(frm) {
		this._frm = frm;
	},

	submit: function(callback) {
		if ( this._wait ) {
			var originalDisplay = this._wait.getStyle('display');
			var orginailVisibility = this._wait.getStyle('visibility');
			if (orginailVisibility == 'hidden') this._wait.setStyle('visibility','visible');
			else this._wait.setStyle('display','block');
		};
		var uploadCallback = function() {
			if ( this._wait ) {
				if (orginailVisibility == 'hidden') this._wait.setStyle('visibility','hidden');
				else this._wait.setStyle('display',originalDisplay);
			};
			var xhr = {};
			try{
				xhr.responseText = io.contentWindow.document.body ? io.contentWindow.document.body.innerHTML : null;
				xhr.responseXML = io.contentWindow.document.XMLDocument ? io.contentWindow.document.XMLDocument : io.contentWindow.document;
			} catch(e) {};
			io.removeEvent('mouseover',uploadCallback);
			window.setTimeout(function(){io.remove()},1);
			this._frm.method = old_method;
			this._frm.target = old_target;
			callback(xhr);
		}.bind(this);
		if (this._frm.encoding) this._frm.encoding = 'multipart/form-data';
		else this._frm.enctype = 'multipart/form-data';
		var io = this.createIframe();
		var old_target = this._frm.target || '';
		var old_method = this._frm.method || "post";
		io.addEvent('load',uploadCallback);
		this._frm.target = io.id;
		this._frm.method = "post";
	},

	createIframe: function() {
		var frameId = 'GFormSubmit' + (this._frm.name || this._frm.id);
		var io = null;
		if (window.ActiveXObject) {
			io = document.createElement('<iframe id="' + frameId + '" name="' + frameId + '" />');
			io.src = 'javascript:false';
		} else {
			io = document.createElement('iframe');
			io.setAttribute('id',frameId);
			io.setAttribute('name',frameId);
		};
		io.style.position = 'absolute';
		io.style.top = '-1000px';
		io.style.left = '-1000px';
		document.body.appendChild(io);
		return $(io);
	},

	toJSON: function(src) {
		try{
			if (src.length > 4) return eval('(' + src + ')');
		} catch (e) { };
		return null;
	},

	inintLoading: function(loading,center) {
		this._wait = $(loading);
		if (center) this._wait.center();
	}
});

_loader = function(){};
_loader.prototype = {};

GLoader = Class.create();
GLoader.prototype = Object.extend(new _loader(), {
	initialize: function(action,callback) {
		var loading = true;
		this.action = action;
		this.encode = true;
		this.id = 'GLoader_iframe';
		var io = this.createIframe();
		var uploadCallback = function() {
			if ( this.wait ) {
				if (this.orginailVisibility == 'hidden') this.wait.setStyle('visibility','hidden');
				else this.wait.setStyle('display',this.originalDisplay);
			};
			var xhr = {};
			try{
				if (io.contentWindow.document.body){
					var data = io.contentWindow.document.body.innerHTML;
					xhr.responseText = this.encode ? decodeURIComponent( data ) : data;
				} else xhr.responseText = null;
			} catch(e) {};
			if (!loading) callback(xhr);
			loading = false;
		}.bind(this);
		io.addEvent('load',uploadCallback);
	},

	createIframe: function() {
		if (!document.getElementById(this.id)){
			var io = null;
			if (window.ActiveXObject) {
				io = document.createElement( '<iframe id="' + this.id + '" name="' + this.id + '" />' );
			} else {
				io = document.createElement('iframe');
				io.setAttribute('id',this.id);
				io.setAttribute('name',this.id);
			};
			io.style.position = 'absolute';
			io.style.top = '-1000px';
			io.style.left = '-1000px';
			document.body.appendChild(io);
			return $(io);
		}
		else
		{
			return $(this.id);
		};
	},

	inint: function(obj){
		var links = obj.getElementsByTagName( 'a' );
		var temp = this;
		var patt1 = /^(.*?)\?module=(.*?)$/
		var patt2 = new RegExp( '^.*?' + location.hostname + '/(.*?).(html|php)[?]?(.*?)$' );
		var patt3 = new RegExp( '^.*?' + location.hostname + '/(.*?).(html|php)$' );
		var mouseoverCallback = function() {
			window.status = '';
			return true;
		};
		var clickCallback = function() {
			if (temp.wait){
				if (temp.orginailVisibility == 'hidden') temp.wait.setStyle('visibility','visible');
				else temp.wait.setStyle('display','block');
				if (temp.center) temp.wait.center();
			};
			return true;
		};
		for( var i = 0 ; i < links.length ; i++ ) {
			link =  links[i];
			if ( link.target != '_blank' && link.onclick == null ){
				if (hs = patt1.exec(link.href)){
					link.href = this.action + '.php?module=' + hs[2];
					link.target = this.id;
					var elinks = $(link);
					elinks.addEvent('mousemove',mouseoverCallback);
					elinks.addEvent('click',clickCallback);
				}else if (hs = patt2.exec(link.href)) {
					urls = link.href.split( '?' );
					hs = patt3.exec(urls[0]);
					if (hs = patt3.exec(urls[0])){
						a = this.action + '.php?module=' + hs[1];
						a += urls.length > 1 ? '&' + urls[1] : '';
						link.href = a;
						link.target = this.id;
						var elinks = $(link);
						elinks.addEvent('mousemove',mouseoverCallback);
						elinks.addEvent('click',clickCallback);
					};
				};
			};
		};
	},

	submit: function(pForm) {
		var old_target = pForm.target;
		var old_action = pForm.action;
		pForm.target = this.id;
		pForm.action = this.action + '.php';
		pForm.submit();
		pForm.target = old_target;
		pForm.action = old_action;
		return false;
	},

	inintLoading: function(loading,center) {
		this.wait = $(loading);
		this.center = center;
		this.originalDisplay = this.wait.getStyle('display');
		this.orginailVisibility = this.wait.getStyle('visibility');
	}
});

_modal = function(){};
_modal.prototype = {};

modal = Class.create();
modal.prototype = Object.extend(new _modal(), {
	initialize: function(elem) {
		this.elem = $(elem);
	},

	show:function() {
		this.elem.style.position = 'absolute';
		this.elem.center();
		this.overlay();
		new Fade(this.elem).play({'start':'0','to':'100'});
		this.elem.style.zIndex = 9999;
	},

	overlay: function() {
		var frameId = 'overlay_iframe';
		var io = null;
		if (window.ActiveXObject) {
			io = document.createElement('<iframe id="' + frameId + '" name="' + frameId + '" height="100%" />');
		} else {
			io = document.createElement('iframe');
			io.setAttribute('id',frameId);
			io.setAttribute('name',frameId);
		};
		io.setAttribute('frameBorder','0');
		io.setAttribute('src','javascript:false');
		io.style.top = '0px';
		io.style.left = '0px';
		io.style.height = document.getHeight() + 'px';
		io.style.width = document.getWidth() + 'px';
		io.style.position = 'fixed';
		document.body.appendChild(io);
		if (document.all) document.frames(frameId).document.bgColor = '#000000';
		else io.style.backgroundColor='#000000';
		io.style.zIndex = 8888;
		new Fade(frameId).setStyle('opacity',0.2);
	}
});

Fx = function(){};
Fx.prototype = {
	setStyle: function(property, value) {
		if (property == 'opacity') {
			if (window.ActiveXObject) this.Element.style.filter = "alpha(opacity=" + (value * 100) + ")";
			this.Element.style.opacity = value;
		} else this.Element.style[property] = value + this.options.unit;
	},

	_run: function() {
		this.playing = true;
		this.step();
	},

	stop: function() {
		this.playing = false;
		this.options.onComplete.call(this,this);
	}
};

Fade = Class.create();
Fade.prototype = Object.extend(new Fx(), {
	initialize: function(el) {
		this.options = {
			from: 0,
			to: 100,
			speed: 50,
			duration: 5,
			unit: '',
			onComplete: function(){}
		};
		this.Element = $(el);
		this.playing = false;
		this.timer = 0;
	},

	play: function(options) {
		Object.extend(this.options,options || { });
		if (this.options.to > this.options.from) {
			this.name = 'fadeIn';
			this.to = (this.options.to > 100) ? 100 : this.options.to;
			this.from = (this.options.from < 0) ? 0 : this.options.from;
		} else {
			this.name = 'fadeOut';
			this.to = (this.options.to < 0) ? 0 : this.options.to;
			this.from = (this.options.from > 100) ? 100 : this.options.from;
		};
		if ( !this.playing ) {
			this.now = this.from;
			this._run();
		};
	},

	step: function() {
		if (this.playing) this.setStyle('opacity',this.now/100);
		now = (this.name == 'fadeIn') ? this.now + this.options.duration : this.now - this.options.duration;
		if (this.playing && ((this.name == 'fadeOut' && now >= this.to) || (this.name == 'fadeIn' && now <= this.to))) {
			this.now = now;
			this.timer = window.setTimeout(this.step.bind(this),this.options.speed);
		} else this.stop();
	}
});

Highlight = Class.create();
Highlight.prototype = Object.extend(new Fx(), {
	initialize: function(el) {
		this.options = {
			from: {'borderColor':'#FF0000','backgroundColor':'#FFBFBF'},
			to: 'auto',
			speed: 10,
			time: 20,
			unit: '',
			onComplete: function(){}
		};
		this.Element = $(el);
		this.playing = false;
		this.timer = 0;
	},

	play: function(options) {
		Object.extend(this.options,options || { });
		source = this.options.from;
		if (Object.isObject(source)) {
			destination = {};
			for(var property in source) destination[property] = source[property].ToRgb();
			this.from = destination;
		};
		source = this.options.to;
		destination = {};
		if (Object.isObject(source)) {
			for(var property in source) destination[property] = source[property].ToRgb();
			this.to = destination;
		} else if (source == 'auto') {
			source = this.options.from;
			for(var property in source) destination[property] = this.Element.getStyle(property).ToRgb();
			this.to = destination;
		};
		source = this.options.from;
		if (source == 'auto') {
			source = this.options.to;
			for(var property in source) destination[property] = this.Element.getStyle(property).ToRgb();
			this.from = destination;
		};
		this.delta = [];
		for(var property in this.from) {
			to = this.to[property];
			from = this.from[property];
			this.delta[property] = [
				(to[0] - from[0]) / this.options.time,
				(to[1] - from[1]) / this.options.time,
				(to[2] - from[2]) / this.options.time];
		}
		if ( !this.playing ) {
			this.now = 0;
			this._run();
		};
	},

	step: function() {
		if (this.playing) {
			for(var property in this.from) {
				colors = this.from[property];
				this.setStyle(property,'rgb(' + 
					parseInt(colors[0] + (this.delta[property][0] * this.now)) + ',' + 
					parseInt(colors[1] + (this.delta[property][1] * this.now)) + ',' + 
					parseInt(colors[2] + (this.delta[property][2] * this.now)) + ')');
			};
		};
		this.now++;
		if (this.now > this.options.time) this.stop();
		else this.timer = window.setTimeout(this.step.bind(this),this.options.speed);
	}
});

Scroll = Class.create();
Scroll.prototype = Object.extend(new Fx(), {
	initialize: function(container,scroller) {
		this.options = {
			speed: 30,
			duration: 1,
			pauseit: 1,
			scrollto: 'top'
		};
		this.container=$(container);
		this.scroller=$(scroller);
		this.container.addEvent('mouseover',function(){this.rel='pause'});
		this.container.addEvent('mouseout',function(){this.rel='play'});
		this.container.elem.rel='play';
		this.playing = false;
		var size = this.container.getDimensions();
		this.containerHeight = size.height;
		this.containerWidth = size.width;
	},

	play: function(options) {
		Object.extend(this.options,options || { });
		this.scrollerTop = 0;
		this.scrollerLeft = 0;
		this._run();
	},

	step: function() {
		if (this.container.elem.rel=='play'||this.options.pauseit!=1){
			if (this.options.scrollto=='bottom') {
				this.scrollerTop = this.scrollerTop>this.containerHeight ? 0-this.scroller.getHeight() : this.scrollerTop+this.options.duration;
				this.scroller.elem.style.top = this.scrollerTop+'px';
			} else if (this.options.scrollto=='left') {
				this.scrollerLeft = this.scrollerLeft+this.scroller.getWidth()<0 ? this.containerWidth : this.scrollerLeft-this.options.duration;
				this.scroller.elem.style.left = this.scrollerLeft+'px';
			} else if (this.options.scrollto=='right') {
				this.scrollerLeft = this.scrollerLeft>this.containerWidth ? 0-this.scrollerWidth : this.scrollerLeft+this.options.duration;
				this.scroller.elem.style.left = this.scrollerLeft+'px';
			} else {
				this.scrollerTop = this.scrollerTop+this.scroller.getHeight()<0 ? this.containerHeight :this.scrollerTop-this.options.duration;
				this.scroller.elem.style.top = this.scrollerTop+'px';
			};
		};
		this.timer = window.setTimeout(this.step.bind(this),this.options.speed);
	}
});
