﻿
//取得url参数 字符串
function _getUrlStr(){
	hrefstr=window.location.href;
	var strarray=hrefstr.split("?");
	var tmpStr=strarray[1];
//	if(tmpStr==undefined){			
//		tmpStr=null;
//	}
	return unescape(tmpStr);
}
//
function open_win(url){
	window.open(url);
}
//取得单个url参数值 
function _getUrlItem(strKey){
	var hrefstr=window.location.href;
	var reg = new RegExp("(^|&)"+ strKey +"=([^&]*)(&|$)"); 
	var r = hrefstr.substr(hrefstr.indexOf("\?")+1).match(reg); 
	if (r!=null){
		return unescape(r[2]);
	}else{
		return null;
	}
}

//加入收藏夹
function addToFavorite(){				
	//window.external.addFavorite('http://www.duk.cn','读客! 订阅生活新媒体');
	var t_url = window.location.href;
	var t_title = window.document.title;
	window.external.addFavorite(t_url, t_title);
}

//改变IE标题
function changeTitle(str){				
	window.document.title=str+"-在线杂志-读客! 订阅生活新媒体";
}
//
//评论杂志
function gotoMagazineComment(id){
	//
	//
	window.open ("http://comment2.news.sohu.com/viewcomments.action?id=252729296")
}
