﻿var pics = new Array();

var captions = new Array();
var speed = 5000;
var pictureBox;

pics[1] = '../Image/Heading1.png';
pics[2] = '../Image/Heading2.png';
pics[3] = '../Image/Heading3.png';

var i = 1;
var count = pics.length - 1;


function runSlideShow() 
{
  
   pictureBox = document.getElementById("HomePagePictures");
    
     if (pictureBox != null)
    {
  
        if (document.all)
        {
              pictureBox.style.filter="blendTrans(duration=6)";
            pictureBox.style.filter = "blendTrans(duration=CrossFadeDuration)";
            pictureBox.filters.blendTrans.Apply();
            
        }

        pictureBox.src = pics[i];

        if (document.all)
        {
            pictureBox.filters.blendTrans.Play();
        }

        i = i + 1;

        if (i > count)
        {
            i = 1;
        }

        setTimeout('runSlideShow()', speed);

        speed = 5000;
    }
    
     
}


function toggleDiv(divID1, divID2)
{
    var div1 = document.getElementById(divID1);
    var div2 = document.getElementById(divID2);

    if ((div1 != null) && (div2 != null))
    {
        div1.style.display = 'inline';
        div2.style.display = 'none';
    }
}

function onButtonHover(buttonID)
{
    var button = document.getElementById(buttonID);

    if (button != null)
    {
        button.className = "MenuButtonHover";
    }
}

function onButtonOut(buttonID)
{
    var button = document.getElementById(buttonID);

    if (button != null)
    {
        button.className = "MenuButton";
    }
}

function onSubButtonHover(buttonID) {
    var button = document.getElementById(buttonID);

    if (button != null) {
        button.className = "SubMenuButtonHover";
    }
}

function onSubButtonOut(buttonID) {
    var button = document.getElementById(buttonID);

    if (button != null) {
        button.className = "SubMenuButton";
    }
}

function currentButton(buttonID)
{
    currentButtonID = buttonID;
}
