
/*-- ------ #Install ------ --*/
function Install(){}
//-- #Parameters --
//#AJAX
Install.prototype.sAjax_0=new netsSingleAjax();
Install.prototype.sPanelCount=4;
Install.prototype.sTemplate_InstallSuccuessReport="";


//-- #Methods --
//#Discuss
Install.prototype.OnPanelShow=function(pIndex){
	var Coun0=0;
	while(this.sPanelCount>Coun0){
		document.getElementById("panelTab_"+Coun0).src="Ui/m_default/Img/3_A.jpg";
		document.getElementById("panelBox_"+Coun0).className=tmpCommon.sysHidden;
		
		Coun0++;
	}

	document.getElementById("panelTab_"+pIndex).src="Ui/m_default/Img/3_B.jpg";
	document.getElementById("panelBox_"+pIndex).className="OutFrame_A";
	return 0;
}
//#Checked
Install.prototype.sChecked_Config=0;
Install.prototype.JsDCheck=function(pType){
	var tmpBOOL=true;
	//-- ------ ### ------ --
	tmpSTR="Db_Host";
	tmpElement_TXT=document.getElementById(tmpSTR+"_Txt");
	tmpElement_ERROR=document.getElementById(tmpSTR+"_Error");
	if(tmpElement_TXT.value==""){
		tmpElement_ERROR.className="Install_0_21";
		tmpElement_ERROR.innerHTML="对不起，数据库地址不能为空";
		tmpBOOL=false;
	}else{
		tmpElement_ERROR.className=tmpCommon.sysHidden;
	}
	//-- ------ ### ------ --
	tmpSTR="Db_Dbname";
	tmpElement_TXT=document.getElementById(tmpSTR+"_Txt");
	tmpElement_ERROR=document.getElementById(tmpSTR+"_Error");
	if(tmpElement_TXT.value==""){
		tmpElement_ERROR.className="Install_0_21";
		tmpElement_ERROR.innerHTML="对不起，数据库名称不能为空";
		tmpBOOL=false;
	}else{
		tmpElement_ERROR.className=tmpCommon.sysHidden;
	}
	//-- ------ ### ------ --
	tmpSTR="Db_Tablehead";
	tmpElement_TXT=document.getElementById(tmpSTR+"_Txt");
	tmpElement_ERROR=document.getElementById(tmpSTR+"_Error");
	if(tmpElement_TXT.value==""){
		tmpElement_ERROR.className="Install_0_21";
		tmpElement_ERROR.innerHTML="对不起，数据库表头不能为空";
		tmpBOOL=false;
	}else{
		tmpElement_ERROR.className=tmpCommon.sysHidden;
	}
	//-- ------ ### ------ --
	tmpSTR="Db_Username";
	tmpElement_TXT=document.getElementById(tmpSTR+"_Txt");
	tmpElement_ERROR=document.getElementById(tmpSTR+"_Error");
	if(tmpElement_TXT.value==""){
		tmpElement_ERROR.className="Install_0_21";
		tmpElement_ERROR.innerHTML="对不起，数据库用户名不能为空";
		tmpBOOL=false;
	}else{
		tmpElement_ERROR.className=tmpCommon.sysHidden;
	}
	//-- ------ ### ------ --
	tmpSTR="Db_Pxd";
	tmpElement_TXT=document.getElementById(tmpSTR+"_Txt");
	tmpElement_ERROR=document.getElementById(tmpSTR+"_Error");
	if(tmpElement_TXT.value==""){
		tmpElement_ERROR.className="Install_0_21";
		tmpElement_ERROR.innerHTML="对不起，数据库用户密码不能为空";
		tmpBOOL=false;
	}else{
		tmpElement_ERROR.className=tmpCommon.sysHidden;
	}
	//-- ------ ### ------ --
	tmpSTR="SystemInfo_Name";
	tmpElement_TXT=document.getElementById(tmpSTR+"_Txt");
	tmpElement_ERROR=document.getElementById(tmpSTR+"_Error");
	if(tmpElement_TXT.value==""){
		tmpElement_ERROR.className="Install_0_21";
		tmpElement_ERROR.innerHTML="对不起，系统名称不能为空";
		tmpBOOL=false;
	}else{
		tmpElement_ERROR.className=tmpCommon.sysHidden;
	}
	//-- ------ ### ------ --
	tmpSTR="SystemUser_Name";
	tmpElement_TXT=document.getElementById(tmpSTR+"_Txt");
	tmpElement_ERROR=document.getElementById(tmpSTR+"_Error");
	if(tmpElement_TXT.value==""){
		tmpElement_ERROR.className="Install_0_21";
		tmpElement_ERROR.innerHTML="对不起，管理员帐号不能为空";
		tmpBOOL=false;
	}else{
		tmpElement_ERROR.className=tmpCommon.sysHidden;
	}
	//-- ------ ### ------ --
	tmpSTR="SystemUser_Pxd";
	tmpElement_TXT=document.getElementById(tmpSTR+"_Txt");
	tmpElement_ERROR=document.getElementById(tmpSTR+"_Error");
	if(tmpElement_TXT.value==""){
		tmpElement_ERROR.className="Install_0_21";
		tmpElement_ERROR.innerHTML="对不起，管理员密码不能为空";
		tmpBOOL=false;
	}else{
		tmpElement_ERROR.className=tmpCommon.sysHidden;
	}
	//-- ------ ### ------ --
	tmpSTR="SystemUser_PxdConfirm";
	tmpElement_TXT=document.getElementById(tmpSTR+"_Txt");
	tmpElement_ERROR=document.getElementById(tmpSTR+"_Error");
	if(tmpElement_TXT.value==""){
		tmpElement_ERROR.className="Install_0_21";
		tmpElement_ERROR.innerHTML="对不起，重复密码不能为空";
		tmpBOOL=false;
	}else{
		tmpElement_ERROR.className=tmpCommon.sysHidden;
	}
	//-- ------ ### ------ --
	tmpSTR="SystemUser_Email";
	tmpElement_TXT=document.getElementById(tmpSTR+"_Txt");
	tmpElement_ERROR=document.getElementById(tmpSTR+"_Error");
	if(tmpElement_TXT.value==""){
		tmpElement_ERROR.className="Install_0_21";
		tmpElement_ERROR.innerHTML="对不起，管理员EMAIL不能为空";
		tmpBOOL=false;
	}else{
		tmpElement_ERROR.className=tmpCommon.sysHidden;
	}
	//-- ------ #Set ------ --
	if(!tmpBOOL){
		return 1;
	}
	
	this.sChecked_Config=1;
	return 0;
}
Install.prototype.OnInstall=function(){
	//-- ------ #Set panel ------ --
	this.OnPanelShow(2);
	//-- ------ #Install ------ --
	document.getElementById("panelContent_2").innerHTML="";
	var tmpURL=this.MakeInstallURL("INITIAL",0);

	document.getElementById("mainInstall_Frame").src=tmpURL;
	//window.open(tmpURL,"_blank");
	return 0;
}
Install.prototype.OnReRequireInstallURL=function(){
	var tmpURL=document.getElementById("mainInstall_URL").value;
	document.getElementById("mainInstall_Frame").src=tmpURL;
	document.getElementById("panelOtherBut_2_LoadingImg").className="Install_0_34";
	document.getElementById("panelOtherBut_2_LoadingLabel").className="Install_0_32";

	return 0;
}
Install.prototype.sMainInstallURL="";
Install.prototype.OnInstall_Callback=function(pFlag,pIndex,pContent){
	
	var tmpFileCount=15;
	var tmpDbCount=15;
	var tmpDbDescriptionsCount=15;
	var tmpURL="";
	//-- ### --
	if(pFlag=="INIT_DONE"){
		tmpURL=parent.tmpInstall.MakeInstallURL("READCONFIG",pIndex);
		parent.document.getElementById("mainInstall_Frame").src=tmpURL;

	}else if(pFlag=="FILE_DONE" && pIndex<=tmpFileCount){
		tmpURL=parent.tmpInstall.MakeInstallURL("READCONFIG",pIndex);
		parent.document.getElementById("mainInstall_Frame").src=tmpURL;
	}else if(pFlag=="FILE_DONE" && pIndex>tmpFileCount){
		tmpURL=parent.tmpInstall.MakeInstallURL("READDB",0);
		parent.document.getElementById("mainInstall_Frame").src=tmpURL;

	}else if(pFlag=="DBFILE_DONE" && pIndex<=tmpDbCount){
		tmpURL=parent.tmpInstall.MakeInstallURL("READDB",pIndex);
		parent.document.getElementById("mainInstall_Frame").src=tmpURL;
	}else if(pFlag=="DBFILE_DONE" && pIndex>tmpDbCount){
		tmpURL=parent.tmpInstall.MakeInstallURL("BUILDDB",0);
		parent.document.getElementById("mainInstall_Frame").src=tmpURL;

	}else if(pFlag=="DB_DONE" && pIndex<=tmpDbCount){
		tmpURL=parent.tmpInstall.MakeInstallURL("BUILDDB",pIndex);
		parent.document.getElementById("mainInstall_Frame").src=tmpURL;
	}else if(pFlag=="DB_DONE" && pIndex>tmpDbCount){
		tmpURL=parent.tmpInstall.MakeInstallURL("DBDESCRIPTIONS",0);
		parent.document.getElementById("mainInstall_Frame").src=tmpURL;

	}else if(pFlag=="DBDESCRIPTIONS_DONE" && pIndex<=tmpDbDescriptionsCount){
		tmpURL=parent.tmpInstall.MakeInstallURL("DBDESCRIPTIONS",pIndex);
		parent.document.getElementById("mainInstall_Frame").src=tmpURL;
	}else if(pFlag=="DBDESCRIPTIONS_DONE" && pIndex>tmpDbDescriptionsCount){
		tmpURL=parent.tmpInstall.MakeInstallURL("CLEAR",0);
		parent.document.getElementById("mainInstall_Frame").src=tmpURL;

	}
	//-- #Error --
	if(pFlag=="ERROR"){
		parent.document.getElementById("panelOtherBut_2_LoadingImg").className=tmpCommon.sysHidden;
		parent.document.getElementById("panelOtherBut_2_LoadingLabel").className=tmpCommon.sysHidden;
	}
	//-- #Success --
	if(pFlag=="SUCCESS"){
		//#Set panel
		parent.document.getElementById("panelNextBut_2").className="Install_0_12";
		parent.document.getElementById("panelOtherBut_2").className=tmpCommon.sysHidden;
		
		tmpSTR=this.sTemplate_InstallSuccuessReport;
		tmpSTR=tmpSTR.replace(/\{Nets.Db_Host}/g,parent.document.getElementById("Db_Host_Txt").value,tmpSTR);
		tmpSTR=tmpSTR.replace(/\{Nets.Db_Port}/g,parent.document.getElementById("Db_Port_Txt").value,tmpSTR);
		tmpSTR=tmpSTR.replace(/\{Nets.Db_Dbname}/g,parent.document.getElementById("Db_Dbname_Txt").value,tmpSTR);
		tmpSTR=tmpSTR.replace(/\{Nets.Db_Tablehead}/g,parent.document.getElementById("Db_Tablehead_Txt").value,tmpSTR);
		tmpSTR=tmpSTR.replace(/\{Nets.Db_Username}/g,parent.document.getElementById("Db_Username_Txt").value,tmpSTR);
		tmpSTR=tmpSTR.replace(/\{Nets.Db_Pxd}/g,parent.document.getElementById("Db_Pxd_Txt").value,tmpSTR);
		/*
		tmpSTR=tmpSTR.replace(/\{Nets.Db_Models_Must}/g,parent.document.getElementById("Db_Models_Must_Txt").value,tmpSTR);
		tmpSTR=tmpSTR.replace(/\{Nets.Db_Models_Optional}/g,parent.document.getElementById("Db_Models_Optional_Txt").value,tmpSTR);
		tmpSTR=tmpSTR.replace(/\{Nets.Db_Data_Optional}/g,parent.document.getElementById("Db_Data_Optional_Txt").value,tmpSTR);
		*/
		tmpSTR=tmpSTR.replace(/\{Nets.SystemInfo_Name}/g,parent.document.getElementById("SystemInfo_Name_Txt").value,tmpSTR);
		tmpSTR=tmpSTR.replace(/\{Nets.SystemInfo_Meta}/g,parent.document.getElementById("SystemInfo_Meta_Txt").value,tmpSTR);
		tmpSTR=tmpSTR.replace(/\{Nets.SystemInfo_Keyword}/g,parent.document.getElementById("SystemInfo_Keyword_Txt").value,tmpSTR);
		tmpSTR=tmpSTR.replace(/\{Nets.SystemInfo_Descriptions}/g,parent.document.getElementById("SystemInfo_Descriptions_Txt").value,tmpSTR);
		tmpSTR=tmpSTR.replace(/\{Nets.SystemUser_Name}/g,parent.document.getElementById("SystemUser_Name_Txt").value,tmpSTR);
		tmpSTR=tmpSTR.replace(/\{Nets.SystemUser_Pxd}/g,parent.document.getElementById("SystemUser_Pxd_Txt").value,tmpSTR);
		tmpSTR=tmpSTR.replace(/\{Nets.SystemUser_PxdConfirm}/g,parent.document.getElementById("SystemUser_PxdConfirm_Txt").value,tmpSTR);
		tmpSTR=tmpSTR.replace(/\{Nets.SystemUser_Email}/g,parent.document.getElementById("SystemUser_Email_Txt").value,tmpSTR);
		//-- #SystemUser_InstallYet_Txt --
		var tmpSystemUser_InstallYet=0;
		Coun0=0;
		while(parent.document.getElementById("SystemUser_InstallYet_Txt"+Coun0)!=undefined){
			if(parent.document.getElementById("SystemUser_InstallYet_Txt"+Coun0).checked){
				tmpSystemUser_InstallYet=parent.document.getElementById("SystemUser_InstallYet_Txt"+Coun0).value;
			}
			Coun0++;
		}
		tmpSTR=tmpSTR.replace(/\{Nets.SystemUser_InstallYet}/g,tmpSystemUser_InstallYet,tmpSTR);
		
		tmpSTR=tmpSTR.replace(/\{Nets.Approot}/g,"../default.php",tmpSTR);
		tmpSTR=tmpSTR.replace(/\{Nets.Approot_QPlatform}/g,"../default.php?ActionType=QPLATFORM",tmpSTR);
		tmpSTR=tmpSTR.replace(/\{Nets.Approot_Platform}/g,"../default.php?ActionType=PLATFORM",tmpSTR);
		parent.document.getElementById("panelContent_3").innerHTML=tmpSTR;
		
	}

	if(tmpURL!=""){
		parent.document.getElementById("mainInstall_URL").value=tmpURL;
	}
	parent.document.getElementById("panelContent_2").innerHTML+=pContent;
	parent.document.getElementById("panelOtherBut_2_Link").focus();
	return 0;
}

