

// Re-lê a pagina no caso de netscape
function reloadPage(init) {
  c = navigator.appName;
  if (init==true) with (navigator) {
    if (c=="Netscape") {
      document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage;
    }
  } else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}
reloadPage(true);

// Abre janela popup
function clickPop(url,nome,opcoes) {
  window.open(url,nome,opcoes);
}

function isDefined(x) {
  return (eval('typeof('+x+')') != 'undefined' && eval('typeof('+x+')') != 'unknown');
}

function windowHeight() { return (document.layers?(window.innerHeight):(document.body.offsetHeight)); }
function documentHeight() { return (is.ie?document.body.scrollHeight:document.height); }
function windowScrollV() { return (is.ie)?(document.body.scrollTop):(window.pageYOffset); }
function doc(div) {	return (is.ns)?(document.layers[div].document):(document); }

var y1 = 0
function findMouse(e) {
  y1 = (!document.layers) ? event.y+document.body.scrollTop : e.pageY
	
	altTotal = windowHeight() - 1; //bug2Height
	
	pyf = ( (y1 > altTotal) ? 230 : y1  * 230 / altTotal);
	
	//altAtiva = 473 - bug2Height
	//xp = ( ( altAtiva * 100 ) / altTotal )
	//yy = ( altAtiva * 0.01 ) * y1
	//pyf = ( altAtiva * 0.01 ) * y1 - bug2Height
	if (isDefined('bug2')) bug2.moveTo(bug2Left,pyf);

}
if (document.layers) document.captureEvents(Event.ONMOUSEMOVE);
document.onmousemove = findMouse;


