﻿
var r = Math.floor(Math.random() * 1000);

var myDomain = "127.0.0.1";

function Include(filePath)
{
	document.write("<script type='text/javascript' src='"+filePath+"'></script>");
}
Include('/clientScript/ajax.js');
Include('/clientScript/xmldom.js');
Include('/clientScript/message.js');
Include('/clientScript/prototype.js');

function displayed(obj)
{
	var editer = $(obj);
	if (editer.style.display == "none")
	{
		editer.style.display = "";
	}
	else
	{
		editer.style.display = "none";
	}
}

function modurl(a, b, c ,d)
{
	//alert(a + b + c + d);
	displayed("_mod_" + a);
	$("_mod_" + a + "_title").value = b;
	$("_mod_" + a + "_url").value = c;
	$("_mod_" + a + "_flag").value = d;
}


function getcategory(job,parms)
{
	$("maincategory").innerHTML = "loading...";

	var pars = "job="+job + parms;
	var myAjax = new Ajax.Request(
	"xmls/userweblink.aspx" ,
	{
	method: 'get',
	parameters: pars,
	onComplete: get_category,
	onFailure : pro_ms($("maincategory"))
	});
}

var pro_ms = function ( obj )
{
	var viewer = obj;
	if ( !viewer ) return;
	viewer.innerHTML = "<img src=\"/images/ajax_loading.gif\" border=\"0\" class=\"image\" /> Loading news list...";
}

