
/*
-- ------ netsMakeHtml ------ --
unionNets.com
2010
*/
function netsMakeHtml(){}
//-- ------ #Parameters ------ --
netsMakeHtml.prototype.sAjax_0=new netsSingleAjax();
//-- ------ #Methods ------ --
netsMakeHtml.prototype.OnRequest=function(){
	var Coun0=0;
	var tmpForm=document.getElementById(tmpCommon.sysForm);
	var tmp_sstSection_0Txt=0;
	
	Coun0=0;
	while(tmpForm.sstSection_0Txt.length>Coun0){
		if(tmpForm.sstSection_0Txt[Coun0].checked){
			tmp_sstSection_0Txt=tmpForm.sstSection_0Txt[Coun0].value;
		}
		Coun0++;
	}
	pURL=tmpCommon.sysPage+"?ActionType=Makehtml&Makehtml="+tmp_sstSection_0Txt+tmpCommon.sysSPLIT1+"0";
	
	this.sAjax_0.sFlag="nets_Makehtml";
	this.sAjax_0.sPanel="sstReport_0Txt_LabelTxt";
	this.sAjax_0.sParameter=tmpCommon.sysPage+"?ActionType=Makehtml&Makehtml="+tmp_sstSection_0Txt+tmpCommon.sysSPLIT1;
	this.sAjax_0.sendRequestSp(pURL,"makehtml_Callback()");
	
	var tmpPanel=document.getElementById(this.sAjax_0.sPanel);
	tmpPanel.innerHTML="页面生成中，请稍等...<br />"+tmpPanel.innerHTML;
	//window.open(pURL,"_blank");
}
function makehtml_Callback(){
	var tmpURL=tmpMakeHtml.sAjax_0.sURL;
	var tmpFlag=tmpMakeHtml.sAjax_0.sFlag;
	var tmpPanel=document.getElementById(tmpMakeHtml.sAjax_0.sPanel);
	var tmpHttpRequests=tmpMakeHtml.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-->"){
			var tmpAR0=tmpData.split(tmpCommon.sysSPLIT5);
			if(tmpAR0.length!=2){
				tmpAR0[1]=99999;
			}else{
				tmpAR0[1]=tmpAR0[1].replace("<!--sendRequest-->","");
			}
	    	tmpPanel.innerHTML=tmpAR0[0]+tmpPanel.innerHTML;
	    	tmpFrames.showLoading(1);
	    	if(tmpAR0[1]<99999){
	    		pURL=tmpMakeHtml.sAjax_0.sParameter+tmpAR0[1];
	    		tmpMakeHtml.sAjax_0.sendRequestSp(pURL,"makehtml_Callback()");
	    	}
	    }else{
	    	tmpPanel.innerHTML=tmpCommon.sysError_Ajax.replace(/\{Nets.Response}/g,tmpURL);
	    	tmpFrames.showLoading(1);
	    }
	}else{
		tmpFrames.showLoading(0);
	}
}

//-- ------ #Instanct ------ --
tmpMakeHtml=new netsMakeHtml();
