/*

<style type='text/css'>
<!--

.tooltiptitle {
		COLOR: #ffffff; 
		TEXT-DECORATION: none; 
		CURSOR: Default; 
		font-family: Verdana, Arial, Helvetica, sans-serif; 
		font-weight: bold; 
		font-size: 10px		}
.tooltipcontent {
		COLOR: #000066; 
		TEXT-DECORATION: none; 
		CURSOR: Default; 
		font-family: arial; 
		font-size: 9px
	}

#ToolTip	{
	position:absolute; 
		width: 100px; 
		top: 0px; 
		left: 0px; 
		z-index:4; 
		visibility:hidden;
		}
-->
</style>
*/
//<!--
var tooltipAtivado=true;  // deixar como tooltipoAtivado=false para nao aparecer ajuda.
var ie = document.all ? 1 : 0;
var ns = document.layers ? 1 : 0;
var MxLenght = 150

if(ns){
	doc = 'document.'; 
	sty = '';
	}
if(ie){
	doc = 'document.all.'; 
	sty = '.style';
	}
var initialize = 0;
var Ex, Ey, topColor, subColor, ContentInfo;

if(ie){
	Ex = 'event.x';
	Ey = 'event.y';
	topColor = '#999999';  //aqui voce muda a cor do fundo do Titulo
	subColor = '#F1F2F2';  //aqui voce muda a cor do fundo do conteudo
	tooltiptitle = '#FFFFFF';// aqui voce muda a cor do Titulo
	
	}

if(ns) {
	Ex = 'e.pageX';
	Ey = 'e.pageY';
	window.captureEvents(Event.MOUSEMOVE);
	window.onmousemove=overhere;
	topColor = '#71AAFF';   //aqui voce muda a cor do fundo do TITULO
	subColor = '#F1F2F2';	//AQUI voce muda a cor do fundo do Conteudo
	}


function MoveToolTip(layerName, FromTop, FromLeft, e){
	// verifica a posicao
  try 
  {
	if(tooltipAtivado==true) {
		var EyActual = eval(FromTop) + 10;
		var ExActual = eval(FromLeft) + 0;

		var ELenght=window.screen.width; // Determine screen resolution width
		var EHeight=window.screen.height; // determina a altura da página
		if (layerName == 'ViewPicture') {
			EyActual = EyActual - 150;
			//alert('layeName='+layerName+ ' FromTop='+FromTop+' FromLeft='+FromLeft);
			//alert('EyActual='+EyActual+' ExActual='+ExActual+'\nElength='+ELenght+' Eheight='+EHeight);
			}
		if((EyActual + 100) > (EHeight - 100)) {
			EyActual = EyActual - 100;
			}
		if((ExActual + MxLenght) > (ELenght - MxLenght)) {
			ExActual = ExActual - MxLenght;
			}
	
		ExActual = ExActual + 20;
	
		if(ie) {
		  try 
		  {
			  eval(doc + layerName + sty + ".top = "  + (EyActual + document.body.scrollTop))
			 }
			 catch(e)
			 {
			 
			 }
			};
		if(ns){
		  try {
		  			eval(doc + layerName + sty + ".top = "  +  EyActual)
	
			 }
			 catch(e)
			 {
			 
			 }
  		}
    try {
		  eval(doc + layerName + sty + ".left = " + ExActual);  //(eval(FromLeft) + 20));  //original: + 15
		}
		catch(e)
		{
		}
		}
	}
	catch(e)
	{
	  var erro=e.description; // ocorreu um erro
	}
	}

function xMoveToolTip(layerName, FromTop, FromLeft, e){
	if(ie){
		eval(doc + layerName + sty + '.top = '  + (eval(FromTop)+ document.body.scrollTop));
		}
	if(ns){
		eval(doc + layerName + sty + '.top = '  +  eval(FromTop));
		}
	
	eval(doc + layerName + sty + '.left = ' + (eval(FromLeft) + 15));
	}

