<!---
function holeStart() {
	NPD_Bullet_obj.start();
}

function NPDHwOnmouseOver() {
	NPD_Bullet_obj.getImg();
	NPD_Bullet_obj.moveStart();
}

function $(id) {
	return document.getElementById(id);
}

var NPD_Bullet_class = function(){
	this.classN		= '';		//指定したクラスの画像のみを取得
	this.min		= 40;		//width heightの最小値
	this.len		= 0;		//ドキュメント内の画像の数
	this.IMG		= [];		//画像オブジェクト格納用配列
	this.CLONE		= [];		//クローンオブジェクト格納用配列
	this.IN			= [];		//箱に入ったフラグ
	this.Blur		= [];
	this.BlurFlg	= [];		//ブルブルカウント
	this.inCount	= 0;		//箱に入った数
	this.moveC		= 0;		//moveカウント
	this.segment	= 100;		//1回転の分割数
	this.angle		= 2 * Math.PI / this.segment;
	this.end		= 1;
	this.uzu		= 15;		//渦巻きの強さ
	this.scale		= {'x':[], 'y':[]};		//縮小サイズ
	this.ImgSize	= {'x':[], 'y':[]};		//縮小されたサイズ
	this.helf		= [];
	this.rad		= [];
	this.def		= [];
	this.rand		= Math.random() * 100;
	this.timerID;			//setInterval Object
	this.newImgOpa  = 0;
};
NPD_Bullet_class.prototype = {
	start : function() {
		this.setHole();
		this.Hole			= {};
		this.Hole.ImgObj	= (document.all) ? $(NPDHoleImgId) : $(NPDHoleImgId).parentNode;
		this.Hole.x			= NPD_XY_Obj.getX(this.Hole.ImgObj) + 64;//画像のサイズを足す
		this.Hole.y			= NPD_XY_Obj.getY(this.Hole.ImgObj) + 128;//画像のサイズを足す

		$$(NPDHoleImgId).NPDHwSetStart();
	},
	setHole : function() {
		var w, h;
		w = document.body.clientWidth||window.body.clientWidth;
		h = document.body.clientHeight||window.body.clientHeight;
		w /= 2;
		h /= 2;
		$(NPDHoleImgId).style.left = (w - 32) + 'px';
		$(NPDHoleImgId).style.top  = (h - 32) + 'px';
	},
	getImg : function() {
		var obj, len, i;
		obj = document.getElementsByTagName("img");
		len = obj.length;
		for (i = 0; i < len; i++) {
			if (obj[i].width >= this.min && obj[i].height >= this.min) {
				if (obj[i].id != NPDHoleImgId) {
					if (!this.classN || this.classN == obj[i].className) {
						this.setImg(obj[i]);
					}
				}
			}
		}
	},
	setAction : function() {
		clearTimeout(this.timerID);
		this.moveStart();
	},
	setImg : function(obj) {
		this.Blur[this.Blur.length] = this.len;
		this.BlurFlg[this.len] = parseInt(Math.random() * 200);//200
		this.IMG[this.len]			= obj;
		this.IMG[this.len]._left	= NPD_XY_Obj.getX(obj);
		this.IMG[this.len]._top		= NPD_XY_Obj.getY(obj);
		this.setClone();
		this.len++;
	},
	setClone : function() {
		var imgObj							= this.IMG[this.len];
		this.CLONE[this.len]				= imgObj.cloneNode(true);
		this.CLONE[this.len].style.position	= 'absolute';
		this.CLONE[this.len].style.left		= imgObj._left + 'px';
		this.CLONE[this.len].style.top		= imgObj._top + 'px';
		this.ImgSize.x[this.len]			= imgObj.width;
		this.ImgSize.y[this.len]			= imgObj.height;
		this.def[this.len]					= {'_x':imgObj._left, '_y':imgObj._top};

		document.body.appendChild(this.CLONE[this.len]);
		NPD_Style_obj.setOpacity(imgObj, 0);
	},
	moveStart : function() {
		var i;
		this.IN[this.getRandom()] = 1;
		this.ga();
		for (i = 0; i < this.len; i++) {
			this.getRad(i);
		}
		this.timerID = setInterval(this.move.bind(this), 10);
	},
	getRad : function(i) {
		var hx, hy, ac, as, rad, c;
		hx = parseInt(this.CLONE[i].style.left) - this.Hole.x;
		hy = parseInt(this.CLONE[i].style.top) - this.Hole.y;
		this.helf[i]	= Math.sqrt(hx * hx + hy * hy);//半径

		c = this.helf[i] / this.uzu;

		this.scale.x[i] = (this.ImgSize.x[i]  - 10) / c;
		this.scale.y[i] = (this.ImgSize.y[i] - 10) / c;

		hx /= this.helf[i];
		hy /= this.helf[i]

		ac = Math.acos(hx);
		as = Math.asin(hy);
		this.rad[i] = (as > 0) ? ac : Math.PI + Math.PI - ac;//ラジアン
	},
	getRandom : function() {
		var len, out;
		len = parseInt(this.Blur.length * Math.random());
		out = this.Blur.splice(len, 1);

		this.CLONE[out].style.zIndex	= 1000 + this.IN.length;
		NPD_Style_obj.setOpacity(this.CLONE[out], 0.8);
		return out;
	},
	move : function() {
		var i;
		if (this.end < this.len && this.moveC > this.rand) {
			this.IN[this.getRandom()] = 1;
			this.rand  = Math.random() * 40;
			this.moveC = 0;
			this.end++;
		}
		for (i in this.IN) {
			if (this.BlurFlg[i] > 0) {
				this.blurImg(i);
				this.BlurFlg[i]--;
			} else {
				this.movePie(i);
			}
		}
		this.moveC++;
	},
	blurImg : function(i) {
		var x, y;
		x = parseInt(Math.random() * 3) - 1;
		y = parseInt(Math.random() * 3) - 1;
		this.CLONE[i].style.left = (parseInt(this.CLONE[i].style.left) + x) + 'px';
		this.CLONE[i].style.top = (parseInt(this.CLONE[i].style.top) + y) + 'px';
	},
	getHoleY : function() {
		return (document.all || navigator.userAgent.match('Chrome')) ? 30 : -90;
	},
	movePie : function(i) {
		if (!this.CLONE[i].style) {
			return;
		}
		var pX, pY;
		this.rad[i] += this.angle;

		cX = this.Hole.x + 26 + this.helf[i] * Math.cos(this.rad[i]) - NPD_XY_Obj.getMarginLeft(this.CLONE[i]);
		cY = this.Hole.y + this.getHoleY() + this.helf[i] * Math.sin(this.rad[i]);

		this.helf[i] -= this.uzu;
		if (this.helf[i] < -10) {
			this.helf[i] = -10;
		}

		this.CLONE[i].style.left = cX + 'px';
		this.CLONE[i].style.top  = cY + 'px';

		this.ImgSize.x[i] -= this.scale.x[i];
		this.ImgSize.y[i] -= this.scale.y[i];

		if (this.ImgSize.x[i] > 0 && this.ImgSize.y[i] > 0) {
			this.CLONE[i].style.width  = this.ImgSize.x[i] + 'px';
			this.CLONE[i].style.height = this.ImgSize.y[i] + 'px';
		} else {
			this.inCount++;
			delete this.IN[i];
			document.body.removeChild(this.CLONE[i]);
			if (this.inCount == this.len) {
				this.stop();
				this.timerID = setTimeout(this.makeNewImg.bind(this), 2);
			}
		}

	},
	makeNewImg : function() {
		clearTimeout(this.timerID);
		this.mogu();
		this.timerID = setTimeout(this.moguEnd.bind(this), 8000);
	},
	moguEnd : function() {
		clearTimeout(this.timerID);
		this.s();
		this.moguE();
	},
	moguE : function() {
		var i;
		this.e();
		this.viewNewImg();
	},
	viewNewImg : function() {
		var i;
		clearTimeout(this.timerID);
		this.newImgOpa += 0.06;
		if (this.newImgOpa >= 1) {
			this.newImgOpa = 1;
		}
		for (i in this.IMG) {
			NPD_Style_obj.setOpacity(this.IMG[i], this.newImgOpa);
		}
		if (this.newImgOpa < 1) {
			this.timerID = setTimeout(this.viewNewImg.bind(this), 10);
		}
	},
	stop : function() {
		clearInterval(this.timerID);
	},
	s : function() {
		$$(NPDHoleImgId).NPDHwS();
	},
	e : function() {
		$$(NPDHoleImgId).NPDHwE();
	},
	ga : function() {
		$$(NPDHoleImgId).NPDHwGa();
	},
	mogu : function() {
		$$(NPDHoleImgId).NPDHwMogu();
	}
};

