// JScript source code
var name, para, node;
button_pics = new Array();

		button_pics[1] = new Image();
		button_pics[1].src = "images/buttons/about_monster_icon_invert.jpg";
		button_pics[2] = new Image();
		button_pics[2].src = "images/buttons/sweetcage_icon_invert.jpg";
		button_pics[3] = new Image();
		button_pics[3].src = "images/buttons/take_care_icon_invert.jpg";
		button_pics[4] = new Image();
		button_pics[4].src = "images/buttons/other_iguanas_icon_invert.JPG";
		button_pics[5] = new Image();
		button_pics[5].src =  "images/buttons/game_icon_invert.jpg";
		button_pics[6] = new Image();
		button_pics[6].src = "images/buttons/disclaimer_icon_invert.jpg";
		button_pics[7] = new Image();
		button_pics[7].src = "images/buttons/about_monster_icon.jpg";
		button_pics[8] = new Image();
		button_pics[8].src = "images/buttons/sweetcage_icon.jpg";
		button_pics[9] = new Image();
		button_pics[9].src = "images/buttons/take_care_icon.jpg";
		button_pics[10] = new Image();
		button_pics[10].src = "images/buttons/other_iguanas_icon.jpg";
		button_pics[11] = new Image();
		button_pics[11].src = "images/buttons/game_icon.jpg"
		button_pics[12] = new Image();
		button_pics[12].src = "images/buttons/disclaimer_icon.jpg";
		button_pics[13] = new Image();
		button_pics[13].src = "images/buttons/Previous_button.jpg";
		button_pics[14] = new Image();
		button_pics[14].src = "images/buttons/Previous_button_invert.JPG";
		button_pics[15] = new Image();
		button_pics[15].src = "images/buttons/next_button_invert.JPG";
		button_pics[16] = new Image();
		button_pics[16].src = "images/buttons/next_button.jpg";
	
	function button_changer(from,to)
	{
		from.src = button_pics[to].src;
	}

oDOM = new ActiveXObject("MSXML.DOMDocument");
oDOM.async = false;
oDOM.load("lizard.xml");

var oDOM;
var node;
var currentNode;

var g_intChange, g_intButtonChange;

