//
//  Script Name:     fcfmenus.js
//  Author:          Pat Patterson
//  Date Written:    10/24/09
//  Remarks:
//       This script is used to load the page up with the menu items as well as
//       the code needed to mouseover the menu items for effects.
//------------------------------------------------------------------------------

//  Load Image Files
homein = new Image()
homein.src = '/images/FCFHome2.jpg'
homeout = new Image()
homeout.src = '/images/FCFHome.jpg'
staffin = new Image()
staffin.src = '/images/FCFStaff2.jpg'
staffout = new Image()
staffout.src = '/images/FCFStaff.jpg'
histin = new Image()
histin.src = '/images/FCFHist2.jpg'
histout = new Image()
histout.src = '/images/FCFHist.jpg'
minin = new Image()
minin.src = '/images/FCFMin2.jpg'
minout = new Image()
minout.src = '/images/FCFMin.jpg'
calin = new Image()
calin.src = '/images/FCFCal2.jpg'
calout = new Image()
calout.src = '/images/FCFCal.jpg'
knowin = new Image()
knowin.src = '/images/FCFInfo2.jpg'
knowout = new Image()
knowout.src = '/images/FCFInfo.jpg'
worin = new Image()
worin.src = '/images/FCFWor2.jpg'
worout = new Image()
worout.src = '/images/FCFWor.jpg'
aboutin = new Image()
aboutin.src = '/images/FCFAbout2.jpg'
aboutout = new Image()
aboutout.src = '/images/FCFAbout.jpg'

//  This function will be used for the onmouseover and onmouseout events
function roll(ImgName, OpCode)
{
   if(OpCode == 'I')
	    document.getElementById(ImgName).src = eval(ImgName + 'in.src')
	 else
	    document.getElementById(ImgName).src = eval(ImgName + 'out.src')			
}

//  This function will paint the initial menus onto the page
function loadMenus()
{
   document.getElementById('menu').innerHTML = '<table align="left" cellpadding="0" cellspacing="0" border="3" width="190" height="650" style="background-image: url(/Side.jpg)"<!--border="3"-->'
	    + '<tr>'
      + '<td valign=top align=center>'
			+ '<br>'
      + '<a href="/index.html"><img id="home" src="/images/FCFHome.jpg" onmouseover="roll(\'home\', \'I\')" onmouseout="roll(\'home\', \'O\')"></img></a><br/><br/>'
      + '<a href="/StaffFCF.html"><img id="staff" src="/images/FCFStaff.jpg" onmouseover="roll(\'staff\', \'I\')" onmouseout="roll(\'staff\', \'O\')"></img></a><br/><br/>'
      + '<a href="/HistFCF.html"><img id="hist" src="/images/FCFHist.jpg" onmouseover="roll(\'hist\', \'I\')" onmouseout="roll(\'hist\', \'O\')"></img></a><br/><br/>'
      + '<a href="/MinistryFCF.html"><img id="min" src="/images/FCFMin.jpg" onmouseover="roll(\'min\', \'I\')" onmouseout="roll(\'min\', \'O\')"></img><br/><br/>'
      + '<a href="/cgi-bin/calendar.cgi"><img id="cal" src="/images/FCFCal.jpg" onmouseover="roll(\'cal\', \'I\')" onmouseout="roll(\'cal\', \'O\')"></img></a><br/><br/>'
      + '<a href="/KnowFCF.html"><img id="know" src="/images/FCFInfo.jpg" onmouseover="roll(\'know\', \'I\')" onmouseout="roll(\'know\', \'O\')"></img></a><br/><br/>'
      + '<a href="/WorshipFCF.html"><img id="wor" src="/images/FCFWor.jpg" onmouseover="roll(\'wor\', \'I\')" onmouseout="roll(\'wor\', \'O\')"></img></a><br/><br/>'
      + '<a href="/AboutFCF.html"><img id="about" src="/images/FCFAbout.jpg" onmouseover="roll(\'about\', \'I\')" onmouseout="roll(\'about\', \'O\')"></img></a><br/><br/>'
      + '</td>'
      + '</tr>'
      + '</table>'
}	 
