
//收藏本页
    function bookmark(title)
    {
	    var url=location.href;
	    if (window.sidebar) window.sidebar.addPanel(title, url,"");
	    else if( window.opera && window.print ){
	    var mbm = document.createElement('a');
	    mbm.setAttribute('rel','sidebar');
	    mbm.setAttribute('href',url);
	    mbm.setAttribute('title',title);
	    mbm.click();}
	    else if( document.all ) window.external.AddFavorite( url, title);
    }
    //设为首页
    function SetHomePage(obj)
    {
	    var s=location.href;
		    obj.style.behavior='url(#default#homepage)';
		    obj.setHomePage(s);
    }

    //内容搜索
    function SearchBook()
    {
	    var BookName=document.all['Tx_BookName'].value;
	    var NovelType=document.all['Tx_NovelType'].value;
	    if (BookName==""){
		    alert("搜索内容不能为空！");
		    document.all['Tx_BookName'].focus();
		    return;
	    }
	    window.open("/SearchResults.aspx?keywords=" + BookName + "&noveltype=" + NovelType);
    }
    function TxSetHtml(ObjectID,sHtml){
	    var obj = document.getElementById(ObjectID);
	    if (obj!=null){
		    if (sHtml!=null) obj.innerHTML = sHtml;
		    obj=null;
	    }
    }
    
    function MyStow(novelid){
	var OutCallBack = {
	  success:function(o){//处理发送请求成功
		 TxProcessHide();
		  if(o.responseText != "undefined"){//是否有服务器返回的字符串
			  if(o.status == 200){//返回的请求http状态是否OK
				  //location.reload();
				  var msg = o.responseText;//获取服务器返回的信息
				  TxAlert(msg);
			  }
		  }
		  
	  },
	  failure:function(o){//处理发送请求失败
		  if(o.responseText != "undefined"){
			  TxAlert(o.statusText);//提示错误信息
		  }
	  }
	};
	var postData = "novelid=" + this.encodeURIComponent(novelid);
	var request = YAHOO.util.Connect.asyncRequest("POST","/XmlHttp/b_BookShelfAdd.aspx",OutCallBack,postData);
	TxProcessShow("正在操作,请等待...",true); 
} 

    function SetSort(sort,isvip,did)
    {
         var newsort=document.getElementById("DropDownListSort").value; 
         if(newsort!=sort)
         {
            var isvip=isvip;
            isvip=isvip.toLowerCase();
            if ("true"==isvip)
            {
                location.href  = "NovelsWarehouse_1_" + newsort + "_a.html";
            }
            else
            {
                location.href  = "NovelsWarehouse_1_" + newsort + "_" + did + ".html";
            }
         }
    }