﻿// JScript 文件

//左右空格
String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); }

String.prototype.escape = function() 
{ 
  var s=this.replace(/\+/g, "%2b");
  return escape(s);
}


function searchNews(type)
{
    var kw=document.getElementById("txt_kw"+type).value.trim();
    var sTime="";
    var eTime="";
    if(type==1)
    {
     sTime=document.getElementById("txt_sTime").value;
     eTime=document.getElementById("txt_eTime").value;
    }
    location.href="/search.aspx?kw="+kw.escape()+"&sTime="+sTime+"&eTime="+eTime;
}