<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">&lt;!--
//Begin
//加载JS文件程序
function include_js(path){
	var sobj = document.createElement('script');
	sobj.type = "text/javascript";
	sobj.src = path;
	var headobj = document.getElementsByTagName('head')[0];
	headobj.appendChild(sobj);
}

include_js("JsFunc/Base.js");


//****************************
//Open Index Search Section
//****************************
function OpenShNode(){
	var PopNode=document.getElementById("PopShNode");
	var defaultStrs="";
	if(PopNode.className=="Normal"){
		PopNode.className="Active";
		document.getElementById("MainNode").style.overflowY="hidden";
		document.getElementById("PopShIpt").focus();
		document.getElementById("PopShIpt").value="";
	}else{
		PopNode.className="Normal";
		document.getElementById("MainNode").style.overflowY="scroll";
		document.getElementById("PopShIpt").value="";
		document.getElementById("AutoShNode").innerHTML="";
	}
}

//*************************************
//Name:PopFrameLayer
//Func:Frame Layer
//*************************************
function PopFrameLayer(SdStrs){
	var iFrameNode,PageBody,QureUrl,NewUrl,FrameUrl,LoadNode;
	PageBody=document.getElementsByTagName("body")[0];
	
	if(document.getElementById("PopFrame")){
		setTimeout(function(){document.getElementById("PopFrame").remove();document.getElementById("PopFrameLoad").remove();},350);
		document.getElementById("PopFrame").className="PopFrameNor";
		PageBody.style.overflowY="scroll";
		//history.pushState(null,null,location.href.split("#")[0]);
		//console.log("Close");
		
	}else{
		FrameUrl=SdStrs;
		
		PageBody.style.overflowY="hidden";
		iFrameNode= document.createElement("iframe");
		LoadNode=document.createElement("div");
		LoadNode.setAttribute("id", "PopFrameLoad");
		LoadNode.innerHTML="&lt;i class=\"Load\"&gt;&lt;/i&gt;&lt;i class=\"Load\"&gt;&lt;/i&gt;&lt;i class=\"Load\"&gt;&lt;/i&gt;&lt;i class=\"Load\"&gt;&lt;/i&gt;";
		
		iFrameNode.setAttribute("id", "PopFrame");
		iFrameNode.setAttribute("class", "PopFrameNor");
		PageBody.appendChild(iFrameNode);
		PageBody.appendChild(LoadNode);
		
		iFrameNode.setAttribute("src",FrameUrl);
		iFrameNode.className="PopFrameAct";
		
		iFrameNode.onload = function(){
			LoadNode.style.display="none";
		};
		
		QureUrl=location.href.split("#");
		if(QureUrl[1]){
			NewUrl=(location.href).replace(QureUrl[1],"popFrame");
		}else{
			NewUrl=	location.href+"#popFrame";
		}
		history.pushState('popFrame',null,NewUrl);
	}
}

//*************************************
//Name:LoadImgFunc
//Func:Load Img Src
//*************************************
function LoadImgFunc(){
	var TopImg=document.querySelector(".RecMainNode .RecPicNode").getElementsByTagName("img")[0];
	var ScdImg=document.querySelector(".MainShowNode").getElementsByTagName("img");
	var TrdImg=document.querySelector(".RndRecConNode").getElementsByTagName("img");
	
	
	setTimeout(function(){
		TopImg.src=TopImg.getAttribute("data-src");
		for(var i =0;i &lt; ScdImg.length; i++){
			if(ScdImg[i].getAttribute("src")=="" || ScdImg[i].getAttribute("src")==null || ScdImg[i].getAttribute("src")=="http://askdian.com/BackData/Upfile/WebImg/loading.gif"){
				ScdImg[i].src=ScdImg[i].getAttribute("data-src");
			}
		}
		
		for(var x =0;x &lt; TrdImg.length; x++){
			if(TrdImg[x].getAttribute("src")=="" || TrdImg[x].getAttribute("src")==null || TrdImg[x].getAttribute("src")=="http://askdian.com/BackData/Upfile/WebImg/loading.gif"){
				TrdImg[x].src=TrdImg[x].getAttribute("data-src");
			}
		}
	},1000);
	//console.log(ScdImg[0].getAttribute("src"));
}

