// This is the script file for the main page


window.onload = MapButtons;
var ButtonsPerPage = 8;
var MouseoverImages = new Array(
		// First page of buttons
		"images/BigButtons/AboutButtonOn.png",
		"images/BigButtons/CatalogButtonOn.png",
		"images/BigButtons/AudioSamplesButtonOn.png",
		"images/BigButtons/ScoreSamplesButtonOn.png",
		"images/BigButtons/PhotographyButtonOn.png",
		"images/BigButtons/InterestButtonOn.png",        
		"images/BigButtons/WorkingButtonOn.png",
		"images/BigButtons/ContactButtonOn.png"
);

var MouseoutImages = new Array(
		// First page of buttons
		"images/BigButtons/AboutButton.png",
		"images/BigButtons/CatalogButton.png",
		"images/BigButtons/AudioSamplesButton.png",
		"images/BigButtons/ScoreSamplesButton.png",
		"images/BigButtons/PhotographyButton.png",
		"images/BigButtons/InterestButton.png",        
		"images/BigButtons/WorkingButton.png",
		"images/BigButtons/ContactButton.png"
);


///////////////////////////////////////////////////////////////////////////////////////
// These functions are mapped to the buttons and are called when the button is clicked
///////////////////////////////////////////////////////////////////////////////////////
var ClickFunctions = new Array(
		// First page of buttons
		ClickAbout,
		ClickCatalog,
		ClickAudioSamples,
		ClickScoreSamples,
		ClickPhotography,
        ClickInterest,
		ClickWorking,
		ClickContact
);


function ClickAbout()
{
  top.location.href = "About/index.html";
  return false;
}

function ClickCatalog()
{
  top.location.href = "Catalog/index.html";
  return false;
}
function ClickAudioSamples()
{
  top.location.href = "Audio/index.html";
  return false;
}
function ClickScoreSamples()
{
  top.location.href = "ScoreSamples/index.html";
return false;
}
function ClickContact()
{
  top.location.href = "Contact/index.html";
  return false;
}

function ClickPhotography()
{
  top.location.href = "Photography/index.html";
  return false;
}
function ClickInterest()
{
  top.location.href = "Interests/index.html";
  return false;
}
function ClickWorking()
{
  top.location.href = "Working/index.html";
  return false;
}

function Mouseover(Index)
{
  ButtonID = 'Button'+Index;
  document.getElementById(ButtonID).src=MouseoverImages[Index];
  return false;
}

function Mouseout(Index)
{
  ButtonID = 'Button'+Index;
  document.getElementById(ButtonID).src=MouseoutImages[Index];
  return false;
}

function Mouseclick(Index)
{
  ClickFunctions[Index]();
  return false;
}

function MapButtons()
{
    for (TempButtonID = 0; TempButtonID < ButtonsPerPage; TempButtonID++)
    {
	  ButtonID = 'Button'+TempButtonID;
	  document.getElementById(ButtonID).src=MouseoutImages[TempButtonID];
    }
	return false;
}
