// JavaScript Document
function adArray() { 
 for (i=0; i*2<adArray.arguments.length; i++) { 
  this[i] = new Object(); 
  this[i].src = adArray.arguments[i*2]; 
  this[i].href = adArray.arguments[i*2+1]; 
 } 
 this.length = i; 
} 
function getAdNum() { 
 dat = new Date(); 
 dat = (dat.getTime()+"").charAt(8); 
 if (dat.length == 1) 
  ad_num = dat%ads.length; 
 else 
  ad_num = 0; 
 return ad_num; 
} 
//var ads = new adArray("http://www.hopewellpresbyterian.com/images/NewLook2011/bodyChristmas1.jpg","","http://www.hopewellpresbyterian.com/images/NewLook2011/bodyChristmas2.jpg","",
//"http://www.hopewellpresbyterian.com/images/NewLook2011/bodyChristmas3.jpg","","http://www.hopewellpresbyterian.com/images/NewLook2011/bodyChristmas4.jpg","","http://www.hopewell//presbyterian.com/images/NewLook2011/bodyChristmas5.jpg","");
var ads = new adArray("http://www.hopewellpresbyterian.com/images/NewLook2011/bodyJanuary1.jpg","","http://www.hopewellpresbyterian.com/images/NewLook2011/bodyJanuary2.jpg","");
var ad_num = getAdNum(); 

document.write('<A href="'+ads[ad_num].href+'"><IMG SRC="'+ads[ad_num].src+'" ' 
+'border="0" name="adswap"></a>'); 
// You can change the height and the width of the link images above 
link_num = document.links.length-1; 

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

