// The following code was programmed by Joel Dixon and Belinda Cecere of Ladybug Web Design,  2005

var prefix = ["inde", "abou", "buil", "firs", "gall", "test", "tric", "faqs", "cont"];

// The following code pre-loads all images for the menu bar, to ensure mouse-over changes look seemless

if (document.images)
{
    var norm = new Array();
    var over = new Array();
    var curr = new Array();


    for (i = 0; i < prefix.length; i++)
    {
        norm[i] = new Image();
        norm[i].src = "./images/" + prefix[i] + "norm.gif";
        over[i] = new Image();
        over[i].src = "./images/" + prefix[i] + "over.gif";
        curr[i] = new Image();
        curr[i].src = "./images/" + prefix[i] + "curr.gif";
    }
}

// The following method changes the image of the button the mouse is over

function swapBtn(btnNum, state)
{
    switch (state)
    {
        case 'norm':
            document.images[prefix[btnNum]].src = norm[btnNum].src;
            break;
        case 'over':
            document.images[prefix[btnNum]].src = over[btnNum].src;
            break;
    }
}

function swapLargeImg(imgNum, state)
{

var captions = new Array();
	
captions[0] = "AW Homes";
captions[1] = "The Lynbrook";
captions[2] = "The Lynbrook";
captions[3] = "The Lynbrook";
captions[4] = "Cornish Road, Lysterfield";
captions[5] = "Cornish Road, Lysterfield";
captions[6] = "Cornish Road, Lysterfield";
captions[7] = "Cornish Road, Lysterfield";
captions[8] = "Cornish Road, Lysterfield";
captions[9] = "Cornish Road, Lysterfield";
captions[10] = "Tarara Court";
captions[11] = "Cornish Road, Lysterfield";
captions[12] = "Cornish Road, Lysterfield";
captions[13] = "The Roberts";
captions[14] = "The Roberts";
captions[15] = "Aluminium Boat Fuel Tanks";
captions[16] = "Kemp Street";
captions[17] = "Kemp Street";
captions[18] = "Kemp Street";
captions[19] = "The Jayne";
captions[20] = "AW Homes";
captions[21] = "AW Homes";
captions[22] = "AW Homes";
captions[23] = "AW Homes";
captions[24] = "AW Homes";
captions[25] = "Cornish Road, Lysterfield";
captions[26] = "AW Homes";
captions[27] = "Cornish Road, Lysterfield";
captions[28] = "AW Homes";
captions[29] = "AW Homes";
captions[30] = "AW Homes";


switch (state)
	{
  	case 'over':
    	document.getElementById("large").src = "./gallery/awhomes" + imgNum + "lg.jpg";
			document.getElementById("imgCaption").innerHTML = captions[imgNum];
  	  break;
  }
}