// JavaScript Document
function killErrors() { 
return true; 
} 
window.onerror = killErrors;



<!-- // 说明：用 JavaScript 实现网页图片等比例缩放 // 整理：http://www.CodeBit.cn  
function changesize(ImgD,FitWidth,FitHeight){     
	var image=new Image();
    image.src=ImgD.src;
	if(image.width>0 && image.height>0){
		if(image.width/image.height>= FitWidth/FitHeight){
			if(image.width>FitWidth){
				ImgD.width=FitWidth;
				ImgD.height=(image.height*FitWidth)/image.width;
            }else{
			    ImgD.width=image.width;
				ImgD.height=image.height;
				}
			} else{
			     if(image.height>FitHeight){
				 	ImgD.height=FitHeight;
				 	ImgD.width=(image.width*FitHeight)/image.height;
				 }else{
				 	ImgD.width=image.width; 
					ImgD.height=image.height;
				}
			}
		}
	} 
	
	function changpic(obj,picpath){
		obj.src = picpath;	
	
	}


//选项卡函数
function secBoard(n,secTab,mainTab)

{

 for(i=0;i<secTab.cells.length;i++)

  secTab.cells[i].className="sec1";
  
  

 secTab.cells[n].className="sec2";


 for(i=0;i<mainTab.tBodies.length;i++)

  mainTab.tBodies[i].style.display="none";

 mainTab.tBodies[n].style.display="block";

}



//系统登陆函数
 function sys_logon(obj){
			  	obj.submit()
				obj.userid.value = '';
				obj.PAW.value = '';
			  
			  
			  }
			  
			  
function correctPNG() 
   {
   for(var i=0; i<document.images.length; i++)
      {
   var img = document.images[i]
   var imgName = img.src.toUpperCase()
   if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
      {
   var imgID = (img.id) ? "id='" + img.id + "' " : ""
   var imgClass = (img.className) ? "class='" + img.className + "' " : ""
   var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
   var imgStyle = "display:inline-block;" + img.style.cssText 
   if (img.align == "left") imgStyle = "float:left;" + imgStyle
   if (img.align == "right") imgStyle = "float:right;" + imgStyle
   if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle  
   var strNewHTML = "<span " + imgID + imgClass + imgTitle
   + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
      + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
   + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
   img.outerHTML = strNewHTML
   i = i-1
      }
      }
   }
   
   
   
   function GetHGDate(obj){
  MInfo = window.showModalDialog("../function/getdate.php","","dialogHeight : 240px; dialogWidth: 235px; help: no; status: no");
  if (MInfo!=null)
  {
	obj.value = MInfo[0];
	
	
	
	
	}
}
function GetMInfo_select(a,b,c){
  MInfo = window.showModalDialog("get_select_list.php?tab_name="+ b +"&field_name="+c,"","dialogHeight : 610px; dialogWidth: 400px; help: no; status: no");
  if (MInfo!=null)
  {
	a.value = MInfo[0];
	
	
	}
}

function Change(child,image){
	if(child.style.display==''){
		child.style.display='none';
		image.src='../oas_pic/icon_plus.gif';
	}
	else{
		child.style.display='';
		image.src='../oas_pic/icon_minus.gif';
	}
}
//添加到收藏夹
function Addme(){ 
	url = "www.gzsaf.com"; //你自己的主页地址 
	title = "贵州安防网"; //你自己的主页名称 
	window.external.AddFavorite(url,title); 
}

//显示当前日期
function disp_date(){
	 var today = new Date();
	 var ttt;
  	ttt = today.getYear() + "年" + (today.getMonth() + 1 ) + "月" + today.getDate() + "日";
	return(ttt);
}


var old_obj = '';

function chang(obj,obj2){
  if(obj.style.display=='block'){
  	obj.style.display='none';	
  }else{
	  if(old_obj != ''){
		old_obj.style.display='none';  
		old_obj = obj;
	  }
	  obj.style.display='block';
	}
}

function openclose(id,sub_id,s_card)
   {
	div1.style.display = 'block';
   div1.innerHTML = "";
   var menu_file = "<iframe   frameborder='0'   id='tree'   name='tree'   scrolling='auto'   src='menu.php?ID=" + s_card + "&select_id="+id+"&menuid=" + sub_id + "'   style='HEIGHT:90%;   VISIBILITY:   inherit;   WIDTH:   100%;   Z-INDEX:   1' onload='this.height=tree.document.body.scrollHeight' onload='this.width=tree.document.body.scrollWidth'> </iframe>"
   div1.innerHTML = menu_file;
   if(id == 1){
		//a.background = '../oas_pic/style2/index_08_02_1.gif';
	   	//b.background = '../oas_pic/style2/index_08_07_1.gif';
   		//c.background = '../oas_pic/style2/index_08_12_1.gif';  

	   
   }else if(id==2){
		 //a.background = '../oas_pic/style2/index_08_02_2.gif';
  // b.background = '../oas_pic/style2/index_08_07_2.gif';
   //c.background = '../oas_pic/style2/index_08_12_2.gif'; 

	   
	   
   }else if(id ==3){
	   
		//a.background = '../oas_pic/style2/index_08_02_3.gif';
   		//b.background = '../oas_pic/style2/index_08_07_3.gif';
  // 	c.background = '../oas_pic/style2/index_08_12_3.gif';
   	
	   
   }
  
   

   }


function submit_t(t_str){
	alert(t_str);
		
}

