<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="liluli"
			 title_url="http://www.heiwaboke.net/2ch/"
			 description="２ちゃんねるビューアです。板やスレッドを閲覧することができます。"
			 width="320"
			 height="420"
			 screenshot="http://www.heiwaboke.net/2ch/img/liluli.png"
			 thumbnail="http://www.heiwaboke.net/2ch/img/liluli-thumb.png"
			 author="ｔｎ"
			 author_email="heiwaboke@gmail.com"
			 author_link="http://www.heiwaboke.net/"
			 author_location="Japan" />
<UserPref name="starturl" display_name="初期表示スレッド" datatype="string" default_value="" />
<Content type="html">
<![CDATA[
<style type="text/css">
<!--
* {font-family:"ＭＳ Ｐゴシック";}
body {
	color:black;
	background-color:#efefef;
	font-size:12px;
	line-height:115%;
}
dd {margin: 0px 0px 12px 18px;}
.title {
	font-size:13px;
	color:red;
}
.nich {
  color:green;
}
.res {color:#B02B2C;}
.spd {color:#006E2E;}
.popup {
	font-size: 10px;
	line-height:105%;
	border-style: solid;
	border-color: #000000;
	border-width: 1px;
	padding: 3px;
	filter: alpha(opacity=90);
	-moz-opacity:0.9;
	opacity:0.9;
	white-space:pre;
}
.popup dl {
	margin:0px;
}
.popup dt {
	margin:0px;
}
.popup dd {
	margin:0px 0px 7px 10px;
}
a:link,a:visited {color:blue;}
a:active {color:red;}
a:hover {color:#660099;}
a:link.tan,
a:visited.tan,
a:active.tan,
a:hover.tan {
  color:#333333;
  text-decoration: underline;
}
a:link.makka,
a:visited.makka,
a:active.makka,
a:hover.makka {
  color:#FF0000;
  text-decoration: underline;
}
a:link.ninki,
a:visited.ninki,
a:active.ninki,
a:hover.ninki {
  color:#AF00CF;
  text-decoration: underline;
}
-->
</style>
<script type="text/javascript">

var nowObj;
var nichObj = [];
var hisObj;
var mainElement;
var popElement;
var mouseX = 0;
var mouseY = 0;

var liluli = {
	ver			: 0.99,
	main		: '2ch',
	element		: 'popup',
	itaurl		: 'http://unkar.jp/convert.php',
	level		: 1,
	popblock	: "",
	maginX 		: 25, // px
	maginY 		: 5, // px
	deleflag 	: false
}
var Reg = {
	sure	: /^([a-zA-Z0-9]+\.2ch\.net|[a-zA-Z0-9]+\.bbspink\.com)(\/test\/read\.[a-zA-Z0-9]+[\/|#]*)([a-zA-Z0-9]+\/)(\d+)(\/)?(.+)?/
,	ita		: /^(.+\.2ch\.net|.+\.bbspink\.com)(\/[a-zA-Z0-9]+\/?)$/
,	id		: /(.+)( ID:)([A-Za-z0-9\+\/]+)/
,	id2		: /(ID:)([A-Za-z0-9\+\/]+)/g
,	http	: /(s?h?ttps?)(:\/\/)([-_.!~*'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/g
,	ttp		: /(^ttps?)/
,	be		: /( BE:)([0-9]+)(\-)(.+)/
,	ank		: /(&gt;(&gt;)?)([0-9]+)/g
,	tag		: /(<br>)(<.+?>)/gi
,	deldat	: /(\.dat)/
,	res		: /(.+) \(([0-9]+)\)$/
};

// 配列検索
Array.prototype.in_array = function(searchElement){
	var size = this.length;
	for(var i = 0; i < size; i++){
		if(searchElement === this[i]) return true;
	}
	return false;
}
// 配列コピー
Array.prototype.clone = function(){
	return Array.apply(null,this);
}

// 実行時間を計る
var TraceLog = function(){
	this.startTime = -1;
	this.outer = document.getElementById('_outer');
};
TraceLog.prototype = {
	start: function(){
		this.startTime = new Date().getTime();
		this.outer.innerHTML = 'started';
	},
	
	stop: function(){
		var current = new Date().getTime();
		var endTime = current - this.startTime;
		this.outer.innerHTML = endTime + 'ms';
	}
};

var History = function(){
	this.pointer = 0;
	this.history = [];
};
History.prototype = {
	Order: function(key){
		if(this.history[this.pointer] != key){
			this.history = this.history.slice(0, this.pointer + 1);
			this.history[this.history.length] = key;
			this.pointer = this.history.length - 1;
		}
		nowObj = nichObj[key];
		nowObj[nowObj.print]();
	},
	
	Arrange: function(){
		if(this.history[this.pointer] != nichObj.length - 1){
			this.history = this.history.slice(0, this.pointer + 1);
			this.history[this.history.length] = nichObj.length - 1;
			this.pointer = this.history.length - 1;
		}
	},
	
	Back: function(){
		this.pointer--;
		var pointer = this.history[this.pointer];
		if(pointer == null){
			this.pointer++;
			return false;
		}
		this.Print(pointer);
	},
	
	Steady: function(){
		this.pointer++;
		var pointer = this.history[this.pointer];
		if(pointer == null){
			this.pointer--;
			return false;
		}
		this.Print(pointer);
	},
	
	Home: function(){
		if(this.history[this.pointer] != 0){
			this.history[this.history.length] = 0;
			this.pointer = this.history.length - 1;
		}
		this.Print(0);
	},
	
	Jump: function(i){
		if(this.history[this.pointer] != i){
			this.history[this.history.length] = i;
			this.pointer = this.history.length - 1;
		}
		this.Print(i);
	},
	
	Print: function(i){
		nowObj = nichObj[i];
		nowObj[nowObj.print]();
	}
};

var zyuuhukuCheck = function(url){
	for(var i = 0, size = nichObj.length; i < size; i++){
		if(nichObj[i].url == url){
			return i;
		}
	}
	return false;
};
var itaObjGet = function(){
	_IG_FetchContent(liluli.itaurl, function(contents){
		// 非同期で動作する
		nowObj = new Server(liluli.itaurl);
		nowObj.lineData = contents.split("\n");
		nowObj.size = nowObj.lineData.length;
		nowObj.printData();
		nichObj[nichObj.length] = nowObj;
		hisObj.Arrange();
	}, { refreshInterval : 3600 });
};
var sureObjGet = function(url, title){
	var key;
	if(key = zyuuhukuCheck(url)){
		hisObj.Order(key);
	} else {
		_IG_FetchContent(url, function(contents){
			// 非同期で動作する
			nowObj = new Board(url, title);
			nowObj.lineData = contents.split("\n");
			nowObj.size = nowObj.lineData.length;
			nowObj.printData();
			nichObj[nichObj.length] = nowObj;
			hisObj.Arrange();
		}, { refreshInterval : 300 });
	}
};
var datObjGet = function(url){
	var key;
	if(key = zyuuhukuCheck(url)){
		hisObj.Order(key);
	} else {
		_IG_FetchContent(url, function(contents){
			// 非同期で動作する
			nowObj = new Thread(url);
			nowObj.printData(contents);
			nichObj[nichObj.length] = nowObj;
			hisObj.Arrange();
		}, { refreshInterval : 300 });
	}
};
var itaView = function(id){
	var element = document.getElementById(id);
	if(element.style.display == "none"){
		element.style.display = "block";
	} else {
		element.style.display = "none";
	}
};

var popUp = {
	puls: function(pop){
		var nich = popElement;
		if(document.getElementById(liluli.level) == null){
			nich.innerHTML += '<div id="' + liluli.level + '" class="popup"></div>';
			nich = document.getElementById(liluli.level);
			nich.style.position = "absolute";
			nich.style.left = 0;
			nich.style.top = 0;
			nich.style.visibility = "visible";
		} else {
			nich = document.getElementById(liluli.level);
		}
		liluli.level++;
		return nich;
	},
	
	dele: function(){
		if(liluli.deleflag){
			popElement.innerHTML = "";
			liluli.level = 1;
			liluli.popblock = "";
		}
	},
	
	style: function(nich, type){
		var x = 0;
		var y = 0;
		nich.style.zIndex = liluli.level;
		nich.style.backgroundColor = "#FFFFCC";
		nich.style.visibility = "visible";
		if((x = mouseX - liluli.maginX) < 0) x = 0;
		if(type == "id"){
			if((x = 320 - nich.offsetWidth) < 0) x = 0;
		}
		if((y = mouseY - nich.offsetHeight - liluli.maginY) < 0) y = 0;
		nich.style.left = x + "px";
		nich.style.top = y + "px";
	},
	
	move: function(i){
		var x = 0;
		var y = 0;
		var nich = document.getElementById(i);
		if((x = mouseX - liluli.maginX) < 0) x = 0;
		if((y = mouseY - nich.offsetHeight - liluli.maginY) < 0) y = 0;
		nich.style.left = x + "px";
		nich.style.top = y + "px";
		return true;
	}
};

var Server = function(url){
	this.print = "printData";
	this.url = url;
	this.title = "板一覧";
	this.lineData = [];
	this.size = 0;
};
Server.prototype = {
	printData: function()
	{
		var timelog = new TraceLog;
		timelog.start();
		var txt = [];
		var line = [];
		var k = 0;
		
		txt[0] = "<div><span class=\"title\">板一覧</span>";
		for(var i = 0; i < this.size; i++){
			if((line = this.lineData[i].split("<>")).length == 2){
				txt[i+1] = '<a href="javascript:sureObjGet(\'' + liluli.itaurl + '/' + line[0] + '/\', \'' + line[1] + '\');">' + line[1] + '</a><br>';
			} else {
				txt[i+1] = '</div><a href="javascript:itaView(' + k + ')" class="tan">' + this.lineData[i] + '</a><br><div id="' + k + '" style="display:none;">';
				k++;
			}
		}
		mainElement.innerHTML = txt.join("");
		
		timelog.stop();
	},
	
	upDate: function(key)
	{
		_IG_FetchContent(this.url, function(contents){
			nowObj.lineData = contents.split("\n");
			nowObj.size = nowObj.lineData.length;
			nowObj.printData();
			nichObj[key] = nowObj;
		}, { refreshInterval : 0 });
	}
};

var Board = function(url, title){
	this.print = "printData";
	this.url = url;
	this.title = title;
	this.lineData = [];
	this.size = 0;
	this.sortflag = 1;
};
Board.prototype = {
	printData: function()
	{
		var timelog = new TraceLog;
		timelog.start();
		var txt = [];
		var line = [];
		var res = [];
		var time = [];
		var since;
		var yy, mm, dd, hh, mi, ss;
		var d = new Date();
		var now = d.getTime() / 1000;
		var i, j = 1;
		
		txt[0] = '<div style="float:left;width:79%;overflow:hidden;white-space:nowrap;"><span class="title">' + this.title + '</span><br>';
		for(i = 0; i < this.size; i++){
			if((line = this.lineData[i].split("<>")).length == 2){
				line[0] = line[0].replace(Reg.deldat, '');
				res[i] = line[1].replace(Reg.res, '$2');
				d.setTime(line[0] * 1000);
				yy = d.getYear();
				mm = d.getMonth() + 1;
				dd = d.getDate();
				hh = d.getHours();
				mi = d.getMinutes();
				ss = d.getSeconds();
				if (yy < 2000) { yy += 1900; }
				if (mm < 10) { mm = "0" + mm; }
				if (dd < 10) { dd = "0" + dd; }
				since = yy + "/" + mm + "/" + dd + " " + hh + ":" + mi + ":" + ss;
				time[i] = Math.floor((3600 * 24) / ((now - line[0]) / res[i]));
				txt[j] = j + ' <a href="javascript:datObjGet(\'' + this.url + line[0] + '/\');" title="' + line[1] + '　' + since + '">' + line[1] + '</a><br>';
				j++;
			}
		}
		txt[j] = '</div><div style="float:right;width:20%;overflow:hidden;white-space:nowrap;">' + '<a href="javascript:nowObj.sort(\'res\', ' + this.sortflag + ');" class="tan">レス</a>　<a href="javascript:nowObj.sort(\'spd\', ' + this.sortflag + ');" class="tan">勢い</a><br>';
		for(i = 0; i < this.size; i++){
			if(res[i] != null){
				j++;
				txt[j] = '<span class="res">' + res[i] + '</span>　<span class="spd">' + time[i] + '</span><br>';
			}
		}
		j++;
		txt[j] = '</div>';
		
		mainElement.style.zIndex = 1;
		mainElement.innerHTML = txt.join("");
		
		timelog.stop();
	},
	
	sort: function(target, type)
	{
		var line = [];
		var i = 0;
		var seed = [];
		var sor = [];
		var data = this.lineData.clone();
		var res;
		var d = new Date();
		var now = d.getTime() / 1000;
		
		if(target == "res"){
			for(i = 0; i < this.size; i++){
				if((line = data[i].split("<>")).length == 2){
					seed[i] = line[1].replace(Reg.res, '$2');
				}
			}
		} else if(target == "spd"){
			for(i = 0; i < this.size; i++){
				if((line = data[i].split("<>")).length == 2){
					line[0] = line[0].replace(Reg.deldat, '');
					res = line[1].replace(Reg.res, '$2');
					seed[i] = Math.floor((3600 * 24) / ((now - line[0]) / res));
				}
			}
		} else {
			return false;
		}

		var ncmp = function(a,b){ return a - b };
		qsort(seed, ncmp);
		
		if(type){
			data.reverse();
			this.sortflag = 0;
		} else {
			this.sortflag = 1;
		}
		
		this.lineData = data.clone();
		this.printData();
		
		function qsort(ary, cmp)
		{
			function q(ary, head, tail)
			{
				var pivot = ary[parseInt(head + (tail - head) / 2)];
				var i = head - 1;
				var j = tail + 1;
				var tmp, unko;
				while(1){
					while(cmp(ary[++i], pivot) < 0);
					while(cmp(ary[--j], pivot) > 0);
					if(i >= j) break;
					tmp = ary[i];
					ary[i] = ary[j];
					ary[j] = tmp;
					unko = data[i];
					data[i] = data[j];
					data[j] = unko;
				}
				if (head < i - 1) q(ary, head, i - 1);
				if (j + 1 < tail) q(ary, j + 1, tail);
				return ary;
			}
			return q(ary, 0, ary.length - 1);
		}
	},
	
	upDate: function(key)
	{
		_IG_FetchContent(this.url, function(contents){
			nowObj.lineData = contents.split("\n");
			nowObj.size = nowObj.lineData.length;
			nowObj.printData();
			nichObj[key] = nowObj;
		}, { refreshInterval : 0 });
	}
};

var Thread = function(url){
	this.print = "printThread";
	this.url = url;
	this.title = "";
	this.size = 0;
	this.res = [];
	this.id = [];
	this.anker = [];
};
Thread.prototype = {
	ankerStyle: function(i)
	{
		var color;
		if(this.anker[i] == null){
			color = "";
		} else if(this.anker[i].length < 3){
			color = ' class="ninki"';
		} else {
			color = ' class="makka"';
		}
		return '<dt><a name="l'+i+'" href="#l'+i+'"'+color+' onmouseover="nowObj.ankerNumber('+i+');">'+i+'</a> ：<span class="nich"><b>' + this.res[i][0] + '</b></span>';
	},
	
	ankerPopup: function(i)
	{
		if(this.res[i] == null) return false; // 存在しない安価の場合
		if(liluli.popblock == 'r' + i) return popUp.move(liluli.level - 1); // 多重防止
		liluli.popblock = 'r' + i;
		
		var nich = popUp.puls();
		nich.innerHTML = "<dl>" + this.ankerStyle(i) + "[" + this.res[i][1] + "]：" + this.res[i][2] + "</dt><dd>" + this.res[i][3] + "</dd></dl>";
		popUp.style(nich, "anka");
	},
	
	ankerNumber: function(namber)
	{
		if(this.anker[namber] == null) return false; // 存在しない安価の場合
		if(liluli.popblock == 'n' + namber) return popUp.move(liluli.level - 1); // 多重防止
		liluli.popblock = 'n' + namber;
		
		var nich = popUp.puls();
		var txt = [], i = 0, j = 0;
		
		for(var k = 0, size = this.anker[namber].length; k < size; k++){
			i = this.anker[namber][k];
			txt[k] = this.ankerStyle(i) + "[" + this.res[i][1] + "]：" + this.res[i][2] + "</dt><dd>" + this.res[i][3] + "</dd>";
			j++;
		}
		nich.innerHTML = "抽出数(" + j + ")<br>" + "<dl>" + txt.join("") + "</dl>";
		popUp.style(nich, "namber");
	},
	
	idPopup: function(id)
	{
		if(this.id[id] == null) return false; // 存在しないIDの場合
		if(liluli.popblock == id) return false; // 多重防止
		liluli.popblock = id;
		
		var nich = popUp.puls();
		var txt = [], i = 0, j = 0;
		
		for(var k = 0, size = this.id[id].length; k < size; k++){
			i = this.id[id][k];
			txt[k] = this.ankerStyle(i) + "[" + this.res[i][1] + "]：" + this.res[i][2] + "</dt><dd>" + this.res[i][3] + "</dd>";
			j++;
		}
		nich.innerHTML = "抽出ID:" + id + " (" + j + ")<br>" + "<dl>" + txt.join("") + "</dl>";
		popUp.style(nich, "id");
	},
	
	printData: function(data)
	{
		var timelog = new TraceLog;
		timelog.start();
		var lineData = data.split("\n");
		this.size = lineData.length;
		var line;
		var i;
		var check = [];
		var txt = [];
		// 初期化しておく
		this.res = [];
		this.id = [];
		this.anker = [];
		
		var ankerNumberColor = function(obj)
		{
			return function(str, p1, p2, p3)
			{
				if(obj.anker[p3] == null){
					obj.anker[p3] = [];
					obj.anker[p3][obj.anker[p3].length] = i;
				} else {
					// >>1>>1>>1等をカウントしてしまうのを防ぐ
					if(!check.in_array(p3)){
						obj.anker[p3][obj.anker[p3].length] = i;
					}
				}
				check[check.length] = p3;
				return '<a href="#l'+p3+'" onmouseover="nowObj.ankerPopup('+p3+');">'+p1+p3+'</a>';
			}
		};
		var idColor = function(obj)
		{
			return function(str, p1, p2, p3)
			{
				var color;
				if(obj.id[p3].length >= 5){
					color = ' class="makka"';
				} else if(obj.id[p3].length > 1){
					color = "";
				} else {
					color = ' class="tan"';
				}
				return '<a href="#l' + i + '" class="tan" title="' + p1 + '">時</a> <a href="#l' + i + '"' + color + ' onmouseover=nowObj.idPopup("' + p3 + '");>ID:</a>' + p3;
			}
		};
		
		var urlLink = function(str, p1, p2, p3)
		{
			if(null != p3.match(Reg.sure)){
				// スレッドだった場合
				if("" != RegExp.$6){
					line = RegExp.$1+'/'+RegExp.$3+RegExp.$4+'/#'+RegExp.$6;
				} else {
					line = RegExp.$1+'/'+RegExp.$3+RegExp.$4;
				}
				return '<a href="javascript:datObjGet(\''+liluli.itaurl+'/'+line+'\');">'+str+'</a>';
			} else if(null != p3.match(Reg.ita)){
				// 板だった場合
				line = RegExp.$1+RegExp.$2;
				return '<a href="javascript:sureObjGet(\''+liluli.itaurl+'/'+line+', \''+RegExp.$2+'\');">'+str+'</a>';
			} else if(p1.match(Reg.ttp)){
				// hが付いていなかった場合
				return '<a href="h'+str+'" target="_blank">'+str+'</a>';
			} else {
				return '<a href="'+str+'" target="_blank">'+str+'</a>';
			}
			return str;
		};
		
		for(i = 1; i < this.size; i++){
			if((this.res[i] = lineData[i-1].split("<>")).length != 5){
				this.res[i] = ["壊れています","壊れています","壊れています","壊れています","壊れています"];
			}
			if(this.res[i][2].match(/( ID:)([A-Za-z0-9\+\/]+)/)){
				if(this.id[RegExp.$2] == null){
					this.id[RegExp.$2] = [];
					this.id[RegExp.$2][this.id[RegExp.$2].length] = i;
				} else {
					this.id[RegExp.$2][this.id[RegExp.$2].length] = i;
				}
			}
			check = [];
			this.res[i][3] = this.res[i][3].replace(Reg.tag, "$1");
			this.res[i][3] = this.res[i][3].replace(Reg.ank, ankerNumberColor(this));
		}
		this.title = this.res[1][4];
		
		txt[0] = '<span class="title">' + this.title + '</span><dl>';
		for(i = 1; i < this.size; i++){
			this.res[i][2] = this.res[i][2].replace(Reg.id, idColor(this));
			this.res[i][2] = this.res[i][2].replace(Reg.be, ' <a href="http://be.2ch.net/test/p.php?i=$2" target="_blank">?$4</a>');
			this.res[i][3] = this.res[i][3].replace(Reg.http, urlLink);
			this.res[i][3] = this.res[i][3].replace(Reg.id2, '<a href="#l' + i + '" class="tan" onmouseover=nowObj.idPopup("$2");>ID:</a>$2');
			txt[i] = this.ankerStyle(i) + "[" + this.res[i][1] + "]：" + this.res[i][2] + "</dt><dd>" + this.res[i][3] + "</dd>";
		}
		txt[i] = "</dl>";
		
		mainElement.style.zIndex = 1;
		mainElement.innerHTML = txt.join("");
		
		timelog.stop();
	},
	
	printThread: function()
	{
		var timelog = new TraceLog;
		timelog.start();
		var txt = [];
		txt[0] = '<span class="title">' + this.title + '</span><dl>';
		for(var i = 1; i < this.size; i++){
			txt[i] = this.ankerStyle(i) + "[" + this.res[i][1] + "]：" + this.res[i][2] + "</dt><dd>" + this.res[i][3] + "</dd>";
		}
		txt[i] = "</dl>";
		mainElement.style.zIndex = 1;
		mainElement.innerHTML = txt.join("");
		timelog.stop();
	},
	
	upDate: function(key)
	{
		_IG_FetchContent(this.url, function(contents){
			nowObj.printData(contents);
			nichObj[key] = nowObj;
		}, { refreshInterval : 0 });
	}
};

_IG_RegisterOnloadHandler(function(){
	var prefs = new _IG_Prefs(__MODULE_ID__);
	var startURL = prefs.getString("starturl");
	hisObj = new History();
	mainElement = document.getElementById("2ch");
	mainElement.style.zIndex = 1;
	mainElement.style.width = "100%";
	mainElement.style.height = "400px";
	mainElement.style.overflow = "scroll";
	var txt = [];
	txt[0] = '<img src="'+_IG_GetImageUrl("http://www.heiwaboke.net/2ch/img/modoru.png")+'" alt="戻る" id="back" />';
	txt[1] = '<img src="'+_IG_GetImageUrl("http://www.heiwaboke.net/2ch/img/susumu.png")+'" alt="進む" id="steady" />';
	txt[2] = '<img src="'+_IG_GetImageUrl("http://www.heiwaboke.net/2ch/img/kousin.png")+'" alt="更新" id="update" />';
	txt[3] = '<img src="'+_IG_GetImageUrl("http://www.heiwaboke.net/2ch/img/ita.png")+'" alt="HOME" id="home" />';
	txt[4] = '<img src="'+_IG_GetImageUrl("http://www.heiwaboke.net/2ch/img/rireki.png")+'" alt="履歴" id="history" />';
	txt[5] = '<span id="_outer">ver ' + liluli.ver + '</span>';
	document.getElementById("top").innerHTML = txt.join("");
	popElement = document.getElementById(liluli.element);
	
	// イベントハンドラをセットする
	mainElement.onclick = function(){
		liluli.deleflag = true;
		popUp.dele();
		liluli.deleflag = false;
	}
	mainElement.onmouseover = function(){
		popUp.dele();
		liluli.deleflag = false;
	}
	popElement.onmouseout = function(){
		liluli.deleflag = true;
	}
	popElement.onclick = function(){
		liluli.deleflag = true;
		popUp.dele();
		liluli.deleflag = false;
	}
	document.getElementById("back").onclick = function(){
		hisObj.Back();
	}
	document.getElementById("steady").onclick = function(){
		hisObj.Steady();
	}
	document.getElementById("update").onclick = function(){
		if(key = zyuuhukuCheck(nowObj.url)){
			nowObj.upDate(key);
		} else {
			nowObj.upDate(nichObj.length - 1);
		}
	}
	document.getElementById("home").onclick = function(){
		hisObj.Home();
	}
	document.getElementById("history").onclick = function(){
		var timelog = new TraceLog;
		timelog.start();
		var txt = [];
		for(var i = 0, size = nichObj.length; i < size; i++){
			txt[i] = '<a href="javascript:hisObj.Jump('+i+')">' + nichObj[i].title + '</a><br><hr>';
		}
		mainElement.innerHTML = txt.join("");
		timelog.stop();
	}
	window.document.onmousemove = function(e){
		if (window.createPopup){
			mouseX = event.x + (document.body.scrollLeft || document.documentElement.scrollLeft);
			mouseY = event.y + (document.body.scrollTop || document.documentElement.scrollTop);
		} else {
			mouseX = e.pageX;
			mouseY = e.pageY;
		}
	}
	
	if(startURL != "" && startURL != null){
		startURL.replace(Reg.http, function(str, p1, p2, p3){
			var line;
			if(null != p3.match(Reg.sure)){
				// スレッドだった場合
				if("" != RegExp.$6){
					line = RegExp.$1+'/'+RegExp.$3+RegExp.$4+'/#'+RegExp.$6;
				} else {
					line = RegExp.$1+'/'+RegExp.$3+RegExp.$4;
				}
				datObjGet(liluli.itaurl+'/'+line);
			} else if(null != p3.match(Reg.ita)){
				// 板だった場合
				line = RegExp.$1+RegExp.$2;
				sureObjGet(liluli.itaurl+'/'+line, RegExp.$2);
			} else {
				itaObjGet();
			}
		});
	} else {
		itaObjGet();
	}
});
</script>
<div id="top"></div>
<div id="2ch"></div>
<div id="popup"></div>
]]></Content>
</Module>