﻿function $E(){return document.getElementById(arguments[0]) || false;}
function CreateXmlHttpRequest(){
    var XmlHttp;
    try{
      XmlHttp = new ActiveXObject('Msxml2.XMLHTTP');
	  }catch(e){
	    try{
	      XmlHttp = new ActiveXObject('Microsoft.XMLHTTP');
		  }catch(e){
		    try{
		      XmlHttp = new XMLHttpRequest();
			  }catch(e){}
		  }
	  }
	  return XmlHttp;
}
function GetDate()
{
	var date = new Date();
	var str = null;
	var n=date.getDay();
	switch(n)
	{
		case 0:
		     str="星期日";
		     break
		case 1:
		     str="星期一";
		     break
		case 2:
		     str="星期二";
		     break
		case 3:
		     str="星期三";
		     break
		case 4:
		     str="星期四";
		     break
		case 5:
		     str="星期五";
		     break
		case 6:
		     str="星期六";
		     break
	}
	str+=" "+date.getFullYear()+"年"+(date.getMonth()+1)+"月"+date.getDate()+"日  "+date.getHours()+"："+(date.getMinutes()<10 ? "0"+date.getMinutes() : date.getMinutes());
	$E("timer").innerHTML = str;
        setTimeout(GetDate,30000);
}
function checkSearch()
{
	if($E("keyword").value=="")
	{
		alert("请输入要查询的关键字！");
		return false;
	}
	return true;
}
function clearSearchText()
{
	if($E("keyword").value=="搜索医药产品信息...")
	{
		$E("keyword").value='';
	}
}
function clearSearchKey(obj)
{
   if(obj.value=='亮点网打造行业成交量最高的网站')
   {
	  obj.value='';
   }
}
