//Create an Image array for each Branch
var branchPics = new Array(25)
	branchPics[0] = ["crt1", "322", "322"];
	branchPics[1] = ["crt2", "322", "322"];
	branchPics[2] = ["crt3", "322", "322"];
	branchPics[3] = ["crt4", "322", "322"];
	branchPics[4] = ["crt5", "322", "322"];
	branchPics[5] = ["crt6", "322", "322"];
	branchPics[6] = ["crt7", "322", "322"];
	branchPics[7] = ["crt8", "322", "322"];
	branchPics[8] = ["crt9", "322", "322"];
	branchPics[9] = ["crt10", "322", "322"];
	branchPics[10] = ["crt11", "322", "322"];
	branchPics[11] = ["crt12", "322", "322"];
	branchPics[12] = ["crt13", "322", "322"];
	branchPics[13] = ["crt14", "322", "322"];
	branchPics[14] = ["crt15", "322", "322"];
	branchPics[15] = ["crt16", "322", "322"];
	branchPics[16] = ["crt17", "322", "322"];
	branchPics[17] = ["crt18", "322", "322"];
	branchPics[18] = ["crt19", "322", "322"];
	branchPics[19] = ["crt20", "322", "322"];
	branchPics[20] = ["crt21", "322", "322"];
	branchPics[21] = ["crt22", "322", "322"];
	branchPics[22] = ["crt23", "322", "322"];
	branchPics[23] = ["crt24", "322", "322"];
	branchPics[24] = ["crt25", "322", "322"];
	
	picSrc = "scripts/crt/";
	picExt = ".jpg";
	
var i = 0;

var LoadImg = 
{
	init: function ()
	{
	document.BranchPic.src = picSrc + branchPics[i][0] + picExt;
	y = i + 1
	document.getElementById('DataArea').innerHTML = y + " of 25";
	document.BranchPic.width = branchPics[i][1];
	document.BranchPic.height = branchPics[i][2];
	}
};
Core.start(LoadImg);

function prev()
{
	if (i < 1)
	{
		var x = i = 24;
	}
	else
	{
		var x = i -= 1;
	}
	
	y = (x + 1)
	document.BranchPic.src = picSrc + branchPics[x][0] + picExt;
	document.getElementById('DataArea').innerHTML = y + " of 25";
	document.BranchPic.width = branchPics[x][1];
	document.BranchPic.height = branchPics[x][2];
}

function next()
{
	if (i > 23)
	{
		var x = i = 0;
	}
	else
	{
		var x = i += 1;
	}
	y = (x + 1)
	document.BranchPic.src = picSrc + branchPics[x][0] + picExt;
	document.getElementById('DataArea').innerHTML = y + " of 25";
	document.BranchPic.width = branchPics[x][1];
	document.BranchPic.height = branchPics[x][2];
	
}