function Install_Install_callback(){
	var tmpFlag=tmpInstall.sAjax_0.sFlag;
	var tmpPanel=document.getElementById(tmpInstall.sAjax_0.sPanel);
	var tmpURL=tmpInstall.sAjax_0.sURL;
	var tmpHttpRequests=tmpInstall.sAjax_0.sHttpRequests;
	//alert(tmpHttpRequests.responseText);
	if(tmpHttpRequests.readyState==4){
		//alert(tmpHttpRequests.responseText);
		var tmpData=getDataByFlag(tmpHttpRequests.responseText,tmpFlag);
		//alert(tmpData);
		if(tmpData.indexOf("sendRequest")>=0 && tmpData!="<!--sendRequest-->"){
			//-- ### --
			tmpFileCount=15;
			tmpDbCount=15;
			tmpAR0=tmpData.split(tmpCommon.sysSPLIT1);
			tmpFlag=tmpAR0[0];
			tmpINT=tmpAR0[1];
			tmpPanel.innerHTML+=tmpAR0[2];
			//-- ### --
			if(tmpFlag=="INIT_DONE"){
				var tmpURL=tmpInstall.MakeInstallURL("READCONFIG",tmpINT);
				tmpInstall.sAjax_0.sendRequestSp(tmpURL,"Install_Install_callback()");
				//window.open(tmpURL,"_blank");

			}else if(tmpFlag=="FILE_DONE" && tmpINT<=tmpFileCount){
				var tmpURL=tmpInstall.MakeInstallURL("READCONFIG",tmpINT);
				tmpInstall.sAjax_0.sendRequestSp(tmpURL,"Install_Install_callback()");
				//window.open(tmpURL,"_blank");
			}else if(tmpFlag=="FILE_DONE" && tmpINT>tmpFileCount){
				var tmpURL=tmpInstall.MakeInstallURL("READDB",0);
				tmpInstall.sAjax_0.sendRequestSp(tmpURL,"Install_Install_callback()");
				//window.open(tmpURL,"_blank");

			}else if(tmpFlag=="DBFILE_DONE" && tmpINT<=tmpDbCount){
				var tmpURL=tmpInstall.MakeInstallURL("READDB",tmpINT);
				tmpInstall.sAjax_0.sendRequestSp(tmpURL,"Install_Install_callback()");
				//window.open(tmpURL,"_blank");
			}else if(tmpFlag=="DBFILE_DONE" && tmpINT>tmpDbCount){
				var tmpURL=tmpInstall.MakeInstallURL("BUILDDB",0);
				tmpInstall.sAjax_0.sendRequestSp(tmpURL,"Install_Install_callback()");
				//window.open(tmpURL,"_blank");

			}else if(tmpFlag=="DB_DONE" && tmpINT<=tmpDbCount){
				var tmpURL=tmpInstall.MakeInstallURL("BUILDDB",tmpINT);
				tmpInstall.sAjax_0.sendRequestSp(tmpURL,"Install_Install_callback()");
				//window.open(tmpURL,"_blank");
			}else if(tmpFlag=="DB_DONE" && tmpINT>tmpDbCount){
				var tmpURL=tmpInstall.MakeInstallURL("CLEAR",0);
				tmpInstall.sAjax_0.sendRequestSp(tmpURL,"Install_Install_callback()");
				//window.open(tmpURL,"_blank");

			}
			//-- #Error --
			if(tmpFlag=="ERROR"){}
			//-- #Success --
			if(tmpFlag=="SUCCESS"){
				//#Set panel
				document.getElementById("panelNextBut_2").className="Install_0_12";
				tmpSTR=this.sTemplate_InstallSuccuessReport;
				document.getElementById("panelContent_3").innerHTML=tmpSTR;
				
			}

	    }else{
	    	//tmpPanel.innerHTML=tmpCommon.sysError_Ajax.replace(/\{Nets.Response}/g,tmpURL);
	    }
	}else{}
}

