﻿// JScript 文件

//隐藏对象
function ObjectHidden(ObjectName)
{
    document.getElementById(ObjectName).style.display='none'
}

//有效对象
function ObjectViewHidden(ObjectName)
{
    if(document.getElementById(ObjectName).style.display=='')
        document.getElementById(ObjectName).style.display='none';
    else
        document.getElementById(ObjectName).style.display=''
        
        
}
//弹出一个独立的窗口
function ShowWindowOne(filename,width,height){
    filename=filename.replace("small","big");
    window.showModalDialog(filename,'dialogwin','scroll:0;status:0;help:1;resizable:0;dialogWidth:'+width+'px;dialogHeight:'+height+'px;scrolling=0;noresize=0;');
    
}
//弹出一个独立的窗口
function ShowWindowCaseOne(filename){    
    window.showModalDialog(filename,'dialogwin','scroll:0;status:0;help:1;resizable:0;dialogWidth:1024px;dialogHeight:768px;scrolling=0;noresize=0;');
    
}


/*提交按钮后失效按钮*/
function DisableControl(controlId)
{
  try
    {
      document.getElementById(controlId).value ='处理中...';
      if(typeof(Page_IsValid) == 'undefined'|| Page_IsValid==null)
      {
            document.getElementById(controlId).disabled =true;   
            
      }
      else
      {
            if(!Page_IsValid)
                document.getElementById(controlId).disabled =false;
            else
            {
                
                document.getElementById(controlId).disabled =true;
                
            }
      }
  }catch(err){}
    
}
function DisableControl_SetTimeout(controlId,interval)
{
  setTimeout("DisableControl('" +controlId + "')",interval);
} 


function DisableBtn(control)
{

   try
    {    
        DisableControl_SetTimeout(control.id,100);
    }catch(err){}
}

