function csswrite(){
	var s = GetCookie("@fontSize");

var font1 = "/css/sub_font1.css";
var font2 = "/css/sub_font2.css";
var font3 = "/css/sub_font3.css";

	var myHost = window.location.host;

	if(s == "normal"){document.write('<link href="http://'+myHost+font1+'" type="text/css" rel="stylesheet" media="all" />');}
	else if(s == "large"){document.write('<link href="http://'+myHost+font2+'" type="text/css" rel="stylesheet" media="all" />');}
	else if(s == "xlarge"){document.write('<link href="http://'+myHost+font3+'" type="text/css" rel="stylesheet" media="all" />');}
	else {document.write('<link href="http://'+myHost+font1+'" type="text/css" rel="stylesheet" media="all" />');}


var myUrl = window.location.href;

var mystyle = "/css/print.css";

	if(myUrl.match("print")) {
		document.write('<link href="http://'+myHost+mystyle+'" type="text/css" rel="stylesheet" media="all" />');
	}
}


function GetCookie(key) {
   get_data = document.cookie;
   cv = new Array();
   gd = get_data.split(";");
   for (i in gd) {
      a = gd[i].split("=");
      a[0] = a[0].replace(" ","");
      cv[a[0]] = a[1];
   }
   if (cv[key]) return cv[key];
   else return "";
}

function SetCookie(cn,days) {
	var s = GetCookie("@fontSize");

   ex = new Date();
   ex = new Date(ex.getTime() + (1000 * 60 * 60 * 24 * days));
   y = ex.getYear(); if (y < 1900) y += 1900;
   hms = ex.getHours() + ":" + ex.getMinutes() + ":" + ex.getSeconds();
   p = String(ex).split(" ");
   ex = p[0] + ", " + p[2] + "-" + p[1] + "-" + y + " " + hms + " GMT;";

	if(s == "normal"){
		val = "large";
              var myCookie = "@" + cn + "=" + val +"; path=/; expires=" + ex;
		document.cookie = myCookie;
	} else if(s == "large"){
		val = "xlarge";
              var myCookie = "@" + cn + "=" + val +"; path=/; expires=" + ex;
		document.cookie = myCookie;
	} else if( s == "" ){
		val = "large";
              var myCookie = "@" + cn + "=" + val +"; path=/; expires=" + ex;
		document.cookie = myCookie;
	}

	location.reload();
}

function SetCookieNormalsize(cn,days) {
   ex = new Date();
   ex = new Date(ex.getTime() + (1000 * 60 * 60 * 24 * days));
   y = ex.getYear(); if (y < 1900) y += 1900;
   hms = ex.getHours() + ":" + ex.getMinutes() + ":" + ex.getSeconds();
   p = String(ex).split(" ");
   ex = p[0] + ", " + p[2] + "-" + p[1] + "-" + y + " " + hms + " GMT;";

		val = "normal";
		document.cookie = "@" + cn + "=" + val +"; path=/; expires=" + ex;
		location.reload();
}

function print(css){
	var strUrl;
	strUrl=window.location.href+"?print=true";

	window.open(strUrl,'print','toolbar=yes,location=yes,directories=no,personalbar=yes,status=no,menubar=yes,scrollbars=yes,titlebar=yes,resizable=yes,width=770,height=600');
}

function print_kaigi(css){
	var strUrl;
	strUrl=window.location.href+"&print=true";

	window.open(strUrl,'print','toolbar=yes,location=yes,directories=no,personalbar=yes,status=no,menubar=yes,scrollbars=yes,titlebar=yes,resizable=yes,width=770,height=600');
}

