
var adImages = new Array( 'ad4.gif','ad2.gif');
var adLink = new Array('www.thebreez.com','www.lakecycle.com');

var adImagesTwo = new Array( 'ad16.jpg','ad5.jpg','ad11.jpg');
var adLinkTwo = new Array('mailto:millie.hamilton@anthem.com','http://www.multi-mediamusic.com','http://www.homes20.com');

var adImagesThree = new Array ('ad9.jpg','ad9.jpg');
var adLinkThree = new Array('www.joeyedwin.com','');


var adImagesFour = new Array ('ad12.gif','ad18.gif');
var adLinkFour = new Array('','');

var adImagesFive = new Array( 'ad6.jpg','ad16.jpg','ad5.jpg','ad11.jpg');
var adLinkFive = new Array('www.thebreezeshowcase.com','','www.multi-mediamusic.com','www.homes20.com');



var topAd = 0;
var adCt = adImagesTwo.length;


var thisAd = 0;
var imgCt = adImages.length;

var sideAd = 0;
var sAdCt = adImagesThree.length;

var lowerAd = 0;
var lAdCt = adImagesFour.length;

var topAd5 = 0;
var adCt5 = adImagesFive.length;



function rotate(){

   if(document.images){
     thisAd++;
     if(thisAd == imgCt){
    thisAd = 0;
     }

     document.getElementById('adImage').src = adImages[thisAd];
     if(adLink[thisAd] !=''){
      document.getElementById('imgLink').href ="http://"+adLink[thisAd]; 
     }else{
       document.getElementById('imgLink').href="#";
     }
    
     
    setTimeout("rotate()", 10000);
  }

}//end function




function topRotate()
{
    if(document.images){  
  topAd++;
  if(topAd == adCt){
    topAd = 0;
  }
  document.getElementById('adImageTwo').src = adImagesTwo[topAd];
  
  if(adLinkTwo[topAd] !=''){
    
    document.getElementById('adLinkTwo').href=adLinkTwo[topAd];
       }else{
      document.getElementById('adLinkTwo').href="#";
       }
    

  setTimeout("topRotate()", 13000);
  }


}


function sideRotate()
{
    if(document.images){  
  sideAd++;
  if(sideAd == sAdCt){
    sideAd = 0;
  }
  document.getElementById('adImageThree').src = adImagesThree[sideAd];
  
  if(adLinkThree[sideAd] !=''){
    document.getElementById('imgLinkThree').href="http://"+adLinkThree[sideAd];
  }else{
      document.getElementById('imgLinkThree').href="#";
  }
  setTimeout("sideRotate()", 10000);
  
  
  }

}


function lowerRotate()
{
    if(document.images){  
  lowerAd++;
  if(lowerAd == lAdCt){
    lowerAd = 0;
  }
  document.getElementById('adImageFour').src = adImagesFour[lowerAd];
  
  if(adLinkFour[lowerAd] !=''){
  document.getElementById('imgLinkFour').href="http://"+adLinkFour[lowerAd];
}else{
  document.getElementById('imgLinkFour').href="#";
}

  setTimeout("lowerRotate()", 16000);
  }


}


function topRotate5()
{
    if(document.images){  
  topAd5++;
  if(topAd5 == adCt5){
    topAd5 = 0;
  }
  document.getElementById('adImageFive').src = adImagesFive[topAd5];
  
  if(adLinkTwo[topAd] !=''){
    
    document.getElementById('adLinkFive').href="http://"+adLinkFive[topAd5];
       }else{
      document.getElementById('adLinkFive').href="#";
       }
    

  setTimeout("topRotate5()", 13000);
  }


}


  function init() {
       // quit if this function has already been called
       if (arguments.callee.done) return;

       // flag this function so we don't do the same thing twice
       arguments.callee.done = true;


    rotate();
    topRotate();
    sideRotate();
    lowerRotate();

   }

function init2(){

    topRotate5();

}