Function undefined , help needed

hi ,
i have the following functions.


<body onload="slideShow();">
----
var i; 
function slideShow(){
	var div = document.getElementById("featured");
	var img=div.getElementsByTagName("img")[0];
	var imgArr=new Array();
	imgArr[1]="../public/images/featured/01.jpg";
	imgArr[2]="../public/images/featured/02.jpg";
	imgArr[3]="../public/images/featured/03.jpg";
	imgArr[4]="../public/images/featured/04.jpg";
	function t(){
		if(this.paused==1){switchPaused();}
		if(this.paused==0){ casing(); }
		function one(){
			if(i==1){
			this.current=1;
			img.src=imgArr[1];
			}
		}
		function two(){
			if(i==2){
			this.current=2;
			img.src=imgArr[2];
			}
		}
		function three(){
			if(i==3){
			this.current=3;
			img.src=imgArr[3];
			}
		}
		function four(){
			if(i==4){
			this.current=4;
			img.src=imgArr[4];
			}
		}
		alert(two());
...continues on.

the alert gives

Undefined

I don’t know what to do , so i ask here .
How to make this work ?

ok i think i’ve found the solution in this post http://www.sitepoint.com/forums/showthread.php?t=665688
should’ve used the search form first.
Sorry for any inconvenience.