function writeFlashHTML( arg ){
  
  /**
   * 引数から属性を抽出する
   */
   
  var parm = []
  
  //すべての引数を順番に
  for( i = 0 ; i < arguments.length ; i++ )
  {
    //属性名と属性値をあらわす文字列を配列parmへセットする(半角空白は除去)
    parm[i] = arguments[i].split(' ').join('').split('=')
    
    //有効な属性名があれば属性値で変数化( 無効な名前は無視 )
    switch (parm[i][0])
    {
      case '_swf'     : var _swf     = parm[i][1] ; break ; // フラッシュのURL
      case '_quality' : var _quality = parm[i][1] ; break ; // 画質
      case '_loop'    : var _loop    = parm[i][1] ; break ; // 繰り返し
      case '_bgcolor' : var _bgcolor = parm[i][1] ; break ; // 背景色
      case '_wmode'   : var _wmode   = parm[i][1] ; break ; // 背景透明(WinIEのみ)
      case '_play'    : var _play    = parm[i][1] ; break ; // 自動再生
      case '_menu'    : var _menu    = parm[i][1] ; break ; // 右クリックメニュー
      case '_scale'   : var _scale   = parm[i][1] ; break ; // 幅高さが%の時の縦横比等
      case '_salign'  : var _salign  = parm[i][1] ; break ; // 表示領域内表示位置
      case '_height'  : var _height  = parm[i][1] ; break ; // ムービーの高さ
      case '_width'   : var _width   = parm[i][1] ; break ; // ムービーの幅
      case '_hspace'  : var _hspace  = parm[i][1] ; break ; // まわりの余白(水平方向)
      case '_vspace'  : var _vspace  = parm[i][1] ; break ; // まわりの余白(垂直方向)
      case '_align'   : var _align   = parm[i][1] ; break ; // 表示位置
      case '_class'   : var _class   = parm[i][1] ; break ; // クラス
      case '_id'      : var _id      = parm[i][1] ; break ; // ID名
      case '_name'    : var _name    = parm[i][1] ; break ; // ムービー名
      case '_style'   : var _style   = parm[i][1] ; break ; // スタイル
      case '_declare' : var _declare = parm[i][1] ; break ; // 読み込まれるだけで実行しない
      default        :;
    }
  }
  

  // タグ用文字列生成
  var htm = ""
  
  htm+="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'"
  htm+="        codebase='https://download.macromedia.com/pub/shockwave/"
                    htm+="cabs/flash/swflash.cab'"
  if(!!_width)   htm+="        width    = '" + _width   + "'"
  if(!!_height)  htm+="        height   = '" + _height  + "'"
  if(!!_hspace)  htm+="        hspace   = '" + _hspace  + "'"
  if(!!_vspace)  htm+="        vspace   = '" + _vspace  + "'"
  if(!!_align)   htm+="        align    = '" + _align   + "'"
  if(!!_class)   htm+="        class    = '" + _class   + "'"
  if(!!_id)      htm+="        id       = '" + _id      + "'"
  if(!!_name)    htm+="        name     = '" + _name    + "'"
  if(!!_style)   htm+="        style    = '" + _style   + "'"
  if(!!_declare) htm+="                    " + _declare  
  htm+=">"
  if(!!_swf)     htm+="<param  name     = 'movie'   value ='" + _swf     + "'>"
  if(!!_quality) htm+="<param  name     = 'quality' value ='" + _quality + "'>"
  if(!!_loop)    htm+="<param  name     = 'loop'    value ='" + _loop    + "'>"
  if(!!_bgcolor) htm+="<param  name     = 'bgcolor' value ='" + _bgcolor + "'>"
  if(!!_play)    htm+="<param  name     = 'play'    value ='" + _play    + "'>"
  if(!!_menu)    htm+="<param  name     = 'menu'    value ='" + _menu    + "'>"
  if(!!_scale)   htm+="<param  name     = 'scale'   value ='" + _scale   + "'>"
  if(!!_salign)  htm+="<param  name     = 'salign'  value ='" + _salign  + "'>"
  if(!!_wmode)   htm+="<param  name     = 'wmode'   value ='" + _wmode   + "'>"
  htm+=""
  htm+="<embed                          "
  htm+="        pluginspage='https://www.macromedia.com/go/getflashplayer'"
  if(!!_width)   htm+="        width    = '" + _width   + "'"
  if(!!_height)  htm+="        height   = '" + _height  + "'"
  if(!!_hspace)  htm+="        hspace   = '" + _hspace  + "'"
  if(!!_vspace)  htm+="        vspace   = '" + _vspace  + "'"
  if(!!_align)   htm+="        align    = '" + _align   + "'"
  if(!!_class)   htm+="        class    = '" + _class   + "'"
  if(!!_id)      htm+="        id       = '" + _id      + "'"
  if(!!_name)    htm+="        name     = '" + _name    + "'"
  if(!!_style)   htm+="        style    = '" + _style   + "'"
  htm+="        type     = 'application/x-shockwave-flash' "
  if(!!_declare) htm+="                    " + _declare  
  if(!!_swf)     htm+="        src      = '" + _swf     + "'"
  if(!!_quality) htm+="        quality  = '" + _quality + "'"
  if(!!_loop)    htm+="        loop     = '" + _loop    + "'"
  if(!!_bgcolor) htm+="        bgcolor  = '" + _bgcolor + "'"
  if(!!_play)    htm+="        play     = '" + _play    + "'"
  if(!!_menu)    htm+="        menu     = '" + _menu    + "'"
  if(!!_scale)   htm+="        scale    = '" + _scale   + "'"
  if(!!_salign)  htm+="        salign   = '" + _salign  + "'"
  htm+="></embed>"
  htm+="</object>"

  //書き出し処理
  document.write(htm)
  
}



