var Timer = null;
var CurScreen = MaxScreen = 1;
function pwSlidePlayer(action,index,maxNum) {
	clearTimeout(Timer);
	if (typeof maxNum != 'undefined')MaxScreen = maxNum;
	switch (action) {
		case 'pause' :
			clearTimeout(Timer);
			break;
		case 'goon' :
			clearTimeout(Timer);
			Timer = setTimeout('pwSlidePlayer();', 3000);
			break;
		case 'play' :
			CurScreen = index - 1 ;
		default :
			if (CurScreen >= MaxScreen)CurScreen = 0 ;
			for (i=0;i<MaxScreen;i++) {
				getObj("Switch_"+i).style.display = "none" ;
			}
			getObj("Switch_"+CurScreen).style.display = "block" ;
			var NavStr = "" ;
			for (i=1;i<=MaxScreen;i++) {
				if (i == CurScreen+1) {
					NavStr += '<li><a href="javascript:;" target="_self" class="sel">'+i+'</a></li>' ;
				} else {
					NavStr += '<li onclick="pwSlidePlayer(\'play\','+i+');"><a href="javascript:;" target="_self">'+i+'</a></li>' ;
				}
			}
			getObj("SwitchNav").innerHTML = NavStr ;
			if (MaxScreen>1) {
				CurScreen++;
				Timer = setTimeout('pwSlidePlayer();', 3000);
			}
	}
}