function changePicture(o){
	var oImg = document.getElementById('picturePreview');
	oImg.onload=function(){
        if (oImg.readyState=="complete" || oImg.complete){
			//setTimeout(nextPicture,1000);
        }
	}
	oImg.src = DATA_PATH + 'pictures/' + o.value;
}
function prePicture(){
	var opt = document.getElementById('pictureSlt');
	if(opt.selectedIndex==opt.options.length-1) return;
	opt.selectedIndex += 1;
	var oImg = document.getElementById('picturePreview');
	oImg.onload=function(){
        if (oImg.readyState=="complete" || oImg.complete) {
        }
	}
	oImg.src = DATA_PATH + 'pictures/' + SZ121_SatelliteCloudPicIndex[opt.selectedIndex].pic;
}
function nextPicture(){

	var opt = document.getElementById('pictureSlt');
	if(opt.selectedIndex==0){
		if(document.getElementById('playButton').title=='停止')
		{
			setTimeout("document.getElementById('playButton').title='播放';playPicture();",1500);
		}
		return;
	}
	opt.selectedIndex -= 1;
	var oImg = document.getElementById('picturePreview');
	oImg.onload=function(){
        if (oImg.readyState=="complete" || oImg.complete){
			if(document.getElementById('playButton').title=='停止')
				setTimeout(nextPicture,1000);
        }
	}
	oImg.src = DATA_PATH + 'pictures/' + SZ121_SatelliteCloudPicIndex[opt.selectedIndex].pic;
}
function playPicture(){
	var img = document.getElementById('playButton');
	if(img.title=='播放'){
		img.title = "停止";
		img.src = '/design/index/images/btn_pause.gif';
		var opt = document.getElementById('pictureSlt');
		opt.selectedIndex = opt.options.length-1;
		var oImg = document.getElementById('picturePreview');
		oImg.onload=function(){
			if (oImg.readyState=="complete" || oImg.complete){
				setTimeout(nextPicture,1000);
			}
		}
		oImg.src = DATA_PATH + 'pictures/' + SZ121_SatelliteCloudPicIndex[opt.selectedIndex].pic;
		//playInterval = setInterval(prePicture,1400);
	}else{
		img.title = '播放';
		img.src = '/design/index/images/btn_play.gif';
		//clearInterval(playInterval);
	}
}
