function ScrollBox(_container,_width,_height) {
	/******************************
	PRIVATE	Class Properties
	******************************/
	var thisOBJ = this;// "this" object to allow private methods to call public methods
	var container = _container;
		if(typeof container == "string") { container = document.getElementById(_container); if(container === null) { return; } }
		//if(typeof container == "undefined")
	
	var c1; //content 1
	var c2; //content 2
	
	var cheight = _height;
	var cwidth = _width;
	var cGAP = 20;
	var cINCREMENT = 1;
	var cINCREMENT_bak = 1;
	var cTIMEOUT = 30;
	
	var INITIAL_NTRVL = 0;
	var INITIAL_TIMEOUT = 2000;
	var SCROLL_NTRVL = 0;
	var SCROLL_NTRVL_ITER = 0;
	var SCROLL_NTRVL_STOP = 0;
	
	var ACTIVE = false;
	
	/******************************
	CONSTRUCTOR   --- see call to constructor at bottom of class
	******************************/
	var init = function() {
		container.style.position = "relative";
		container.style.overflow = "hidden";
		container.style.width = _width + "px";
		container.style.height = _height + "px"
		
		container.onmouseover = function() {
			thisOBJ.stopScroll();
		}
		container.onmouseout = function() {
			thisOBJ.resumeScroll();
		}
		
		c1 = document.createElement("div");
		var obj_len = container.childNodes.length;
		for (var i=0; i<obj_len; i++) {
			c1.appendChild(container.childNodes[i].cloneNode(true));
		}
		c2 = c1.cloneNode(true);
		updateClassName(c1,"sc","");
		updateClassName(c2,"sc","");
		
		clearData(container);
		
		c1.style.position = "absolute";
		c1.style.left = "0px";
		//c1.style.background = "red";
		c1.style.width = "100%";
		
		c2.style.position = "absolute";
		c2.style.left = "0px";
		//c2.style.background = "green";
		c2.style.width = "100%";
		
		container.appendChild(c1);
		container.appendChild(c2);
		
		c1.style.top = "0px";
		var tmpH = getHeight(c1);
		if(tmpH < cheight) {
			cGAP = cheight - tmpH;
			c2.style.top = cheight + "px";
		} else {
			c2.style.top = (cheight+cGAP) + "px";
		}
		resetContent();
	};
	
	/******************************
	PRIVATE	Class Methods
	******************************/
	var resetContent = function() {
		c1.style.top = "0px";
		var tmpH = getHeight(c1);
		if(tmpH < cheight) {
			cGAP = cheight - tmpH;
			c2.style.top = cheight + "px";
		} else {
			c2.style.top = (cheight+cGAP) + "px";
		}		
	}
	
	var repeatScroll = function() {
		SCROLL_NTRVL = setInterval(scrollContent,cTIMEOUT);
		clearInterval(INITIAL_NTRVL);
	}
	
	var scrollContent = function() {
		if(cINCREMENT != 0) {
			var t1 = c1;
			var t2 = c2;
			if(parseInt(c1.style.top,10) > parseInt(c2.style.top,10)) {
				t1 = c2;
				t2 = c1;
			}
			var t1_top = parseInt(t1.style.top,10);
			var t2_top = parseInt(t2.style.top,10);
			
			var t1_bottom = t1_top+getHeight(t1);
			if(t1_bottom < 0) {
				t1.style.top = (cheight+cGAP) + "px";
				t2.style.top = "" + (t2_top-cINCREMENT) + "px";
			} else if(t1_bottom < cheight) {
				t1.style.top = "" + (t1_top-cINCREMENT) + "px";
				t2.style.top = "" + (t2_top-cINCREMENT) + "px";
			} else {
				t1.style.top = "" + (t1_top-cINCREMENT) + "px";
			}
		}
			
		ACTIVE = true;
		
		
		SCROLL_NTRVL_ITER += 1;
		if(SCROLL_NTRVL_ITER > SCROLL_NTRVL_STOP && SCROLL_NTRVL_STOP > 0) {
			clearInterval(SCROLL_NTRVL);
		}
	}
	
	var getHeight = function(obj) {
		return obj.offsetHeight;
		//opera p1.style.pixelHeight
	};
	
	var clearData = function(obj) {
		var obj_to_clear = obj;
		if(typeof(obj_to_clear) == "string") {
			obj_to_clear = document.getElementById(obj);
		}
		if(obj_to_clear !== null) {
			var idx = obj_to_clear.childNodes.length;
			for (var i = idx - 1; i >= 0; i--) {
				//alert(obj_to_clear.childNodes[i].nodeName);
				obj_to_clear.removeChild(obj_to_clear.childNodes[i]);
			}
		}
	};
	
	var updateClassName = function(obj,newclass,classtoreplace) {
		var modifiedclass = obj.className;
		if (classtoreplace !== "") {
			var classEStoreplace = classtoreplace.split(",");
			for(var i=0; i<classEStoreplace.length; i++) {
				if(modifiedclass.indexOf(classEStoreplace[i]) != -1) {
					modifiedclass = modifiedclass.replace(classEStoreplace[i],"");
				}
			}
		}
		if (newclass !== "") {
			var newclassES = newclass.split(",");
			for(var k=0; k<newclassES.length; k++) {
				if (modifiedclass.indexOf(newclassES[k]) == -1) {
					if (modifiedclass.length > 0) {
						modifiedclass = modifiedclass + " " + newclassES[k];
					} else {
						modifiedclass = newclassES[k];
					}
				}
			}
		}
		var modifiedclass2 = "";
		var spacedclass = modifiedclass.split(" ");
		for(var j=0; j<spacedclass.length; j++) {
			if(spacedclass[j].length > 0) {
				modifiedclass2 += spacedclass[j] + " ";
			}
		}
		obj.setAttribute("class", modifiedclass2);
		obj.setAttribute("className", modifiedclass2);
		//alert("final: |"+modifiedclass2+"|");
	};
	
	/******************************
	PUBLIC	Class Properties
	******************************/	
	this.startScroll = function(s) {
		var tmp_timeout = INITIAL_TIMEOUT;
		if(typeof s != "undefined") {
			tmp_timeout = parseInt(s,10) * 1000;
		}
		INITIAL_NTRVL = setInterval(repeatScroll,tmp_timeout);
	}
	
	this.resumeScroll = function() {
		cINCREMENT = cINCREMENT_bak;
	}
	
	this.stopScroll = function() {
		cINCREMENT = 0;
	}
	
	this.setContentHeight = function(h) {
		if(typeof h == typeof 2) {
			cheight = h;
			resetContent();
		}
	}
	
	this.setContentWidth = function(w) {
		if(typeof w == typeof 2) {
			cwidth = w;
			resetContent();
		}
	}
	
	this.setContentGap = function(p) {
		if(typeof p == typeof 2) {
			cGAP = p;
			resetContent();
		}
	}
	
	this.setScrollIncrement = function(p) {
		if(typeof p == typeof 2) {
			cINCREMENT = p;
			cINCREMENT_bak = p;
		}
	}
	
	this.setScrollTimeout = function(ms) {
		if(typeof ms == typeof 2) {
			cTIMEOUT = ms;
			thisOBJ.stopScroll();
			repeatScroll();
		}
	}
	
	/******************************
	CALL TO "CONSTRUCTOR"
	******************************/
	init();
}