﻿init();
function init(){
	if(location.href.indexOf("/girl/") >= 0 && HTML.C("comicspot_auth").length == 0){
		var h = new Date().getHours();
		if(h > 7 && h < 21){
			window.location.href = "http://" + DOMAIN;
		}
	}
	var e = DOM.E("Intro");
	if(e.innerHTML == "&nbsp;"){
		DOM.setDisplay(e, false);
	}
	if(typeof module == "string" && typeof id == "number" && id > 0){
		dataLoader.regist("moduleObjectCounter:module=" + module + "&id=" + id);
		//暂不显示评论
		e = e.nextSibling;
		e = (XML.isElement(e)? e : e.nextSibling);
		e.style.display = "none";
/*		//评论初始化
		if(typeof commentaries == "object"){
			commentaries.init("Commentaries", "module__picture", id);
		}
*/
	}
	//添加点击图片翻页功能，仅登录用户
	var eci = DOM.E("PicImage");
	var epn = DOM.E("LinkPageNext");
	var en = epn == null? ecn : epn;
	if(en != null){
		eci.setAttribute("nextPage", en.href);
	}
	eci.ondblclick = function(){
		if(member.getUid() <= 0){return false;}
		var np = this.getAttribute("nextPage");
		if(np){
			location.href = np;
		}
	}
	//拖动图片移动窗口滚动条
	HTML.dragScroll(eci, null, 2);
}
