﻿JSFG_Constants ={
	FGJGDM : {
		Europe : 'EC'
	}
}
/*bookshppping*/
function shoppingbook()
{
	window.open("shoppingcart.jsp?action=addbook&tsh=020011",'order','menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=1,resizable=0,width=760,top=10,left=50,height=560');
	
}
/* comm function */

function ShowMsg(msg)
{
	if (msg!="")
		alert(msg);
}
	

/* oder operate function */
function OnOrderItemClicked()
{

	id = event.returnValue;

	if ( null != id && id.length > 0 ) window.open("orderdetail.jsp?orderid="+id,"","scrollbars=yes,resizable=no");
}
function OnStdMgrItemClicked()
{
	id = event.returnValue;
	if ( null != id && id.length > 0 ) window.open("stddetail.jsp?tradeid="+id,"","scrollbars=yes,resizable=no");
}

function GetMgrOrderProc(status)
{
	var ret="";
	if (status=="0")
	{
		/*
		ret="<a onclick=\"javascript:MgrAcceptOrder(this.parentElement.parentElement);\"></a>"
			+"<br>"+"<a onclick=\"javascript:MgrCancelOrder(this.parentElement.parentElement);\"></a>";
		*/
		ret="<img src='images/accept-2.gif' border='0' alt='接受订单' class='lnkimg' onclick=\"javascript:MgrAcceptOrder(this.parentElement.parentElement);\">"
			+"<br>"+"<img src='images/eject-2.gif' border='0' alt='拒绝订单' class='lnkimg' onclick=\"javascript:MgrCancelOrder(this.parentElement.parentElement);\">";
		
	}else if(status=="1"){	//处理中
		ret="<a onclick=\"javascript:MgrFinishOrder(this.parentElement.parentElement);\">完成订单</a>"
			+"<br>"+"<a onclick=\"javascript:MgrCancelOrder(this.parentElement.parentElement);\">拒绝订单</a>";
	}
	return ret;
}

function MgrFinishOrder(curTR)
{
	/*
	if (confirm("确认要完成订单("+curTR.children[1].innerText+")吗?"))
		location="ordermgr.jsp?op=finish&id="+curTR.children[1].innerText;
	*/
	var orderprocparam=new Object;
	orderprocparam.totalamount=curTR.children[5].innerText;
	orderprocparam.orderid=curTR.children[1].innerText;
	orderprocparam.paymethod="0";
	if (window.showModalDialog("orderproc.jsp",orderprocparam)){
		var url="ordermgr.jsp?op=finish&id="+curTR.children[1].innerText+"&paymethod="+orderprocparam.paymethod;
		location=url;				
	}
		
}
function MgrAcceptOrder(curTR)
{
	if (confirm("确认要接受订单("+curTR.children[1].innerText+")吗?")){
		var url="ordermgr.jsp?op=accept&id="+curTR.children[1].innerText;	
		location=url;				
	}
}
function GetMyOrderProc(status)
{
	var ret="";
	if (status=="0")
	{		
		ret="<img src='images/Style_Blue2/cancel-2.gif' border='0' alt='撤销订单' class='lnkimg' onclick=\"javascript:MgrCancelMyOrder(this.parentElement.parentElement);\">";
		
	}
	return ret;
}
function GetUsrOrderProc(status)
{
	var ret="";
	if (status=="0"){		//待处理 
		ret="<a onclick=\"javascript:UsrCancelOrder(this.parentElement.parentElement);\">撤销订单</a>";
	}
	return ret;
}


function GetStdOrgStatusDesc(status)
{
	if (status=="0")
		return "关闭";
	else if (status=="1")
		return "开放";
	else
		return "未知";
}

function GetStdOrgProc(status)
{
	var ret="";
	if (status=="0")		// 关闭
		ret="<a href=# onclick=\"javascript:MgrEnableStdOrg(this.parentElement.parentElement);\">开放</a>";
	else
		ret="<a href=# onclick=\"javascript:MgrDisableStdOrg(this.parentElement.parentElement);\">关闭</a>";
	
	ret+="&nbsp;";
	ret+="<a href=# onclick=\"javascript:MgrRemoveStdOrg(this.parentElement.parentElement);\">删除</a>";
	
	return ret;
}

