//原因这三个被设置为窗体的基本属性，所以写成被永远引用
//自动刷新父亲
function refreshParent()
{
  try{
    //window.opener.history.go(0);
    //alert('a='+window.opener.name);
    window.opener.location.reload();
  }catch(e){}
  try{
    var myObj = window.dialogArguments; //得到
    myObj.history.go(0);

  }catch(e){}
}
//自动关闭父亲
function closeParent()
{
  try{
    //window.opener.history.go(0);
    //alert('a='+window.opener.name);
    window.opener.close();
  }catch(e){}
  try{
    var myObj = window.dialogArguments; //得到
    myObj.close();
  }catch(e){}
}
//自动刷新窗体
function AutoRefresh(autotime,$i){
  setTimeout('AutoRefresh('+autotime+',1);',autotime);
  if($i=='1')window.history.go(0);
}
//自动关闭窗体
function AutoClose(autotime,i){
 setTimeout('AutoClose('+autotime+',1);',autotime);
 if(i==1) {
   window.focus();
//   window.opener=null;    (有这个，如果自动关闭无法刷新父)
   window.close();
 }
}

