// JavaScript Document
//无提示关闭窗口
function closeWindow()
{
	window.opener = null;
	window.open(' ', '_self', ' ');
	window.close();
}
//加入收藏
function addfavorite()
{
	try
	{
		if(document.all) {
			window.external.addFavorite(window.location,document.title);
		}
		else if (window.sidebar) {
			window.sidebar.addPanel(document.title,window.location, "");
		}	
	}
	catch(e) 
	{
		alert("收藏失败，请按下Ctrl+D加入收藏！")
	}	
}

 //设置为主页 调用  <a href="#" onclick="SetHome(this)">设为首页</a>

function SetHome(obj)
{
	var url="http://"+window.location.host;  //window.location.host
	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);
		}
	}
}

function Play(file,image,w,h,autostart)
{
	var flashvars='file='+file+'&autostart='+autostart+'&image='+image;
	document.write('<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="'+w+'" height="'+h+'">');
	document.write('<param name="movie" value="/inc/flvPlayer.swf" />');
	document.write('<param name="allowfullscreen" value="true" />');
	document.write('<param name="allowscriptaccess" value="always" />');
	document.write('<param name="flashvars" value="'+flashvars+'" />');
	document.write('<embed type="application/x-shockwave-flash"	id="player2" name="player2"	src="/inc/flvPlayer.swf" width="'+w+'" height="'+h+'" allowscriptaccess="always" allowfullscreen="true" flashvars="'+flashvars+'"/>');
	document.write('</object>');
}

