function querySPTCode(taxNo){
	if(!isTaxNo(taxNo)){
		alert("税号不正确！");	
		return;
	}
	openBox('/servlet/wa/RegCode?handle=querySPTCode&taxNo='+taxNo,'税票通注册码下载',550,300,false);
	//document.queryCodeForm.action="/servlet/wa/RegCode?handle=querySPTCode";
	//document.queryCodeForm.submit();
	//document.queryCodeForm.action="";
}

function queryDeductCode(taxNo){
	if(!isTaxNo(taxNo)){
		alert("税号不正确！");	
		return;
	}
	openBox('/servlet/wa/RegCode?handle=queryDeductCode&taxNo='+taxNo,'抵扣联信息采集系统注册码查询',600,400,false);
}

function queryHuyouCode(taxNo){
	if(!isTaxNo(taxNo)){
		alert("税号不正确！");	
		return;
	}	
	openBox('/servlet/wa/RegCode?handle=queryHuyouCode&taxNo='+taxNo,'沪友注册码查询',700,400,false);
}

function queryReportTaxCode(taxNo){
	if(taxNo==""||taxNo=="输入企业税号"){
		alert("请先输入税号。");
		return;
	}
	if(!isTaxNo(taxNo)){
		alert("请输入正确税号！");	
		return;
	}	
	openBox('/servlet/wa/RegCode?handle=querySoftcode&taxNo='+taxNo,'电子报税软件注册码查询',700,450,false);
}

function queryReportTaxCodeForm(){
	openBox('/servlet/wa/RegCode?handle=queryReportTaxCodeForm','电子报税软件注册码查询',700,450,false);
}

function queryEtaxCode(taxNo){
	if(!isTaxNo(taxNo)){
		alert("税号不正确！");	
		return;
	}	
	openBox('/servlet/wa/RegCode?handle=queryEtaxcode&taxNo='+taxNo,'e税宝注册文件查询',700,450,false);
}

function queryCode(){
	if(document.queryCodeForm.taxNo.value==""||document.queryCodeForm.taxNo.value=="输入企业税号"){
		alert("请先输入税号。");
		document.queryCodeForm.taxNo.focus();
		return;
	}
	if(document.queryCodeForm.codeType.value==1){//抵扣联注册码查询
		queryDeductCode(document.queryCodeForm.taxNo.value)
	}else if(document.queryCodeForm.codeType.value==2){//电子申报注册码
		queryReportTaxCode(document.queryCodeForm.taxNo.value);
	}else if(document.queryCodeForm.codeType.value==3){//沪友注册码查询
		queryHuyouCode(document.queryCodeForm.taxNo.value);
	}else if(document.queryCodeForm.codeType.value==4){//税票通注册码查询
		querySPTCode(document.queryCodeForm.taxNo.value);
	}else if(document.queryCodeForm.codeType.value==5){//e税宝注册码查询
		queryEtaxCode(document.queryCodeForm.taxNo.value);
	}
}
