var selectedpic = 'none';
var hoverpic = 'none';
var keeptime = 0;
var t;
var flag = 0;

function bgChange(button) {
  document.getElementById(button).style.backgroundImage = "url('/images/translucent.png')";
  document.getElementById(button).style.color = '#000000';
  document.getElementById(button).style.textShadow = '2px 2px 2px white';
}

function selectedButton(button) {
  document.getElementById(button).style.backgroundImage = "url('/images/button.png')";
  document.getElementById(button).style.color = '#FFFFFF';
  document.getElementById(button).style.textShadow = '2px 2px 2px black';
}

function welcome_load() {
  if (flag != 1) {
    document.getElementById('boximage').innerHTML = '<iframe width="307" height="230" src="http://www.youtube.com/embed/0u4YKBrSV90" frameborder="0" allowfullscreen></iframe>';
    document.getElementById('boxtext').innerHTML = '<h3>Welcome!</h3> <p>We are a church in Boston with a passion to minister to the many college students of this city.  Please take time to browse through our site and learn more about us. <a href="http://www.symphonychurch.com/about.php">Click here!</a><br><br><br><a href="http://www.symphonychurch.com/service.php"><div style="color:red; font-size:18px; text-decoration:none;"><strong></strong></div></a></p>';
    selectedButton('wel');
	bgChange('mult');
	bgChange('min');
	bgChange('sermon_series');
	bgChange('ann');
	flag = 1;
  }
}
/*
function service_load() {
  if (flag != 2) {
    document.getElementById('boximage').innerHTML = '<img src="/images/map.png" border="0">';
	document.getElementById('boxtext').innerHTML = '<h3>Join Us on Sundays!</h3><p>We meet at 11AM on Sundays at the MATCH School, conveniently located on BU&#146;s campus. Click <a href="http://www.symphonychurch.com/service.php">here</a> for more information!<br><br><br><strong>MATCH Public Charter School</strong><br>1001 Commonwealth Ave<br>Boston, MA 02215</p>';
    selectedButton('serv');
	bgChange('wel');
	bgChange('ann');
	bgChange('mult');
	bgChange('min');
	flag = 2;
  }
}
*/

function passion_load() {
  if (flag != 2) {
    document.getElementById('boximage').innerHTML = '<img src="/images/lent.jpg" border="0">';
	document.getElementById('boxtext').innerHTML = '<h3>Passion Week!</h3><p>Now that we have completed our Lent devotional readings, we now are turning to another set of readings specifically for Passion Week. Follow along with the seven sayings of Jesus on the cross (one saying for each day of the week).  Additionally, there are supplementary readings for each day. You can find the readings <a href="http://www.symphonychurch.com/Seven Sayings.pdf">here</a>.</p>';
    selectedButton('passionwk');
	bgChange('wel');
	bgChange('ann');
	bgChange('easter');
	bgChange('goodfriday');
	flag = 2;
  }
}

function goodFriday_load() {
  if (flag != 3) {
    document.getElementById('boximage').innerHTML = '<img src="/images/goodfridaymap.jpg" border="0">';
	document.getElementById('boxtext').innerHTML = '<h3>Good Friday!</h3><p>Please join us as we remember Jesus&#146;s sacrifice on the cross.  We will be holding the service at <strong>7PM at the Hilton Back Bay</strong> (40 Dalton Street, Boston, Massachusetts 02115).  The best way to get there is to take the Green Line B, C, or D to the Hynes Convention Center T stop, walk along Boylston St toward Boston and turn right onto Dalton St.</p>';
    selectedButton('goodfriday');
	bgChange('passionwk');
	bgChange('wel');
	bgChange('easter');
	bgChange('ann');
	flag = 3;
  }
}

function easter_load() {
  if (flag != 4) {
    document.getElementById('boximage').innerHTML = '<img src="/images/passionweek.jpg" border="0">';
	document.getElementById('boxtext').innerHTML = '<h3>He is Risen!</h3><p>Easter is coming soon and we hope you will join us to celebrate the resurrection of our Lord and Savior Jesus Christ!  This service will be at <strong>11AM at the Match School</strong> (1001 Commonwealth Ave, Boston, MA 02215) on Easter Sunday.</p>';
    selectedButton('easter');
	bgChange('wel');
	bgChange('ann');
	bgChange('passionwk');
	bgChange('goodfriday');
	flag = 4;
  }
}