function GetDeliverInfoProc()
{
	ret="<a href=# onclick=\"javascript:MgrEditDeliverInfo(this.parentElement.parentElement);\">修改</a>";	
	ret+="&nbsp;";
	ret+="<a href=# onclick=\"javascript:MgrRemoveDeliverInfo(this.parentElement.parentElement);\">删除</a>";
	return ret;	
}

function MgrRemovePaymentInfo(curTR)
{
	if (confirm("确认要删除("+curTR.children[1].innerText+")吗?")){
		alert(curTR.children[1].innerText);
		location="paymentmgr.jsp?op=remove&fkfs="+curTR.children[1].innerText;		
	}
}

function GetPaymentInfoProc()
{
	ret="<a href='#' onclick=\"javascript:MgrRemovePaymentInfo(this.parentElement.parentElement);\">删除</a>";
	return ret;	
}

function MgrRemoveUsrGroupInfo(curTR,action)
{
	if (confirm("确认要删除("+curTR.children[1].innerText+")吗?"))
		location="usrgroupmgr.jsp?op=remove&action="+action+"&groupId="+curTR.children[1].innerText;		
}



function MgrApproveUsr(curTR)
{
	if (confirm("确认("+curTR.children[1].innerText+")成会员吗?"))
		window.open("usrapprove.jsp?op=pass&usrId="+curTR.children[1].innerText,"","menubar=no,status=no,location=no,titlebar=no,scrollbars=yes,resizable=no,height=200,width=200,top=100,left=250");
}

function MgrEjectUsr(curTR)
{
	if (confirm("确认屏蔽("+curTR.children[1].innerText+")的待审信息吗?"))
		window.open("usrapprove.jsp?op=remove&usrId="+curTR.children[1].innerText,"","menubar=no,status=no,location=no,titlebar=no,scrollbars=yes,resizable=no,height=200,width=200,top=100,left=250");
		//location="usrapprove.jsp?op=remove&usrId="+curTR.children[1].innerText;		
}

function GetUsrApproveProc()
{
	ret="<a href=# onclick=\"javascript:MgrApproveUsr(this.parentElement.parentElement);\">通过</a>";
	ret+="&nbsp;";
	ret+="<a href=# onclick=\"javascript:MgrEjectUsr(this.parentElement.parentElement);\">转存</a>";
	return ret;	
}

function GetOrderStatusDesc(status)
{
	if (status=="0")
		return "等待处理";
	else if (status=="1")
		return "处理中";
	else if (status=="2")
		return "系统拒绝";			
	else if (status=="3")
		return "用户取消";
	else if (status=="4")
		return "处理完毕";
	else
		return "未知";
}

function GetOrderTypeDesc(LB)
{
	if (LB=="0")
		return "下载标准";
	else if (LB=="1")
		return "购买标准";
	else if (LB=="2")
		return "标准查新";
	else if (LB=="3")
		return "译文下载";	
	else if (LB=="3")
		return "译文下载";	
	else if (LB=="6")
		return "在线浏览";	
	else if (LB=="7")
		return "普通浏览";
	else
		return "未知";
		
		

}

function GetDeliverTypeDesc(TDFS)
{
	if (TDFS=="-")
		return "查新";
	else return TDFS;
}

function UsrCancelOrder(curTR)
{
	if (confirm("确认要取消订单("+curTR.children[1].innerText+")吗?"))
		location="usrorderinfo.jsp?op=cancel&id="+curTR.children[1].innerText;
}








function GetUsrTypeDesc(usrtype)
{
	if (usrtype=="0")
		return "匿名用户";
	else if (usrtype=="1")
		return "注册用户";
	else if (usrtype=="2")
		return "会员用户";
	else if (usrtype=="3")
		return "管理用户";
	else if (usrtype=="4")
		return "普通会员";
	else if (usrtype=="5")
		return "高级用户";
	else if (usrtype=="6")
		return "订单管理员";
	else
		return "未知用户";
		
}