function get_category(originalRequest)
{
	var XO = originalRequest.responseXML;
	var _status = XO.getElementsByTagName("resultstatus")[0].firstChild.nodeValue;
	//内容
	var _item = null;
	var subitem = null;
	var _subitem = null;
	var html = "";
	var item = XO.getElementsByTagName("item");

	for(var i = 0; i < item.length; i++)
	{
		_item = item[i];
		html += "<div id=\"favorite\" onmouseover=\"javascript:displayed('_show_"+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"');\" onmouseout=\"javascript:displayed('_show_"+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"');\">";
		html += "<div id=\"favorite1\"><div id=\"l7-title4\"><img src=\"/images/032710114.gif\"/>";
		html += _item.getElementsByTagName("category")[0].firstChild.nodeValue;
		html += "</div><span style=\"display:none\" id=\"_show_"+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"\"><div id=\"l7-title2\">";
		html += "<a href=\"javascript:displayed('_add_"+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"');\" class=\"more\">增加</a>";
		html += " <a style=\"color:red;cursor:hand;\" onclick=\"javascript:{if(confirm('删除该分类 ?')){getcategory('del','&amp;weblinkcategoryid="+_item.getElementsByTagName('categoryid')[0].firstChild.nodeValue+"');}return false;}\"><img src=\"/images/close.gif\" border=\"0\" /></a></div></span>"
		html += "</div>"
				
		html += "<div class=\"cateadd\" id=\"_add_"+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"\" style=\"display:none;\">";
		html += "　　 <a href=\"javascript:showcollect("+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+",$('collect_weblink').innerHTML,1,1);\" class=\"more\">从我收藏的网站中选择</a><br>"
		html += "标题:<input type=\"text\" id=\"_add_"+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"_title\" class=\"inpu\" /> <a href=\"javascript:displayed('_add_"+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"');\" class=\"more\">取消</a><br>";
		html += "链接:<input value=\"http://\" type=\"text\" id=\"_add_"+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"_url\" class=\"inpu\" />";
		html += " <a href=\"javascript:getcategory('addurl','&amp;title='+$('_add_"+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"_title').value+'&amp;weblinkcategoryid="+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"'+'&amp;Httpaddress='+$('_add_"+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"_url').value)\"  class=\"more\">保存</a>";
		//alert(html);
		html += "</div>"
		html += "<div class=\"cateadd\" id=\"_mod_"+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"\" style=\"display:none;\">";
		html += "　　 <a href=\"javascript:showcollect("+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+",$('collect_weblink').innerHTML,1,0);\" class=\"more\">从我收藏的网站中选择</a><br>"
		html += "标题:<input type=\"text\" id=\"_mod_"+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"_title\" class=\"inpu\" /> <a href=\"javascript:displayed('_mod_"+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"');\" class=\"more\">取消</a><br>";
		html += "链接:<input value=\"http://\" type=\"text\" id=\"_mod_"+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"_url\" class=\"inpu\" />";
		html += "<input value=\"\" type=\"hidden\" id=\"_mod_"+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"_flag\" class=\"inpu\" />";
		html += " <a href=\"javascript:getcategory('modurl','&amp;title='+$('_mod_"+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"_title').value+'&amp;userweblinkid='+$('_mod_"+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"_flag').value+'&amp;Httpaddress='+$('_mod_"+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"_url').value)\"  class=\"more\">保存</a>";
				
		html += "</div>"
		html += "<div id=\"favorite2\">";
		subitem = _item.getElementsByTagName("subitem");
		for(var j=0; j < subitem.length; j++)
		{
			_subitem = subitem[j];
			html += "<div style=\"height:17px;width:100%;\" onmouseover=\"javascript:displayed('_h_"+_subitem.getElementsByTagName('subid')[0].firstChild.nodeValue+"');\" onmouseout=\"javascript:displayed('_h_"+_subitem.getElementsByTagName('subid')[0].firstChild.nodeValue+"');\">";
			html += "<div id=\"favoriteright\">　　<a href='"+_subitem.getElementsByTagName("httpaddress")[0].firstChild.nodeValue+"' target='_blank'>"+_subitem.getElementsByTagName("title")[0].firstChild.nodeValue+"</a></div>"
			html += "<div id=\"favoriteright2\"><span style=\"display:none;\" id=\"_h_"+_subitem.getElementsByTagName('subid')[0].firstChild.nodeValue+"\"><a href=\"javascript:modurl('"+_item.getElementsByTagName("categoryid")[0].firstChild.nodeValue+"' ,'"+_subitem.getElementsByTagName("title")[0].firstChild.nodeValue+"' ,'"+_subitem.getElementsByTagName("httpaddress")[0].firstChild.nodeValue+"' ,'"+_subitem.getElementsByTagName("subid")[0].firstChild.nodeValue+"');\" class=\"more\">编辑</a> <a style=\"color:red;cursor:hand;\" onclick=\"javascript:{if(confirm('删除该链接 ?')){getcategory('delurl','&amp;userweblinkid="+_subitem.getElementsByTagName('subid')[0].firstChild.nodeValue+"');}return false;}\"><img src=\"/images/close.gif\" border=\"0\" /></a></span></div>";
			html += "</div>"
		}
		html += "</div></div>";
		
	}

	switch (_status)
	{
		case "1" :
			showCity(document,"您的个性化设置已载入！");
			break;
		case "-1" :
			showCity(document,"登录后才能保存您的操作！");
			break;
		case "-2" :
			showCity(document,"名称已存在, 不能增加！");
			break;
		case "-3" :
			showCity(document,"参数为空.");
			break;
	}

	$("maincategory").innerHTML = html;
	$('weblinkcategory').value = "";
}

function getXml(num ,pageurl, upurl)
{

	var stitle = "title_" + num;
	var smainbody = "mainbody_" + num;
	var rssuri = "rssuri_" + num;

	if(pageurl == "") 
	{
		pageurl = "http://rss.sina.com.cn/news/allnews/ent.xml";
	}
	$(stitle).innerHTML = "<img src=\"/images/032710110.gif\" />Loading title...";
	$(smainbody).innerHTML = "<img src=\"/images/ajax_loading.gif\" border=\"0\" class=\"image\" /> Loading news list...";
	$(rssuri).value = pageurl;

	var pars = "pageurl=" + escape(pageurl) + "&Num=" + num + "&upurl=" + upurl ;

	var myAjax = new Ajax.Request(
	"/xmls/requestrss.aspx" ,
	{
	method: 'get',
	parameters: pars,
	onComplete: get_Xml( stitle,smainbody,rssuri,pageurl ),
	onFailure : pro_ms($(smainbody))
	});
}

