var divId = 'div_banner';
var tableId = 'table_banner'
var bWidth = 800;
var bHeight = 35;
var shift = 1;
var leftPos;	
function start()
{
    setInterval("roll()", 30);
    vAlignment();
    document.getElementById(divId).style.visibility = 'visible';
}	
function vAlignment()
{
    document.getElementById(divId).style.left = 0;
    document.getElementById(divId).style.width = (document.body.clientWidth + 15) + 'px';
}	
function roll()
{
    if (document.all || document.getElementById)
    {
        leftPos = parseInt(document.getElementById(tableId).style.left);
        document.getElementById(tableId).style.left = (leftPos - shift) + 'px';
        if (Math.abs(leftPos) >= bWidth)
        {
            document.getElementById(tableId).style.left = (-shift) + 'px';
        }
    }
}	
function showBanner(bBody, large)
{
	if (large == true) {
		bHeight = bHeight * 2;
	}
	
    var position;
    if (window.attachEvent)
    {
        window.attachEvent("onscroll", vAlignment);
        window.attachEvent("onresize", vAlignment);
        position = "absolute";
    }
    else
    {
        window.addEventListener("resize", vAlignment, 1);
        position = "fixed";
    }	        
    var z_index = "z-index:100;";
    if (large) {
    	z_index = "";
    }
    document.write('<div id="' + divId + '" onMouseout="shift=1" onMouseover="shift=0" style="bottom:0;visibility:hidden;overflow:hidden;position:' + position + ';left:0px;width:' + (document.body.clientWidth + 15) + 'px;height:' + bHeight + 'px;' + z_index + '">');
    document.write('<table cellspacing=0 cellpadding=0 id="' + tableId + '" style="position:absolute;left:812px;top:1px;width:' + (bWidth * 4) + 'px"><tr><td>' + bBody + '</td></tr></table></div>');	
    setTimeout("start()", 1000);
}
function openWinCentered(loc, winname, widthh, heightt, params)
{
    var tp = Math.ceil((screen.height-heightt)/2);
    var lf = Math.ceil((screen.width-widthh)/2);
    if (params.length > 0)
        params = "," + params;

    var win=window.open(loc,winname,"width="+widthh+",height="+heightt+",top="+tp+",left="+lf+params);
    win.focus();
    return win;
}