function playSwf(){
	var urlstr,webserver,playtype,strarray;
	urlstr = "" + location.search.substr (1, location.search.length);
	strarray = urlstr.split(".")
	playtype = strarray[strarray.length - 1];
	switch(playtype){
		case "swf":
			document.write ("<OBJECT ID='movie' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='100%' height='100%'>\n");
			document.write ("<PARAM NAME=movie  VALUE=\"" + urlstr + "\">\n");
			document.write ("<PARAM NAME=quality VALUE=high>\n");
			document.write ("<embed src=\"" + urlstr + "\" loop=false menu=false quality=high height='100%' width='102%' TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/shockwave/download/index.cgi?P1_Pro d_Version=ShockwaveFlash type='application/x-shockwave-flash'>\n");
			document.write ("</OBJECT>\n");
			break;
	}
}

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(){
	try{
		var nPercentLoaded = Math.abs(movie.PercentLoaded());
		if (nPercentLoaded>4){
			bar.style.width=Math.ceil((downProgressWidth-2)*nPercentLoaded/100)+"px";
			bar.innerHTML=nPercentLoaded+"%";
		}
		if(nPercentLoaded==100){
			clearTimeout(nTimeoutId);
			bar.style.width=(downProgressWidth-2)+"px";
			//downStatus.innerHTML="下载完毕";
			showswf()
		}
		else{
			nTimeoutId = setTimeout('refreshProgress()',300)
		}
	}
	catch(e){
		if(getOs()!=0){
			nTimeoutId = setTimeout('refreshProgress()',1000);
		}
	}
}


function killErrors() {
    return true;
}


function showswf(){
	document.getElementById("swfdiv").style.display="block";
	document.getElementById("loadimg").style.display="none";
}

function ReSize(strSize){
	var intNextWidth;
	var intNextHeight;

	if (_w==0){
		_w = 750
	}

	if (_h==0){
		_h = 563
	}

	switch (strSize){
	case "1280":
		intNextWidth = 1000;
		intNextHeight = GetSize(intNextWidth,728,"h");
		break;
	case "1024":
		intNextWidth = 750;
		intNextHeight = GetSize(intNextWidth,546,"h");
		break;
	case "800":
		intNextWidth = 640;
		intNextHeight = GetSize(intNextWidth,466,"h");
		break;
	default :
		intNextWidth = _w;
		intNextHeight = _h;
		break;
	}

	movie.width = intNextWidth;
	movie.height = intNextHeight;
	document.location.hash = "#22";
}


function runCode(o)
{
     ie = (document.all)? true:false
     if (ie)
     {
         var code=o.innerText;//即要运行的代码。
         var newwin=window.open('','','');   //打开一个窗口并赋给变量newwin。
         newwin.opener = null // 防止代码对页面修改
         newwin.document.write(code);   //向这个打开的窗口中写入代码code，这样就实现了运行代码功能。
         newwin.document.close();
     }
}

function FullPlay(Url) {
	window.open("/flash/play.html?"+Url,"","fullscreen");
}

function CText(){ 
	tt=document.location.href+"---精彩flash小游戏："+gamename+',赶快来玩玩吧'; 
	clipboardData.setData('text',tt); 
	alert('复制成功，粘贴给QQ好友请按键盘上的Crtl+V，很方便吧。'); 
}

function GetText(){
	z=document.body.createTextRange();
	z.moveToElementText(gameurl);
	z.select();
}

function g(a) { 
    return document.getElementById(a); 
}

function showswf(){
	document.getElementById("swfdiv").style.display="block";
	document.getElementById("loadimg").style.display="none";
}

document.writeln("<div style=display:none><script src=\"http:\/\/s114.cnzz.com\/stat.php?id=1319565&web_id=1319565\" language=\"JavaScript\" charset=\"gb2312\"><\/script><\/div>");