var get_Xml = function ( stitle,smainbody,rssuri,pageurl )
{
	return function(httpRequest)
	{
		var XO = httpRequest.responseXML;
		
		var mainbody = XO.getElementsByTagName("channel");
		
		//内容
		var title = null;
		var item = null;
		var link = null;
		var pubDate = null;
		var html = "<ul id=\"r_6\">";
		var pageitem = 8;	//每页显示条数
		var items = XO.getElementsByTagName("item");
		
		if(items.length < pageitem)
		{
			pageitem = items.length;
		}
		for(var i = 0; i < pageitem; i++)
		{
			item = items[i];
			link = item.getElementsByTagName("link")[0].firstChild.nodeValue;
			title = item.getElementsByTagName("title")[0].firstChild.nodeValue;
			//pubDate = item.getElementsByTagName("pubDate")[0].firstChild.nodeValue;
			html += "<li><div id=\"l0-x\"><img src=\"/images/dot.gif\" width=\"10\" height=\"9\" /> <a href=\"http://www.zhongwenlink.com/external.aspx?pageurl="+link+"&title="+escape(title)+"\" target=_blank title="+title+">"+title+"</a></div></li>";
		}
		html += "</ul>"
		
		//检查是不是我们自己的链接
		var mylink = pageurl ;
		if(mylink.indexOf(myDomain) > -1)
		{
			var arr = mylink.split('/');
			var myurl = arr[arr.length-1];
			var rssid = myurl.split('.')[0];
			var resulturl = "/per.rss/News-"+rssid+".aspx";
			$(stitle).innerHTML = "<img src=\"/images/032710110.gif\" /><a href=\""+resulturl+"\" target=\"_blank\" class=\"blue\"><strong>"+mainbody[0].getElementsByTagName("title")[0].firstChild.nodeValue + "(" + i + ")</strong></a>";
		}
		else
		{
			$(stitle).innerHTML = "<img src=\"/images/032710110.gif\" /><strong>"+mainbody[0].getElementsByTagName("title")[0].firstChild.nodeValue + "(" + i + ")</strong>";
		}
		
		$(smainbody).innerHTML = html;
	};
}

function countrycode()
{
	var myAjax = new Ajax.Request(
	"/xmls/country.xml" ,
	{
	method: 'get',
	//parameters: pars,
	onComplete: pro_country_xml
	});
}

//处理country xml
function pro_country_xml(originalRequest)
{
		var XO = originalRequest.responseXML;
		var city = XO.getElementsByTagName("city");
		var cs = $("country_select");
		cs.options.length = 0;
		cs.options.add(new Option("选国家","-1"));
		for(var i=0 ;i<city.length;i++)
		{
			var countryname = city[i].attributes[1].value;
			cs.options.add(new Option(countryname,countryname));
		}
}

function citycode()
{
	var myAjax = new Ajax.Request(
	"/xmls/city.xml" ,
	{
	method: 'get',
	//parameters: pars,
	onComplete: pro_city_xml
	});
}

//处理city xml
function pro_city_xml(originalRequest)
{
		var XO = originalRequest.responseXML;
		var city = XO.getElementsByTagName("city");
		var cityselect = $("city_select");
		var cs = $("country_select");
		cityselect.options.length = 0;
		cityselect.options.add(new Option("选城市","-1"));
		for(var i=0 ;i<city.length;i++)
		{
			var countryname = city[i].attributes[1].value;
			var cityname = city[i].attributes[0].value;
			var citycode = city[i].attributes[2].value;
			if(countryname == cs.value)
			{
				cityselect.options.add(new Option(cityname,citycode));
			}
		}
}

//get weather
function weathercode(ispost ,p)
{
	//var cityselect = $("city_select");
	//alert(document.getElementById("city_select"));
	
	if( p == "-1")
	{
		showCity(document,"请选择城市！");
		return;
	}


	if(get_Cookie("wCity") == "-1")
	{
		set_Cookie("wCity" ,p)
	}
	else
	{
		if(ispost == 1)
		{
			set_Cookie("wCity" ,p)
		}
		p = get_Cookie("wCity");
	}

	pars = "p=" + p + "&ispost=" + ispost;
	$("w_today").innerHTML = "loading...";
	$("w_today").style.color = "#CE4542";
	var myAjax = new Ajax.Request(
	"/xmls/yahoo.aspx" ,
	{
	method: 'get',
	parameters: pars,
	onComplete: pro_weather_xml
	});
}

