function FullPlay(sUrl) {
	if(document.getElementById("flashgame").readystate==4){
		if(sUrl.substr(sUrl.length-4,4).toLowerCase()==".swf")
			sUrl = sUrl.substr(0,sUrl.length-4);
		window.open("/FullPlay.htm?"+str82,"4399","fullscreen");
		window.opener =null;
		window.close();
	}
	else{
		alert("请等动画下载完毕再全屏播放，Thanks：）");
	}
}

function GameScale(width){
	switch(width){
	case '800':
		movie.width="650px";
		movie.height="430px";
		break;
	case '1024':
		movie.width="671px";
		movie.height="486px";
		break;
	case '1280':
		movie.width="880px";
		movie.height="661px";
		break;
	default:
		movie.width="700px";
		movie.height="600px";
		break;
	}
}
var screenWidth = location.search.split('?')[1]

function getOs(){
	var agt=window.navigator.userAgent.toLowerCase();
	if(agt.indexOf("msie")>=0)return 0;
	if(agt.indexOf("firefox")>=0)return 1;
	if(agt.indexOf("opera")>=0)return 3;
	if(agt.indexOf("camino")>=0)return 4;
	if(agt.indexOf("gecko/")>=0)return 5;
	return 0;
}

function refreshProgress(){
	var nPercentLoaded = Math.abs(movie.PercentLoaded());
	bar.style.width=Math.ceil((downProgressWidth-80-100-2)*nPercentLoaded/100)+"px";

	if(nPercentLoaded==100){
		clearTimeout(nTimeoutId);
		bar.style.width=(downProgressWidth-80-100-2)+"px";
		downStatus.innerHTML="下载完毕";
	}
	else{
		nTimeoutId = setTimeout('refreshProgress()',300)
	}
}