function sermon_load() {
  if (flag != 2) {
    document.getElementById('boximage').innerHTML = '<img src="/images/sotm.png" border="0">';
	document.getElementById('boxtext').innerHTML = '<h3>The Talk that Changed the World!</h3><p>Two thousand years ago, a rabbi named Jesus preached a sermon from a mountain that set the course of the world in a different direction.  For the next few months, Pastor Barry will be preaching through this sermon, the Sermon on the Mount. Come and learn with us as we study this passage from the Gospel of Matthew. You can also <a href="http://www.symphonychurch.com/multimedia.php?load=sermons">listen online!</a></p>';
    selectedButton('sermon_series');
	bgChange('mult');
	bgChange('min');
	bgChange('ann');
	bgChange('wel');
	flag = 2;
  }
}

/*
function sermon_load() {
  if (flag != 2) {
    document.getElementById('boximage').innerHTML = '<img src="/images/xmas.png" border="0">';
	document.getElementById('boxtext').innerHTML = '<h3>Christmas is Coming!</h3><p>What better way to honor the coming of our Savior then to look forward to His Second Coming? During this three week series, starting on December 4th, Pastor Barry will talk about what will happen when Jesus comes again. Come and listen! You can also <a href="http://www.symphonychurch.com/multimedia.php?load=sermons">listen online!</a></p>';
    selectedButton('sermon_series');
	bgChange('mult');
	bgChange('min');
	bgChange('ann');
	bgChange('wel');
	flag = 2;
  }
}
*/

function retreat_load() {
  if (flag != 2) {
    document.getElementById('boximage').innerHTML = '<img src="/images/college_retreat.png" border="0">';
	document.getElementById('boxtext').innerHTML = '<h3>Fall College Retreat!</h3><p>Fall is approaching and there is lots to be excited for! But what to be most excited for is Symphony&#146;s first ever Fall College Retreat! The retreat will be held the weekend of Sep 30-Oct 2.  Click <a href="http://www.symphonychurch.com/retreat/info.php">here</a> for more information.  We are offering online registration for this retreat, so <a href="http://www.symphonychurch.com/retreat">sign up today</a> for the best price!</p>';
    selectedButton('sermon_series');
	bgChange('mult');
	bgChange('min');
	bgChange('ann');
	bgChange('wel');
	flag = 2;
  }
}

function announcements_load() {
  if (flag != 4) {
    document.getElementById('boximage').innerHTML = '<embed type="application/x-shockwave-flash" src="http://picasaweb.google.com/s/c/bin/slideshow.swf" width="400" height="267" flashvars="host=picasaweb.google.com&hl=en_US&feat=flashalbum&RGB=0x000000&feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2F101297903852223313654%2Falbumid%2F5510677547336332545%3Falt%3Drss%26kind%3Dphoto%26hl%3Den_US" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';
	document.getElementById('boxtext').innerHTML = '<h3>Announcements!</h3><p>We have many events coming up.  Please check out our <a href="http://www.symphonychurch.com/calendar.php">schedule of events</a> and see what fun things are going on at Symphony!<br><br><br><br><a href="http://www.symphonychurch.com/service.php"><div style="color:red; font-size:18px; text-decoration:none;"><strong></strong></div></a></p>';
    selectedButton('ann');
	bgChange('mult');
	bgChange('min');
	bgChange('sermon_series');
	bgChange('wel');
	flag = 4;
  }
}

/*function retreat_load() {
  if (flag != 4) {
    document.getElementById('boximage').innerHTML = '<img src="/images/retreat.jpg" border="0">';
	document.getElementById('boxtext').innerHTML = '<h3>The Winter Retreat is Coming!</h3><p>The first Symphony Winter Retreat is coming soon!  Please register at the next Sunday service!  Check the <a href="http://www.symphonychurch.com/retreat.php">retreat page</a> for more information!</p>';
    selectedButton('retreat');
	bgChange('serv');
	bgChange('ann');
	bgChange('wel');
	bgChange('min');
	flag = 4;
  }
}
*/

function lent_load() {
  if (flag != 3) {
    document.getElementById('boximage').innerHTML = '<img src="/images/lent.jpg" border="0">'; //'<img src="/images/headphones.png" border="0">';
	document.getElementById('boxtext').innerHTML = '<h3>Lent has begun!</h3><p>Prayerfully consider joining us in observing this Lenten season by giving up something to help you focus on Jesus in preparation for Easter.  Also, we encourage you to follow along with our Lent <a href="http://symphonychurch.com/Lent 2011.pdf">Scripture reading plan</a>, that the Lord might speak to us together as a church, and grow us in our relationship with him. See our new <a href="http://blog.symphonychurch.com">blog</a> as Pastor Barry and other leaders write daily on the Scripture readings.</p>';
	//'<h3>Watch, Look, Listen!</h3><p>Check out the <a href="http://www.symphonychurch.com/multimedia.php">sights and sounds</a> of Symphony Church!  Peruse our pictures and videos, or listen to a sermon by Pastor Barry!<br><br><br><br><a href="http://www.symphonychurch.com/service.php"><div style="color:red; font-size:18px; text-decoration:none;"><strong></strong></div></a></p>';
    selectedButton('mult');
	bgChange('min');
	bgChange('ann');
	bgChange('wel');
	//bgChange('min');
	flag = 3;
  }
}