//*************************************
//Name:TouchFunc
//Func:Touc Function
//*************************************
function TouchFunc(){
	PreLoadRldwnFms();LoadImgFunc();
	var startY=0,moveEndY=0,MvLength_Y;
	var startX=0,moveEndX=0,MvLength_X;
	var dircetions=0;
	//console.log(RefshTxt.getAttribute("data"));
	
	document.addEventListener("touchstart",function(f){
		startY=f.targetTouches[0].pageY;
		startX=f.targetTouches[0].pageX;
		f = f || window.event;
	},false);
	
	document.addEventListener("touchmove",function(e){
		var TmpmvEndY= e.changedTouches[0].pageY;
		var TmpLthY = startY - TmpmvEndY;
		
		//console.log(TmpLthY);
		if(TmpLthY &lt; -90){
			SlideDown(TmpLthY,"do");
		}
		
	},false);
	
	document.addEventListener("touchend",function(e){
		moveEndY= e.changedTouches[0].pageY;
		moveEndX= e.changedTouches[0].pageX;
		MvLength_Y = startY - moveEndY;
		MvLength_X = startX - moveEndX;
		
		//GetAllTips(Math.round(startX)+"|"+Math.round(moveEndX));
		//console.log(Math.round(startX),Math.round(moveEndX),"|",Math.round(startY),Math.round(moveEndY),"|")
		dircetions=GetDirection(startX,startY,moveEndX,moveEndY);
		//console.log(dircetions,"Y:"+(moveEndY-startY),"X："+(moveEndX-startX));
		
		if(dircetions==2){
			SlideDown(MvLength_Y,"End");
			
		}else if(dircetions==3){
			SlideParentCard(MvLength_X,dircetions);
		}
	},false);
}

//*************************************
//Name:SlideParentCard
//Func:Slide Parent Card
//*************************************
function SlideParentCard(distance,dircetions){
	var FtSecNod=window.parent.document.querySelector("#FooterNav").getElementsByTagName("section");
	
	//console.log(dircetions,distance);
	if(distance&gt;80 &amp;&amp; dircetions==3){
		window.parent.Index_ChangeTable(FtSecNod[1]);
		//dircetions=0;
	}
}

//************************************************
//Name:SlideDown
//Func:When Scroll=0 Then Pull down Update
//************************************************
function SlideDown(distance,Action){
	var ShowYes = Boolean;
	var scrollTop;
	var _element=document.getElementById("MainNode");
	var RefshTxt=document.getElementById("refTxt");
	
	if(Action=="End"){
		RefshTxt.innerHTML=RefshTxt.getAttribute("data");
		//console.log(RefshTxt.getAttribute("data"));
		setTimeout(function(){
			RefshTxt.innerHTML="&lt;i class=\"icon-shuaxin Refrsh\"&gt;&lt;/i&gt;";
			_element.style.transition="transform 0.5s ease 1s";
			_element.style.transform="translateY(0px)";
		},500);
		setTimeout(function(){RefshTxt.innerText="";RefshTxt.className="Normal";RefshTxt.setAttribute("rel","")},1100);
		setTimeout(function(){_element.style.borderTop="none";},2000);
		return false;
	}
	
	scrollTop=document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
	Number(scrollTop)==0?ShowYes=true:ShowYes=false;
	
	if(ShowYes==true){
		if(Math.abs(distance) &gt;100){
			//console.log(distance);
			_element.style.borderTop="1px solid #e8e8e8";
			_element.style.boxShadow = "0px -10px 10px rgba(211,211,211,0.4)";
			_element.style.transition="transform 0s ease 0s";
			if(Math.abs(distance) &lt; 220){
				_element.style.transform="translateY("+(Math.abs(distance)-100)+"px)";
			}else{
				_element.style.transform="translateY(120px)";	
			}
			
			RefshTxt.className="Active";
			RefshTxt.innerHTML=RefshTxt.getAttribute("data");
			PreLoadRldwnFms();
		}
	}
}









