﻿
function news_search(){
     var strTitle=document.getElementById("txtSearchTitle").value;
     strTitle=trim(strTitle);
     if(strTitle==""||strTitle.length==0||strTitle=="请输入搜索关键字"){return;}
     window.location.href="http://www.hytool.net/news_search.html?keyword="+escape(strTitle)+"&page=1";
 }

function keypreess(){  
  document.onkeypress=function(evt){ 
  if(evt==null){evt=window.event;}
   if(evt.keyCode==13){
       news_search();
   }
 }
}

function favorite(){
	if( arguments[0] ) var url = arguments[0], title = arguments[1] ? arguments[1] : url;
	else var url = location.href, title = document.title ? document.title : url;
 
	if (typeof(document.all) == 'object') external.addFavorite(url, title);
	else if (typeof(sidebar) == 'object') sidebar.addPanel(title, url, '');
	else alert('您使用的浏览器不支持javascript收藏网址！\n请手动收藏，或使用IE/火狐浏览器！');
}

