function addScrollers() {
// code each scroller as follows:
// startScroll('id of scroller div','content of scroller');
if(navigator.appName == "Microsoft Internet Explorer"){
	document.getElementById('myscroller').style.height = '72px';
	document.getElementById('myscroller').style.top = '10px';
}
startScroll('myscroller');
}

var speed=12; // scroll speed (bigger = faster)
var dR=false; // reverse direction
// Vertical Scroller Javascript
var step = 1; 
function objWidth(obj){if(obj.offsetWidth) return obj.offsetWidth; if (obj.clip) return obj.clip.width; return 0;} 
function objHeight(obj) {if(obj.offsetHeight) return obj.offsetHeight; if (obj.clip) return obj.clip.height; return 0;} 
function scrF(i,sH,eH){var x=parseInt(i.top)+(dR? step: -step); if(dR && x>sH)x=-eH;else if(x<2-eH)x=sH;i.top = x+'px';}

function startScroll(sN)
{
	var scr=document.getElementById(sN);
	var Length = objHeight(scr);
	var txt= scr.innerHTML;
	scr.style.height = 52;
		 
	// if there no messsage do not show the red backgroud alert(txt.length); 
	if(txt==0) {
	document.getElementById("close2").style.visibility ="hidden";	
	}else{
	document.getElementById("close2").style.visibility = "visible"; 	 
	}
	// if the message is more than 3 line sroll it, if not just display it
	if(Length > 60)	{
		//alert("plust grand:"+ objHeight(scr));
		var sW = objWidth(scr)-6;
		var sH = objHeight(scr);
		scr.innerHTML = '<div id="'+sN+'in" style="position:absolute; left:3px; width:'+sW+';">'+txt+'</div>';
		var sTxt=document.getElementById(sN+'in');
		var eH=objHeight(sTxt);
		sTxt.style.top=(dR? -eH : sH)+'px';
		sTxt.style.clip='rect(0,'+sW+'px,'+eH+'px,0)';
		//alert(navigator.appName+" "+parseFloat(navigator.appVersion));
		setInterval(function() {scrF(sTxt.style,sH,eH);},1000/speed);
	}
}
window.onload = addScrollers;
                  

