var pageName;
var s;
var lastupdate;
var dayName = new Array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var monName = new Array ("January","February","March","April","May","June","July","August","September","October","November","December")
var now = new Date


//Make reference to the selected link
function makeLinkTo(s) { 
  window.top.location.href = s.options[s.selectedIndex].value;
}


function poplesson( pageName ) {
  popup=open( pageName, "popupbig", "width=400,height=300,resizeable=no" );
}


function PrintHeader () {
  document.write('<DIV ID="header">');
  document.write('<BR><BR><BR><BR><BR><BR>');
  document.write('</DIV>');
}


function PrintHomeLink () {
  document.write('<DIV ID="sectionhead">');
  document.write('<A href="http://www.audioevangelism.com">AudioEvangelism.com Main Page</A>');
  document.write('</DIV>');
}


function PrintDate () {
  document.write('<B>');
  document.write(dayName[now.getDay()] + ", " + monName[now.getMonth()] + " " + now.getDate() + ", " + now.getFullYear());
  document.write('</B>');
}


function PrintHeaderImage () {
  document.write('<DIV ID="header">');
  document.write('<IMG SRC="images/aebanner.jpg" ALT="AudioEvangelism.com Logo">');
  document.write('</DIV>');
}


function PrintHeaderImageFromSubFolder () {
  document.write('<DIV ID="header">');
  document.write('<IMG SRC="../images/aebanner.jpg" ALT="AudioEvangelism.com Logo">');
  document.write('</DIV>');
}


function PrintHeaderScripture () {

}


function PrintUpperNavigationLinks () {
  document.write('<DIV id=TopToolbar>');
  document.write('<A class=uppernav href="news_archive.htm">News Archive</A> | ');
  document.write('<A class=uppernav href="quarterlyreports/index.htm">Quarterly Reports</A> | ');
  document.write('<A class=uppernav href="about.htm">About This Work</A> | ');
  document.write('<A class=uppernav href="feedback.htm">What Others Are Saying</A> | ');
  document.write('<A class=uppernav href="links.htm">Our Favorite Links</A> | ');
  document.write('<A class=uppernav href="requestcds.htm">Request FREE CDs</A> ');
  document.write('</DIV>');
}

function PrintSUBUpperNavigationLinks () {
  document.write('<DIV id=TopToolbar>');
  document.write('<A class=uppernav href="../news_archive.htm">News Archive</A> | ');
    document.write('<A class=uppernav href="../quarterlyreports/index.htm">Quarterly Reports</A> | ');
  document.write('<A class=uppernav href="../about.htm">About This Work</A> | ');
  document.write('<A class=uppernav href="../feedback.htm">What Others Are Saying</A> | ');
  document.write('<A class=uppernav href="../links.htm">Our Favorite Links</A> | ');
  document.write('<A class=uppernav href="../requestcds.htm">Request FREE CDs</A> ');
  document.write('</DIV>');
}

function PrintNavigationLinks () {
  document.write('<DIV id=BannerToolbar>');
  document.write('<A class=topnav href="index.htm">Home</A> | ');
  document.write('<A class=topnav href="contact.htm">Contact Us</A> | ');
  document.write('<A class=topnav href="usage.htm">Usage Guidelines</A> | ');
  document.write('<A class=topnav href="subscribe.htm">Subscriptions</A> | ');
  document.write('<A class=topnav href="archives.htm">Lesson Archives</A>  ');
  document.write('</DIV>');
}

function PrintSUBNavigationLinks () {
  document.write('<DIV id=BannerToolbar>');
  document.write('<A class=topnav href="../index.htm">Home</A> | ');
  document.write('<A class=topnav href="../contact.htm">Contact Us</A> | ');
  document.write('<A class=topnav href="../usage.htm">Usage Guidelines</A> | ');
  document.write('<A class=topnav href="../subscribe.htm">Subscriptions</A> | ');
  document.write('<A class=topnav href="../archives.htm">Lesson Archives</A>  ');
  document.write('</DIV>');
}

function PrintFooter ( lastupdate ) {
  document.write('<DIV ID="footer">');
  document.write('Copyright © 2005-2012 by Audio Evangelism.');
  document.write('<BR>');
  document.write('Please abide by our <A href="usage.htm">Usage Guidelines</A>.');
  document.write('<BR>');
  document.write('All scripture quotations, unless otherwise indicated, are taken from the New King James Version&reg; (NKJV).');
  document.write('<BR>');
  document.write('NKJV Copyright &copy; 1982 by Thomas Nelson, Inc. Used by permission. All rights reserved.');
  document.write('<BR>');
  document.write('This page was last updated: ');
  document.write(lastupdate);
  document.write('</DIV>');
}


function PrintSUBFooter ( lastupdate ) {
  document.write('<DIV ID="footer">');
  document.write('Copyright © 2005-2012 by Audio Evangelism.');
  document.write('<BR>');
  document.write('Please abide by our <A href="../usage.htm">Usage Guidelines</A>.');
  document.write('<BR>');
  document.write('All scripture quotations, unless otherwise indicated, are taken from the New King James Version&reg; (NKJV).');
  document.write('<BR>');
  document.write('NKJV Copyright &copy; 1982 by Thomas Nelson, Inc. Used by permission. All rights reserved.');
  document.write('<BR>');
  document.write('This page was last updated: ');
  document.write(lastupdate);
  document.write('</DIV>');
}


