//确认操作
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//	input : pageNum			翻到页面
//			objForm     	FORM对象
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
function openpage(pageNum,objForm){
  
  objForm.hidNowPage.value=pageNum;
  objForm.submit();
}

//确认操作
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//	input : str			提示文字
//			loc_href	跳转的页面
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
	function confirm_chk(str,loc_href)
	{
		if(confirm(str)) {
		void(location.href=loc_href);
		}
	}
//	end

function JunmpPageNum(varNumMax,varNum,objForm)
  {
   if(isNaN(varNum) || parseInt(varNum) != varNum || varNum<=0){
    alert("请输入1到"+varNumMax+"之间的正整数！");
	return false;
	exit;}    
   if (varNum>varNumMax){
    alert("您只能输入1到"+varNumMax+"之间的正整数！");
	return false;
	exit;}   
   openpage(varNum,objForm);
}
function test(){
    alert("sdf");
}

//开新窗口2
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//	input : url			连接地址
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
	function openwin2(url,width,heigh) {
		window.open(url,'choose','width='+width+',height='+heigh+',scrollbars=yes');
		
	}
//	end
function bookReport(reportid) {
	if(confirm("确定要预定这份报告？")) {
		window.open('/reportuser/bookreport.asp?id=' + reportid,'myAction','height=2,width=2,toolbar=0,menubar=0,scrollbars=0,status=0,resizable=1,top=10000,left=10000');
	}
}

function viewDispatch(target, login, columnid, articleid, price)
{
	window.open('/reportuser/viewDispatch.asp?ArticleId=' + articleid + '&ColumnId='+columnid + '&price=' + price + '&target=' + target + '&login=' + login,'choose',"top=250,left=400,toolbar=no,menubar=no,scrollbars=no,resizable=0,location=no, status=no,width=280,height=200");
}

function login() {
	alert("请先登陆");
	window.open('/reportuser/login.asp','choose',"top=250,left=400,toolbar=no,menubar=no,scrollbars=no,resizable=0,location=no, status=no,width=280,height=200");
		
}

function viewProtected(columnid,articleid,price) {
	//if(confirm("访问本页将扣除您" + price + "个电子货币!确定要继续么？")) {
		window.open('/reportuser/viewprotected.asp?aid=' + articleid + "&cid=" + columnid + "&price=" + price);
	//}
}

function viewFree(columnid,articleid) {
	//if(confirm("访问本页将扣除您" + price + "个电子货币!确定要继续么？")) {
		window.open('/reportuser/viewfree.asp?ArticleId=' + articleid + "&ColumnId=" + columnid);
	//}
}

function viewBrief(columnid,articleid) {
	//if(confirm("访问本页将扣除您" + price + "个电子货币!确定要继续么？")) {
		window.open('/reportuser/viewBrief.asp?ArticleId=' + articleid + "&ColumnId=" + columnid);
	//}
}

function viewShoppingBag(ReportId)
{
		window.open("/reportuser/ShoppingBag_Add.asp?ReportId=" + ReportId);

}


function login2() {
	alert("本页内容为收费内容，只有vip用户能浏览");
	window.open('/reportuser/charge_work.asp','choose',"top=250,left=400,toolbar=no,menubar=no,scrollbars=no,resizable=0,location=no, status=no,width=280,height=200");
		
}

function login1() {
	alert("您要浏览的内容为保护内容，请先登陆。并升级为vip用户才能继续。");
	window.open('/reportuser/login.asp','choose',"top=250,left=400,toolbar=no,menubar=no,scrollbars=no,resizable=0,location=no, status=no,width=280,height=200");
		
}
