			var isTp=0;
			var newPic;
			var lwPage="page_2.html?MMId="
			var morePage="page_2.html?MMId="
			var loadPicPage="FunctionPage/ShowPage.aspx?pid="
			var newPicCount=0;
			$(function(){
				InitValue();
				$("#ToHide").hide();
				$("#div_MMrq").empty();
				$("#waitingDiv").fadeIn("slow",function (){LoadVoteTopJson();$("#waitingDiv").hide();LoadNewJoinPicJson();});
				
			})
			function openLwPage(mmid)
			{
				window.open(this.lwPage + mmid)
			}
			function openMorePage(mmid)
			{
				window.open(this.morePage + mmid)
			}
			function InitValue()
			{
				this.newPic=$("img[name=newJoin]");
				this.newPicCount=this.newPic.size();
			}
			
			function LoadNewJoinPicJson()
			{
				var datas ="m=2&t="; 
				datas += this.newPicCount;
				datas += "&o=";
				var t=new Date();
				datas += t.getTime();
				
				var path="FunctionPage/OtherJSON.aspx?"+datas
				//var path1="FunctionPage/LoadPicid.aspx?"+datas
				$.getJSON(path,function(msg){
					var data=msg.Table;
					//var datas = "InfoTable"
					$.each(data,function(i,n)
					{             
						BindNewPic(i,n);
					});
				})
			}
			
			function BindNewPic(i,n)
			{
				//this.newPic.get(i).src=format(loadPicPage + n.PicId,"images\\pic_mmn.gif");
		
				LoadImage(this.newPic.get(i),loadPicPage,format(n.PicId,"0"));
				//var picid=datas.picid
				
				this.newPic.eq(i).css("cursor","pointer");
				//this.newPic.eq(i).click(function(){window.open("page_1.html?picid=" + picid)});
				this.newPic.eq(i).click(function(){window.open("page_2.html?MMId=" + n.MMId)});
			}
			
			function LoadVoteTopJson()
			{
				var datas ="xp=1"; 
				datas += "&istp=";
				datas += this.isTp.toString();
				if (this.isTp==0)
				{
					datas += "&o=";
					var t=new Date();
					datas += t.getTime();
				}
				var path="FunctionPage/LoadMMInfo.aspx?"+datas
				$.getJSON(path,function(msg){
					var data=msg.Table;
					
					$.each(data,function(i,n)
					{             
						NDiv(n,"#div_MMrq");
					});
				})
			}

			function NDiv(dat,div)
			{
			
				try
				{
					var cdiv =$("#ToHide").clone();
					
					cdiv.attr("id","MMDiv_" + dat.MMId);
					cdiv.find("#imglw").click(function(){openLwPage(dat.MMId)})
					cdiv.find("#imgmore").click(function(){openMorePage(dat.MMId)})
					cdiv.find("#imgzct").click(function(){DoTp(cdiv,dat.MMId);});
					cdiv.find("#jdyzh").text(dat.JdyouAccount);
					cdiv.find("#nc").text(dat.Nickname);
					cdiv.find("#age").text(format(dat.Age,lan_secret));
					cdiv.find("#cs").text(format(dat.City,lan_secret));
					cdiv.find("#constellation").text(format(dat.Constellation,lan_secret));
					
					
					cdiv.find("#yx").text(dat.NowGames);	
					cdiv.find("#rc").text(format(dat.VoteCount,0));
					
					var xdoc=cdiv.find("#zp").get(0)
					
					LoadImage(xdoc,loadPicPage,format(dat.PicId,"0"));
					
					cdiv.find("#zp").css("cursor","pointer");
					cdiv.find("#zp").click(function(){window.open("page_2.html?MMId="+dat.MMId)})
					var id=dat.MMId;
					var str="";
					
					str=MMPK.FunctionPage.AjaxPage.getScriptMsg(parseInt(id)).value;
					
					cdiv.find("#jb").html(str);
					
					cdiv.appendTo(div);
					
					cdiv.show();
				}
				catch(e)
				{
					return false;
				}
				
			}

			function format(str,def)
			{
				return $.trim(str)==""?def:$.trim(str);
			}
			 
			function DoTp(cdiv,mid)
			{	
				
				var logUser=MMPK.FunctionPage.AjaxPage.LoadS("logUser").value;
				
				if (logUser=="" || logUser==null)
				{
					popupTips('loginFram',2400,2400,1150);
					return;
				}
				var rcdiv=cdiv.find("#rc");
				js_Vote(logUser,mid,rcdiv);
			}
			
			

			function showErrMsg(msg)
			{
				alert(msg);
			}