var sep_x = 30;
var sep_y = 30; //20;
/*
var popupmes = new Array();

popupmes[0] = '<code>World Wide WebConsortium<\/code><br>HTMLやスタイルシートの仕様などを<br>制定しその技術を推奨している団体'
popupmes[1] = '画面から飛び出すウィンドウ<br>(MSIE、NS6、Opera6 に対応)'
popupmes[2] = '閲覧者のブラウザで実行するプログラム<br>非視覚系ブラウザは対応していません'
popupmes[3] = 'メールマガジン「第91号」<br>今週のおさらいに戻る'
*/
var x = -300;
var y = -100;
var ms = 0;
var ie4 = (navigator.appVersion.indexOf('MSIE 4')>=0);
var op6 = (navigator.userAgent.indexOf('Opera 6')>=0)||(navigator.userAgent.indexOf('Opera/6')>=0);

/*
for (i=0;i<popupmes.length;i++){
    document.write("<div id='span"+i+"' class='spanstyle'");
    if(ie4){document.write(" style='width:10;'><table><tr><td nowrap");}
    document.write(">");
	document.write(popupmes[i]);
    if(ie4){document.write("</td></tr></table>");}
    document.write("</div>");
}
*/
for (i = 0; i < popupmes.length; i++) {
    document.write('<div id="span' + i + '" class="spanstyle"');
    document.write("><table cellspacing=0 cellpadding=0>");
    document.write("<tr>");
    document.write('<td background="popup/waku00.gif" width=10px height=10px />');
    document.write("<td background='popup/waku01.gif' height=10px />");
    document.write("<td background='popup/waku02.gif' width=10px height=10px />");
    document.write("</tr>");
    document.write("<tr>");
    document.write("<td background='popup/waku03.gif' width=10px />");
    document.write("<td nowrap background='popup/waku04.gif'><span class='popmes'>");
    document.write(popupmes[i]);
    document.write("</span></td>");
    document.write("<td background='popup/waku05.gif' width=10px />");
    document.write("</tr>");    
    document.write("<tr>");
    document.write("<td background='popup/waku06.gif' width=10px height=10px />");
    document.write("<td background='popup/waku07.gif' height=10px />");
    document.write("<td background='popup/waku08.gif' width=10px height=10px />");
    document.write("</tr></table>");
    document.write("</div>");
}


function handlerMM(e){
    x = (document.all) ? document.body.scrollLeft+event.clientX : (op6)?event.clientX : e.pageX;
    y = (document.all) ? document.body.scrollTop/*+event.clientY*/ : (op6) ? event.clientY : e.pageY;
    flg=1;
}

function disp_mess(ms){
    if (flg == 1 && document.all) {// for Internet Explorer
       var thisspan = document.all("span"+ms).style;
       thisspan.posLeft=x+sep_x;
       thisspan.posTop = y+sep_y;
       thisspan.visibility = "visible"
   }
   if (flg == 1 && document.layers) {// for Netscape Communicator 4.*
       var thisspan = eval("document.span"+ms);
       thisspan.left=x+sep_x;
       thisspan.top=y+sep_y;
       thisspan.visibility="visible"
   }
   if (flg == 1 && !document.all && document.getElementById) {// for Netscape 6.*
       var thisspan = document.getElementById("span"+ms);
       thisspan.style.left=x+sep_x;
       thisspan.style.top =y+sep_y;
       thisspan.style.visibility="visible"
   }
}


function del_mess(ms){
   if (document.all){
       var thisspan = document.all("span"+ms).style;
       thisspan.visibility="hidden";
   }
   if (document.layers){
       var thisspan = eval("document.span"+ms);
       thisspan.visibility="hidden";
   }
   if (!document.all && document.getElementById){
       var thisspan = document.getElementById("span"+ms);
       thisspan.style.visibility="hidden";
   }
}

function NN_reload(){
      if (document.layers) location.reload();
}

if (document.layers){
    document.captureEvents(Event.MOUSEMOVE);
}
if (!document.all && document.getElementById && !op6){
    window.onmousemove = handlerMM;
    window.captureEvents(Event.MOUSEMOVE);
}else{
    document.onmousemove = handlerMM;
}

window.onresize = NN_reload;