//#Install
Install.prototype.MakeInstallURL=function(pFlag,pIndex){
	var tmpDBS_Value="";
	var tmpDBS_Text="";
	var tmpSystemUser_InstallYet=0;
	var Coun0=0;
	//-- ### --
	Coun0=0;
	while(document.getElementById("Db_Models_Must_Txt"+Coun0)!=undefined){
		if(document.getElementById("Db_Models_Must_Txt"+Coun0).checked){
			tmpDBS_Value+=document.getElementById("Db_Models_Must_Txt"+Coun0).value+tmpCommon.sysSPLIT2;
		}
		Coun0++;
	}
	Coun0=0;
	while(document.getElementById("Db_Models_Optional_Txt"+Coun0)!=undefined){
		if(document.getElementById("Db_Models_Optional_Txt"+Coun0).checked){
			tmpDBS_Value+=document.getElementById("Db_Models_Optional_Txt"+Coun0).value+tmpCommon.sysSPLIT2;
		}
		Coun0++;
	}
	Coun0=0;
	while(document.getElementById("Db_Data_Optional_Txt"+Coun0)!=undefined){
		if(document.getElementById("Db_Data_Optional_Txt"+Coun0).checked){
			tmpDBS_Value+=document.getElementById("Db_Data_Optional_Txt"+Coun0).value+tmpCommon.sysSPLIT2;
		}
		Coun0++;
	}
	//-- ### --
	Coun0=0;
	while(document.getElementById("Db_Models_Must_Txt"+Coun0)!=undefined){
		if(document.getElementById("Db_Models_Must_Txt"+Coun0).checked){
			tmpDBS_Text+=document.getElementById("Db_Models_Must_Txt"+Coun0+"_Label").innerHTML+tmpCommon.sysSPLIT2;
		}
		Coun0++;
	}
	Coun0=0;
	while(document.getElementById("Db_Models_Optional_Txt"+Coun0)!=undefined){
		if(document.getElementById("Db_Models_Optional_Txt"+Coun0).checked){
			tmpDBS_Text+=document.getElementById("Db_Models_Optional_Txt"+Coun0+"_Label").innerHTML+tmpCommon.sysSPLIT2;
		}
		Coun0++;
	}
	Coun0=0;
	while(document.getElementById("Db_Data_Optional_Txt"+Coun0)!=undefined){
		if(document.getElementById("Db_Data_Optional_Txt"+Coun0).checked){
			tmpDBS_Text+=document.getElementById("Db_Data_Optional_Txt"+Coun0+"_Label").innerHTML+tmpCommon.sysSPLIT2;
		}
		Coun0++;
	}
	//-- #SystemUser_InstallYet_Txt --
	Coun0=0;
	while(document.getElementById("SystemUser_InstallYet_Txt"+Coun0)!=undefined){
		if(document.getElementById("SystemUser_InstallYet_Txt"+Coun0).checked){
			tmpSystemUser_InstallYet=document.getElementById("SystemUser_InstallYet_Txt"+Coun0).value;
		}
		Coun0++;
	}
	
	var tmpURL="index.php?ActionType=DInstall&DInstall="+pFlag+tmpCommon.sysSPLIT1+pIndex;
	tmpURL=tmpURL+"&Db_Host="+tmpCommon.encodeURL(document.getElementById("Db_Host_Txt").value);
	tmpURL=tmpURL+"&Db_Dbname="+tmpCommon.encodeURL(document.getElementById("Db_Dbname_Txt").value);
	tmpURL=tmpURL+"&Db_Port="+tmpCommon.encodeURL(document.getElementById("Db_Port_Txt").value);
	tmpURL=tmpURL+"&Db_Tablehead="+tmpCommon.encodeURL(document.getElementById("Db_Tablehead_Txt").value);
	tmpURL=tmpURL+"&Db_Username="+tmpCommon.encodeURL(document.getElementById("Db_Username_Txt").value);
	tmpURL=tmpURL+"&Db_Pxd="+tmpCommon.encodeURL(document.getElementById("Db_Pxd_Txt").value);
	tmpURL=tmpURL+"&Db_Models_Value="+tmpCommon.encodeURL(tmpDBS_Value);
	tmpURL=tmpURL+"&Db_Models_Text="+tmpCommon.encodeURL(tmpDBS_Text);
	tmpURL=tmpURL+"&SystemInfo_Name="+tmpCommon.encodeURL(document.getElementById("SystemInfo_Name_Txt").value);
	tmpURL=tmpURL+"&SystemInfo_Meta="+tmpCommon.encodeURL(document.getElementById("SystemInfo_Meta_Txt").value);
	tmpURL=tmpURL+"&SystemInfo_Keyword="+tmpCommon.encodeURL(document.getElementById("SystemInfo_Keyword_Txt").value);
	tmpURL=tmpURL+"&SystemInfo_Descriptions="+tmpCommon.encodeURL(document.getElementById("SystemInfo_Descriptions_Txt").value);
	tmpURL=tmpURL+"&SystemUser_Name="+tmpCommon.encodeURL(document.getElementById("SystemUser_Name_Txt").value);
	tmpURL=tmpURL+"&SystemUser_Pxd="+tmpCommon.encodeURL(document.getElementById("SystemUser_Pxd_Txt").value);
	tmpURL=tmpURL+"&SystemUser_PxdConfirm="+tmpCommon.encodeURL(document.getElementById("SystemUser_PxdConfirm_Txt").value);
	tmpURL=tmpURL+"&SystemUser_Email="+tmpCommon.encodeURL(document.getElementById("SystemUser_Email_Txt").value);
	tmpURL=tmpURL+"&SystemUser_InstallYet="+tmpCommon.encodeURL(tmpSystemUser_InstallYet);
	tmpURL=tmpURL+"&NUM="+Math.random();
	//window.open(tmpURL);
	
	return tmpURL;
}