function view_flash( flashfile, MM_FlashCanPlay ){

if ( MM_FlashCanPlay ) {
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write('  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ');
	document.write(' ID="r-flash" WIDTH="543" HEIGHT="164" ALIGN="">');
	document.write(' <PARAM NAME="movie" VALUE="' + flashfile + '" /> <PARAM NAME="quality" VALUE="high" /> <PARAM NAME="bgcolor" VALUE="#FFFFFF" />  '); 
	document.write(' <EMBED src="' + flashfile + '" quality=high bgcolor=#FFFFFF  ');
	document.write(' swLiveConnect=FALSE WIDTH="543" HEIGHT="164" NAME="r-flash" ALIGN=""');
	document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
	document.write(' </EMBED>');
	document.write(' </OBJECT>');
} else{
	document.write('<IMG SRC="/common/000067914.jpg" WIDTH="543" HEIGHT="164" usemap="#daika" BORDER="0" />');
}

}


function view_flash2( flashfile, MM_FlashCanPlay ){

if ( MM_FlashCanPlay ) {
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write('  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ');
	document.write(' ID="r-flash" WIDTH="750" HEIGHT="164" ALIGN="">');
	document.write(' <PARAM NAME="movie" VALUE="' + flashfile + '" /> <PARAM NAME="quality" VALUE="high" /> <PARAM NAME="bgcolor" VALUE="#FFFFFF" />  '); 
	document.write(' <EMBED src="' + flashfile + '" quality=high bgcolor=#FFFFFF  ');
	document.write(' swLiveConnect=FALSE WIDTH="750" HEIGHT="164" NAME="r-flash" ALIGN=""');
	document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
	document.write(' </EMBED>');
	document.write(' </OBJECT>');
} else{
	document.write('<IMG SRC="/common/000073196.jpg" WIDTH="750" HEIGHT="164" usemap="#daika" BORDER="0" />');
}

}


function fontdefault(){
     var element = document.getElementsByTagName("font");   
     for( i=0 ; i<element.length ; i++ ){
       var fontsize = element.item(i).getAttribute("SIZE"); 

	if(fontsize == 1){
		element.item(i).style.fontSize = '66%';
	}else if(fontsize == 2){
		element.item(i).style.fontSize = '85%';
	}else if(fontsize == 3){
		element.item(i).style.fontSize = '110%';
	}else if(fontsize == 4){
		element.item(i).style.fontSize = '121%';
	}else if(fontsize == 5){
		element.item(i).style.fontSize = '165%';
	}else if(fontsize == 6){
		element.item(i).style.fontSize = '220%';
	}else if(fontsize == 7){
		element.item(i).style.fontSize = '330%';
	}else{
		element.item(i).style.fontSize = '100%';
	}
     }
}