var absLeft = 148;
var absRight = 287;
var banner_position = 0;
var newMsg = "";
function initScroll(msg, url){
	var outsideDiv = document.getElementById('test');
	var windowWidth;
	if (window.innerWidth)
		windowWidth = window.innerWidth-absLeft-absRight - 17;
	else if (document.body.clientWidth)
		windowWidth = document.body.clientWidth-absLeft-absRight;
	outsideDiv.innerHTML = '<input type="text" id="scroll" style="left:' + absLeft + 'px; width:'+windowWidth+'px;" onfocus="window.location=\'' + url + '\'"></input>';
	newMsg = msg + "...                                                       ";
	charwidth = windowWidth;
	k = (charwidth / msg.length) + 1;
	for(i = 0; i <= k; i++)
		newMsg += newMsg + " ";
	scroll();
}

function scroll(){
	var scroller = document.getElementById('scroll');
	scroller.value = newMsg.substring(banner_position, banner_position + charwidth);
	if(banner_position++ >= 0.99*charwidth)
		banner_position = 0;
	setTimeout("scroll()",100) 
}