//*************************************
//Name:PreLoadRldwnFms
//Func:Load Fms Sentence Top Page
//*************************************
function PreLoadRldwnFms(){
	var Pldwn_AjaxUrl,Pldwn_AjaxUrl;
	var RefshTxt=document.getElementById("refTxt");
	if(RefshTxt.getAttribute("rel")==""){
		Pldwn_AjaxUrl="Fun/GameAjax.asp?Action=GetPulldwnRfsh";
		Pldwn_BackStr=ajaxGet(Pldwn_AjaxUrl);
		//console.log(reconvert(Pldwn_BackStr));
		RefshTxt.setAttribute("data",reconvert(Pldwn_BackStr));
		RefshTxt.setAttribute("rel","1");
	}
}



function getClient() {
	return {
		width: window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
		height: window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
	}
}

//*************************************
//Name:PullUpRenew
//Func:PullUp Load Bottom Txt
//*************************************
function PullUpRenew(){
	var ShowNode=document.getElementById("DbContainer");
	var AjaxUrl,BackStr,NowNum;
	NowNum=ShowNode.getAttribute("data");
	
	if(getScrollHeight() - 70 == Math.ceil(getDocumentTop()) + getWindowHeight() || getScrollHeight() == Math.ceil(getDocumentTop()) + getWindowHeight()){
		if(Number(NowNum)&lt;=Number(ShowNode.getAttribute("rel"))-4){
			ShowNode.setAttribute("data",Number(NowNum)+4);
			AjaxUrl="Fun/GameAjax.asp?Action=PuRndGetPro&amp;ObjectId="+Number(NowNum)+"&amp;Object="+ShowNode.getAttribute("rel");
			BackStr=ajaxGet(AjaxUrl);
			//console.log(BackStr);
			document.getElementById("LoadTipNode").className="Active";
			setTimeout(function(){document.getElementById("LoadTipNode").className="Normal";ShowNode.innerHTML=ShowNode.innerHTML+BackStr;VistAppOrNot();},350);
			if(Number(NowNum)==Number(ShowNode.getAttribute("rel"))-4){
				var NowDate=new Date();
				//console.log(NowDate.getMonth()+1+"-"+NowDate.getDate());
				localStorage.setItem("AskDian_IndexLoad",NowDate.getMonth()+1+"-"+NowDate.getDate());
			}
			//console.log(BackStr);
		}else{
			console.log("Have done",localStorage.getItem("AskDian_IndexLoad"));
			//ShowNode.innerHTML=ShowNode.innerHTML+"&lt;div class=\"AppdownLoadTip\"&gt;&lt;/div&gt;";
			//VistAppOrNot();
			LoadRndCont();
			return false;
		}
	}
}