function validate_email( frm, fld1, fld2 ) {
  if (fld1 != fld2) {
	alert("The email addresses you entered do not match. Please verify that you have entered the correct email address in both fields.");
  }
}



function pophelp( pageName ) {
  popup=open( "help/" + pageName + ".htm", "popupscript", "width=600,height=200,resizeable=no,scrollbars=1" );
  clean=0;  window.document.close;
}



function PrintGLOBALUpperNavigationLinks () {
  document.write('<DIV id=TopToolbar>');
  document.write('<A class=uppernav href="http://www.audioevangelism.com/news_archive.htm">News Archive</A> | ');
  document.write('<A class=uppernav href="http://www.audioevangelism.com/about.htm">About This Work</A> | ');
  document.write('<A class=uppernav href="http://www.audioevangelism.com/feedback.htm">What Others Are Saying</A> | ');
  document.write('<A class=uppernav href="http://www.audioevangelism.com/links.htm">Our Favorite Links</A> | ');
  document.write('<A class=uppernav href="http://www.audioevangelism.com/requestcds.htm">Request FREE CDs</A> ');
  document.write('</DIV>');
}


function PrintGLOBALNavigationLinks () {
  document.write('<DIV id=BannerToolbar>');
  document.write('<A class=topnav href="http://www.audioevangelism.com/index.htm">Home</A> | ');
  document.write('<A class=topnav href="http://www.audioevangelism.com/contact.htm">Contact Us</A> | ');
  document.write('<A class=topnav href="http://www.audioevangelism.com/usage.htm">Usage Guidelines</A> | ');
  document.write('<A class=topnav href="http://www.audioevangelism.com/subscribe.htm">Subscriptions</A> | ');
  document.write('<A class=topnav href="http://www.audioevangelism.com/archives.htm">Lesson Archives</A>  ');
  document.write('</DIV>');
}


function PrintOLDDailyAudioLinks ( lessondate ) {
  document.write('<A class=audiolink href="dlybrd/audio/DB_');
  document.write(lessondate);
  document.write('_24.m3u"><IMG SRC="images/blue22.jpg" BORDER=0 ALT="Click here for LOW-SPEED connections"></A>');
  document.write('&nbsp;&nbsp;&nbsp;&nbsp;');

  document.write('<A class=audiolink href="dlybrd/audio/DB_');
  document.write(lessondate);
  document.write('_48.m3u"><IMG SRC="images/red22.jpg" BORDER=0 ALT="Click here for HIGH-SPEED connections"></A>');
}

function PrintOLDWeeklyAudioLinks ( lessondate ) {
  document.write('<A class=audiolink href="sndwrds/audio/SW_');
  document.write(lessondate);
  document.write('_24.m3u"><IMG SRC="images/blue22.jpg" BORDER=0 ALT="Click here for LOW-SPEED connections"></A>');
  document.write('&nbsp;&nbsp;&nbsp;&nbsp;');

  document.write('<A class=audiolink href="sndwrds/audio/SW_');
  document.write(lessondate);
  document.write('_48.m3u"><IMG SRC="images/red22.jpg" BORDER=0 ALT="Click here for HIGH-SPEED connections"></A>');
}


function PrintLessonAudioLinks ( lessondate ) {
  document.write('<A class=audiolink href="lessons/');
  document.write(lessondate.substr(0,4));
  document.write('/audio/AE_');
  document.write(lessondate);
  document.write('_24.m3u"><IMG SRC="images/blue22.jpg" BORDER=0 ALT="Click here for LOW-SPEED connections"></A>');
  document.write('&nbsp;&nbsp;&nbsp;&nbsp;');

  document.write('<A class=audiolink href="lessons/');
  document.write(lessondate.substr(0,4));
  document.write('/audio/AE_');
  document.write(lessondate);
  document.write('_48.m3u"><IMG SRC="images/red22.jpg" BORDER=0 ALT="Click here for HIGH-SPEED connections"></A>');
}

function PrintLessonAudioLinks32 ( lessondate ) {

if (lessondate.substr(0,4) == '2012') {

  document.write('<A class=audiolink href="lessons/');
  document.write(lessondate.substr(0,4));
  document.write('/mp3/AE_');
  document.write(lessondate);
  document.write('_32.mp3"><IMG SRC="images/blue22.jpg" BORDER=0 ALT="Click here for LOW-SPEED connections"></A>');
  document.write('&nbsp;&nbsp;&nbsp;&nbsp;');

  document.write('<A class=audiolink href="lessons/');
  document.write(lessondate.substr(0,4));
  document.write('/mp3/AE_');
  document.write(lessondate);
  document.write('_64.mp3"><IMG SRC="images/red22.jpg" BORDER=0 ALT="Click here for HIGH-SPEED connections"></A>');
}

else {
  document.write('<A class=audiolink href="lessons/');
  document.write(lessondate.substr(0,4));
  document.write('/audio/AE_');
  document.write(lessondate);
  document.write('_32.m3u"><IMG SRC="images/blue22.jpg" BORDER=0 ALT="Click here for LOW-SPEED connections"></A>');
  document.write('&nbsp;&nbsp;&nbsp;&nbsp;');

  document.write('<A class=audiolink href="lessons/');
  document.write(lessondate.substr(0,4));
  document.write('/audio/AE_');
  document.write(lessondate);
  document.write('_64.m3u"><IMG SRC="images/red22.jpg" BORDER=0 ALT="Click here for HIGH-SPEED connections"></A>');
}
}
