var oCouplet = new Object(); 

function Couplet(_top, _width, _height, _offset, _delay, _amount) {
this.author = '51JS.COM-ZMM';
this.version = 'Couplet 1.0';
this.top = _top;
this.width = _width;
this.height = _height;
this.offset = _offset;
this.delay = _delay;
this.amount = _amount;

this.drawCouplet = function(_content) {
this.content = _content;
var _client = document.body.clientWidth;
var _css = new String();
_css += 'top: ' + this.top + 'px;';
_css += 'width: ' + this.width + 'px;';
_css += 'height: ' + this.height + 'px;';
_css += 'position: absolute;';
_css += 'font-size: 12px;';
_css += 'border: 1px solid menu;';
_css += 'overflow: auto;'
var _html = new String();
_html += '<div id="oCouplet_left" style="' + _css + 'left: ' + this.offset + 'px;">';
_html += this.content; 
_html += '</div>';
_html += '<div id="oCouplet_right" style="' + _css + 'left: ' + (_client - this.width - this.offset) + 'px;">';
_html += this.content; 
_html += '</div>';
return _html;
}

this.doScroll = function() {
var _left = document.getElementById('oCouplet_left');
var _right = document.getElementById('oCouplet_right');
var _oTop = parseInt(_left.style.top);
var _nTop = parseInt(document.body.scrollTop) + this.top;
if (_oTop < _nTop) {
if ((_nTop - _oTop) > 0) {
_left.style.top = _right.style.top = _oTop + 1 + 'px';
var oTime = window.setTimeout('oCouplet.doScroll()', this.delay);
} else {
window.clearTimeout(oTime); 
}
} else {
if ((_oTop - _nTop) > 0) {
_left.style.top = _right.style.top = _oTop - 1 + 'px';
var oTime = window.setTimeout('oCouplet.doScroll()', this.delay);
} else {
window.clearTimeout(oTime); 
}
}
}
}


window.onload = function() {
var oTop = 20, oWidth = 105, oHeight = 350, oOffset = 2;
var oDelay = 80, oAmount = 1;
oCouplet = new Couplet(oTop, oWidth, oHeight, oOffset, oDelay, oAmount);
with (document.body) {
innerHTML += oCouplet.drawCouplet(self.oContent.innerHTML);
onscroll = function() {
oCouplet.doScroll();
} 
} 
} 

<!--
var xPos = 20;
var yPos = document.body.clientHeight;
var step = 1;
var delay = 30;
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
img.style.top = yPos;
function changePos() {
width = document.body.clientWidth;
height = document.body.clientHeight;
Hoffset = img.offsetHeight;
Woffset = img.offsetWidth;
img.style.left = xPos + document.body.scrollLeft;
img.style.top = yPos + document.body.scrollTop;
if (yon) {
yPos = yPos + step;
}
else {
yPos = yPos - step;
}
if (yPos < 0) {
yon = 1;
yPos = 0;
}
if (yPos >= (height - Hoffset)) {
yon = 0;
yPos = (height - Hoffset);
}
if (xon) {
xPos = xPos + step;
}
else {
xPos = xPos - step;
}
if (xPos < 0) {
xon = 1;
xPos = 0;
}
if (xPos >= (width - Woffset)) {
xon = 0;
xPos = (width - Woffset);
}
}
function www_helpor_net() {
img.visibility = "visible";
interval = setInterval('changePos()', delay);
}
www_helpor_net();
//For more,visit:www.helpor.net
-->