//#Check db connection
Install.prototype.CheckDbConnection=function(){
	if(this.sChecked_Config==0){
		return 1;
	}
	//-- ### --
	var tmpURL="index.php?ActionType=DDbConnectionTest&DDbConnectionTest=0";
	tmpURL=tmpURL+"&Db_Host="+tmpCommon.encodeURL(document.getElementById("Db_Host_Txt").value);
	tmpURL=tmpURL+"&Db_Dbname="+tmpCommon.encodeURL(document.getElementById("Db_Dbname_Txt").value);
	tmpURL=tmpURL+"&Db_Port="+tmpCommon.encodeURL(document.getElementById("Db_Port_Txt").value);
	tmpURL=tmpURL+"&Db_Tablehead="+tmpCommon.encodeURL(document.getElementById("Db_Tablehead_Txt").value);
	tmpURL=tmpURL+"&Db_Username="+tmpCommon.encodeURL(document.getElementById("Db_Username_Txt").value);
	tmpURL=tmpURL+"&Db_Pxd="+tmpCommon.encodeURL(document.getElementById("Db_Pxd_Txt").value);
	tmpURL=tmpURL+"&NUM="+Math.random();

	this.sAjax_0.sFlag="Message";
	this.sAjax_0.sPanel="Db_Pxd_Error";
	this.sAjax_0.sURL=tmpURL;
	this.sAjax_0.sendRequestSp(tmpURL,"Install_CheckDbConnection_callback()");
	//window.open(tmpURL,"_blank");
	
	return 0;
}
function Install_CheckDbConnection_callback(){
	var tmpFlag=tmpInstall.sAjax_0.sFlag;
	var tmpPanel=document.getElementById(tmpInstall.sAjax_0.sPanel);
	var tmpURL=tmpInstall.sAjax_0.sURL;
	var tmpHttpRequests=tmpInstall.sAjax_0.sHttpRequests;
	//alert(tmpHttpRequests.responseText);
	if(tmpHttpRequests.readyState==4){
		//alert(tmpHttpRequests.responseText);
		var tmpData=getDataByFlag(tmpHttpRequests.responseText,tmpFlag);
		//alert(tmpData);
		if(tmpData.indexOf("sendRequest")>=0 && tmpData!="<!--sendRequest-->"){
			if(tmpData=="Success<!--sendRequest-->"){
				tmpPanel.className="Install_0_22";
				tmpPanel.innerHTML="数据库链接测试成功；";
				this.sChecked_Config=1;
				//-- ------ #Install ------ --
				tmpInstall.OnInstall();
				
			}else {
				tmpPanel.className="Install_0_21";
				tmpPanel.innerHTML="数据库链接测试失败，请检查您填写的地址、端口、用户名和用户密码；";
				this.sChecked_Config=0;
				
			}
			
	    }else{
	    	//tmpPanel.innerHTML=tmpCommon.sysError_Ajax.replace(/\{Nets.Response}/g,tmpURL);
	    }
	}else{}
}