function LoadRndCont(){
	var RndAjaxUrl,RndAjaxUrl1,RndBkStrs,RndBkStrs1,LoadNode;
	var PartNode=document.getElementById("MainNode");
	LoadNode=document.getElementById("CmpRnd");
	
	document.getElementById("DbContainer").style.marginBottom="0px";
	
	document.getElementById("LoadTipNode").className="Active";
	//console.log(LoadNode.getAttribute("data"));
	if(LoadNode.getAttribute("data")=="NaN" || LoadNode.getAttribute("data")==""){
		RndAjaxUrl="Fun/GameAjax.asp?Action=GetRndAjaxIds";
		RndBkStrs=ajaxGet(RndAjaxUrl);
		LoadNode.setAttribute("data",RndBkStrs);
		LoadNode.setAttribute("rel","4");
		
		RndAjaxUrl1="Fun/GameAjax.asp?Action=GetRndAjaxStrs&amp;Object="+LoadNode.getAttribute("data")+"&amp;ObjectId=4";
		RndBkStrs1=ajaxGet(RndAjaxUrl1);
		//console.log(RndBkStrs1);
		setTimeout(function(){document.getElementById("LoadTipNode").className="Normal";LoadNode.innerHTML=LoadNode.innerHTML+RndBkStrs1;},350);
	}else{
		if(Number(LoadNode.getAttribute("rel"))&lt;=12){
			LoadNode.setAttribute("rel",Number(LoadNode.getAttribute("rel"))+4);
			RndAjaxUrl1="Fun/GameAjax.asp?Action=GetRndAjaxStrs&amp;Object="+LoadNode.getAttribute("data")+"&amp;ObjectId="+LoadNode.getAttribute("rel");
			RndBkStrs1=ajaxGet(RndAjaxUrl1);
			//console.log(RndAjaxUrl1);
			
			setTimeout(function(){document.getElementById("LoadTipNode").className="Normal";LoadNode.innerHTML=LoadNode.innerHTML+RndBkStrs1;VistAppOrNot();},350);
		}else{
			console.log("done");
			LoadNode.setAttribute("data","NaN");
			LoadNode.setAttribute("rel","4");
		}
		
		//console.log(LoadNode.getAttribute("rel"));
	}
	//console.log(RndAjaxUrl1);
	
	
	
}


//*************************************
//Name:LoadRndCont
//Func:Load PreRnd Contxt
//*************************************
function LoadRndCont_Old(){
	if(localStorage.getItem("AskDian_IndexLoad")!==null){
		var Nowdate=new Date().getDate();
		var LstDate=localStorage.getItem("AskDian_IndexLoad").split("-")[1];
		if(Nowdate==LstDate){
			var ShowNode=document.getElementById("DbContainer");
			var AjaxUrl="Fun/GameAjax.asp?Action=GetAllHvLoadPro";
			var BackStr=ajaxGet(AjaxUrl);
			ShowNode.innerHTML=ShowNode.innerHTML+BackStr;
			console.log(BackStr);
			//setTimeout(function(){waterFall();},350);
			//
		}else{
			//waterFall();
		}
	}else{
		//waterFall();
	}
}

//*************************************
//Name:waterFall
//Func:waterFall Order
//*************************************
function waterFall() {
	var ShowNode=document.getElementById("DbContainer");
	var items =ShowNode.getElementsByClassName("LstItem");
	var gap = 10;
	var pageWidth = getClient().width;
	var itemWidth = items[0].offsetWidth;
	var columns = parseInt(pageWidth / (itemWidth + gap));
	var arr = [];
	
	//console.log(items.length);
	for(var i =0;i &lt; items.length; i++){
		if(i &lt; columns) {
			items[i].style.top = 0;
			items[i].style.left = (itemWidth + gap) * i + 'px';
			arr.push(items[i].offsetHeight);
		}else {
			//其他行，先找出最小高度列，和索引
			//假设最小高度是第一个元素
			var minHeight = arr[0];
				//console.log(minHeight);
			var index = 0;
			for(var j = 0; j &lt; arr.length; j++){//找出最小高度
				if(minHeight &gt; arr[j]){
					minHeight = arr[j];
					index = j;
				} 
			}
			//设置下一行的第一个盒子的位置
			//top值就是最小列的高度+gap
			items[i].style.top = arr[index] + gap + 'px';
			items[i].style.left = items[index].offsetLeft + 'px';
				
			//修改最小列的高度
			//最小列的高度 = 当前自己的高度 + 拼接过来的高度 + 间隙的高度
			arr[index] = arr[index] + items[i].offsetHeight + gap;
		}
	}
	ShowNode.style.height=arr[0]+items[items.length-1].offsetHeight+gap+80+"px";
	//console.log("个数："+items.length,ShowNode.offsetHeight);
}