var NPD_XY_class = function() {
};
NPD_XY_class.prototype = {
	getX : function(obj) {
		return obj.offsetLeft + this.parentGetXY(obj, 0, 'offsetLeft');
	},
	getY : function(obj, num) {
		return obj.offsetTop  + this.parentGetXY(obj, 0, 'offsetTop');
	},
	parentGetXY : function (obj, num, property) {
		var n, o;
		n = 0;
		o = obj.offsetParent;
		if (o) {
			if (n = o[property]) {
				num += n;
			}
			return this.parentGetXY(o, num, property);
		} else {
			return num;
		}
	},
	getMarginLeft : function(obj) {
		try {
			if (obj.style.margin) {
				obj.style.margin.match(/([0-9\.]+)(p[cxt]|[cm]m|e[mx]|in|%)/);
				return parseInt(RegExp.$1);
			} else if(obj.style.marginLeft) {
				return parseInt(obj.style.marginLeft);
			} else {
				return 0;
			}
		} catch(e){}
	}
}
var NPD_Style_class = function() {
}
NPD_Style_class.prototype = {
	set : function (obj, key, value) {
		obj.style[key] = value;
	},
	setOpacity : function (obj, value) {
		try {
			obj.style.opacity = value;
			obj.style.filter  = 'alpha(opacity=' + (value * 100) + ')';
		}catch(e){}
	}
};