function GetGroupTypeDesc(groupType)
{
	if (groupType!="null")
		return groupType;
	else
		return "未分组";
}


function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span");
		if(el.style.display != "block"){
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="vsubmenu")
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}




function MgrEditDeliverInfo(curTR)
{
	ShowEditForm(curTR);		
}

function MgrRemoveDeliverInfo(curTR)
{
	if (confirm("确认要删除("+curTR.children[1].innerText+")吗?"))
		location="delivermgr.jsp?op=remove&id="+curTR.children[1].innerText;		
}


function GetTradeTypeDesc(tradeType)
{
	if (tradeType=="0") {
		return "下载标准";
	} else if (tradeType=="1") {
		return "购买标准";
	} else if (tradeType=="2") {
		return "标准查新";
	} else if (tradeType=="3") {
		return "转入页数";
	} else if (tradeType=="4") {
		return "转出页数";
	} else if (tradeType=="5") {
		return "译文下载";	
	} else if (tradeType=="6") {
		return "在线浏览";	
	} else if (tradeType=="7") {
		return "普通浏览";	
	} else if (tradeType=="11") {
		return "下载法规";
	} else if (tradeType=="12")
		return "购买法规";		
	else if (tradeType=="13")
		return "法规查新";
	else if (tradeType=="14")
		return "法规在线浏览";	
	else if (tradeType=="15")
		return "法规普通浏览";	
	else
		return "未知交易类别";
}

function GetWastebookTypeDesc(type)
{
	if (type=="0")
		return "下载标准";
	else if (type=="1")
		return "购买标准";
	else if (type=="2")
		return "标准查新";
	else if (type=="3")
		return "转入页数";		
	else if (type=="4")
		return "转出页数";
	else if (type=="5")
		return "译文下载";		
	else if (type=="6")
		return "浏览标准";	
	else if (type=="7")
		return "普通浏览";
	else if (type=="11")
		return "法规下载";		
	else if (type=="13")
		return "浏览法规";	
	else if (type=="14")
		return "法规查新";	
	else
		return "未知类别";
}

function GetTradeDesc(tradeId)
{
	return "<a href='tradedetail.jsp?tradeid="+tradeId+"' target='_new'>"+tradeId+"</a>";
}



function OnTradeItemClicked()
{
	id = event.returnValue;

	if ( null != id && id.length > 0 ) {
		if(id=='ll')
		{alert(id);
		return;
		}
		else
		{	//alert(id);
		window.open("tradedetail.jsp?tradeid="+id,"","scrollbars=yes,resizable=no");
		}
		}
}


function OnGroupUsageItemClicked()
{
	id = event.returnValue;
	if ( null != id && id.length > 0 ) location="usrusagenext.jsp?usrgrp="+id;
}

function OnGroupServiceItemClicked()
{
	id = event.returnValue;
	if ( null != id && id.length > 0 ) location="servicestat44.jsp?usrgrp="+id;
}

function OnzwServiceItemClicked()
{
	id = event.returnValue;
	if ( null != id && id.length > 0 ) location="servicestat9.jsp?zw="+id;
}


function SelectOrg(obj)
{
	showModalDialog("orgselector.jsp",obj,"status:no;center:yes;help:no");
}

// add by kevin 20100315
function SelectCountry(obj)
{
	showModalDialog("orgselector4newMarket.jsp",obj,"status:no;center:yes;help:no");
}
// endadd

function SelectTechOrg(obj)
{
	showModalDialog("JiShuFaGui/techOrgSelector.jsp",obj,"status:no;center:yes;help:no");
}

function SelectTaxonomy()
{
	window.open("taxonomyselector.jsp","","menubar=no,status=no,location=no,titlebar=no,scrollbars=yes,resizable=no,height=600,width=780");
}

function SelectTechTaxonomy()
{
	window.open("JiShuFaGui/techTaxOnoMySelector.jsp","","menubar=no,status=no,location=no,titlebar=no,scrollbars=yes,resizable=no,height=600,width=780");
}

