// JavaScript Document
function ad2Array() { 
 for (i=0; i*2<ad2Array.arguments.length; i++) { 
  this[i] = new Object(); 
  this[i].src = ad2Array.arguments[i*2]; 
  this[i].href = ad2Array.arguments[i*2+1]; 
 } 
 this.length = i; 
} 
function getAd2Num() { 
 dat2 = new Date(); 
 dat2 = (dat2.getTime()+"").charAt(8); 
 if (dat2.length == 1) 
  ad2_num = dat2%ads2.length; 
 else 
  ad2_num = 0; 
 return ad2_num; 
} 
/* took this one out "images/ads/foothillbridalmagazine2.jpg","http://www.foothillsbridalmagazine.com",*/
var ads2 = new ad2Array( 
"images/ads/awhconstructionAD.jpg","",
"images/ads/fairfieldchapelAD.jpg","http://www.fairfieldmountainschapel.org/"
); 

var ad2_num = getAd2Num(); 

document.write('<A href="'+ads2[ad2_num].href+'" target="_blank"><IMG SRC="'+ads2[ad2_num].src+'" ' 
+'border="0" name="ads2wap"></a>'); 
// You can change the height and the width of the link images above 

link_num2 = document.links.length-1; 

function rotateSponsor2() { 
 if (document.images) { 
  ad2_num = (ad2_num+1)%ads2.length; 
  document.ads2wap.src = ads2[ad2_num].src; 
  document.links[link_num2].href = ads2[ad2_num].href; 
  setTimeout("rotateSponsor2()",5000); 
 } 
} 
setTimeout("rotateSponsor2()",5000); 
// Change both the 4000s above to how long you want to show the banner 
// 4000 is 4 seconds, 5000 would be 5 seconds  

