var quotes=new Array();

quotes[0]='&quot;I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours&quot; - <i>Stephen Roberts</i>';

quotes[1]='&quot;It is said that men may not be the dreams of the Gods, but rather that the Gods are the dreams of men.&quot; - <i>Carl Sagan</i>';

quotes[2]='&quot;Religion is the sigh of the oppressed creature, the heart of a heartless world, & the soul of soulless conditions. It is the opium of the people.&quot; - <i>Karl Marx</i>';

quotes[3]='&quot;The church says the earth is flat, but I know that it is round, for I have seen the shadow on the moon, and I have more faith in a shadow than in the church.&quot; - <i>Ferdinand Magellan</i> ';

quotes[4]='&quot;I distrust those people who know so well what God wants them to do because I notice it always coincides with their own desires.&quot; - <i>Susan B. Anthony</i> ';

quotes[5]='&quot;No philosophy, no religion, has ever brought so glad a message to the world as this good news of Atheism.&quot; - <i>Annie Wood Besant</i> ';

quotes[6]='&quot;Men never commit evil so fully and joyfuly as when they do it for religious convictions.&quot; - <i>Blaise Pascal</i> ';

quotes[7]='&quot;Gods are fragile things; they may be killed by a whiff of science or a dose of common sense.&quot; - <i>Chapman Cohen</i> ';

quotes[8]='&quot;No man ever believes that the Bible means what it says; he is always convinced that it says what he means.&quot; - <i>George Bernard Shaw</i> ';

quotes[9]='&quot;As people become more intelligent they care less for preachers and more for teachers.&quot; - <i>Robert G. Ingersoll</i> ';

quotes[10]='&quot;The world holds two classes of men - intelligent men without religion, and religious men without intelligence.&quot; - <i>Abu Ala Al-Maarri</i> ';

quotes[11]='&quot;History, I believe, furnishes no example of a priest-ridden people maintaining a free civil government.&quot; - <i>Thomas Jefferson</i> ';

quotes[12]='&quot;It was, of course, a lie...I do not believe in a personal God and I have never denied this but have expressed it clearly.&quot; - <i>Albert Einstein</i> ';

quotes[13]='&quot;I have never seen the slightest scientific proof of the religious ideas of heaven and hell, of future life for individuals, or of a personal God.&quot;  - <i>Thomas Edison</i> ';

quotes[14]='&quot;In the absence of fear there is little faith.&quot; - <i>Michael Pain</i> ';

quotes[15]='&quot;A tyrant must put on the appearance of uncommon devotion to religion. Subjects are less apprehensive of illegal treatment from a ruler whom they consider to be God-fearing and pious.&quot; - <i>Aristotle, 343 B.C.</i> ';

function SetCookie (name, value) {
         var argv = SetCookie.arguments;
         var argc = SetCookie.arguments.length;
         var expires = (argc > 2) ? argv[2] : null;
         var path = (argc > 3) ? argv[3] : null;
         var domain = (argc > 4) ? argv[4] : null;
         var secure = (argc > 5) ? argv[5] : false;
         document.cookie = name + "=" + escape (value) +
         ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
         ((path == null) ? "" : ("; path=" + path)) +
         ((domain == null) ? "" : ("; domain=" + domain)) +
         ((secure == true) ? "; secure" : "");
}

function getCookieVal(offset) {
   var endstr = document.cookie.indexOf (";", offset);
   if (endstr == -1) endstr = document.cookie.length;
   return unescape (document.cookie.substring(offset, endstr));
}

function GetCookie(name) {
   var arg = name+"=";
   var alen = arg.length;
   var clen = document.cookie.length;
   var i = 0;
   while (i < clen) {
      var j = i + alen;
      if (document.cookie.substring(i, j) == arg) return getCookieVal(j);
      i = document.cookie.indexOf(" ", i) + 1;
      if (i == 0) break;
   }
   return null;
}

//if (document.images) {

  ads = new Array(1);
  ads[0] = "pics/narciso.jpg";
  //ads[1] = "pics/forum.jpg";
//}

newplace = new Array(1);
newplace[0] = "http://www.amazon.com/exec/obidos/ASIN/1932560742/spacecoastfre-20";
//newplace[1] = "forum";

