﻿var tWidth = "100%";                 // width (in pixels)
var tHeight = "16px";                // height (in pixels)
var tcolour = "transparent";         // background colour:
var moStop=true;                     // pause on mouseover (true or false)
var fontfamily = 'arial,sans-serif'; // font for content
var tSpeed=3;                        // scroll speed (1 = slow, 5 = fast)

// enter your ticker content here (use \/ and \' in place of / and ' respectively)
var content = "<a href=\"http:\/\/www.fraudes.org\/indexjvs.asp\">O nosso Site é monitorado 24h por dia, 365 dias por ano pelo \"Monitor de Fraudes\" o qual é reconhecido como de utilidade publica pela ONU – Organização das Nações Unidas.... Para conhecer o monitor de fraudes, Clique aqui...<\/a>";

// Simple Marquee / Ticker Script
// copyright 3rd January 2006, Stephen Chapman
// permission to use this Javascript on your web page is granted
// provided that all of the below code in this script (including this
// comment) is used without any alteration
var cps = tSpeed;
var aw, mq;
var fsz = parseInt(tHeight) - 4;
function startticker() {
	var tick = document.createElement("div");
	tick.style.position = "relative";
	tick.style.overflow = "hidden";
	tick.style.backgroundColor = tcolour;
	tick.style.width = tWidth;
	tick.style.height = tHeight;
	if (moStop)
		tick.setAttribute("onmouseover", "cps=0");
	tick.setAttribute("onmouseout", "cps=tSpeed");

	var mq = document.createElement("div");
	mq.setAttribute("id", "mq");
	mq.style.position = "absolute";
	mq.style.left = "0px";
	mq.style.top = "0px";
	mq.style.fontFamily = fontfamily;
	mq.style.fontSize = fsz + 'px';
	mq.style.whiteSpace = "nowrap";

	tick.appendChild(mq);

	document.getElementById("ticker").appendChild(tick);
	mq = document.getElementById("mq");
	mq.style.left = (parseInt(tWidth) + 10) + "px";
	mq.innerHTML = '<span id="tx">' + content + '<\/span>';
	aw = document.getElementById("tx").offsetWidth;
	lefttime = setInterval("scrollticker()", 50);

}

function scrollticker() {
	var mq = document.getElementById("mq");
	mq.style.left = (parseInt(mq.style.left) > (-10 - aw)) ? parseInt(mq.style.left) - cps + "px" : parseInt(tWidth) + 10 + "px";
}
addEvent(window, "load", startticker);
