// test.js

var x = 
{
	test01 : ["dog","cat","cow","pig","ferret","lion"],
	test02 : ["one","two","three","four","five","six"],
	test03 : "foo",
	count : 0
}

var i; // global variables are evil!

window.onload = function()
{
	document.getElementById("theButton").onclick = function()
	{
		i = (x.test03 == "foo") ? x.test01 : x.test02;

		FB.log(1,[i]);

		for (z = 0; z < i.length; z++)
		{
			FB.log(1,["counter z",z,x.test03,i[z]])
		}

		FB.log(0,["not showing"]); // first argument 1/0 can hide output
		
		if ((z == i.length) && (x.test03 == "foo")) x.test03 = "world";
		else x.test03 = "foo";
		
		x.count++;
		
		FB.log(1,["-----------------",x.count]);
	}
}