function IdxPageCol(thisObj,Types){
	var ArtId=thisObj.getAttribute("data");
	var AjaxUrl,BackStr,IconNode,TxtNode;
	if(get_All_Cookie("UserLogin")!="" &amp;&amp; get_All_Cookie("UserLogin")!=null){
		var Lstdate=thisObj.getAttribute("rel");
		IconNode=thisObj.getElementsByTagName("i")[0];
		TxtNode=thisObj.getElementsByTagName("label")[0];
		if(Lstdate==""){
			thisObj.setAttribute("rel",new Date());
		}else{
			var nowdate=new Date().getTime();
			var LstStrs =new Date(thisObj.getAttribute("rel")).getTime();
			if((nowdate - LstStrs)&lt;5000){
				GetAllTips("您的手速太快了,稍后再试吧~");
				return false;
			}else{
				thisObj.setAttribute("rel",new Date());
			}
		}
		
		if(IconNode.className=="icon-Col1 Col"){
			IconNode.className="icon-Col2 Col ZanAct";
			if(TxtNode.innerHTML=="收藏"){
				TxtNode.innerHTML="1";
				TxtNode.setAttribute("class","Numb");
			}else{
				TxtNode.innerHTML=Number(TxtNode.innerHTML) + 1;
			}
			ShowComNewAlert("恭喜您，文章收藏成功！可以进入&lt;a href='javascript:;' onClick=\"GotoColPage()\"/&gt;收藏夹&lt;/a&gt;查看！","Success",2000,"Box");
			
		}else{
			IconNode.className="icon-Col1 Col";
			if(TxtNode.innerHTML=="1"){
				TxtNode.innerHTML="收藏";
				TxtNode.setAttribute("class","Txt");
			}else{
				TxtNode.innerHTML=Number(TxtNode.innerHTML) - 1;
			}
			ShowComNewAlert("文章取消收藏成功！","Success",2000,"Box");
		}
		AjaxUrl="MbAjax.asp?Action=CollectArt&amp;Object=AskDian&amp;ObjectId="+ArtId;
		BackStr=ajaxGet(AjaxUrl);
		//console.log(BackStr);
		
	}else{
		//GetAllTips("登录之后可以查看收藏文章~");
		var LocalUrl=window.location.href;
		LocalUrl=FilterSourcePage(LocalUrl);
		if(window.top.document.getElementById("FooterNav")){
			window.top.document.getElementById("FooterNav").style.display="none";
		}
		ShowNewComConform("登录之后可以继续操作","此操作需要用户登录，您是否现在登录？","",function(){window.location.href="UserLogin.asp?SourcePage="+LocalUrl;},"",function(){window.top.document.getElementById("FooterNav").style.display="flex";});
		
	}
	//console.log(ArtId);
}

function GotoColPage(){
	if(window.top.document.getElementById("FooterNav")){
		var HomeSec=window.top.document.querySelectorAll("#FooterNav section")[2];
		parent.Index_ChangeTable(HomeSec);
	}	
	//console.log(window.top.document.querySelectorAll("#FooterNav section")[2]);
}
function ShowNewComConform(title,content,yesVal,yesFunc,noVal,noFunc){
	NewAlert({
		title:title,
		content:content,
		yesVal:yesVal,
		cancelVal:noVal,
		yesCallBack:yesFunc,
		cancelCallBack:noFunc
	});
}
function ShowComNewAlert(content,State,tim,ShowType){
	NewAlert({content:content,State:State,timer:tim,ShowType:ShowType});
}
/*
//console.log(DevicH);
function GetMenuClk(thisObj){
	var ParNode=document.getElementById("FooterNav");
	var ListNode=ParNode.getElementsByTagName("section");
	for (i=0;i&lt;ListNode.length ;i++ ){
		if(thisObj==ListNode[i]){
			thisObj.className="Active";
		}else{
			ListNode[i].className="Normal";
		}
	}
}
*/

--&gt;</pre></body></html>