//information is a 3D array that contains all dynamic data about the dogs
var information = new Array();
//array 1 is a list of the pet names
information [0] = new Array();
information [0] [0] = "gussie";
information [0] [1] = "tara";
information [0] [2] = "lela";
information [0] [3] = "tammy";
information [0] [4] = "gina";
information [0] [5] = "khala";
information [0] [6] = "sadie";
information [0] [7] = "zena";
information [0] [8] = "kip";
information [0] [9] = "sura";
information [0] [10] = "kiera";
information [0] [11] = "kele";
information [0] [12] = "moya";
information [0] [13] = "buster"
//array 2 is a list of the kennel names
information [1] = new Array();
information [1] [0] = "Gussie";
information [1] [1] = "Elveswood Goldberry";
information [1] [2] = "Imbali Balela";
information [1] [3] = "CH Imbali Zuri";
information [1] [4] = "Imbali Hazina";
information [1] [5] = "Imbali Kamili Khala";
information [1] [6] = "Imbali Hususa";
information [1] [7] = "UK & FCI INT CH Imbali Azizi";
information [1] [8] = "UK, FCI INT & IR CH Imbali Kipenzi JW";
information [1] [9] = "Imbali Kisura";
information [1] [10] = "Harvesttrail Kiera of Imbali JW";
information [1] [11] = "Imbali Kelele";
information [1] [12] = "Imbali Moya";
information [1] [13] = "Imbali Bakari (AI)";
//array 3 is a list of the names of the dogs images
information [2] = new Array();
information [2] [0] = "gussie.jpg";			//gussie
information [2] [1] = "tara.jpg";			//tara
information [2] [2] = "lela.jpg";			//lela
information [2] [3] = "tammy4.jpg";			//tammy
information [2] [4] = "gina2.jpg";			//gina
information [2] [5] = "khalastanding2.jpg";//khala
information [2] [6] = "083655aa.jpg";		//sadie
information [2] [7] = "ccbobpaignton04.jpg";//zena
information [2] [8] = "2002trophies.jpg";	//kip
information [2] [9] = "surashead.jpg";		//sura
information [2] [10] = "blackpool06.jpg";	//kiera
information [2] [11] = "kele5wks.jpg";		//kele
information [2] [12] = "moya.jpg";			//moya
informaiton [2] [13] = "DSCF0138.jpg";		//buster

//========================================================================================================

//dogsName() is a function that takes the pet name as input and writes the kennel name to the document
function dogsName(dog)
{ 
	for (count = 0; count < information [0].length; count++)
	{
		var db = information [0] [count];
		if (dog == db)
		{
			document.write(information [1] [count]);
		}
	}
}

function viewDog(name)
{
	var newWin;
	var URL = "viewDog.htm";
	newWin = open(URL, name, "height=350,width=450,scrollbars=no");
	newWin.focus();
	newWin.document.write('<html><head><title>' + name + '</title><script language="JavaScript" src="javascript/functions.js"></script></head>');
	newWin.document.write('<body bgcolor="black">');
	newWin.document.write('<p align="center"><img src="images/' + name + '/' + name + '.jpg" height="250" width="350"></p>');
	newWin.document.write('<table align="center"><tr align="center">');
	newWin.document.write('<td><img src="buttons/viewdgshme.gif"></td>');
	newWin.document.write('<td></td>');
	newWin.document.write('<td><a href="javascript:window.close()"><img src="buttons/exit.gif"></a></td>');
	newWin.document.write('</tr></table></body></html>');
}

//ourDogsIndex() creates the index for the Our Dogs section of the site. The dogs pet name is passed with the instruction so that when on the page, the name appears in white.
function ourDogsIndex(dog)
{
	document.write('<table align="center" cellspacing="4" cellpadding="2">');
	document.write('<tr align="center"><td><a href="ourdogs.html">Index</a></td>');
 
	for (count = information [0].length -1; count > -1; count--)
	{
		var db = information [0] [count];
		if (db == dog)
		{
			document.write('<td><font color="white">' + information [1] [count] + '</font></td>');
		}else{
			document.write('<td><a href="' + information [0] [count] + '.html">' + information [1] [count] + '</a></td>');
		}
		if (count == 7)
		{
			document.write('</tr><tr align="center">');
		}
	}
	document.write('</tr></table>');
}

//showImage(dog, size) puts the dogs image on the page. The dogs pet name is passed and 
function showImage(dog, size) 
{
	for (count = 0; count < information [0].length; count++)
	{
		var db = information [0] [count];
		if (db == dog)
		{
			if (size == "thumb")
			{
				document.write('<img src="images/' + dog + '/thumb/' + information [2] [count] + '">');
			}else{
				document.write('<img src="images/' + dog + '/' + information [2] [count] + '">');
			}
		}
	}
}

//News Index is for all of the news pages across the years
function newsHeader(date)
{
	year = date.substring(3);
	document.write('<h1 align="center">Imbali News</h1>');
	document.write('<p align="center">');
	
	for (count = 1; count < 11; count ++)
	{
		if (year == count)
		{
			document.write(date);
		} else {
			if (count == 8)
			{
				document.write('<a href="news.html" target="bottom">200' + count + '</a>');
			} else {
				document.write('<a href="news0' + count + '.html" target="bottom">200' + count + '</a>');
			}
		}
		if (count < 8)
		{
			document.write(' - ');
		}
	}
	document.write('</p><hr>');
}

