var path = ""; var theForm=document.forms[0]; var openerForm=null; if(window.opener!=null && typeof(window.opener)!="undefined"){ openerForm=window.opener.document.forms[0]; } var topForm=null; if(top!=null){ topForm=top.document.forms[0]; } //打开新窗口 function openNewWin(url,winName,width,height,attribute){ if(attribute==null) attribute=""; if(winName==null) winName=""; if(width==null) width="600"; if(height==null) height="400"; var tyWin=window.open(url,winName,'width='+width+'px height='+height+'px left=' + (screen.availWidth-width )/2 + ' top=' + (screen.availheight-height )/2 + ' '+attribute); tyWin.focus(); } function OpenNewWin(url,winName,width,height,attribute){ openNewWin(url,winName,width,height,attribute); } //关闭窗口 function Close(confirm,message){ var mess="确定要关闭窗口吗?"; if(confirm!=null && confirm==true){ if(message!=null && message.length>0){ mess=message; } if(!window.confirm(mess)){ return; } } CloseWithoutConfirm(); } ///多命令参数 function DoClose(){ Close(true,null); } //不提示直接关闭窗口 function CloseWithoutConfirm(){ window.opener=null; window.close(); } //刷新页面 function Refresh(){ theForm.submit(); } //刷新父窗口 function RefreshOpener(){ if(openerForm!=null){ openerForm.submit(); } } function MaxWin(){ if (top.location.href == window.location.href && window.location.href.indexOf("no_full_screen") == -1 ) { self.moveTo(-4,-4); self.resizeTo((screen.availWidth+8),(screen.availHeight+8)); } } //不允许当前页面在框架页内 function KeepTop(){ if(this.location!=top.location){ top.location=this.location; } } //改变行状态 function changeRowState(i,rowStateId){ //alert($(rowStateId+"_"+i).value); if($(rowStateId+"_"+i).value=="n"){ $(rowStateId+"_"+i).value = "u"; } else if($(rowStateId+"_"+i).value==""){ $(rowStateId+"_"+i).value = "i"; } } //删除 function changeRowDel(obj,i,rowStateId,stateValue){ if(typeof(stateValue)=="undefined") stateValue = "u"; if(obj.checked) $(rowStateId+"_"+i).value="d"; else $(rowStateId+"_"+i).value=stateValue; } //全选并改变行状态 function selAllDelCheck(obj,rowStateId,delId,groupId,stateValue){ if(typeof(stateValue)=="undefined") stateValue = "u"; var rowCount = $("_qam_rowcount_"+groupId).value; if(obj.checked){ for(var i=0;i"; ol=o.childNodes[0].tBodies[0].rows; for(var i=0;i st) pos[1] = st; } function getObject(objectid){ return document.getElementById(objectid); } function $(oid){ return document.getElementById(oid); } function getContextPath(){ var ctxpath=""; if($("__ContextPath")){ var tmppath=$("__ContextPath").value; if(tmppath.length>1 && "/"==tmppath.substring(0,1)){ ctxpath=tmppath; path=ctxpath; } } return ctxpath; } function getValueById(obj,id){ if(typeof(obj)=="object"){ var len=obj.paras.length; for(var i=0;i