
// original content taken from Nic's JavaScript Page with permission
// lack of these three lines will result in copyright infringment
// made by: Nic's JavaScript Page - http://www.javascript-page.com


var currentdate = 0;
var core = 0;

function initArray() {

this.length = initArray.arguments.length;
  for (var i = 0; i < this.length; i++) {
  this[i] = initArray.arguments[i];
  }
}
var max_textads = 1;
var max_imgads = 1;
var textads = new Array();
var imgads = new Array();
var final_ad = "";

var img_front = "";
var img_back = "";

var text_front = "<div style='background-color:#F9E9C4;FONT-SIZE:10px;color:#000000;padding:5px;margin-bottom:10px;width:110px;'>";
var text_back = "</div>";

textads[1] = "<div style='FONT-SIZE:11px;'><b>FREE e-Publications!</b></div><br><a href='http://www.kintera.org/site/lookup.asp?c=aqKFLTOBIpH&amp;b=1108041&utm_source=LeftAdT&utm_medium=banner'>Sign up</a> for <i>PeaceMeal</i> or one of or our other FREE e-publications today!";
textads[0] = "<div style='FONT-SIZE:11px;'><b>Bookstore</b></div><br>Visit our <a href='http://bookstore.peacemaker.net/resources/index.php?utm_source=LeftAdT&utm_medium=banner' target='_blank'>online bookstore</a> for many great resources on biblical peacemaking. ";
textads[2] = "<div style='FONT-SIZE:11px;'><b>Training Near You</b></div><br>Check our <a href='http://www.kintera.org/site/c.aqKFLTOBIpH/b.1118441/k.4FBE/Master_Event_Calendar.htm?utm_source=LeftAdT&utm_medium=banner'>event schedule</a> for upcoming peacemaking events in your area.";
textads[3] = "<div style='FONT-SIZE:11px;'><b>Partner with Us</b></div><br>If you have been blessed by this ministry, would you consider <a href='https://www.kintera.org/site/c.aqKFLTOBIpH/b.1075523/k.8340/Make_a_Donation/apps/ka/sd/default.asp?utm_source=LeftAdT&utm_medium=banner'>making a donation</a> today to support the work of peacemaking around the world?";
textads[4] = "<div style='FONT-SIZE:11px;'><b>Key Resource</b></div><br>To get your church started on the journey toward a culture of peace, visit the <a href='http://www.peacemaker.net/site/c.aqKFLTOBIpH/b.2837365/k.65C1/The_Peacemaking_Church.htm?utm_source=LeftAdT&utm_medium=banner'>Peacemaking Church</a> section of this website.";
textads[5] = "<div style='FONT-SIZE:11px;'><b>Peacemaking Teams</b></div><br>Develop an ongoing ministry of peacemaking at your church. Find out how in the <a href='http://www.peacemaker.net/site/c.aqKFLTOBIpH/b.2859109/k.A474/Peacemaking_Teams.htm?utm_source=LeftAdT&utm_medium=banner'>Peacemaking Teams</a> section of the website.";
textads[6] = "<div style='FONT-SIZE:11px;'><b>Route 5:9</b></div><br>Check out the scenery on <a href='http://www.route59.org'>Route 5:9</a>, the official blog of Peacemaker Ministries.";


imgads[0] = "<a href='http://www.peacemaker.net/site/c.aqKFLTOBIpH/b.5461095/k.9748/The_Leadership_Opportunity.htm?utm_source=LeftAdG&utm_medium=banner' target='_blank'><img src='/atf/cf/{1aae2d45-395c-4a44-910e-2c81f149f8e1}/SIDEBAR-AD-TLO.GIF' border=0 alt='The Leadership Opportunity'></a>";
imgads[1] = "<a href='http://www.peacemaker.net/site/lookup.asp?c=aqKFLTOBIpH&b=2837365&utm_source=LeftAdG&utm_medium=banner' target='_blank'><img src='/atf/cf/{1AAE2D45-395C-4A44-910E-2C81F149F8E1}/LEFT-PCRS.GIF' border=0 alt='Peacemaking Church Resource Set'></a>";
imgads[2] = "<a href='http://www.peacemaker.net/site/lookup.asp?c=aqKFLTOBIpH&b=2892589&utm_source=LeftAdG&utm_medium=banner' target='_blank'><img src='/atf/cf/{1AAE2D45-395C-4A44-910E-2C81F149F8E1}/LEFT-SGS.GIF' border=0 alt='Small Group Study'></a>";
imgads[3] = "<a href='http://www.peacemaker.net/site/c.aqKFLTOBIpH/b.4439585/k.A957/Peacemaking_Church_Womens_Study_Living_the_Gospel_in_Relationships.htm?utm_source=LeftAdG&utm_medium=banner' target='_blank'><img src='/atf/cf/{1aae2d45-395c-4a44-910e-2c81f149f8e1}/SIDEBAR-WOMENS-STUDY.GIF' border=0 alt='Women's Study'></a>";


var currentdate = new Date();
var core = currentdate.getSeconds() % textads.length;
var core2 = currentdate.getSeconds() % imgads.length;



 for (var i = 0; i<max_textads; i++){
              final_ad = final_ad + text_front + textads[core+i] + text_back;
       if (core + i == textads.length - 1){
             core = core - textads.length;}}

 for (var i = 0; i<max_imgads; i++){
              final_ad = final_ad + img_front + imgads[core2+i] + img_back;
       if (core2 + i == imgads.length - 1){
             core2 = core2 - imgads.length;}}



document.write(final_ad);