function $(id) {
    return document.getElementById(id);
}

function showMenu (baseID, divID) {
    baseID = $(baseID);
    divID  = $(divID);
    if (showMenu.timer) clearTimeout(showMenu.timer);
	hideCur();
    divID.style.display = 'block';
	showMenu.cur = divID;

    if (! divID.isCreate) {
        divID.isCreate = true;
        //divID.timer = 0;
        divID.onmouseover = function () {
            if (showMenu.timer) clearTimeout(showMenu.timer);
			hideCur();
            divID.style.display = 'block';
        };

        function hide () {
            showMenu.timer = setTimeout(function () {divID.style.display = 'none';}, 1000);
        }

        divID.onmouseout = hide;
        baseID.onmouseout = hide;
    }
	function hideCur () {
		showMenu.cur && (showMenu.cur.style.display = 'none');
	}
}

function panDuanXuanZe()
{
	var leibie = document.getElementById("soushuo_leibie").value;
	var soushuo_info = document.getElementById("soushuo_info").value;
      soushuo_info = soushuo_info.Trim();
        var reg = /联系人|电话|传真|e-mail|E-mail|邮箱|招标代理机构|代理机构|代理/g;
	 
     if(soushuo_info!=null&&soushuo_info!="")
	{
		if(leibie=="0")
		{
			alert("系统信息：请选择要搜索的行业！");
			return false;
		}
		else
		{
		   if(reg.test(soushuo_info)){
                       alert("无法找到您要搜索的内容");
 			return false;
                   }	
                   return true;
		}
	}
	else
	{
		alert("系统信息：搜索内容为空，无法完成搜索！");
		return false;
	}
	
}


String.prototype.Trim = function()    
{    
return this.replace(/(^\s*)|(\s*$)/g, "");    
}    
String.prototype.LTrim = function()    
{    
return this.replace(/(^\s*)/g, "");    
}    
String.prototype.RTrim = function()    
{    
return this.replace(/(\s*$)/g, "");    
}    
