// wowzine cv2 script
if(swfName==undefined)var swfName="cv2";
this[swfName+"_DoFSCommand"]=new function(command, args) {
	var cv2Obj =document.getElementById(swfName);
	// 代码放在此处。
	if(command=="saveBrowseHistory"){
		document.location.hash="page"+args;
		if(args!="0"){
			document.title=wowzineTitle+" 第"+args+"页";
		}else{
			document.title=wowzineTitle+" 封面";
		}
	}
	//
}

//取得位置参数
function getPagePos(){
	hrefstr=window.location.href;
	var strarray=hrefstr.split("#page");
	var tmp=strarray[1];
	if(tmp!=undefined){
		var tmppos=tmp;
	}else{
		var tmppos=0;
	}
	return tmppos;
}


//
function fscommandInit(){
	//Fscommand
	var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
	// 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 cv2loader_FSCommand(ByVal command, ByVal args)\n');
		document.write('Sub '+swfName+'_FSCommand(ByVal command, ByVal args)\n');
		document.write('	Call '+swfName+'_DoFSCommand(command, args)\n');
	//	document.write('	Call cv2loader_DoFSCommand(command, args)\n');
		document.write('End Sub\n');
		document.write('</script\>\n');
	}
}
// 处理 Flash 影片中的所有 FSCommand 消息



function cv2loader_DoFSCommand(command, args) {
	var cv2Obj =document.getElementById(swfName);
	// 代码放在此处。
	if(command=="saveBrowseHistory"){
		document.location.hash="page"+args;
		if(args!="0"){
			document.title=wowzineTitle+" 第"+args+"页";
		}else{
			document.title=wowzineTitle+" 封面";
		}
	}
	//
}

