function $(objID) {
	return document.getElementById(objID)
}

function copyit(){
	var obj = window.clipboardData;
  var surl = window.top.parent.location.href;
  var stitle = document.title;
  var str = stitle + ':' + surl;
	if(obj.setData('Text',str)){
	  alert('你已经成功复制本链接地址，好东西当然要发给QQ/MSN好友分享了');
  }
}

function favit(){
	if ( window.sidebar && "object" == typeof( window.sidebar ) && "function" == typeof( window.sidebar.addPanel ) ){
  	//  firefox
		window.sidebar.addPanel( document.title, document.location.href, '' );
	}else if ( document.all && "object" == typeof( window.external ) ){
    //  ie
    window.external.addFavorite( document.location.href, document.title );
  }
}
function nav(t){
  $(t).className = 'active';
}

function copyit2(){
  var obj = $("page_url");
  if (obj.value) { 
	obj.select();js=obj.createTextRange();js.execCommand("Copy");}
	alert("已经复制成功，你可以发送给你朋友了！");
}	

function xprint(sid,stype,spara1,spara2,spara3) {
	var btype = Math.floor(parseInt(stype, 10)/100);
	if(btype == 4 || btype == 6 ) {
		sid = parseInt(sid, 10) + btype*1000000;
		spara1 = encodeURI(spara1);
		preContent = '<a href="http://www.gougou.com/search?search=' + spara1 + '&id=' + sid + '" target="_blank">' + spara2 + '</a>';
	}
	document.write(preContent);
}

function FavtoQQ(){
	window.open('http://shuqian.qq.com/post?from=3&title='+encodeURIComponent(document.title)+'&uri='+encodeURIComponent(document.location.href)+'&jumpback=2&noui=1','favit','width=930,height=470,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes')
}