var timer = null;
var counter = 0;

function banner() {
  timer=setTimeout("banner()", 5000);
  counter++;
  if (counter >= ads.length)
    counter = 0;
  //document.bannerad.src = ads[counter];
}
//window.onload='banner()'

function gothere() {
  counter2 = counter;
  window.location.href = newplace[counter2];
}

function maximizeWindow()
{
  //var wCookie = GetCookie("maxwindow");
  //if (wCookie == null)
  //{    
  //  answer = window.confirm("This website looks best when the window is set to a particular size. \n\nClick OK if you would like us to set your browser to that size when you visit it.");
  //  if (answer) wCookie = "yes";
  //  else wCookie = "no";

  //  var expDate = new Date();
  //  expDate.setTime(expDate.getTime() + (24 * 60 * 60 * 1000 * 365));
  //  SetCookie("maxwindow", wCookie, expDate);
  //}

  //if (wCookie == "yes")
  //{
  //  var width = 1024;
  //  var height = 748;
    
  //  if (width > screen.width) width = screen.width;
  //  if (height > screen.height) height = screen.height-20;
    
  //  window.moveTo(0,0);
  //  window.resizeTo(width,height);
  //}
}


function insertMenu(currentPage, path)
{
  if (path==undefined) path="";
  var menuitem = new Array(
    {name:'HOME',            link:path+'index.php',               type:'menu'}, 
    {name:'About Us',        link:path+'faq.html',                type:'submenu'},
    //{name:'Calendar',        link:path+"calendar' target='_blank'",  type:'submenu'},
    {name:'Calendar',        link:"http://atheists.meetup.com/569/calendar/list/' target='_blank'",  type:'submenu'},
    {name:'Newsletters',     link:path+'newsletters.html',        type:'submenu'},
    {name:'Contact Us',      link:path+'contact.html',            type:'submenu'},
    {name:'Join-Renew-Donate',link:path+'donate.html',            type:'submenu'},
    {name:'EDUCATION',       link:'',                        type:'menu'},
    {name:'Voter\'s Guide',link:path+'voterguide.html',         type:'submenu'},
    {name:'Your Rights',     link:path+'yourrights.html',         type:'submenu'},
    {name:'ACTIVISM',        link:'',                        type:'menu'},
    {name:'Local Issues',    link:path+'localissues.html',        type:'submenu'},
    {name:'What You Can Do', link:path+'activism.html',           type:'submenu'},
    {name:'Sign the Virtual Wall',   link:path+'brick.html',      type:'submenu'},
    {name:'COMMUNITY',       link:'',                        type:'menu'},
    //{name:'Secular Services',link:path+'services.html',         type:'submenu'},
    {name:'Local Events',    link:path+'calendar.html',           type:'submenu'},
    {name:'Message Board',   link:path+'discussion.html',         type:'submenu'},
    {name:'Local Freethinkers',link:path+'locals.html',           type:'submenu'},
    {name:'FUN STUFF',       link:'',                        type:'menu'},
    {name:'Videos',          link:"http://youtube.com/profile?user=scfreethought' target='_blank'",             type:'submenu'},
    {name:'Cartoons',        link:path+'blackandblue.html',       type:'submenu'},
    {name:'Stuff to Buy',    link:path+'store.html',              type:'submenu'});

  var mClass;
  var mColumn;
  
  document.write("<div id='scfamenu'>");
  document.write("<table border=0 cellpadding=2 cellspacing=1 width=140");//100%>");
  for (var i in menuitem) 
  {
    if (currentPage != menuitem[i].name) mClass=menuitem[i].type;
    else                                 mClass=menuitem[i].type+"_highlight";

    link = menuitem[i].link;
    if (link != "") linkhtml="<a class='" + mClass + "' href='" 
        + menuitem[i].link + "'>" + menuitem[i].name + "</a>";
    else            linkhtml=menuitem[i].name;    

    if (menuitem[i].type == "menu")
      document.write("<tr valign='top'><td align='left' class='" 
        + mClass + "'>" + "&nbsp;" + linkhtml + "</td></tr>");
    else                           
      document.write("<tr valign='top'><td align='left' class='" 
        + mClass + "'>" + "&nbsp;&nbsp;&nbsp;" + linkhtml + "</td></tr>");
  }
  document.write("</table>");
  document.write("</div>");
}

