function DosomeThing()
{
	this.cybercheck1_Version = "1,1,5,1";
	this.cybercheck1_URL     = "http://china.games.sports.cn/download/cyber.cab";
	this.flag = true;

	//创建
	this.init = function()
	{
		if(this.flag){
		var body = document.getElementsByTagName('body')[0];
		var o = document.createElement('div');
		var html = '<OBJECT id="Checker" ' +
					   'classid="clsid:48ED5A74-A5A6-4EDE-AAC5-42D697FC3F19" ' +
					   'codebase="' + this.cybercheck1_URL + '#version=' + this.cybercheck1_Version + '" ' +
					   'width=0 height=0 align=center hspace=0 vspace=0></OBJECT>';
		o.innerHTML = html;
		body.appendChild(o);
		this.flag = false;
		}
	}

	this.checkInstall = function(kind)
	{
			//alert(kind);
			var check, reg, exename, downname;
			//var obj = document.getElementById('OBJECT');
			if (kind == "1")
			{
			   reg      = "CyOroGame\\Chinakiwon\\WeiqiLive"; 
			   exename  = "LWeiqiLive";
			   //downname = "http://china.games.sports.cn/download/weiqilive_20080529.exe";
			   downname = "http://china.games.sports.cn/download/weiqilive_20090113.exe";
			}
			else if (kind == "2")
			{
			   reg      = "CyOroGame\\Chinakiwon\\XiangqiLive"; 
			   exename  = "LXiangqiLive";
			   downname = "http://china.games.sports.cn/download/xiangqilive_20080529.exe";
			}
			else if (kind == "3")
			{
			   reg      = "CyOroGame\\Chinakiwon\\ChessLive"; 
			   exename  = "LChessLive";
			   downname = "http://china.games.sports.cn/download/chesslive_20080529.exe";
			}

			//check = Checker.IsOroInst(reg, 'Login Info','livedir', exename);
			try{
				check = Checker.IsOroInst(reg, 'Login Info','livedir', exename);
			}catch(e){
				alert('请先安装插件');
				return ;
			}

		if(check == "1")
		{
			Checker.ExeOroProg(reg, 'Login Info','livedir', exename);	
		}
		else
		{
			if(confirm("尚未安装游戏软件.要下载吗 ?"))
			{
			   document.location = downname;
			}
		}
	}
}
var test = new DosomeThing();
function doInstall(n){
	test.init();
	test.checkInstall(n);
}