function popUp(URLStr, left, top, width, height) 
{
    popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + ',screenX=' + left + ',screenY=' + top + '');
}
//<![CDATA[
var Rollar = "sim";
var tipo = "top";
var roll = 0;
var tmp = 50;

function Duplicar(){
	var Marquee = document.getElementById("Marquee");
	Cont = Marquee.innerHTML;
	if (tipo=="left" || tipo=="right"){
		IDA = "<div style=\"float:left; position:relative;margin-left:-"+Marquee.clientWidth+";width:"+Marquee.clientWidth+"; height:"+Marquee.clientHeight+";\">"+Cont+"</div>";
		IDB = "<div style=\"float:right; position:relative;margin-right:-"+Marquee.clientWidth+";width:"+Marquee.clientWidth+"; height:"+Marquee.clientHeight+";\">"+Cont+"</div>";
		IDC = IDA + IDB + Cont;
	}
	if(tipo=="top" || tipo=="down"){
		IDA = "<div style=\"float:left; position:relative;margin-top:-"+Marquee.clientHeight+";width:"+Marquee.clientWidth+"; height:"+Marquee.clientHeight+";\">"+Cont+"</div>";
		IDB = "<div style=\"float:left; position:relative;margin-bottom:-"+Marquee.clientHeight+";width:"+Marquee.clientWidth+"; height:"+Marquee.clientHeight+";\">"+Cont+"</div>";
		IDC = IDA + Cont + IDB;
	}
	Marquee.innerHTML = IDC;
}
function Fmarquee(){
	var Marquee = document.getElementById("Marquee");
	var Caixa = document.getElementById("caixa");

if(tipo=="left" || tipo=="right"){
	var Altura = Caixa.clientWidth;
}else if(tipo=="down" || tipo=="top"){
	var Altura = Caixa.clientHeight;
}

	roll++;

	if(Altura==roll){
		roll = (roll*-1);
	}

	if(tipo == "top"){
		Marquee.style.marginTop = (roll*-1)+"px";
	} else if (tipo == "down"){
		Marquee.style.marginTop = roll+"px";
	} else if (tipo == "left"){
		Marquee.style.marginLeft = (roll*-1)+"px";
	} else if (tipo == "right"){
		Marquee.style.marginLeft = roll+"px";
	}

	if(Rollar == "sim"){
	   setTimeout("Fmarquee()",tmp);
	}
}
function playM(){
	Rollar = "sim";
	Fmarquee();
}

function stopM(){
	Rollar = "nao";
}

window.onload = function(){
	Rollar = "sim";
	Fmarquee();
	Duplicar();
}
//]]>