//处理订购
function DLPDFShopItem(bzid)
{
	if (bzid==" ")
		return;	
	AddOrderItem2(bzid);
}
//处理订购译文
function DLPDFShopItemcn(bzid)
{
	if (bzid==" ")
		return;	
	AddOrderItem(bzid);
}
//download
function DLPDFItem(TR,PDFFileName)
{ 

	if (PDFFileName==" ")
		return;
	ShowDlPDFForm(TR.children[1].innerText,PDFFileName);
}

function HasAsset(id)
{
	if (id=="*")
		return "<img class='lnkimg' src='images/shopcar.gif' onclick='javascript:AddOrderItem(this.parentElement.parentElement)'>"
	else
		return "&nbsp;";
}
//处理下载
function HasPDF(pdffile)
{
	
	if (pdffile!="null")
	{
		return "<a href='#' onclick='javascript:DLPDFItem(this.parentElement.parentElement,\""+pdffile+"\")'>"+"下载"+"</a>";
	}
	else
		return "&nbsp;";
}
//处理下载
function HasForcePDF(pdffile)
{
	
	if (pdffile!="null")
	{
		return "<a href='#' onclick='javascript:DLPDFItem(this.parentElement.parentElement,\""+pdffile+"\")'>"+"阅读"+"</a>";
	}
	else
		return "&nbsp;";
}

//处理下载

//处理译文下载
function DLPDFItemcn(TR,PDFFileName)
{
	if (PDFFileName==" ")
		return;
	ShowDlPDFFormcn(TR.children[1].innerText,PDFFileName);
}
//处理译文订购
function DLPDFItemShopcn(TR,PDFFileName)
{
	if (PDFFileName==" ")
		return;
	ShowDlPDFShopFormcn(TR.children[1].innerText,PDFFileName);
}
//处理下载显示
function HasPDFYW(pdffile)
{
	if (pdffile!="null")
	{
		return "<a href='#' onclick='javascript:DLPDFItemcn(this.parentElement.parentElement,\""+pdffile+"\")'>"+"下载"+"</a>";
	}
	else
		return "&nbsp;";
}
function HasForcePDFYW(pdffile)
{
	if (pdffile!="null")
	{
		return "<a href='#' onclick='javascript:DLPDFItemcn(this.parentElement.parentElement,\""+pdffile+"\")'>"+"阅读"+"</a>";
	}
	else
		return "&nbsp;";
}
//处理译文订购显示
function HasPDFYWShop(pdffile)
{
	if (pdffile!="null"){
		return "<a href='#' onclick='javascript:DLPDFItemShopcn(this.parentElement.parentElement,\""+pdffile+"\")'>"+"订购"+"</a>";
	}
	else
		return "&nbsp;";
}

//处理订购显示
function HasPDFShop(bzid)
{

	if (bzid!="null"){
		return "<a href='#' onclick='javascript:DLPDFShopItem(\""+bzid+"\")'>"+"订购"+"</a>";
	}
	else
		return "&nbsp;";
}
function ShowShoppingcart()
{
	window.open("shoppingcart.jsp","order","menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=1,resizable=0,width=720,top=10,left=50,height=560");
}

function OnStdItemClicked(){
 	id = event.returnValue;
	id=encodeURIComponent(id);
	if ( null != id && id.length > 0 ) window.open("stdinfo.jsp?id="+id,"","scrollbars=yes,resizable=yes");
}
// BeginAdd kevin 10/03/16, task #zyw05
function OnNewMarketStdItemClicked(){
 	id = event.returnValue;
	id=encodeURIComponent(id);
	if ( null != id && id.length > 0 ) window.open("stdinfo.jsp?isNewMarket=Y&id="+id,"","scrollbars=yes,resizable=yes");
}
// EndAdd kevin 10/03/16, task #zyw05

