/**
 *  openWindow.js
 *  function name  mmMapPic
 *  function       Another window where the map and the comment were displayed is opened.
 *  argument       mmTitle:    name of window
 *                 mmX:        width of window
 *                 mmY:        height of window
 *                 mmMapPic:   file name of map picture('/images/filename')
 *                 mmComment:  comment was displayed
 *                 mmSw:       if mmSw==1, it changes line when the character of "→" is detected
 *  @author        S.Sanno,		2008/07/31
 *  @update        Y.Horikawa,	2009/04/28
 */

var i = 0;
var mmStr = "";
var mmWinflg = false;

function mmMapPic(mmTitle, mmX, mmY, mmMapPic, mmComment, mmSw){

  mmWinSize = "width=" + mmX + ", height=" + 450;
  if(mmWinflg!=false) {
    mmWin.close();
  }
  mmWin = window.open("", "map" , mmWinSize, "resizable=no");
  mmWinflg = true;

  htmlbody = '<!DOCTYPE html PUBLIC "-//W3C//D	TD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
  htmlbody += '<html xmlns="http://www.w3.org/1999/xhtml"><head>';
  htmlbody += '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="language" content="ja" />';
  htmlbody += '<title>'+mmTitle+'</title></head>';
  htmlbody += '<body style="margin:0;padding:5;"><img src="http://www.meet-me.jp'+mmMapPic+'"><br /><br />';
  htmlbody += '<div align="center"><input type="button" value=" 地図を閉じる " onclick="window.close();return false;" /></div>';
  htmlbody += '</body></html>';

  mmWin.document.write(htmlbody);
  mmWin.focus();
}

function mmOpenPic(mmTitle, mmX, mmY, mmMapPic, mmComment, mmSw){

  mmWinSize = "width=" + mmX + ", height=" + mmY;
  if(mmWinflg!=false) {
    mmWin.close();
  }
  mmWin = window.open("", "map" , mmWinSize, "resizable=no");
  mmWinflg = true;

  htmlbody = '<!DOCTYPE html PUBLIC "-//W3C//D	TD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
  htmlbody += '<html xmlns="http://www.w3.org/1999/xhtml"><head>';
  htmlbody += '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="language" content="ja" />';
  htmlbody += '<title>'+mmTitle+'</title></head>';
  htmlbody += '<body style="margin:0;padding:5;"><img src="http://www.meet-me.jp'+mmMapPic+'"><br /><br />';
  htmlbody += '<div align="center"><input type="button" value=" 閉じる " onclick="window.close();return false;" /></div>';
  htmlbody += '</body></html>';

  mmWin.document.write(htmlbody);
  mmWin.focus();
}

function mmAgreement(mmTitle, mmX, mmY, mmText){

  mmWinSize = "width=" + mmX + ", height=" + 450;
  if(mmWinflg!=false) {
    mmWin.close();
  }
  mmWin = window.open("", "" , mmWinSize, "resizable=yes,scrollbars=yes");
  mmWinflg = true;

  htmlbody = '<!DOCTYPE html PUBLIC "-//W3C//D	TD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
  htmlbody += '<html xmlns="http://www.w3.org/1999/xhtml"><head>';
  htmlbody += '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="language" content="ja" />';
  htmlbody += '<title>'+mmTitle+'</title></head>';
  htmlbody += '<body style="margin:0;padding:5;"><br /><br />';
  htmlbody += '<textarea>';
  htmlbody += '<object type="text/plain" data="http://www.meet-me.jp/meet-me.html" width="100%" height="50%"><p>non object</p></object>';
  htmlbody += '</textarea>';
  htmlbody += '<div align="center"><input type="button" value=" 閉じる " onclick="window.close();return false;" /></div>';
  htmlbody += '</body></html>';

  mmWin.document.write(htmlbody);
  mmWin.focus();
}
