var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
function controler_DoFSCommand(command, args) {
	var controlerObj = InternetExplorer ? controler : document.controler;
    var movie = InternetExplorer ? flashMovie : document.flashMovie;

	switch(command){
	    case "getTotalFrames":
		    totalFrames = movie.TotalFrames;
		    controlerObj.SetVariable("JStotalFrames",totalFrames);
	        break;
	    case "getCurrentFrame":
		    var currentFrame = movie.TCurrentFrame("/");
		    controlerObj.SetVariable("JScurrentFrame",currentFrame);
		    break;
		case "isPlaying":
		    var isPlay = movie.IsPlaying();
		    controlerObj.SetVariable("JSisPlaying",isPlay);
		    break;
		case "getSwfUrl":
		    var swfUrl = movie.TGetProperty("/",15);
		    controlerObj.SetVariable("JSgetSwfUrl",swfUrl);
		    break;
		case "getSwfName":    
		    var swfName = movie.TGetProperty("/",13);
		    controlerObj.SetVariable("JSgetSwfName",swfName);
		    break;
		case "fullview":
		    window.open('http://www.pconline.com.cn/images/html/viewflash_pconline.htm?'
		        +movie.TGetProperty("/",15)+'&namecode=pcedu&subnamecode=pcedu_flash');
		    break;
	    case "play":
	        movie.Play();
	        break;
	    case "stop":
	        movie.StopPlay();
	        break;
	    case "pause":
	        movie.StopPlay();
	        break;
	    case "rewind":
	        movie.Rewind();
	        break;
	    case "last":
	        movie.GotoFrame(totalFrames);
	        break;
	    case "jump":
            movie.GotoFrame(args);
            movie.Play();
            break;
	}
}
// Hook for Internet Explorer 
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 controler_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call controler_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}



