//ポップアップ
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 upDate(){
    x = event.clientX+document.body.scrollLeft-100;				//左からの位置
    y = event.clientY+document.body.scrollTop+10;				//上からの位置

	box1.style.left = x;
	box1.style.top = y;
	box1.style.visibility = "visible";
	box1.innerHTML = "<MARQUEE direction='up' scrollamount='3'><CENTER><B>〜更新履歴〜</B></CENTER><BR>2005/02/28 【JavaScript講座】Vol.5の練習問題に対して回答が間違っていたのを修正。<BR>2005/01/30 HTML講座（文字をスクロールさせたい！）内の属性値の誤りを修正。SCROLLDELY→SCROLLDELAY。<BR>トップデザインちょっと変更。<BR>2005/01/23 トップデザインちょっと変更。<BR>2004/12/27 CGIについて（転送モード）追加<BR>2004/09/26 CGIについて（CGIをもらって使ってみよう）追加<BR>2004/09/19 CGIについて（CGIを借りて使ってみよう）<BR>2004/10/11 CGIについて（CGIの仕組み）<BR>2004/10/20 CGIについて（パーミッションとは？）追加追加</MARQUEE>";
}

//ポップアップを消す
function nonPop(){
//	if(box.style.visibility == "visible"){
//		box.style.visibility = "hidden";
//	}
	if(box1.style.visibility == "visible"){
		box1.style.visibility = "hidden";
	}
}
