﻿function fontZoom(size) {
  $("#newscontent").attr("class", "font" + size);
}

function copyLink() {
  try {
    var cText = document.location.toString(); if (window.clipboardData) { window.clipboardData.setData("Text", cText); alert("复制完成!"); } else if (window.netscape) {
      try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); } catch (e) { alert("您的浏览器设置为不允许复制！\n如果需要此操作，请在浏览器地址栏输入'about:config'并回车\n然后将'signed.applets.codebase_principal_support'设置为'true',再重试复制操作!"); return false; }
      var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard); if (!clip) return; var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable); if (!trans) { return; }
      trans.addDataFlavor('text/unicode'); var str = new Object(); var len = new Object(); var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString); str.data = cText; trans.setTransferData("text/unicode", str, cText.length * 2); var clipid = Components.interfaces.nsIClipboard; if (!clip) return false; clip.setData(trans, null, clipid.kGlobalClipboard); alert("复制完成!");
    }
  } catch (e) { }
};
function sharetokaixin() {
  var url = encodeURIComponent(self.location);
  var title = encodeURIComponent($("title").text());
	var testhtml = "<a href='http://www.kaixin001.com/repaste/share.php?rtitle=" + title + "&rurl=" + url + "' title='分享到开心网'>分享到开心网</a>"
	$.fn.ceebox.popup(testhtml, {onload:true,htmlWidth:600,htmlHeight:450});
	return false;
};
function sharetorenren() {
  var url = encodeURIComponent(self.location);
  var title = encodeURIComponent($("title").text());
	var testhtml = "<a href='http://share.renren.com/share/buttonshare.do?link=" + url + "&title=" + title + "' title='分享到人人网'>分享到人人网</a>"
	$.fn.ceebox.popup(testhtml, {onload:true,htmlWidth:600,htmlHeight:450});
	return false;
  //window.open("http://share.renren.com/share/buttonshare.do?link=" + url + "&title=" + title);
};
function sharetosina() {
  var url = encodeURIComponent(self.location);
  var title = encodeURIComponent($("title").text());
	var testhtml = "<a href='http://v.t.sina.com.cn/share/share.php?url=" + url + "&title=" + title + "' title='分享到新浪微博'>分享到新浪微博</a>"
	$.fn.ceebox.popup(testhtml, {onload:true,htmlWidth:600,htmlHeight:450});
	return false;
};
function sharetodouban() {
	var url = encodeURIComponent(self.location);
  var title = encodeURIComponent($("title").text());
	var testhtml = "<a href='http://www.douban.com/recommend/?url=" + url + "&title=" + title + "' title='分享到豆瓣网'>分享到豆瓣网</a>"
	$.fn.ceebox.popup(testhtml, {onload:true,htmlWidth:600,htmlHeight:450});
	return false;
};

function CloseCeeboxM()
{
	$.fn.ceebox.closebox();
	return false;
}
	
	function DoSearch() {
		var q = encodeURIComponent($("#search_text").val());
		self.location = '/Default.aspx?tabid=190&SearchCriteria=' + q;
	}