var NPD_Event_class = function() {
}
NPD_Event_class.prototype = {
	set : function(obj, name, func, mode) {
		if(obj.addEventListener) {
			obj.addEventListener(name, func, false);
		}else if(obj.attachEvent) {
			obj.attachEvent('on' + name, func);
		}
	}
};

Function.prototype.bind = function() {
	var method, param, object;
	method = this;
	param  = $A(arguments);
	object = param.shift();
	return function() {
		return method.apply(object, param.concat($A(arguments)));
	}
}
function $A(arr) {
	var res, i;
	if (!arr) return [];
	if (arr.toArray) {
		return arr.toArray();
	} else {
		res = [];
		for (i = 0; i < arr.length; i++)
			res.push(arr[i]);
		return res;
	}
}
function $$(id) {
	var obj;
	try{
		obj = document[id];
	} catch(e) {
		obj = window[id];
	}
	return obj;
}

if(!NPD_Event_Obj) {
	var NPDHoleImgID, NPD_Event_Obj, NPD_Bullet_obj, NPD_XY_Obj, NPD_Style_obj;
	NPDHoleImgId = 'NPDHwEater' + Math.round(Math.random() * 10000000);

	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="180" height="250" id="' + NPDHoleImgId + '" align="middle">');
	document.write('<param name="allowScriptAccess" value="always" />');
	document.write('<param name="allowFullScreen" value="false" />');
	document.write('<param name="movie" value="http://www.manga-chat.jp/swf/parts/halloween.swf" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<param name="bgcolor" value="#ffffff" />');
	document.write('<embed src="http://www.manga-chat.jp/swf/parts/halloween.swf" wmode="transparent" quality="high" bgcolor="#ffffff" width="180" height="250" name="' + NPDHoleImgId + '" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');

	NPD_Event_Obj = new NPD_Event_class();
	NPD_Bullet_obj = new NPD_Bullet_class();
	NPD_XY_Obj = new NPD_XY_class();
	NPD_Style_obj = new NPD_Style_class();
	NPD_Event_Obj.set(window, 'load', holeStart, false);
}
if(!document.all){ // IE以外のモダンなブラウザなら.
	(function(){
		for (var property in Event.prototype){
			if(property.match(/mousemove/i)){
				window.addEventListener(property.toLowerCase(), function(e){
					window.event = e;
				}, true);
			}
		}
	}());
};
-->