// BeginAdd kevin 09/10/14, task #zyw01
function OnTechItemClicked(){
 	id = event.returnValue;
	id=encodeURIComponent(id);
	if ( null != id && id.length > 0 ) window.open("techinfo.jsp?id="+id,"","scrollbars=yes,resizable=yes");
}
// EndAdd kevin 09/10/14, task #zyw01

function OnUsrTradeItemClicked(){
 	id = event.returnValue;
	if ( null != id && id.length > 0 ) window.location="trademgr.jsp?usrid="+id;
}

function OnUsrTradeItemClicked2(){
 	id = event.returnValue;
	if ( null != id && id.length > 0 ) window.location="grp_trademgr.jsp?usrid="+id;
}


function BuildPDFUrl(PDFFileName)
{
	if (PDFFileName=='null')
		return "&nbsp;";
	else
		return "<a href='ShowPDFDLForm(\""+PDFFileName+"\")'>"+PDFFileName+"</a>";
}


function IsValidEmail(str) {
   return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}

function IsEmpty(inp) {
   return ( (inp.value==null) || (inp.value.length==0) );
}

function IsNumeric(sText) {
	try {
		var nn = parseFloat(sText);
		if ( nn>=0 ) return true;
		return false;
	} catch (e){
		alert( 'parseFloat err' );
		return false;
	}
	return false;
}

function IsDate(str){
	var reg = /^(\d{1,4})(-|\.|\/)(\d{1,2})\2(\d{1,2})$/; 
	var r = str.match(reg); 
	if(r==null) return false; 
	return true;
}

//校验普通电话、传真号码：可以“+”开头，除数字外，可含有“-”��
function IsTel(s)
{
	//var patrn=/^[+]{0,1}(\d){1,3}[ ]?([-]?(\d){1,12})+$/;
	var patrn=/^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/;
	if (!patrn.exec(s)) return false;
	return true;
}

//校验邮政编码
function IsPostalCode(s)
{
	//var patrn=/^[a-zA-Z0-9]{3,12}$/;
	var patrn=/^[a-zA-Z0-9 ]{3,12}$/;
	if (!patrn.exec(s)) return false;
	return true;
}


function checkField( fld, s, chk ){
	if ( fld==null ){
		alert("没有检查字段:" + s + "["+ fld +"]" );
		return false;
	}
	if ( chk.indexOf("notNull") ){
		if ( (inp.value==null) || (inp.value.length==0) ){
			alert( s + "不能为空。");
			fld.select();
			fld.focus();
			return false;
		}
	}
	if ( chk.indexOf("Num") ){
		if ( IsNumeric( fld.value ) ){
		}
	}
}
function chkEmpty( fld, msg ){
	if ( IsEmpty(fld) ) {
		alert("["+msg+"]不能为空值");
		fld.select();
		fld.focus();
		return false;
	}
	return true;
}
function chkEmail(fld, msg){
	if ( IsValidEmail(fld.value) ) return true;
	alert(msg+'格式不是正确的电子邮件地址格式');
	fld.select();
	fld.focus();
	return false;
}
function chkPassEqual(fld1,fld2){
	if ( fld1.value != fld2.value ){
		alert('两次输入的密码不一致');
		fld2.select();
		fld2.focus(); 
		return false;
	}
	return true;
}
function chkNumeric(fld,msg){
	if ( IsNumeric(fld.value) ) return true;
	alert(msg+'不是数值');
	fld.select();
	fld.focus();
	return false;
}

function chkDate(fld,msg){
	if ( IsDate(fld.value) ) return true;
	alert(msg+'不是日期格式');
	fld.select();
	fld.focus();
	return false;
}
function chkTel(fld,msg){
	if ( IsEmpty(fld) || IsTel(fld.value) ) return true;
	alert(msg+'不是正确的格式');
	fld.select();
	fld.focus();
	return false;
}
function chkPostalcode(fld,msg){
	if ( IsEmpty(fld) || IsPostalCode(fld.value) ) return true;
	alert(msg+'不是正确的格式');
	fld.select();
	fld.focus();
	return false;
}