function insertTitle(path)
{
  if (path==undefined) path="";
  document.write("<div id='scfatitle'>");
  document.write("<table border=0><tr><td valign='top'><table><tr><td style='white-space: nowrap;' align='center' valign='top' class='title'><font style='font-family:comic sans ms;'>");
  document.write("Space Coast Freethought Association");
  document.write("</font></td></tr>");
  document.write("<tr><td align='center' valign='top'>");
  document.write("<b><font style='font-family:verdana; font-variant:small-caps; color:#A5D6FF'>A group of atheists, agnostics, and other rationalists in Brevard County, FL</font></b><br><img height=5 width=640 src='"+path+"pics/light_blue.gif' border=0 style='padding: 0px; margin: 0 0 0 0;'>");
  document.write("</td></tr></table></td></tr>");
  document.write("<tr><td align='center' valign='top'>");
  //document.write("<a href='javascript:gothere()'><IMG SRC='"+path+"pics/narciso.jpg' WIDTH=468 HEIGHT=60 BORDER=0 NAME='bannerad'></a>");
  document.write("<table border=0 width=640 cellpadding=2 cellspacing=0>");
  document.write("<tr><td align=center><div class='quote'>");
  //document.write("<script type='text/JavaScript' src='"+path+"freethoughtquote.js'></script>");
  document.write("<script type='text/JavaScript'>document.write(quotes[Math.floor(Math.random()*(quotes.length))]);</script>");
  document.write("</div></td></tr></table>");
  document.write("</td></tr></table>");
  document.write("</div>");
}

function insertLogo(path)
{
  if (path==undefined) path="";
  document.write("<div id='scfalogo'>");
  document.write("<table width=130 height=130 border=0 cellpadding=0 cellspacing=0><tr><td valign='top' align=center>");
  document.write("<a href='"+path+"index.php'><img height=123 width=123 src='"+path+"pics/scfa_logo_blackbg.gif' border=0 ></a>");
  document.write("</td></tr></table>");
  document.write("</div>");
}

function insertCounter()
{
  document.write("<img src='http://visit.geocities.com/counter.gif?B=ff00ff&d=216&f=3&l=2&C=1'>");
}

function insertBodyHeader(currentPage, path)
{
  if (path==undefined) path="";
  document.write("<table cellpadding=5 width=100%>");// height=100%>");

  document.write("<tr valign=top><td valign=top align=center width=1%>");// width=140>");
  insertLogo(path);
  document.write("</td><td valign=top align=left>");
  insertTitle(path);
  document.write("</td></tr><tr valign=top><td valign=top align=left>");
  insertMenu(currentPage);
  insertAU(path);
  insertCounter();
  document.write("</td><td valign=top>");
}

function insertAU(path)
{
  if (path==undefined) path="";
  document.write("<div id='scfaau'>");
  document.write("<table width=100%><tr><td align=center><a href='http://au.org'><img src='"+path+"pics/au_black.gif' style='border-style:none'></img></a></td></tr><tr><td align=center><font color=white>Associate Group</font></td></tr></table>");
  document.write("</div>");
}

function insertBodyHeader2(path)
{
  if (path==undefined) path="";
  document.write("<table cellpadding=5 width=100%>");// height=100%>");
  document.write("<tr valign=top><td valign=top align=center width=140>");
  insertLogo(path);
  document.write("</td><td valign=top align=left>");
  insertTitle(path);
  document.write("</td></tr>");
  document.write("</table>");
}

function insertViewportHeader()
{  
  document.write("<div id='print_div' style='background-color:#e0ffff;padding:5px;' class='white'>");
  document.write("<table width=100% border=0 cellpadding=2 cellspacing=0><tr><td valign=top>");
}

function insertViewportFooter()
{
  document.write("</td></tr></table></div>");
}

function insertBodyFooter()
{
  document.write("</td></tr></table>");
}