function pro_weather_xml(originalRequest)
{
	
	$("c_s_s").style.display = "none";
	var XO = originalRequest.responseXML;
	var items = XO.getElementsByTagName("item");
	var title = XO.getElementsByTagName("title")[0].firstChild.nodeValue.replace("Conditions for " ,"");
	var pic = XO.getElementsByTagName("pic")[0].firstChild.nodeValue;
	$("w_title").innerHTML = title ;
	$("w_pic").innerHTML = pic;
	$("w_today").innerHTML = "Today";
	$("w_today").style.color = "";
	var _html = "<ul id=\"w_ul\">";

	for(var i=0;i< items.length ; i++)
	{
		_html += "<li class=\"w_li1\">"+items[i].attributes[0].value+" : </li><li class=\"w_li2\"> "+items[i].attributes[2].value+"</li>";
	}
	_html += "</ul>";
	$("w_item").innerHTML = _html;

}

function get_Cookie(Name)			//cookies读取JS
{
	var search = Name + "="
	if(document.cookie.length > 0) 
	{
		offset = document.cookie.indexOf(search)
		if(offset != -1) 
		{
			offset += search.length
			end = document.cookie.indexOf(";", offset)
			if(end == -1) end = document.cookie.length
			return unescape(document.cookie.substring(offset, end))
		 }
		else return "-1"
	}
	else
	{
		return "-1"
	}
}

function set_Cookie(Name ,Value)
	{
		var _date = new Date("December 31, 2020"); 
		//document.domain = "psder.com";
		document.cookie = Name + "=" + Value + "; expires=" + _date.toGMTString() + "; path=/ "; 
	}

function delcollect(id ,Et)
{
	if(confirm("确定要删除？"))
	{
		var pars = "job=del&id="+id+"&Et="+Et;
		var myAjax = new Ajax.Request(
		"/xmls/collect.aspx" ,
		{
		method: 'get',
		parameters: pars,
		onComplete: del_collect
		});
	}
	return false;
}

function del_collect()
{
	showCity(document,"已经成功删除！");
	new getcollect();
}

//选择收藏的Link
var __creatFlag=false;
var __st2;
function showcollect(tx ,Ht ,Et ,Xt)
{
	var tt = null;
	var tc = null;
	if(Et == 1)
	{
		if(Xt == 1)
		{
			tt = $("_add_"+tx+"_url");
			tc = $("_add_"+tx+"_title")
			$("web_title").value = "_add_"+tx+"_title";
			$("web_rid").value = "_add_"+tx+"_url";
		}
		else
		{
			tt = $("_mod_"+tx+"_url");
			tc = $("_mod_"+tx+"_title")
			$("web_title").value = "_mod_"+tx+"_title";
			$("web_rid").value = "_mod_"+tx+"_url";
		}
	}
	else
	{
		tt = $("rssuri_"+tx);
		$("rss_url").value = tt.name;
	}
	
	if(__creatFlag == true){
		__hideDiv();
		//return false;
	}
	//else{
		var ttop  = tt.offsetTop;
		var tleft = tt.offsetLeft;
		while (tt = tt.offsetParent){ttop+=tt.offsetTop; tleft+=tt.offsetLeft;}

		var __divResult = document.createElement("div");
		__divResult.id = "showcollect";
		__divResult.style.position = "absolute";
		__divResult.style.background = "#FFFFFF";
		__divResult.style.width = "275px";
		__divResult.style.border = "1px solid #cccccc";
		__divResult.style.paddingLeft = "14px";
		__divResult.style.paddingTop = "3px";
		__divResult.style.paddingBottom = "3px";
		__divResult.style.text = "left";
		__divResult.style.fontSize = "13px";
		__divResult.style.color = "#999999";
		__divResult.style.lineHeight = "20px";
		__divResult.style.top = ttop+25+"px";
		__divResult.style.left = tleft+"px";
		__divResult.style.visibility = "visible";
		__divResult.style.zIndex = 10000;
		__divResult.innerHTML += "<div style='float:left'>请选择:</div>";
		__divResult.innerHTML += "<div align='right' style='float:right;padding-right:3px;'><a href='javascript:__hideDiv();'><img src='/images/img_close.gif' border='0' width='9' height='9'></a></div><br clear='all'>";
		__divResult.innerHTML += Ht;
		document.body.appendChild(__divResult);

		__creatFlag=true;
		__st2 = window.setTimeout("__hideDiv()",10000);
	//}
}