function GetBZStatus(zt)
{
	if (zt=="作废")
		return "<span style='background-color: Red;	color: #F0F8FF;'>作废</span>";
	else if (zt=="未生效")
		return "<span style='background-color: yellow;	color: #000000;'>未生效</span>";
	else
		return "<span style='background-color: green;	color: #F0F8FF;'>现行</span>";

}


function ShowPrintVer(title,obj)
{
	window.open("printform.jsp?title="+title+"&obj="+obj,"","scrollbars=yes,resizable=no");
}
function GetUsrStatus(status)
{
	if (status=="T")
		return "现行";
	else if(status=="H")
		return "屏蔽";
	else if(status=="S")
		return "停用";
	else if(status=="F")
		return "未审批";
}
function GetUsrStatusProc(status)
{
	var ret="";
	if (status=="T"){		// 正常
		
		ret="<img src='images/sotpUser.gif' border='0' alt='停用' class='lnkimg' onclick=\"javascript:StopUseing(this.parentElement.parentElement);\">";
		
	}else if(status=="F"||status=="S"||status=="H"){	// 中
			ret="<img src='images/Opening.gif' border='0' alt='启用' class='lnkimg' onclick=\"javascript:OpeningUser(this.parentElement.parentElement);\">"
			+"<br>"+"<img src='images/delete.gif' border='0' alt='删除' class='lnkimg' onclick=\"javascript:deleteUser(this.parentElement.parentElement);\">";
	}
	return ret;
}



//bookscript
function viewdeletebook(tspt)
{
	if (tspt!="null")
	{
		return "<a href='#' onclick='javascript:clickdeletebook(this.parentElement.parentElement,\""+tspt+"\")'>"+"删除"+"</a>";
	}
	else
		return "&nbsp;";

}

function viewmodifybook(tsid)
{
	if (tsid!="null")
	{
		return "<a href=\"bookupdate.jsp?id="+tsid+"\">修改</a>";
	}
	else
		return "&nbsp;";
}

