
/* Retirar esta linha da página
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
*/

document.write('<STYLE type=text/css>#supertext {')
document.write('LEFT: 0px; VISIBILITY: hidden; POSITION: absolute; TOP: 0px')
document.write('}')
document.write('</STYLE>')

document.write('<META content="MSHTML 6.00.2800.1106" name=GENERATOR>')

//INÍCIO DO CÓDIGO



var thecontent='<body><div id="banner" style="z-index:1"><img src="_images/banners/banner_home_flutuante01xx.gif" width="298" height="148" border="0" usemap="#Map">  <map name="Map">  <area shape="rect" coords="253,119,294,144" href="javascript: closeBall();">  <area shape="rect" coords="2,3,249,142" href="http://siteagente.ibizaturismo.com.br/lojavirtual/destinos_novo.asp?cd_agrupamento=4">  </map></div></body>';

var hidetimer='';

// velocidade do texto
var BallSpeed = 1; //velocidade do banner

var contentWidth;
var contentHeight;
var maxBallSpeed = 1;


var xMax;
var yMax;
var xPos = 0;
var yPos = 0;
var xDir = 'right';
var yDir = 'down';
var superballRunning = true;
var tempBallSpeed;
var currentBallSrc;
var newXDir;
var newYDir;

function initializeBall() {
   if (document.all) {
      xMax = document.body.clientWidth
      yMax = document.body.clientHeight
      document.all("supertext").style.visibility = "visible";
      contentWidth=supertext.offsetWidth
      contentHeight=supertext.offsetHeight
      }
   else if (document.layers) {
      xMax = window.innerWidth;
      yMax = window.innerHeight;
      contentWidth=document.supertext.document.width
      contentHeight=document.supertext.document.height
      document.layers["supertext"].visibility = "show";
      }
   setTimeout('moveBall()',400);
   if (hidetimer!='')
   setTimeout("hidetext()",hidetimer)
   }

function moveBall() {
   if (superballRunning == true) {
      calculatePosition();
      if (document.all) {
         document.all("supertext").style.left = xPos + document.body.scrollLeft;
         document.all("supertext").style.top = yPos + document.body.scrollTop;
         }
      else if (document.layers) {
         document.layers["supertext"].left = xPos + pageXOffset;
         document.layers["supertext"].top = yPos + pageYOffset;
         }
      animatetext=setTimeout('moveBall()',20);
      }
   }

function calculatePosition() {
   if (xDir == "right") {
      if (xPos > (xMax - contentWidth - BallSpeed)) { 
         xDir = "left";
         }
      }
   else if (xDir == "left") {
      if (xPos < (0 + BallSpeed)) {
         xDir = "right";
         }
      }
   if (yDir == "down") {
      if (yPos > (yMax - contentHeight - BallSpeed)) {
         yDir = "up";
         }
      }
   else if (yDir == "up") {
      if (yPos < (0 + BallSpeed)) {
         yDir = "down";
         }
      }
   if (xDir == "right") {
      xPos = xPos + BallSpeed;
      }
   else if (xDir == "left") {
      xPos = xPos - BallSpeed;
      }
   else {
      xPos = xPos;
      }
   if (yDir == "down") {
      yPos = yPos + BallSpeed;
      }
   else if (yDir == "up") {
      yPos = yPos - BallSpeed;
      }
   else {
      yPos = yPos;
      }
   }

function hidetext(){
if (document.all)
supertext.style.visibility="hidden"
else if (document.layers)
document.supertext.visibility="hide"
clearTimeout(animatetext)
}

if (document.all||document.layers){
document.write('<div id="supertext" style="z-index:50"><nobr>'+thecontent+'</nobr></div>')
window.onload = initializeBall;
window.onresize = new Function("window.location.reload()");
}

function closeBall() {
   if (document.all) {
      document.all("supertext").style.visibility = "hidden";
   }
}

setTimeout('closeBall()',1200000); //tempo que o banner vai rodar