var delayb4scroll = 2000; //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed = 3; //Specify marquee scroll speed (larger is faster 1-10)
var pauseit = 1; //Pause marquee onMousever (0=no. 1=yes)?
////NO NEED TO EDIT BELOW THIS LINE////////////
var copyspeed = marqueespeed;
var pausespeed = (pauseit == 0)? copyspeed: 0;
var actualWidth = '';
function scrollmarquee(){
    try{
	    $("vmarquee").style.left = parseInt($("vmarquee").style.left) - copyspeed+"px";
	    $("newOne").style.left = parseInt($("newOne").style.left) - copyspeed+"px";
	    if ( parseInt($("vmarquee").style.left) + 10  <= actualWidth*(-1) ) {
	       $("vmarquee").style.left = actualWidth+"px";					
	    }
	    if ( parseInt($("newOne").style.left) + 10  <= actualWidth*(-1)  ) {
	       $("newOne").style.left = actualWidth+"px";					
	    }
    }catch(e){}
}
function initializemarquee(){
	try{


    //alert('referer' + window.parent.location.href);
    var oldw = $('outerMost').style.width;
    $('outerMost').style.width = '5000px';
    var widdd = 0;
    
    paras = $A($('vmarquee').getElementsByClassName('dummyClass')); 
    paras.each(function(elm){ widdd = widdd + 8 + parseInt(elm.offsetWidth); }); 
    //$('vmarquee').getElementsByClassName('dummyClass').each(function(elm) { widdd = widdd + parseInt(elm.offsetWidth); }); 
    
    $('marqueecontainer').style.width = ((widdd * 2) + 1456) + 'px';
    $('vmarquee').style.width = (widdd + 728) + 'px';
    $('outerMost').style.width = oldw;
    $('manualAds').style.width = widdd + 'px';



	    $("vmarquee").style.left = 0;
	    containerWidth = $("marqueecontainer").offsetWidth;
	    actualWidth = $("vmarquee").offsetWidth;
	    if ( containerWidth > actualWidth ) { $("marqueecontainer").style.width = actualWidth; }
	    if (!$("newOne")) {
            try{
		        newUl = document.createElement('div');
		        newUl.id = "newOne";
		        $('marqueecontainer').appendChild(newUl);
		        $('newOne').innerHTML = $("vmarquee").innerHTML;
		        $('newOne').style.position = $("vmarquee").style.position;
		        $('newOne').style.padding = $("vmarquee").style.padding;
		        $('newOne').style.margin = $("vmarquee").style.margin;
		        $('newOne').style.width = $("vmarquee").style.width;
		        $('newOne').style.display = 'block';
	            $("newOne").style.left = actualWidth+'px';
            }catch(e){}
	    }
    }catch(e){}
    setTimeout('lefttime=setInterval("scrollmarquee()",80)', delayb4scroll);
}

