// JavaScript Document
function getFla(FlaSrc,width,height,wmode,FlashVars){
	var str;
	wmode=wmode||"opaque";
	FlashVars=FlashVars||"";
	str="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0\" width=\""+width+"\" height=\""+height+"\">";
	str+="  <param name=\"movie\" value=\""+FlaSrc+"\" />";
	str+="  <param name=\"quality\" value=\"high\" />";
	str+="  <param name=\"wmode\" value=\""+wmode+"\" />";
	str+="	<param name=\"FlashVars\" value=\""+FlashVars+"\" />";
	str+="  <embed src=\""+FlaSrc+"\" quality=\"high\" wmode=\""+wmode+"\" FlashVars=\""+FlashVars+"\"  pluginspage=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\""+width+"\" height=\""+height+"\"></embed>";
	str+="</object>";
	document.write(str);
}

//添加收藏，设为首页
var Fav={
	AddFavorite : function(){
		var sURL=location.href;
		var sTitle=document.title;
		try{
			window.external.addFavorite(sURL, sTitle);
		}catch (e){
			try{
				window.sidebar.addPanel(sTitle, sURL, "");
			}catch (e){
				alert("加入收藏失败，请使用Ctrl+D进行添加");
			}
		}
	},
	SetHome : function(obj){
		var URL='http://'+location.hostname+(location.port!=''?':':'')+location.port;
		try{
			obj.style.behavior='url(#default#homepage)';obj.setHomePage(URL);
		}
		catch(e){
			if(window.netscape){
				try{
					netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
				}catch (e){ 
					alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入\"about:config\"并回车\n然后将[signed.applets.codebase_principal_support]设置为'true'");  
				}
				var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
				prefs.setCharPref('browser.startup.homepage',URL);
			}
		}
	}
}