function clickdeletebook(TR,tspt)
{
	if (tspt==" ")
		return;
	window.location="bookmanger.jsp?tspt="+tspt+"&bookaction=delete&id="+TR.children[1].innerText;
}
function clickmodifybook(TR,tspt)
{
	if (tspt==" ")
	return;
	window.location="bookupdate.jsp?tspt="+tspt+"&bookaction=modify&id="+TR.children[1].innerText;
}
function OnBookItemClicked(id)
{
	
	id = event.returnValue;
	if ( null != id && id.length > 0 ) window.open("bookdetail.jsp?bookisbn="+id,"",'menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=1,resizable=0,width=660,top=10,left=50,height=460');
}
function rowsubmit(url)
{

	var numstart=document.all.actionstart.value;
	var numend=document.all.actionend.value;


	var num="";
	if(numstart!=undefined&&numstart.length>0)
	{
		num=trim(numstart);
	}
	
	if(numend!=undefined&&numend.length>0)
	{
		num=trim(numend);
	}	

	if(num!=undefined&&num.length>0)
	{
	
		if(checknumber(num)==true)
		{
			alert("请输入合适的数字!");
			
		}
		else
		{

			var myurl=url;+"?action="+num;
			if(url.indexOf ("?")==-1)
					myurl=myurl+"?action="+num;
			else
				myurl=myurl+"action="+num;
	

			window.location.href=myurl;
		}	
	}
	else
	{
		alert("不能为空,请输入数字！");
	}

	return false;
}
function rowstartsubmit()
{
	
	
	var numstart=document.all.actionstart.value;
	var numend=document.all.actionend.value;

    var rowboolean=false;
	var num="";
	if(numstart!=undefined&&numstart.length>0)
	{
		num=trim(numstart);
	}
	
	if(numend!=undefined&&numend.length>0)
	{
		num=trim(numend);
	}	

	if(num!=undefined&&num.length>0)
	{
	
		if(checknumber(num)==true)
		{
			alert("请输入合适的数字!");
			rowboolean=false;
		}
		else
		{

			rowboolean=true;
		}	
	}
	else
	{
		alert("不能为空,请输入数字！");
		rowboolean=false;
	}
	alert(rowboolean);
	return rowboolean;
}
function trim(s) {
  var count = s.length;
  var st    = 0;       // start
  var end   = count-1; // end

  if (s == "") return s;
  while (st < count) {
    if (s.charAt(st) == " ")
      st ++;
    else
      break;
  }
  while (end > st) {
    if (s.charAt(end) == " ")
      end --;
    else
      break;
  }
  return s.substring(st,end + 1);
}
function checknumber(String)
{
	var Letters = "1234567890";
	var i;
	var c;
	for( i = 0; i < String.length; i ++ )
	{
		c = String.charAt( i );
		if (Letters.indexOf( c ) ==-1)
		{
			return true;
		}
	}
return false;
}
function GetUploadResProc(status)
{

	var ret="";
	if (status=="0")
	{		// 待处理

		ret="<a onclick=\"javascript:MgrFinishRes(this.parentElement.parentElement);\">完成标准</a>"
			//+"<br>"+"<a onclick=\"javascript:MgrEditRes(this.parentElement.parentElement);\">编辑标准</a>"
			+"<br>"+"<a onclick=\"javascript:MgrCancelRes(this.parentElement.parentElement);\">拒绝标准</a>";
	}
	return ret;
}
function MgrAcceptRes(curTR)
{
	if (confirm("确认要接受标准("+curTR.children[1].innerText+")审核吗?")){
		var url="uploadResAudit.jsp?op=accept&bzid="+curTR.children[1].innerText;	
		location=url;				
	}
}
function MgrFinishRes(tr)
{
	//alert(tr.all[32].innerText);
	if (confirm("确认要完成标准("+tr.children[1].innerText+")审核吗?")){
		var url="uploadResAudit.jsp?op=finish&bzid="+tr.children[1].innerText+"&dlm="+tr.children[7].innerText+"&ywys="+tr.children[8].innerText+"&ys="+tr.children[9].innerText+"&qwwjm="+tr.children[2].innerText+"&ywwjm="+tr.children[3].innerText;	
		//alert(url);
	window.location=url;
	}
}
function MgrCancelRes(tr)
{

	if (confirm("确认要拒绝标准("+tr.children[1].innerText+")审核吗?")){
var url="uploadResAudit.jsp?op=cancel&numstr="+tr.all[10].innerText+"&bzid="+tr.children[1].innerText;	
		location=url;				
	}
}
function MgrEditRes(tr)
{
	window.document.getElementById("resname").value=tr.all[0].innerText;	 
	window.document.getElementById("brief").value=tr.all[1].innerText;	
	//window.document.getElementById("id").value=id;
	//document.all.tsisbnidden.innerHTML="<input name=\"txthidden\" type=\"hidden\" value=\""+tr.all[0].innerText+"\" />";		 
	SetView();
}
function SetView()
{
	win1.style.display="";
	dialogBoxBG.style.display="";
}
function ShowFileView(YWWJM)
{
	
	var ret="";
	if(YWWJM=='null')
	{
		return "";
	}
	var path="StandardUpload/"+YWWJM;
	ret+="<a href='"+path+"' target='_blank'\">"+YWWJM+"</a>";
	return ret;
}

function OnStdStatuteItemClicked(){
 	id = event.returnValue;
	id=encodeURIComponent(id);
	if ( null != id && id.length > 0 ) window.open("stdStatuteinfo.jsp?id="+id,"","menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=1,resizable=0,width=720,top=10,left=50,height=560");
}
function opinionTime(stratTime,endTime){
        var start = stratTime.split( "-" );
        var end = endTime.split( "-" );
        if(start[0]<=end[0]){
              if(start[0] == end[0]){
                   if(start[1]<=end[1]){
                   if(start[1] ==end[1]){
                 if(start[2]<=end[2]){
                    return false;
                  }else
                           return true;
                    }else
                      return false;
                     }else
                          return true;
                }else
                     return false;
           }else
               return true;
}
