//ポップアップ
function pop(msg){
    win_w = 200;
	win_h = 200;
	width = 30;
	height = 30;
	x = event.x+document.body.scrollLeft;
	y = event.y+document.body.scrollTop;
	e_x = event.x;
	e_y = event.y;
	b_x = x;
	b_y = y;
	p_msg = msg;

	box.style.width = width;
	box.style.height = height;
	box.style.left = x;
	box.style.top = y;
	box.innerHTML = "";
	box.style.visibility = "visible";
	spread(p_msg);

}
function spread(msg){
	p_msg = msg;
	width += win_w/3;
	height += win_h/3;
	b_x += (document.body.clientWidth-win_w-e_x)/3;
	b_y -= e_y/3;
	if(width < win_w || height < win_h){
		box.style.left = b_x;
   		box.style.top = b_y;
		box.style.width = width;
		box.style.height = height;
		timer = setTimeout("spread(p_msg)",50);
	}
	else{
		box.style.left = document.body.scrollLeft+document.body.clientWidth-win_w;				//左からの位置
   		box.style.top = document.body.scrollTop;				//上からの位置
		box.style.width = win_w;
		box.style.height = win_h;
		box.innerHTML = msg;
		clearTimeout(timer);
	}
}



//ポップアップを消す
function nonPop(){
	if(box.style.visibility == "visible"){
		box.style.visibility = "hidden";
	}

}