var lastScrollY			= 0;

function heartBeat(){ 
	var diffY;
	if (document.documentElement && document.documentElement.scrollTop) {
		diffY = document.documentElement.scrollTop;
	} else if (document.body) {
		diffY = document.body.scrollTop
	} else {
	}

	var percent;

	percent= .1 * (diffY-lastScrollY);

	if(percent>0)percent=Math.ceil(percent); 
	else percent=Math.floor(percent);


	if(percent==0) return ;

	document.getElementById("couplet_1").style.top=parseInt(document.getElementById
	("couplet_1").style.top)+percent+"px";
	document.getElementById("couplet_2").style.top=parseInt(document.getElementById
	("couplet_2").style.top)+percent+"px";
	lastScrollY=lastScrollY+percent;
}


function coupletInti(coupletLhtm, coupletRhtm) {
	var coupletL	= document.createElement("DIV");
	var coupletR	= document.createElement("DIV");

	coupletWidth	= parseInt(coupletWidth);
	coupletHeight	= parseInt(coupletHeight);
	if(isNaN(coupletWidth)) coupletWidth = 92;
	if(isNaN(coupletHeight)) coupletHeight = 270;

	

	coupletL.id				= 'couplet_1';
	coupletL.style.position	= 'absolute';
	coupletL.style.left		= '6px';
	coupletL.style.top		= '144px';
	coupletL.style.width	= (coupletWidth+4)+'px';
	coupletL.style.height	= (coupletHeight+4)+'px';
	coupletL.style.zIndex	= '1000';
	coupletL.innerHTML		= coupletLhtm;

	coupletR.id				= 'couplet_2';
	coupletR.style.position	= 'absolute';
	coupletR.style.right	= '6px';
	coupletR.style.top		= '144px';
	coupletR.style.width	= (coupletWidth+4)+'px';
	coupletR.style.height	= (coupletHeight+4)+'px';
	coupletR.style.zIndex	= '1000';
	coupletR.innerHTML		= coupletRhtm;


	var imgL = coupletL.getElementsByTagName('IMG')[0];
	imgL.style.border	= '1px solid #ccc';
	imgL.style.padding	= '1px 1px 1px 1px';
	imgL.style.width	= coupletWidth+'px';
	imgL.style.height	= coupletHeight+'px';

	var imgR = coupletR.getElementsByTagName('IMG')[0];
	imgR.style.border	= '1px solid #ccc';
	imgR.style.padding	= '1px 1px 1px 1px';
	imgR.style.width	= coupletWidth+'px';
	imgR.style.height	= coupletHeight+'px';


	document.body.appendChild(coupletL);
	document.body.appendChild(coupletR);
	window.setInterval("heartBeat()",10);
}