function multimedia_load() {
  if (flag != 5) {
    document.getElementById('boximage').innerHTML = '<img src="/images/headphones.png" border="0">';
	document.getElementById('boxtext').innerHTML = '<h3>Watch, Look, Listen!</h3><p>Check out the <a href="http://www.symphonychurch.com/multimedia.php">sights and sounds</a> of Symphony Church!  Peruse our pictures and videos, or listen to a sermon by Pastor Barry!<br><br><br><br><a href="http://www.symphonychurch.com/service.php"><div style="color:red; font-size:18px; text-decoration:none;"><strong></strong></div></a></p>';
    selectedButton('mult');
	bgChange('min');
	bgChange('ann');
	bgChange('wel');
	bgChange('sermon_series');
	flag = 5;
  }
}

/*function ministries_load() {
  if (flag != 5) {
    document.getElementById('boximage').innerHTML = '<img src="/images/Ministry_Teams.png" border="0">';
	document.getElementById('boxtext').innerHTML = '<h3>Get Involved!</h3><p>Have any special gifts or talents?  There is probably a ministry team for you!  <a href="http://www.symphonychurch.com/ministries.php">Learn more</a> about the different ways to serve at Symphony!<br><br><br><br><a href="http://www.symphonychurch.com/service.php"><div style="color:red; font-size:18px; text-decoration:none;"><strong></strong></div></a></p>';
    selectedButton('min');
	bgChange('sermon_series');
	bgChange('ann');
	bgChange('mult');
	bgChange('wel');
	flag = 5;
  }
} */

/*
function ministries_load() {
  if (flag != 5) {
    document.getElementById('boximage').innerHTML = '<img src="/images/ami_rev.jpg" border="0">';
	document.getElementById('boxtext').innerHTML = '<h3>AMI Revolution!</h3><p>The AMI (Acts Ministries International) churches will get together in Philadelphia for our annual college student conference during June 23-26.  This conference will provide a great opportunity to join in worship with fellow believers from around the country.  Check out the <a href="http://www.amirevolution.com">website</a> to sign up and find more details.</p>';
    selectedButton('min');
	bgChange('sermon_series');
	bgChange('ann');
	bgChange('mult');
	bgChange('wel');
	flag = 5;
  }
}
*/

function ministries_load() {
  if (flag != 3) {
    document.getElementById('boximage').innerHTML = '<img src="/images/morning_prayer.png" border="0">';
	document.getElementById('boxtext').innerHTML = '<h3>Morning Prayer!</h3><p>There is no better way to start your day then in prayer with God!  Join us on Wednesdays and Fridays at 7AM for an hour of individual and group prayer.  We meet at Ruggles Baptist Church, located at 874 Beacon Street, Boston.</p>';
    selectedButton('min');
	bgChange('sermon_series');
	bgChange('ann');
	bgChange('mult');
	bgChange('wel');
	flag = 3;
  }
}

/*function ministries_load() {
  if (flag != 5) {
    document.getElementById('boximage').innerHTML = '<a href="/calendar.php"><img src="/images/openhouse.png" border="0"></a>';
	document.getElementById('boxtext').innerHTML = '<h3>Open House!</h3><p>To kick off the new school year, Symphony will be hosting a number of events during September.  We are calling this Open House because we hope many newcomers will come and see what we are all about.  So, check out the events that are coming and be sure to invite your friends out!</p>';
    selectedButton('min');
	bgChange('sermon_series');
	bgChange('ann');
	bgChange('mult');
	bgChange('wel');
	flag = 5;
  }
}*/

function preloader() {
  var i = 0;
  imageObj = new Image();
  images = new Array();
  images[0] = "/images/morning_prayer.png";
  images[1] = "/images/headphones.png";
  //images[2] = "/images/passionweek.jpg";
  //images[3] = "/images/lent.jpg";
  images[2] = "/images/translucent.png";
  //images[5] = "/images/retreatpage.jpg";
  images[3] = "/images/pbarryandfamily.png";
  //images[4] = "/images/Ministry_Teams.jpg";
  images[4] = "/images/sotm.png";
  for(i=0; i<=4; i++) {
    imageObj.src = images[i];
  }
}

function initialize() {
  welcome_load();
}
	
	
    


