function getDownUrl(id) {
	if (id != null && id != "") {
		MagazineDowns.getMagazineDown(id, urlResult);
	} else {
		
	}
}
function urlResult(msg) {
	window.location=msg;
}

function showPopLable(){
MagazineStory.magazineStoryLable(function (msg){
	var color0="7, 115, 190";
	var color1="224, 153, 0";
	var color2="53, 53, 53";
	var font0="仿宋_GB2312";
	var font1="幼圆";
	var font2="隶书";
	var htmlCon="<form name='myform' action='/kuke/magazineStory' method='post'><input type='hidden' name='label' ><input type='hidden' name='o' value='storyList'></form>";
	for(var i=0;i<msg.length;i++){
		var lableName = msg[i].lableName;
		var color_num=Math.round(Math.random()*3);
		var font_num=Math.round(Math.random()*4);
		if(i%2==0){
			if(color_num==0&&font_num==0){
				htmlCon+="<span><a style=\"font-family: '"+font0+"' '宋体'; font-size: 18px; color: rgb("+color0+"); font-weight: bold;\" href=\"javascript:subformvalue('"+lableName+"');\" title='"+lableName+"'>"+lableName+"</a></span>&nbsp;&nbsp;";
			}else if(color_num==0&&font_num==1){
				htmlCon+="<span><a style=\"font-family: '"+font0+"' '宋体';font-size: 18px; color: rgb("+color1+"); font-weight: bold;\" href=\"javascript:subformvalue('"+lableName+"');\" title='"+lableName+"'>"+lableName+"</a></span>&nbsp;&nbsp;";
			}else if(color_num==1&&font_num==0){
				htmlCon+="<span><a style=\"font-family: '"+font1+"' '宋体'; font-size: 18px; color: rgb("+color0+"); font-weight: bold;\" href=\"javascript:subformvalue('"+lableName+"');\" title='"+lableName+"'>"+lableName+"</a></span>&nbsp;&nbsp;";
			}else if(color_num==1&&font_num==1){
				htmlCon+="<span><a style=\"font-family: '"+font1+"' '宋体'; font-size: 18px; color: rgb("+color1+"); font-weight: bold;\" href=\"javascript:subformvalue('"+lableName+"');\" title='"+lableName+"'>"+lableName+"</a></span>&nbsp;&nbsp;";
			}else if(color_num==1&&font_num==2){
				htmlCon+="<span><a style=\"font-family: '"+font1+"' '宋体'; font-size: 18px; color: rgb("+color2+"); font-weight: bold;\" href=\"javascript:subformvalue('"+lableName+"');\" title='"+lableName+"'>"+lableName+"</a></span>&nbsp;&nbsp;";
			}else if(color_num==2&&font_num==1){
				htmlCon+="<span><a style=\"font-family: '"+font2+"' '宋体'; font-size: 18px; color: rgb("+color1+"); font-weight: bold;\" href=\"javascript:subformvalue('"+lableName+"');\" title='"+lableName+"'>"+lableName+"</a></span>&nbsp;&nbsp;";
			}else if(color_num==2&&font_num==2){
				htmlCon+="<span><a style=\"font-family: '"+font2+"' '宋体'; font-size: 18px; color: rgb("+color2+"); font-weight: bold;\" href=\"javascript:subformvalue('"+lableName+"');\" title='"+lableName+"'>"+lableName+"</a></span>&nbsp;&nbsp;";
			}else if(color_num==2&&font_num==0){
				htmlCon+="<span><a style=\"font-family: '"+font2+"' '宋体'; font-size: 18px; color: rgb("+color0+"); font-weight: bold;\" href=\"javascript:subformvalue('"+lableName+"');\" title='"+lableName+"'>"+lableName+"</a></span>&nbsp;&nbsp;";
			}else if(color_num==0&&font_num==2){
				htmlCon+="<span><a style=\"font-family: '"+font0+"' '宋体'; font-size: 18px; color: rgb("+color2+"); font-weight: bold;\" href=\"javascript:subformvalue('"+lableName+"');\" title='"+lableName+"'>"+lableName+"</a></span>&nbsp;&nbsp;";
			}else if(color_num==0&&font_num==3){
				htmlCon+="<span><a style=\"font-size: 18px; color: rgb("+color0+"); font-weight: bold;\" href=\"javascript:subformvalue('"+lableName+"');\" title='"+lableName+"'>"+lableName+"</a></span>&nbsp;&nbsp;";
			}else if(color_num==2&&font_num==3){
				htmlCon+="<span><a style=\" font-size: 18px; color: rgb("+color2+"); font-weight: bold;\" href=\"javascript:subformvalue('"+lableName+"');\" title='"+lableName+"'>"+lableName+"</a></span>&nbsp;&nbsp;";
			}else if(color_num==1&&font_num==3){
				htmlCon+="<span><a style=\" font-size: 18px; color: rgb("+color1+"); font-weight: bold;\" href=\"javascript:subformvalue('"+lableName+"');\" title='"+lableName+"'>"+lableName+"</a></span>&nbsp;&nbsp;";
			}
		}else{
			htmlCon+="<span><a href=\"javascript:subformvalue('"+lableName+"');\" title='"+lableName+"'>"+lableName+"</a></span>&nbsp;&nbsp;";
		}
	}
	document.getElementById("biaoqian_t_center").innerHTML=htmlCon;
});
}

function subformvalue(label) {
      document.myform.label.value = label;
      document.myform.submit();
}
function subpageformvalue(label,pageNow){
     document.myPageForm.label.value = label;
     document.getElementById("pageNow").value=pageNow;
     document.myPageForm.submit();
}
//分页标签
function subpageformCount(label,pagecount){
	var stra=document.getElementById("pageNowInput").value;
	message="以下内容不符合要求,请检查!\n"
	opt=false;
	if(stra == ""){
		message+="请填写页码！\n";
		opt=true;
	}else{
		for (nIndex=0; nIndex<stra.length; nIndex++){ 
			cCheck = stra.charAt(nIndex); 
			if (!(IsDigit(cCheck))) {
				message+="页码必须有数字组成!\n";
				opt=true;
				break;
				
			}
		} 
	}
	if(parseInt(stra)>pagecount){
		message+="您提交的页码无效！\n";
		opt=true;
	}
	if(opt){
		alert(message);
		return false;
	}else{
		 document.myPageForm.label.value = label;
     	 document.getElementById("pageNow").value=stra;
		 document.myPageForm.submit();
	}
	
}
