var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
var btime,bspeed;
btotal=0;
var bxx,fixx;
var yPos;
var byy=20;
var zheng=1;
function setpos(){
window.screen.width>800?suspentpos=135:suspentpos=0;
fixx=Math.round(document.body.offsetWidth/2);

bxx=fixx+suspentpos;
ctime=setTimeout("setpos()",100);
}

function butmove(){
	yPos = document.body.clientHeight-20;
	document.all.ss2.style.visibility="visible";
	document.all.ss2.style.left=bxx+255;
	document.all.ss2.style.top=byy+window.document.body.scrollTop+135;
	byy=byy+zheng*5;
	bspeed=100+50*Math.random();
	btime=setTimeout("butmove()",bspeed);
	if (byy>220) {
		zheng=0
	}
}

function s2_DoFSCommand(command, args) {
  var s2Obj = InternetExplorer ? s2 : document.s2;
	if(command=="click"){
  		if (args=="ok"){
		document.all.ss3.style.visibility="visible";
		document.all.ss2.style.visibility="hidden";
		whichObj('s3').GOTOFrame(2);
		whichObj('s3').play();
		clearTimeout(btime);
		}
	}
}

function s1_DoFSCommand(command, args) {
  var s1Obj = InternetExplorer ? s1 : document.s1;
	if(command=="end"){
		if (args=="ok"){
		document.all.ss3.style.visibility="hidden";
		document.all.ss1.style.visibility="hidden";
		document.all.ss2.style.visibility="visible";
		butmove();
		}
	}
	if(command=="loading"){
		if (args=="ok"){
		document.all.ss1.style.visibility="visible";
		whichObj('s1').GOTOFrame(2);
		whichObj('s1').play();
		}
	}
}

function s3_DoFSCommand(command, args) {
  var s3Obj = InternetExplorer ? s3 : document.s3;
  	if(command=="war"){
		if (args=="ok"){
		document.all.ss3.style.visibility="hidden";
		document.all.ss2.style.visibility="visible";
		butmove();
		}
	}
}

function whichObj(objName){
	if(navigator.appName=="Netscape"){
		return document[objName]
	}else{
		return window[objName]
	}
}

if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
	navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('Sub s2_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call s2_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('Sub s3_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call s3_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('Sub s1_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call s1_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}