//隐藏层
function __hideDiv()
{
	var _divResults = null;
	_divResults = $('showcollect');
	if (_divResults) {
		var oOpenForm = _divResults.parentNode;
		oOpenForm.removeChild(_divResults);
		__creatFlag=false;
		window.clearTimeout(st2);
	}
}

function Innerobj(Et ,Rid ,Title ,English)
{
	if(Et == 0)
	{
		$($("rss_url").value).value = "http://127.0.0.1:92/RssLink/"+Rid+".xml";
	}
	else
	{
		$($("web_title").value).value = Title;
		$($("web_rid").value).value = "http://www.zhongwenlink.com/goto-"+English+"-"+Rid+".aspx";
	}
}

function getcollect()
{
	var myAjax = new Ajax.Request(
	"/xmls/usercollect.aspx" ,
	{
	method: 'get',
	//parameters: pars,
	onComplete: get_collect
	});
}

function get_collect(originalRequest)
{
	var XO = originalRequest.responseXML;
	var codeweblink = XO.getElementsByTagName("collectwebflag");
	var coderss = XO.getElementsByTagName("collectrssflag");
	var html = "";
	var Rhtml = "";
	switch(codeweblink[0].firstChild.nodeValue)
	{
		case "1" :
			var listweb = XO.getElementsByTagName("collectweb");
			var pageList = iPageSize * WebCurrPage;
			if(pageList > listweb.length)
			{
				pageList = listweb.length;
				if(listweb.length%iPageSize == 0)
				{
					WebCurrPage = parseInt(listweb.length/iPageSize);
				}
				else
				{
					WebCurrPage = parseInt(listweb.length/iPageSize)+1;
				}
			}
			
			var CurrIndex = pageList-iPageSize;
			if(pageList < iPageSize)
			{
				if(iPageSize < listweb.length)
				{
					pageList = iPageSize;
				}
				else
				{
					pageList = listweb.length;
				}
				CurrIndex = 0;
				WebCurrPage = 1;
			}
			
			html += "<ul id=\"r_7\">";
			for(var i=CurrIndex ; i<pageList ;i++)
			{
				html += "<li style=\"float:left\" ";
				html += "onmouseover=\"javascript:displayed('_s_"+listweb[i].getElementsByTagName("id")[0].firstChild.nodeValue+"');\" ";
				html += "onmouseout=\"javascript:displayed('_s_"+listweb[i].getElementsByTagName("id")[0].firstChild.nodeValue+"');\">";
				html += "<div id=\"favoriteright\"> <img src=\"/images/dot.gif\" /> ";
				html += "<a href=\""+listweb[i].getElementsByTagName("url")[0].firstChild.nodeValue+"\" target=\"blank\">";
				html += listweb[i].getElementsByTagName("title")[0].firstChild.nodeValue;
				html += "</a>";
				html += "</div>";
				html += "<div id=\"favoriteright2\">";
				html += "<a id=\"_s_"+listweb[i].getElementsByTagName("id")[0].firstChild.nodeValue+"\" ";
				html += "onclick=\"javascript:delcollect("+listweb[i].getElementsByTagName("id")[0].firstChild.nodeValue+",1);\" ";
				html += "style=\"color:red;cursor:hand;display:none;\" >";
				html += "<img src=\"/images/close.gif\" border=\"0\" /></a>&nbsp;&nbsp;</div>";
				html += "</li>";
			}
			html += "</ul>";
			
			html += "<div style=\"float:right;\"><a href=\"javascript:;\" onclick=\"javascript:WebCurrPage=WebCurrPage-1;getcollect();\" class=\"more\">上一页</a>　<a href=\"javascript:;\" onclick=\"javascript:WebCurrPage=WebCurrPage+1;getcollect();\" class=\"more\">下一页</a>&nbsp;&nbsp;</div>";
			$("web_collect").innerHTML = html;
			break;
		case "0" :
			$("web_collect").innerHTML = "<ul id=\"r_7\"><li> 您目前没有收藏任何网站。请首先在“网站集锦”里选您所要收藏的网站。</li></ul>";
			break;
		case "-1" :
			$("web_collect").innerHTML = "<ul id=\"r_7\"><li> 您尚未登录，请登录后查看您收藏的网站。</li></ul>";
			break;
	}

	switch(coderss[0].firstChild.nodeValue)
	{
		case "1" :
			var listweb = XO.getElementsByTagName("collectrss");
			var pageList = iPageSize * RssCurrPage;
			if(pageList > listweb.length)
			{
				pageList = listweb.length;
				if(listweb.length%iPageSize == 0)
				{
					RssCurrPage = parseInt(listweb.length/iPageSize);
				}
				else
				{
					RssCurrPage = parseInt(listweb.length/iPageSize)+1;
				}
			}
			var CurrIndex = pageList-iPageSize;
			if(pageList < iPageSize)
			{
				if(iPageSize < listweb.length)
				{
					pageList = iPageSize;
				}
				else
				{
					pageList = listweb.length;
				}
				CurrIndex = 0;
				RssCurrPage = 1;
			}
			Rhtml += "<ul id=\"r_7\">";
			//alert(pageList+","+RssCurrPage);
			for(var i=CurrIndex ; i<pageList ;i++)
			{
				Rhtml += "<li style=\"float:left\" ";
				Rhtml += "onmouseover=\"javascript:displayed('_r_"+listweb[i].getElementsByTagName("id")[0].firstChild.nodeValue+"');\" ";
				Rhtml += "onmouseout=\"javascript:displayed('_r_"+listweb[i].getElementsByTagName("id")[0].firstChild.nodeValue+"');\">";
				Rhtml += "<div id=\"favoriteright\"> <img src=\"/images/rssicon2.gif\" /> ";
				Rhtml += "<a href=\""+listweb[i].getElementsByTagName("url")[0].firstChild.nodeValue+"\" target=\"blank\">";
				Rhtml += listweb[i].getElementsByTagName("title")[0].firstChild.nodeValue;
				Rhtml += "</a>";
				Rhtml += "</div>";
				Rhtml += "<div id=\"favoriteright2\">";
				Rhtml += "<a id=\"_r_"+listweb[i].getElementsByTagName("id")[0].firstChild.nodeValue+"\" ";
				Rhtml += "onclick=\"javascript:delcollect("+listweb[i].getElementsByTagName("id")[0].firstChild.nodeValue+",0);\" ";
				Rhtml += "style=\"color:red;cursor:hand;display:none;\" >";
				Rhtml += "<img src=\"/images/close.gif\" border=\"0\" /></a>&nbsp;&nbsp;</div>";
				Rhtml += "</li>";
			}
			Rhtml += "</ul>";
			//alert(pageList+","+RssCurrPage);
			Rhtml += "<div style=\"float:right;\"><a href=\"javascript:;\" onclick=\"javascript:RssCurrPage=RssCurrPage-1;getcollect();\" class=\"more\">上一页</a>　<a href=\"javascript:;\" onclick=\"javascript:RssCurrPage=RssCurrPage+1;getcollect();\" class=\"more\">下一页</a>&nbsp;&nbsp;</div>";
			$("rss_collect").innerHTML = Rhtml;
			break;
		case "0" :
			$("rss_collect").innerHTML = "<ul id=\"r_7\"><li> 您目前没有收藏任何频道。请首先在“频道大全”里选您所要收藏的频道。</li></ul>";
			break;
		case "-1" :
			$("rss_collect").innerHTML = "<ul id=\"r_7\"><li> 您尚未登录，请登录后查看您收藏的频道。</li></ul>";
			break;
	}
}
var RssCurrPage = 1; //当前页
var WebCurrPage = 1; //当前页
var iPageSize = 8; //每页几条