	function toggle(ID){
		target = document.all(ID);
	
		var menuLayers = document.all.tags("DIV");
		for (i=0; i<menuLayers.length; i++) {
		  if (menuLayers[i].id.indexOf("sub") != -1 && menuLayers[i].id!=target.id) {
			menuLayers[i].style.display = "none";
		  }
		}
		
		if (target.style.display=="none") {
			target.style.display="";
		} else {
			target.style.display="none";
		}
	}
	
	function bookmark()
	{ if(document.all) window.external.addfavorite('http://www.anfangonline.com/',"中国安防在线 - 安防行业资讯平台 - www.anfangonline.com");}
		
	 function doZoom(size){
	  document.getElementById('zoom').style.fontSize=size+'px'
	  } 
	  
	function InitAjax()
	{
	var ajax=false; 
	try { 
	ajax = new ActiveXObject("Msxml2.XMLHTTP"); 
	} catch (e) { 
	try { 
	ajax = new ActiveXObject("Microsoft.XMLHTTP"); 
	} catch (E) { 
	ajax = false; 
	} 
	}
	if (!ajax && typeof XMLHttpRequest!="undefined") { 
	ajax = new XMLHttpRequest(); 
	} 
	return ajax;
	}
	
	function MM_openWin(strID,Height,Width){
		var strUrl;
		var strWindowType = "";  
		switch(strID){
			case 1:
				strUrl = "modify_company_info.php";
				break;
			case 2:
				strUrl = "modify_contact.php";
				break;
			case 3:
				strUrl = "modify_personal.php";
				break;
			case 4:
				strUrl = "uploadFile.php";
				break;
			case 5:
				strUrl = "uploadProduct.php";
				break;
			case 6:
				strUrl = "uploadTrade.php";
				break;
			case 7:
				strUrl = "uploadLogo.php";
				break;
		}
		strWindowType = strWindowType+"height="+Height+",";
		strWindowType = strWindowType+"width="+Width+",";
		strWindowType = strWindowType+"location=no"+",";
		strWindowType = strWindowType+"menubar=no"+",";
		strWindowType = strWindowType+"resizable=no"+",";
		strWindowType = strWindowType+"scrollbars=yes"+",";
		strWindowType = strWindowType+"status=no"+",";
		strWindowType = strWindowType+"toolbar=no"+",";
		strWindowType = strWindowType+"directories=no"+",";
		strWindowType = strWindowType+"left=200"+",";
		strWindowType = strWindowType+"top=100"+",";
		window.open(strUrl,"",strWindowType);
	}

	var $Pub_Str_Testcode = new Array()
	// a-zA-Z0-9
	$Pub_Str_Testcode["az09"]	= /^\w+$/;
	// 货币
	$Pub_Str_Testcode["money"] = /^(([1-9]{1,3},)([0-9]{3},)*)?(\d{1,3})\.\d{2}$/;
	//区号
	$Pub_Str_Testcode["quhao"]	= /^[0-9]{3,4}$/;
	//电话号码（区号之后的数字）
	$Pub_Str_Testcode["telnumber"]	= /^[0-9]{7,8}$/;
	// email
	$Pub_Str_Testcode["email"]	= /^[-_a-zA-Z0-9.]+@([-_a-zA-Z0-9]+\.)+[a-zA-Z0-9]{2,3}$/;
	// 证件
	$Pub_Str_Testcode["paper"]	= /[0-9\-]{6,30}/;
	// 邮编
	$Pub_Str_Testcode["postal"]	= /[0-9]{6}/;
	//0-9数字
	$Pub_Str_Testcode["number09"]	= /[0-9]/;
	//整数
	$Pub_Str_Testcode["int"]	= /^0|([\-\+]?[1-9][0-9]*)$/;
	// 正整数
	$Pub_Str_Testcode["plus"]	= /^[1-9][0-9]*$/;
	// 负数
	$Pub_Str_Testcode["minus"]	= /^\-[1-9][0-9]*$/;
	// 非正整数
	$Pub_Str_Testcode["!plus"]	= /^0|(\-[1-9][0-9]*)$/;
	// 非负整数
	$Pub_Str_Testcode["!minus"]	= /^0|([1-9][0-9]*)$/;
	// 电话、手机
	$Pub_Str_Testcode["phone"]	= /(^(0[0-9]{2,3}\-?)?[1-9][0-9]{6,7}$)|(^0?13[0-9]{9}$)/;
	// HTML字符
	$Pub_Str_Testcode["html"]	= /[\<\>\'\"\#\&\|]+/;
	// 正则表达式字符
	$Pub_Str_Testcode["regexp"]	= /[\^\$\<\>\[\]\(\)\{\}\\\\\/\-\|\*\?\+\.\;\,]+/;
	// 目录、文件名
	$Pub_Str_Testcode["file"]	= /^[^\/\\\<\|\>\'\"\&\#\?\:\*]+$/;
	// 目录、文件路径
	$Pub_Str_Testcode["path"]	= /^[A-Za-z]\:\\([^\\\/\<\>\|\*\:\?\"\']\\?)*$/;
	// URL地址
	$Pub_Str_Testcode["url"]	=/((^http)|(^https)|(^ftp)):\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/;
	
	// IP地址
	$Pub_Str_Testcode["ip"]		=/^(((22[0-5])|(2[0-1][0-9])|([0-1]?[0-9]{1,2}))\.){3}((22[0-5])|(2[0-1][0-9])|([0-1]?[0-9]{1,2}))$/
