var FlashNews = {
	currentScreen:0,
	switchTimer:null,
	pauseSwitch:function(){clearTimeout(this.switchTimer);},
	goonSwitch:function(){
		clearTimeout(this.switchTimer);
		this.switchTimer = setTimeout("FlashNews.switchPic("+(FlashNews.currentScreen+1)+");", 3000);
	},
	switchPic:function(screen){
		clearTimeout(this.switchTimer);
		var liTags = $("SwitchNav").getElementsByTagName("li");
		this.currentScreen=(screen==null||screen>liTags.length-1)?0:screen;
		for (var i=0;i<liTags.length;i=i+1) {
			if (i == this.currentScreen) {
				liTags[i].setAttribute("class","sel");
				liTags[i].setAttribute("className","sel");
				$("Switch_"+i).style.display = "block";
			} else {
				liTags[i].removeAttribute("class");
				liTags[i].removeAttribute("className");
				$("Switch_"+i).style.display = "none";
			}
		}
		this.switchTimer = setTimeout("FlashNews.switchPic("+(FlashNews.currentScreen+1)+");", 3000);
	}
}

var SubjectsFlash = {
	currentScreen:0,
	switchTimer:null,
	pauseSwitchSubject:function(){clearTimeout(this.switchTimer);},
	goonSwitchSubject:function(){
		clearTimeout(this.switchTimer);
		this.switchTimer = setTimeout("SubjectsFlash.switchPicSubject("+(SubjectsFlash.currentScreen+1)+");", 3000);
	},
	switchPicSubject:function(screen){
		clearTimeout(this.switchTimer);
		var liTags = $("SwitchNav_subjects").getElementsByTagName("li");
		this.currentScreen=(screen==null||screen>liTags.length-1)?0:screen;
		for (var i=0;i<liTags.length;i=i+1) {
			if (i == this.currentScreen) {
				liTags[i].setAttribute("class","sel");
				liTags[i].setAttribute("className","sel");
				$("Switch_subject_"+i).style.display = "block";
			} else {
				liTags[i].removeAttribute("class");
				liTags[i].removeAttribute("className");
				$("Switch_subject_"+i).style.display = "none";
			}
		}
		this.switchTimer = setTimeout("SubjectsFlash.switchPicSubject("+(SubjectsFlash.currentScreen+1)+");", 3000);
	}
}

var FlashYanshou = {
		currentScreen:0,
		switchTimer:null,
		pauseSwitch:function(){clearTimeout(this.switchTimer);},
		goonSwitch:function(){
			clearTimeout(this.switchTimer);
			this.switchTimer = setTimeout("FlashYanshou.switchPic("+(FlashYanshou.currentScreen+1)+");", 3000);
		},
		switchPic:function(screen){
			clearTimeout(this.switchTimer);
			var liTags = $("SwitchNav_ys").getElementsByTagName("li");
			this.currentScreen=(screen==null||screen>liTags.length-1)?0:screen;
			for (var i=0;i<liTags.length;i=i+1) {
				if (i == this.currentScreen) {
					liTags[i].setAttribute("class","sel");
					liTags[i].setAttribute("className","sel");
					$("Switch_ys_"+i).style.display = "block";
				} else {
					liTags[i].removeAttribute("class");
					liTags[i].removeAttribute("className");
					$("Switch_ys_"+i).style.display = "none";
				}
			}
			this.switchTimer = setTimeout("FlashYanshou.switchPic("+(FlashYanshou.currentScreen+1)+");", 3000);
		}
	}
