function quickscroll(variableName, object, scrollUntil, scrollHow, amount, speed) {
    window[variableName] = this;
    this.object = typeof object == "object" ? object : typeof object == "string" ? document.getElementById(object) : document.getElementsByTagName("BODY")[0];
    var position = this.object.currentStyle ? this.object.currentStyle.position : document.defaultView.getComputedStyle(this.object, null).getPropertyValue("position");
    position = position ? position.toLowerCase() : position;
    if (position != "absolute" && position != "relative") {
        this.object.style.position = "relative";
    }
   var overflow = this.object.currentStyle ? this.object.currentStyle.overflow : document.defaultView.getComputedStyle(this.object, null).getPropertyValue("overflow");
    overflow = overflow ? overflow.toLowerCase() : overflow;
    if (overflow != "auto" && overflow != "scroll") {
        this.object.style.overflow = "scroll";
		this.object.style.overflowY = "hidden"; /*custumized*/
    }
    this.scrollUntil = scrollUntil;
    scrollHow = parseFloat(scrollHow) || 0;
    if (!scrollHow) {
        this.position = "Top";
        this.dimension = "Height";
    } else {
        this.position = "Left";
        this.dimension = "Width";
    }
  this.amount = parseFloat(amount) || 20;
    this.speed = parseFloat(speed) || 20;
    this.timer = 0;
    this.afterLoad = function () {this.scrollHow = "scroll" + this.position;
	if (typeof this.scrollUntil == "object") {this.stopAt = this.scrollUntil["offset" + this.position];
	var spaceRemains = this.object["scroll" + this.dimension] - this.scrollUntil["offset" + this.position];
	if (spaceRemains < this.object["client" + this.dimension]) {this.stopAt -= this.object["client" + this.dimension] - spaceRemains;}} 
	else if (document.getElementById(this.scrollUntil)) {var layerPos = document.getElementById(this.scrollUntil)["offset" + this.position];this.stopAt = layerPos;var spaceRemains = this.object["scroll" + this.dimension] - layerPos;if (spaceRemains < this.object["client" + this.dimension]) {this.stopAt -= this.object["client" + this.dimension] - spaceRemains;}} 
	else if (!isNaN(parseFloat(this.scrollUntil))) {this.stopAt = Math.abs(parseFloat(this.scrollUntil) || 0);var spaceRemains = this.object["scroll" + this.dimension] - this.stopAt;if (spaceRemains < this.object["client" + this.dimension]) {this.stopAt -= this.object["client" + this.dimension] - spaceRemains;}} else {this.stopAt = this.object["scroll" + this.dimension] - this.object["client" + this.dimension];}if (this.object[this.scrollHow] <= this.stopAt) {this.timer = setInterval(variableName + ".scroll1()", this.speed);} 
	else {this.timer = setInterval(variableName + ".scroll2()", this.speed);}};
    this.scroll1 = function () {var toend = this.object[this.scrollHow] + this.amount;if (toend >= this.stopAt) {this.object[this.scrollHow] = this.stopAt;clearInterval(this.timer);this.timer = 0;} else {this.object[this.scrollHow] = toend;}};
    this.scroll2 = function () {var toend = this.object[this.scrollHow] - this.amount;if (toend <= this.stopAt) {this.object[this.scrollHow] = this.stopAt;clearInterval(this.timer);this.timer = 0;} else {this.object[this.scrollHow] = toend;}};
    this.scroll = function () {if (this.object && !this.timer) {this.afterLoad();}
	};
}