/*
adImages = new Array("/img/med_budha.jpg", "/img/chakra_budha.jpg", "/img/frog.jpg")
thisAd = 0
imgCt = adImages.length

function rotate() {
if (document.images) {
thisAd++

if (thisAd == imgCt) {
thisAd = 0
}
document.adBanner.src=adImages[thisAd]
setTimeout("rotate()", 3 * 1000)
}
}*/

window.onload = initToolLink;
var toolImages = new Array("/img/medToolBanner.jpg", "/img/chkToolBanner.jpg", "/img/priToolBanner.jpg");
var toolURL = new Array("inwardjourney.com/tools/meditation/", "inwardjourney.com/tools/chakras/", "inwardjourney.com/tools/principles/");
var thisTool = 0;
function rotate() {
thisTool++; 
if(thisTool == toolImages.length) {
thisTool = 0;
}
document.getElementById("tool").src = toolImages[thisTool];
setTimeout("rotate()", 12 * 1000);
}
function newLocation() {
document.location.href = "http://www." + toolURL[thisTool];
return false;
}
function initToolLink() {
if(document.getElementById("tool").parentNode.tagname == "a")
{
document.getElementById("tool").parentNode.onclick = newLocation;
}
rotate();
}
/*function initToolLink() {
if(document.getElementById("tool").parentNode.tagname == "a") {
document.getElementById("tool").parentNode.onclick = newLocation;}
rotate();
}*/

/*
var bannerImg = new Array();
  // Enter the names of the images below
  bannerImg[0]="/img/med_budha.jpg";
  bannerImg[1]="/img/chakra_budha.jpg";
  bannerImg[2]="/img/frog.jpg";

var newBanner = 0;
var totalBan = bannerImg.length;

function cycleBan() {
  newBanner++;
  if (newBanner == totalBan) {
    newBanner = 0;
  }
  document.banner.src=bannerImg[newBanner];
  // set the time below for length of image display
  // i.e., "4*1000" is 4 seconds
  setTimeout("cycleBan()", 4*1000);
}
window.onload=cycleBan;*/

/*<script language="Javascript" type="text/javascript">
      <!-- Hide from old browsers
     window.onload = initToolLink;
      var toolImages = new Array("img/med_budha.jpg", "img/chakra_budha.jpg", "img/frog.jpg");
      var toolURL = new Array("inwardjourney.com/tools/meditation/", "inwardjourney.com/tools/chakras/", "inwardjourney.com/tools/principles/");
      var thisTool = 0;
      var imgCt = toolImages.length;
      function rotate() {
      if (document.images) {
      thisTool++;
      if (thisTool == imgCt) {
      thisTool = 0;
      }
      document.getElementById("tool").src=toolImages[thisTool];
      setTimeout("rotate()", 3 * 1000);
      }
      }
      function newLocation() {
document.location.href = "http://www." + toolURL[thisTool];
return false;
}
function initToolLink() {
if(document.getElementById("tool").parentNode.tagname == "A") {
document.getElementById("tool").parentNode.onclick = newLocation;}
rotate();
}
      // End hide script from old browsers -->
  </script>*/