function iguana_info(node_wanted)
{	
	load_cookie();
	node = oDOM.documentElement.firstChild;
	display = node.childNodes;
	
	name = display.item(0).text;
	para = display.item(1).text;
	node_desired = display.item(2).text;
	if (node_desired == node_wanted)
	{
		information_box.innerText = para;
	}
	if (node_desired != node_wanted)
	{ 
		
		next_node(node_wanted) 
	}
	
}
function next_node(node_wanted)
{
	
	node = node.nextSibling;
	display = node.childNodes;

	name = display.item(0).text;
	para = display.item(1).text;
	node_desired = display.item(2).text;
	if (node_desired == node_wanted)
	{
		information_box.innerText = para;
	}
	if (node_desired != node_wanted)
	{ 
		next_node(node_wanted) 
	}
}
function change_button(menu_button)
{
	menu_button.bgColor = "#99cc66";
}
function change_button_back(menu_button)
{
	menu_button.bgColor = "#6d9a77";

}
function open_calculator()
{
	newWindow = window.open("http://www.mean-monster.4t.com/calculator.html",null,"height=500, width=750");
	
}
function open_bad_food()
{
	newWindow = window.open("http://www.mean-monster.4t.com/unhealthy_foods.html",null,"height=700, width=950");
	
}
function change_picture(menu_button)
{
diet.style.borderBottom ="Black 3px groove";
diet.style.borderRight = "Black 3px groove";
diet.style.borderLeft ="Black 1px ridge";
diet.style.borderTop = "Black 1px ridge";

parasite.style.borderBottom ="Black 3px groove";
parasite.style.borderRight = "Black 3px groove";
parasite.style.borderLeft ="Black 1px ridge";
parasite.style.borderTop = "Black 1px ridge";

health.style.borderBottom ="Black 3px groove";
health.style.borderRight = "Black 3px groove";
health.style.borderLeft ="Black 1px ridge";
health.style.borderTop = "Black 1px ridge";

breed.style.borderBottom ="Black 3px groove";
breed.style.borderRight = "Black 3px groove";
breed.style.borderLeft ="Black 1px ridge";
breed.style.borderTop = "Black 1px ridge";

groom.style.borderBottom ="Black 3px groove";
groom.style.borderRight = "Black 3px groove";
groom.style.borderLeft ="Black 1px ridge";
groom.style.borderTop = "Black 1px ridge";

behavior.style.borderBottom ="Black 3px groove";
behavior.style.borderRight = "Black 3px groove";
behavior.style.borderLeft ="Black 1px ridge";
behavior.style.borderTop = "Black 1px ridge";

train.style.borderBottom ="Black 3px groove";
train.style.borderRight = "Black 3px groove";
train.style.borderLeft ="Black 1px ridge";
train.style.borderTop = "Black 1px ridge";

old_age.style.borderBottom ="Black 3px groove";
old_age.style.borderRight = "Black 3px groove";
old_age.style.borderLeft ="Black 1px ridge";
old_age.style.borderTop = "Black 1px ridge";

calculator.style.borderBottom ="Black 3px groove";
calculator.style.borderRight = "Black 3px groove";
calculator.style.borderLeft ="Black 1px ridge";
calculator.style.borderTop = "Black 1px ridge";

bad_food.style.borderBottom ="Black 3px groove";
bad_food.style.borderRight = "Black 3px groove";
bad_food.style.borderLeft ="Black 1px ridge";
bad_food.style.borderTop = "Black 1px ridge";
	switch(menu_button)
	{
		case diet:
					diet.style.borderBottom = "Black 1px groove";
					diet.style.borderRight = "Black 1px groove";
					diet.style.borderLeft = "Black 1px ridge";
					diet.style.borderTop = "Black 1px ridge";
					iguana_info(1);
					break;	
		case parasite:
					parasite.style.borderBottom = "Black 1px groove";
					parasite.style.borderRight = "Black 1px groove";
					parasite.style.borderLeft = "Black 1px ridge";
					parasite.style.borderTop = "Black 1px ridge";
					iguana_info(2);
					break;
		case health:
					health.style.borderBottom = "Black 1px groove";
					health.style.borderRight = "Black 1px groove";
					health.style.borderLeft = "Black 1px ridge";
					health.style.borderTop = "Black 1px ridge";
					iguana_info(3);
					break;
		case breed:
					breed.style.borderBottom = "Black 1px groove";
					breed.style.borderRight = "Black 1px groove";
					breed.style.borderLeft = "Black 1px ridge";
					breed.style.borderTop = "Black 1px ridge";
					iguana_info(4);
					break;	
		case groom:
					groom.style.borderBottom = "Black 1px groove";
					groom.style.borderRight = "Black 1px groove";
					groom.style.borderLeft = "Black 1px ridge";
					groom.style.borderTop = "Black 1px ridge";
					iguana_info(5);
					break;	
		case behavior:
					behavior.style.borderBottom = "Black 1px groove";
					behavior.style.borderRight = "Black 1px groove";
					behavior.style.borderLeft = "Black 1px ridge";
					behavior.style.borderTop = "Black 1px ridge";
					iguana_info(6);
					break;	
		case train:
					train.style.borderBottom = "Black 1px groove";
					train.style.borderRight = "Black 1px groove";
					train.style.borderLeft = "Black 1px ridge";
					train.style.borderTop = "Black 1px ridge";
					iguana_info(7);
					break;	
		case old_age:
					old_age.style.borderBottom = "Black 1px groove";
					old_age.style.borderRight = "Black 1px groove";
					old_age.style.borderLeft = "Black 1px ridge";
					old_age.style.borderTop = "Black 1px ridge";
					iguana_info(8);
					break;	
		case calculator:
					calculator.style.borderBottom = "Black 1px groove";
					calculator.style.borderRight = "Black 1px groove";
					calculator.style.borderLeft = "Black 1px ridge";
					calculator.style.borderTop = "Black 1px ridge";
					open_calculator();
					break;
		case bad_food:
					bad_food.style.borderBottom = "Black 1px groove";
					bad_food.style.borderRight = "Black 1px groove";
					bad_food.style.borderLeft = "Black 1px ridge";
					bad_food.style.borderTop = "Black 1px ridge";
					open_bad_food();
					break;
		
	}
}
	