function scrollObj(name, initTop, initWidth, positionStop, timeStop, content, align, speedscroll) {
	//**data**//
	this.name			= name;
	this.initTop		= initTop;
	this.initWidth		= initWidth;
	this.positionStop	= positionStop;
	this.timeStop		= timeStop;
	this.content		= content;
	this.current		= 0;
	this.align			= align;
	this.speed			= 1;
	this.timer			= name + "Timer";
	this.speedScroll	= speedscroll;
	this.objBrowser;

	//**methods**//
	this.setSpeed		= setSpeed;
	this.scrollLayer	= scrollLayer;
	this.pauseScroll	= pauseScroll;
	this.stopScroll		= stopScroll;
	this.restartScroll	= restartScroll;
	this.switchText		= switchText;
	this.animateLayer	= animateLayer;
	this.getElement		= getElement;
	this.createLayer	= createLayer;

	//**initiate methods**//
	this.createLayer();
	this.getElement();
}

function setSpeed(s) {this.speed = s;}

function scrollLayer() { this.objBrowser.style.top = parseInt(this.objBrowser.style.top) - this.speed; }
function pauseScroll() { this.setSpeed(0); setTimeout(this.name + '.restartScroll()', this.timeStop); }
function stopScroll() { this.setSpeed(-1); }
function restartScroll() { if (this.speed != -1) this.setSpeed(1); }
function switchText() { this.current++; if (this.current >= this.content.length) this.current = 0; this.objBrowser.innerHTML = this.content[this.current]; if (document.getElementById && document.all) this.objBrowser.style.top = this.initTop; }

function animateLayer() {
	if (this.speed > 0) {
		if (document.getElementById && document.all && parseInt(this.objBrowser.style.top) > -30) this.scrollLayer();
		if (parseInt(this.objBrowser.style.top) == this.positionStop || (!document.getElementById || !document.all)) this.pauseScroll();
		if (parseInt(this.objBrowser.style.top) == -30 || (!document.getElementById || !document.all)) this.switchText();
	}
}

function getElement() {
	if (document.getElementById) this.objBrowser = document.getElementById(this.name);
    else if (document.all) this.objBrowser = document.all[name];
    else if (document.layers) this.objBrowser = document.layers[name];
    if (document.getElementById && document.all) this.objBrowser.style.top = this.initTop;
}

function createLayer() {
	document.write('<div id="layer' + this.name + '" style="position:relative;overflow:hidden;text-align:' + this.align + ';width:' + this.initWidth + 'px;height:' + this.initTop + 'px;" onmouseover="' + this.name + '.setSpeed(-1);" onmouseout="' + this.name + '.setSpeed(1)">');
	document.write('<div id="' + this.name + '" style="position:absolute;left:0px;vertical-align:middle;width:' + this.initWidth + 'px;height:' + this.initTop + 'px;">');
	document.write(this.content[0]);
	document.write('</div></div>');
	this.timer = setInterval(this.name + '.animateLayer()', this.speedScroll);
}