function ReplaceContent(layerName){
	if(ie){
		document.all[layerName].innerHTML = ContentInfo;
		}
if(ns){
	with(document.layers[layerName].document); { 
		open(); 
   		write(ContentInfo); 
   		close(); 
			}
		}
	}



function Activate(){initialize=1}
function deActivate(){initialize=0}

function overhere(e) {
  try
  {
	if(tooltipAtivado==true) {
		if(initialize) {
			MoveToolTip('ToolTip', Ey, Ex, e);
			eval(doc + 'ToolTip' + sty + '.visibility = "visible"');
	//		eval(doc + 'ToolTip' + sty + '.filter:progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=25)') ;
		}
		else {
			MoveToolTip('ToolTip', 0, 0);
			eval(doc + 'ToolTip' + sty + '.visibility = "hidden"');
			}
		}
	}
	catch(e)
	{
	
	}
	
	}

function EnterContent(layerName, TTitle, TContent,nTam) {
	var lTam = 150;
	if (nTam != null) {
		lTam = nTam;
		}
	ContentInfo = '<table border="0" width="' + lTam + '" cellspacing="0" cellpadding="0">'+
	'<tr><td width="100%" bgcolor="#CCCCCC">'+	
	'<table border="0" width="100%" cellspacing="1" cellpadding="0">'+
		'<tr><td width="100%" bgcolor="'+topColor+'">'+
	'<table border="0" width="90%" cellspacing="0" cellpadding="0" align="center">'+
	'<tr><td width="100%">'+
	'<font color="'+tooltiptitle+'" style="font:Verdana, Arial, Helvetica, sans-serif; font-size:10px" ><strong>&nbsp;'+TTitle+'</strong></font>'+
	'</td></tr>'+
	'</table>'+
	'</td></tr>'+
	'<tr><td width="100%" bgcolor='+subColor+'>'+
	'<table border="0" width="90%" cellpadding="0" cellspacing="1" align="center">'+
	'<tr><td width="100%">'+
	'<font color="'+topColor+'" style="font:Verdana, Arial, Helvetica, sans-serif; font-size:10px" >'+TContent+'</font>'+
	'</td></tr>'+'</table>'+'</td></tr>'+'</table>'+'</td></tr>'+'</table>';
	self.status='Ativo='+tooltipAtivado;
	if(tooltipAtivado==true) {
		ReplaceContent(layerName);
		}
	}
	
// Este procedimento irá iniciar a varredura do mouse
// inserir no <body onmousemove="overhere();">
// inserir este comando logo apos o <body> <div id="ToolTip"></div>

//  Scrolling status Bar text Script
// Being of Scrolling text in the Status bar
var speed = 50 //decrease value to increase speed (must be positive) 
var pause = 2500 //increase value to increase pause
var timerID = null 
var bannerRunning = false
var ar = new Array()
ar[0] = ":: Sistema RCC Editora ::"
//ar[1] = ":: Sistema RCC Editora ::"
//ar[2] = ":: Indispensável ao seu Departamento de Vendas  ::"
//ar[3] = ":: Portal Busca Fácil Info & Telecom ::"
//ar[4] = ""
var currentMessage = 0
var offset = 0
function stopBanner() {
	if (bannerRunning)
		clearTimeout(timerID)
		bannerRunning = false
		}
function startBanner() {
		stopBanner()
		showBanner()
}
function showBanner() { 
		var text = ar[currentMessage]
		if (offset < text.length) {
			if (text.charAt(offset) == " ")
			offset++ 
			var partialMessage = text.substring(0, offset + 1)
			window.status = partialMessage
			offset++ 
			timerID = setTimeout("showBanner()", speed)
			bannerRunning = true
				} else {
			offset = 0
			currentMessage++
				if (currentMessage == ar.length)
					currentMessage = 0
					timerID = setTimeout("showBanner()", pause)
					bannerRunning = true
					}
							}
							
//startBanner();
