// -------------------------- Version Select ----------------------------
var  bName = navigator.appName;
var  bVer = parseInt(navigator.appVersion);
var  isMinIE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4) ? true : false;
var  isMinIE5 = (isMinIE4 && navigator.appVersion.indexOf("5.") >= 0) ? true : false;
var  isMinNS3 = (bName == "Netscape" && bVer >= 3) ? true : false;
var  isMinNS4 = (bName == "Netscape" && bVer >= 4 && bVer < 5) ? true : false;
var  isMinNS5 = (bName == "Netscape" && bVer >= 5) ? true : false;

// フォルダ表示・非表示
function displayFolder(item, openclose) {
  if (isMinIE4) lyr = eval("document.all." + item + "On");
  if (isMinNS5) lyr = eval("document.getElementById('" + item + "On')");
  if (openclose==1) type = "block";
  else type = "none";
  if (isMinIE4 || isMinNS5)lyr.style.display = type;

  if (isMinIE4) lyr = eval("document.all." + item + "Off");
  if (isMinNS5) lyr = eval("document.getElementById('" + item + "Off')");
  if (openclose==1) type = "none";
  else type = "block";
  if (isMinIE4 || isMinNS5) lyr.style.display = type;
}

// プルダウンメニュー
function showBlock(item) {
  if (isMinIE4) lyr = eval("document.all." + item);
  if (isMinNS5) lyr = eval("document.getElementById('" + item + "')");
  if (isMinIE4 || isMinNS5) lyr.style.display = "block";
}
function hideBlock(item) {
  if (isMinIE4) lyr = eval("document.all." + item);
  if (isMinNS5) lyr = eval("document.getElementById('" + item + "')");
  if (isMinIE4 || isMinNS5) lyr.style.display = "none";
}

function swapImage(id,path) {
  if (isMinIE4) img = eval("document.all." + id);
  if (isMinNS5) img = eval("document.getElementById('" + id + "')");
  if (isMinIE4 || isMinNS5) img.src = path;
}

// -------------------------- cell color change ----------------------------

function swapStyle(cell, onoff){
  var c_name;

  if(cell == null || cell.className == "")
    return false;

  switch(onoff){
  case 1:
    c_name = cell.className + "-on";
    break;
  case 0:
    c_name = cell.className.replace("-on","");
  }
  cell.className = c_name;
  return true;
}

function cellColor(cell, onoff){
  var c_name;

  if(cell == null || cell.className == "")
    return false;

  switch(onoff){
  case 1:
    c_name = cell.className + "-on";
    break;
  case 0:
    c_name = cell.className.replace("-on","");
  }
  cell.className = c_name;
  return true;
}

function cellColor1(cell,color) {
  cell.style.backgroundColor = color;
}

function cellColor0(cell) {
  cell.style.backgroundColor = "";
}

function swapBgFg1(cell,bg,fg) {
  cell.style.backgroundColor = bg;
  cell.style.color = fg;
}

function swapBgFg0(cell) {
  cell.style.backgroundColor = "";
  cell.style.color = "";
}

function cellColorID1(id,color) {
  if (isMinIE4) cell = eval("document.all." + id);
  if (isMinNS5) cell = eval("document.getElementById('" + id + "')");
  if (isMinIE4 || isMinNS5) cell.style.backgroundColor = color;
}

function cellColorID0(id) {
  if (isMinIE4) cell = eval("document.all." + id);
  if (isMinNS5) cell = eval("document.getElementById('" + id + "')");
  if (isMinIE4 || isMinNS5) cell.style.backgroundColor = "";
}

function swapBgImg1(cell, img){
    cell.style.backgroundImage = "url("+img+")";
}

function swapBgImg0(cell, img, flag){
    cell.style.backgroundImage = '';
}

function openSizedWin(url,w,h,targetName){
  newwin = window.open(url, targetName, "width="+w+",height="+h+",menubar=1,scrollbars=1,resizable=1,toolbar=1,location=0,personalbar=0,directories=0,status=0");
  newwin.focus();
}

function openNormalWin(url){
  newwin = window.open(url);
  newwin.focus();
}

function openBox(e,url,targetName,offsetx,offsety,width,height,scroll){
  //マウスの現在位置
  var mouseXonScreen = null;
  var mouseYonScreen = null;
  //マウスの現在位置取得
  if(document.all){    
     //e4,e5,e6
     mouseXonScreen = window.event.screenX;
     mouseYonScreen = window.event.screenY;
  } else if(document.layers || document.getElementById ){
     //n4,n6,n7,m1,o6
     mouseXonScreen = e.screenX;
     mouseYonScreen = e.screenY;
  }
  //マウスの現在位置から何ピクセル離すかをセット
  var setx = mouseXonScreen + offsetx;
  var sety = mouseYonScreen + offsety;
  //サブウインドウを開く
  //(引数以外のパラメータも下記でセットできます)
  var para = ""
           + " left="        + setx
           + ",screenX="     + setx
           + ",top="         + sety
           + ",screenY="     + sety
           + ",toolbar="     + 0
           + ",location="    + 0
           + ",directories=" + 0
           + ",status="      + 0
           + ",menubar="     + 0
           + ",scrollbars="  + scroll
           + ",resizable="   + 1
           + ",innerWidth="  + width
           + ",innerHeight=" + height
           + ",width="       + width
           + ",height="      + height;
    newwin=window.open(url,targetName,para);
    newwin.focus();
}

function checkLogout(type, url){
  switch(type){
  case "editting":
    msg = "ログアウトします。\n作業中の内容が失われますがよろしいですか？";
    break;
  default:
    msg = "ログアウトします。 よろしいですか？";
    break;
  }

  if(!window.confirm(msg))
    return;

  location.replace(url);
}

function checkAutoLogin(){
  if(document.form1.autoLogin.checked)
    if(!window.confirm("チェックをつけていると Cookie が保存されます"))
      return;
  location.href="article_submit.html";
}

function checkLogoutAdmin(url){
  msg = "ログアウトします。\n作業中の内容が失われますがよろしいですか？";
  
  if(!window.confirm(msg))
    return;
    
  location.replace(url);
}

function checkNG(id, url){
  b = eval("document.all." + id);

  if(b.style.display == "none"){
    b.style.display = "block";
    return;
  }
  location.href = url;
}

function helpWin(url) {
  var doc = window.open("","help","width=500,height=450,menubar=0,scrollbars=0,resizable=0,toolbar=0,location=0,personalbar=0,directories=0,status=0").document;
  doc.open();

  doc.write('<html>\n');
  doc.write('<head>\n');
  doc.write('<base href="http://webryblog.biglobe.ne.jp">\n');
  doc.write('<title>ヘルプ/ウェブリブログ</title>\n');
  doc.write('<meta http-equiv=content-type content="text/html; charset=Shift_JIS">\n');
  doc.write('<link type="text/css" rel="stylesheet" href="/css/core.css">\n');
  doc.write('<link type="text/css" rel="stylesheet" href="/guide/guide.css">\n');
  doc.write('</head>\n');
  doc.write('<body>\n');
  doc.write('<div id="petti-window">\n');
  doc.write('<table width="100%" height="450" cellspacing="0" cellpadding="0" border="0">\n');
  doc.write('<tr><td class="title-bar"><img src="/help/img/petti_help_title.gif" width="210" height="50" alt="ウェブリブログ ヘルプ"></td>\n');
  doc.write('\t<td class="title-bar" align="right"><img src="/help/img/petti_help_right.gif" width="190" height="50"></td></tr>\n');
  doc.write('<tr><td colspan="2" height="100%">\n');
  doc.write('\t<iframe src="/help/' + url + '" width="100%" height="100%" frameborder="0" border="0"></iframe></td></tr>\n');
  doc.write('<tr><td colspan="2" id="buttons"><button onclick="javascript:window.close()">閉じる</button></td></tr>\n');
  doc.write('</table>\n');
  doc.write('</div>\n');
  doc.write('</body>\n');
  doc.write('</html>\n');

  doc.close();
  doc.focus();
}

function helpWinRel(url) {
  var doc = window.open("","help","width=500,height=450,menubar=0,scrollbars=0,resizable=0,toolbar=0,location=0,personalbar=0,directories=0,status=0").document;
  doc.open();

  doc.write('<html>\n');
  doc.write('<head>\n');
  doc.write('<title>ヘルプ/ウェブリブログ</title>\n');
  doc.write('<meta http-equiv=content-type content="text/html; charset=Shift_JIS">\n');
  doc.write('<link type="text/css" rel="stylesheet" href="/css/core.css">\n');
  doc.write('<link type="text/css" rel="stylesheet" href="/guide/guide.css">\n');
  doc.write('</head>\n');
  doc.write('<body>\n');
  doc.write('<div id="petti-window">\n');
  doc.write('<table width="100%" height="450" cellspacing="0" cellpadding="0" border="0">\n');
  doc.write('<tr><td class="title-bar"><img src="/help/img/petti_help_title.gif" width="210" height="50" alt="ウェブリブログ ヘルプ"></td>\n');
  doc.write('\t<td class="title-bar" align="right"><img src="/help/img/petti_help_right.gif" width="190" height="50"></td></tr>\n');
  doc.write('<tr><td colspan="2" height="100%">\n');
  doc.write('\t<iframe src="/help/' + url + '" width="100%" height="100%" frameborder="0" border="0"></iframe></td></tr>\n');
  doc.write('<tr><td colspan="2" id="buttons"><button onclick="javascript:window.close()">閉じる</button></td></tr>\n');
  doc.write('</table>\n');
  doc.write('</div>\n');
  doc.write('</body>\n');
  doc.write('</html>\n');

  doc.close();
  doc.focus();
}


/**
 * 指定されたCheckBoxのName属性名より、チェック状態と
 * なっているCheckBoxのCountを取得する。
 *
 * @param ctrlObj CheckBoxのコントロールオブジェクト
 * @return チェック状態のコントロール数
 */
function getCountForCheckedCheckBox( ctrlObj ) {

  var nRet = 0; // 返却値
  // 1.入力値チェック
  if ( ctrlObj == null ) {
    return nRet;
  }

  var nCount = 0;
  if(ctrlObj.type == "checkbox"){
    if ( ctrlObj.checked == true ) {
      nCount = 1;
    }
  }else{
    // 2.コントロールの個数を取得
    var len = ctrlObj.length;
    // 3.チェック状態のCheckBoxをカウント
    for ( var i=0; i<len; i++ ) {
      if ( ctrlObj[i].checked == true ) {
        nCount = nCount + 1;
      }
    }
  }
  
  nRet = nCount;
  return nRet;
}

/**
 * 指定されたCheckBoxのName属性名より、チェック状態と
 * なっているCheckBoxの先頭にフォーカスをセットする。
 *
 * @param ctrlObj CheckBoxのコントロールオブジェクト
 * @return 正常：true, 異常：false
 */
function setForcusForCheckedCheckBox( ctrlObj ) {
  
  var bRet = false; // 返却値
  // 1.入力値チェック
  if ( ctrlObj == null ) {
    return bRet;
  }
  // 2.コントロールの個数を取得
  var len = ctrlObj.length;
  // 3.チェック状態のCheckBoxをカウント
  var nCount = 0;
  for ( var i=0; i<len; i++ ) {
    if ( ctrlObj[i].checked == true ) {
      ctrlObj[i].focus();
      bRet = true;
      break;
    }
  }

  return bRet;
}

function url(topdomain, track, css ) {
  tburl_openWin(topdomain, track, css);
}

function tburl_openWin(topdomain, track, css){
  var trackback = window.open("","","Width=500,Height=250");
  trackback.document.open();
  trackback.document.write('<html lang="ja">\n');
  trackback.document.write('<head>\n');
  trackback.document.write('<base href="http://' + topdomain + '" />\n');
  trackback.document.write('<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS" />\n');
  trackback.document.write('<title>トラックバックURL表示/ウェブリブログ</title>\n');
  trackback.document.write('<meta http-equiv="Content-Scripdt-Type" content="text/javascript" />\n');
  trackback.document.write('<meta http-equiv="Content-Style-Type" content="text/css" />\n');
  trackback.document.write('<link href="/css/articles.new/common.css" rel="stylesheet" type="text/css" />\n');
  trackback.document.write('<link href="/' + css + '" rel="stylesheet" type="text/css" />\n');
  trackback.document.write('</head>\n');
  trackback.document.write('<body>\n');
  trackback.document.write('<table id="miniwin" cellspacing="1" cellpadding="0" border="0">\n');
  trackback.document.write('<tr><td class="message">トラックバック用URL </td></tr>\n');
  trackback.document.write('<tr><td><div class="url">' + track + '</div></td></tr>\n');
  trackback.document.write('<tr><td class="message" height="100%">\n');
  trackback.document.write('<p><span class="notice">注意）</span>\n');
  trackback.document.write('ブログ管理者の以下の設定により、受信制限される可能性があります。\n');
  trackback.document.write('<ul style="list-style-type:disc;margin:auto;padding:0.3em 0em;">\n');
  trackback.document.write('<li>記事本文中に対象記事ページへのリンクがない場合</li>\n');
  trackback.document.write('<li>URLや記事タイトル、本文中に管理者が指定した文字列を含む場合</li>\n');
  trackback.document.write('<li>全トラックバック保留設定をしている場合</li>\n');
  trackback.document.write('</ul></p>\n');
  trackback.document.write('  <p class="notice">ウェブリブログのお客様は</p>\n');
  trackback.document.write('  <p>送付したい記事のブーメランコメントのフォームから投稿するだけで送付できます。<br />\n');
  trackback.document.write('  トラックバックURLもご利用できます。</p>\n');
  trackback.document.write('  </td></tr>\n');
  trackback.document.write('<tr><td class="buttons"><input type="button" value="閉じる" onClick="javascript:window.close()" /></td></tr>\n');
  trackback.document.write('</table>\n');
  trackback.document.write('<!-- beacon start -->\n')
  trackback.document.write('<img src="http://go.biglobe.ne.jp/md/vt/002073/001/" width=1 height=1 style="display:none" />\n');
  trackback.document.write('<!-- beacon end -->\n');
  trackback.document.write('</body>\n');
  trackback.document.write('</html>\n');

  trackback.document.close();

  trackback.document.focus();
}
function blink() {
  if (!document.all) { return; }
  for (i = 0; i < document.all.length; i++) {
    obj = document.all(i);
    if (obj.className == "blink") {
      if (obj.style.visibility == "visible") {
        obj.style.visibility = "hidden";
      } else {
        obj.style.visibility = "visible";
      }
    }
  }
  setTimeout("blink()", 800);
}

function themeSearchForm() {
  var bRet = true;
  var obj = document.themesearch.searchstring.value;
        if (obj == "")
          bRet = false;
  return bRet;
}

function topLinks(){
}

function footCopyright(){
}

function include_free_space(){
}

function include_free_space_news(){
}

/**
 * ブーメランコメントするときの文字数チェック
 */
function articlePageValueCheck1(){
  var bRet = true;
  var obj1 = document.atcl1.title.value;
  var obj2 = document.atcl1.textbody.value;
  var textlength = obj2.length;
  
  if(obj1 == "" && obj2 == ""){
    alert("タイトルまたは本文を入力してください。");
    bRet = false;
  }

  if(textlength > 20000){
    alert("本文は20000文字以内で入力してください。");
    bRet = false;
  }
  
  return bRet;
}

/**
 * 認証コメント書き込みの文字数チェック
 */
function articlePageValueCheck2(commentFlg){
  var bRet = true;
  var obj1 = document.atcl2.comment.value;
  var obj2 = document.atcl2.nickname.value;
  var textlength = obj1.length;
  
  if(obj1 == "" || obj2 == ""){
    alert("コメントまたはニックネームを入力してください。");
    bRet = false;
  }

  if(bRet == true){
    if(textlength > 800){
      alert("コメントは800文字以内で入力してください。");
      bRet = false;
    }
  }
  
  if(commentFlg == "1") {
    msg = "認証コメントはウェブリブログユーザ限定です。\nログインしますか？\nログインするとこのページからあなたのブログへリンクが作成されます。";
  }else{
    msg = "このページへのコメントはウェブリブログユーザ限定です。\nログインしますか？\nログインするとこのページからあなたのブログへリンクが作成されます。";
  }
  
  if(bRet == true){
    if(window.confirm(msg)){
      document.atcl2.comment.focus();
      return bRet;
    }else{
      document.atcl2.comment.focus();
      bRet = false;
    }
  }

  return bRet;
}

/**
 * 通常コメント書き込みの文字数チェック
 */
function articlePageValueCheck3(){
  var bRet = true;
  var obj1 = document.atcl2.comment.value;
  var obj2 = document.atcl2.nickname.value;
  var textlength = obj1.length;
  
  if(obj1 == "" || obj2 == ""){
    alert("コメントまたはニックネームを入力してください。");
    bRet = false;
  }

  if(bRet == true){
    if(textlength > 800){
      alert("コメントは800文字以内で入力してください。");
      bRet = false;
    }
  }
  
  msg = "コメント内容はこのページに書き込まれます。よろしいですか？";
  
  if(bRet == true){
    if(window.confirm(msg)){
      document.atcl2.comment.focus();
      return bRet;
    }else{
      document.atcl2.comment.focus();
      bRet = false;
    }
  }

  return bRet;
}

/**
 * ブーメランコメントするときの文字数チェック
 */
function themePortalValueCheck(){
  var bRet = true;
  var obj1 = document.portal1.title.value;
  var obj2 = document.portal1.textbody.value;
  var textlength = obj2.length;
  
  if(obj1 == "" && obj2 == ""){
    alert("タイトルまたは本文を入力してください。");
    bRet = false;
  }
  
  if(textlength > 20000){
    alert("本文は20000文字以内で入力してください。");
    bRet = false;
  }
  
  return bRet;
}

function onMySubmit(formObj, url) {
  formObj.action=url;
  formObj.submit();
}

function onAuthCommentSubmit(formObj, url1, url2) {
  var bRet = true;
  var obj1 = formObj.comment.value;
  var obj2 = formObj.nickname.value;
  var textlength = obj1.length;
  
  if(obj1 == "" || obj2 == ""){
    alert("コメントまたはニックネームを入力してください。");
    bRet = false;
  }

  if(bRet == true){
    if(textlength > 500){
      alert("コメントは500文字以内で入力してください。");
      bRet = false;
    }
  }

  msg = "あなたのウェブリブログへのリンクを作成しますか？\n[キャンセル]または[No]を押すと通常のコメントになります。";

  if(bRet == true){
    if(window.confirm(msg)){
      formObj.comment.focus();
      formObj.action=url1;
      formObj.submit();
    }else{
      formObj.comment.focus();
      formObj.action=url2;
      formObj.submit();
    }
  }

  return bRet;
}

// sidebar.jsに渡すコンポーネント内各要素表示件数
var news_news_disp_num = 5;
var theme_category_disp_num = 20;
var comment_disp_num = 5;
var trackback_disp_num = 5;

// sidebar.jsがエラーを起こさないためのダミーメソッド
function include_comment_list(num) {

}

function include_trackback_list(num) {

}

function include_webry_seal() {
}
function checkAll(f, v) {
  var e = f.newsidList;
  if(e != null){
    if (e.value)
      e.checked = v;
    else
      for (i=0; i<e.length; i++) 
        e[i].checked = v;
  }
}
function include_news_webry_seal(){
}
function include_calendar(){
}
function include_album(){
}

// 入力メールアドレス文字列全角文字チェック
function checkMailAddressValid(mailaddress) {
	for ( i = 0; i < mailaddress.length; i++) {
    var escapeChar = escape( mailaddress.charAt(i) );
	   if ( escapeChar.length >= 4) {
	      alert("メールアドレスに全角が含まれています。\nメールアドレスは半角で入力してください。");
		  return false;
	   }
	}
    return true;
}


// オブジェクトのID(絵文字貼り付け対象ID)
var object_id;

// 絵文字ボタンを表示する
function insertEmoji(userdomain, id){
	object_id = id;
	domain = userdomain;
	document.write(
		"<td class='m'><a href='javascript:void(0)' onclick=\"openBox(event,'http://' +domain+ '/palette.html?id=' + object_id,'eplt',0,0,400,238,0);\"><img src=\"../../images/manage/tag_emoji.gif\" width=\"59\" height=\"19\" border=\"0\" align=\"absmiddle\" alt=\"［絵文字］絵文字パレットから選んで入力します\" /></a><font color=\"#FF0000\"><strong> NEW</strong></font></td>"
		)

}

// 絵文字パレット表示
function palette_open(){  
	var param = location.search;
	var url = location.href;
		
	if(param.length > 0) {
		var type;
  		var start = param.indexOf("type=") + 5;
		var end = param.indexOf("&", start);
		
		if(end > 0 && start > 4){					
			type = param.substring(start, end);			
			url = url.replace("type=" + type,"");
		}else if(start > 4){
			type = param.substring(start, param.length);
		}else{
			type = "webry";
			url += "&";
		}
		url = url.replace("type=" + type,"");	
	}else{
		type = "webry";
		url += "?";
	}

	document.open();
	  
	document.write('<table class="p-tabs" cellpadding="0" cellspacing="0" border="0">\n');
	if(type == "webry"){  
		document.write("<tr><td><a href=\"" + url + "type=webry" + "\"><img src=\"../images/manage/etab11.gif\" width=\"92\" height=\"25\" alt=\"ウェブリ\" /></a></td>\n");
		document.write("<td><a href=\"" + url + "type=docomo" + "\"><img src=\"../images/manage/etab20.gif\" width=\"92\" height=\"25\" alt=\"docomo\" /></a></td>\n");
		document.write("<td><a href=\"" + url + "type=hdeco" + "\"><img src=\"../images/manage/etab40.gif\" width=\"92\" height=\"25\" alt=\"星デコ\" /></a></td>\n");
		document.write("<td><a href=\"" + url + "type=deka" + "\"><img src=\"../images/manage/etab30.gif\" width=\"92\" height=\"25\" alt=\"デカ絵文字\" /></a></td>\n");
	}else if(type == "docomo"){  
		document.write("<tr><td><a href=\"" + url + "type=webry" + "\"><img src=\"../images/manage/etab10.gif\" width=\"92\" height=\"25\" alt=\"ウェブリ\" /></a></td>\n");
		document.write("<td><a href=\"" + url + "type=docomo" + "\"><img src=\"../images/manage/etab21.gif\" width=\"92\" height=\"25\" alt=\"docomo\" /></a></td>\n");
		document.write("<td><a href=\"" + url + "type=hdeco" + "\"><img src=\"../images/manage/etab40.gif\" width=\"92\" height=\"25\" alt=\"星デコ\" /></a></td>\n");
		document.write("<td><a href=\"" + url + "type=deka" + "\"><img src=\"../images/manage/etab30.gif\" width=\"92\" height=\"25\" alt=\"デカ絵文字\" /></a></td>\n");
	}else if(type == "hdeco"){
		document.write("<tr><td><a href=\"" + url + "type=webry" + "\"><img src=\"../images/manage/etab10.gif\" width=\"92\" height=\"25\" alt=\"ウェブリ\" /></a></td>\n");
		document.write("<td><a href=\"" + url + "type=docomo" + "\"><img src=\"../images/manage/etab20.gif\" width=\"92\" height=\"25\" alt=\"docomo\" /></a></td>\n");
		document.write("<td><a href=\"" + url + "type=hdeco" + "\"><img src=\"../images/manage/etab41.gif\" width=\"92\" height=\"25\" alt=\"星デコ\" /></a></td>\n");
		document.write("<td><a href=\"" + url + "type=deka" + "\"><img src=\"../images/manage/etab30.gif\" width=\"92\" height=\"25\" alt=\"デカ絵文字\" /></a></td>\n");
	}else if(type == "deka"){
		document.write("<tr><td><a href=\"" + url + "type=webry" + "\"><img src=\"../images/manage/etab10.gif\" width=\"92\" height=\"25\" alt=\"ウェブリ\" /></a></td>\n");
		document.write("<td><a href=\"" + url + "type=docomo" + "\"><img src=\"../images/manage/etab20.gif\" width=\"92\" height=\"25\" alt=\"docomo\" /></a></td>\n");
		document.write("<td><a href=\"" + url + "type=hdeco" + "\"><img src=\"../images/manage/etab40.gif\" width=\"92\" height=\"25\" alt=\"星デコ\" /></a></td>\n");
		document.write("<td><a href=\"" + url + "type=deka" + "\"><img src=\"../images/manage/etab31.gif\" width=\"92\" height=\"25\" alt=\"デカ絵文字\" /></a></td>\n");		
	}
	document.write('<td align="right" valign="top" width="100%"><a href="javascript:window.close();"><img src="../images/manage/pclose.gif" width="15" height="15" alt="閉じる" /></a></td></tr>\n');
	document.write('</table>\n');
	document.write('<div class="p-outer">\n');
	document.write('<div class="p-inner scroll" id="emoji-container"></div>\n');
	document.write('</div>\n');
	document.write('<script type="text/javascript">');  
	document.write('	emojiPalette();\n');
	document.write('</script>\n'); 
	  
	document.close();

}

// 絵文字パレットの作成
function emojiPalette() {
	var param = location.search;
	if(param.length > 0){
		var id;
		var type;
		var start; 
		var end; 
		start = param.indexOf("id=");
		end = param.indexOf("&", start);
		
		if(end > 0 && start > 0){			
			 id = param.substring(start+"id=".length, end);
		
		}else if (start > 0){
			 id = param.substring(start+"id=".length, param.length);

		}else{
			id="";
		}
		start = param.indexOf("type=");
		end = param.indexOf("&", start);
		
		if(end > 0 && start > 0){			
			 type = param.substring(start+"type=".length, end);
		
		}else if(start > 0){
			 type = param.substring(start+"type=".length, param.length);

		}else{
			type = "webry";
		}		
		makeEmojiPalette2("emoji-container", type, id);
	} else {
		makeEmojiPalette2("emoji-container", "webry" , "");
	}
}

// テーマタブを表示する(記事ページ用)
function insertThemeTabNews(domain){
	if (theme_tab_id.length != 0) {
		document.write(
		'<div class="themetabs">' +
		'	<table cellpadding="0" cellspacing="1" border="0">' +
		'	<tbody><tr>'
		);
		document.write('		<td><a href="http://' + domain + '/">全て</a></td>');
		for (i = 0; i < theme_tab_id.length; i++) {
			if (theme_tab_name[i] != "") {
				document.write('		<td><a href="' + theme_tab_url[i] + '">' + theme_tab_name[i] + '</a></td>');
			}
		}
		document.write(
		'	</tr></tbody>' +
		'	</table>' +
		'</div>'
		);
	}
}

// テーマタブを表示する(個人トップ用)
function insertThemeTabAll(domain){
	if (theme_tab_id.length != 0) {
		document.write(
		'<div class="themetabs">' +
		'	<table cellpadding="0" cellspacing="1" border="0">' +
		'	<tbody><tr>'
		);
		document.write('		<td><a href="http://' + domain + '/" class="cur">全て</a></td>');
		for (i = 0; i < theme_tab_id.length; i++) {
			if (theme_tab_name[i] != "") {
				document.write('		<td><a href="' + theme_tab_url[i] + '">' + theme_tab_name[i] + '</a></td>');
			}
		}
		document.write(
		'	</tr></tbody>' +
		'	</table>' +
		'</div>'
		);
	}	
}

// テーマタブを表示する(テーマ別ページ用)
function insertThemeTabTheme(themeid, domain){
	if (theme_tab_id.length != 0) {
		document.write(
		'<div class="themetabs">' +
		'	<table cellpadding="0" cellspacing="1" border="0">' +
		'	<tbody><tr>'
		);
		document.write('		<td><a href="http://' + domain + '/">全て</a></td>');
		for (i = 0; i < theme_tab_id.length; i++) {
			if (theme_tab_name[i] != "") {
				if (theme_tab_id[i] == themeid) {
					document.write('		<td><a href="' + theme_tab_url[i] + '" class="cur">' + theme_tab_name[i] + '</a></td>');
				} else {
					document.write('		<td><a href="' + theme_tab_url[i] + '">' + theme_tab_name[i] + '</a></td>');
				}
			}
		}
		document.write(
		'	</tr></tbody>' +
		'	</table>' +
		'</div>'
		);
	}
}

// テーマリストを表示する
function openThemeList(){
	var param = location.search;
	if(param.length > 0){
		var put_id;
		var start; 
		var end; 		
		start = param.indexOf("putid=") + "putid=".length;
		end = param.indexOf("&", start);
		
		if(end > 0 && start > 0){			
			 put_id = param.substring(start, end);
		
		}else if(start > 0){
			 put_id= param.substring(start, param.length);

		}else{
			return;
		}	
	  	if(themecategory_name.length != 0) {
	  		document.write('<table border="1" width="90%" align="center" cellspacing="0" cellpadding="0">\n');
	  		for(i=0; i < themecategory_name.length; i++){
	  			var theme_id = "theme" + i;
				document.write('<tr><td><input type="text" style="border:0" size="50" id="' + theme_id + '" value="' + themecategory_name[i] + '"></td><td align="center"><input type="button" value="設定" onclick="javascript:putTheme(\'' + theme_id + '\', \'' + put_id + '\');"></td></tr>\n'); 
	  		}
	  		document.write('</table>\n');	
		} else {
			document.write('<br/><p><div align="center"><font color="#FF0000">記事に使用しているテーマが存在しません。</font></div></p>\n');
		}	
	}		
}

// テーマタブのテキストボックスにテーマ名を挿入する
function putTheme(themeid, putid){	
	var theme_name = document.getElementById(themeid).value; 
    theme_name = theme_name.replace(/\([0-9]*\)$/, "");
    theme_name = theme_name.substring(0, theme_name.length-1);    
	var parwin = window.opener.document;
	var te = parwin.getElementById(putid);				
	te.value = theme_name;	
	window.close();
}

function include_pre_feeling_btn(newsid){
    document.write('<div id="kimochi" class="box-unit">');
    document.write('	<h2 class="h2-general">');
    document.write('		ブログ気持玉');
    document.write('		<a href="javascript:void(0)" onclick="helpWin(\'general_cont.html#blog_feeling\')"><img src="/images/img/help.gif" width="30" height="14" border="0" align="absmiddle" /></a>');
    document.write('	</h2>');
    document.write('	<div class="box">');
    document.write('		<strong>クリックして気持ちを伝えよう！</strong><br />');
    document.write('		ログインしてクリックすれば、自分のブログへのリンクが付きます。<br /><a href="http://webryblog.biglobe.ne.jp/">→ログインへ</a>');
    document.write('		<form method="post" name="feelingpost" action="">');
    document.write('			<input type="hidden" name="newsid" value="' + newsid + '">');
    document.write('			<input type="hidden" name="ftypeid" value="">');
    document.write('			<table id="k-post" cellspacing="0" cellpadding="0" border="0">');
    document.write('				<colgroup>');
    document.write('					<col width="16.6%" span="6" />');
    document.write('				</colgroup>');
    document.write('				<tbody>');
    document.write('					<tr>');
    document.write('						<td><a href="javascript:void(0)" onClick="javascript:onFeelingPost(1);return false;"><img src="/images/article/kimochi_aha.png" alt="なるほど（納得、参考になった、ヘー）" width="24" height="24" /></a><br /><button onclick="javascript:onFeelingPost(1)" title="なるほど（納得、参考になった、ヘー）">なるほど</button></td>');
    document.write('						<td><a href="javascript:void(0)" onClick="javascript:onFeelingPost(2);return false;"><img src="/images/article/kimochi_amaze.png" width="24" height="24" alt="驚いた" /></a><br /><button onclick="javascript:onFeelingPost(2)" title="驚いた">驚いた</button></td>');
    document.write('						<td><a href="javascript:void(0)" onClick="javascript:onFeelingPost(3);return false;"><img src="/images/article/kimochi_funny.png" width="24" height="24" alt="面白い" /></a><br /><button onclick="javascript:onFeelingPost(3)" title="面白い">面白い</button></td>');
    document.write('						<td><a href="javascript:void(0)" onClick="javascript:onFeelingPost(4);return false;"><img src="/images/article/kimochi_nice.png" width="24" height="24" alt="ナイス" /></a><br /><button onclick="javascript:onFeelingPost(4)" title="ナイス">ナイス</button></td>');
    document.write('						<td><a href="javascript:void(0)" onClick="javascript:onFeelingPost(5);return false;"><img src="/images/article/kimochi_guts.png" width="24" height="24" alt="ガッツ（がんばれ！）" /></a><br /><button onclick="javascript:onFeelingPost(5)" title="ガッツ（がんばれ！）">ガッツ</button></td>');
    document.write('						<td><a href="javascript:void(0)" onClick="javascript:onFeelingPost(6);return false;"><img src="/images/article/kimochi_lovely.png" width="24" height="24" alt="かわいい" /></a><br /><button onclick="javascript:onFeelingPost(6)" title="かわいい">かわいい</button></td>');
    document.write('					</tr>');
    document.write('				</tbody>');
    document.write('			</table>');
    document.write('		</form>');
    document.write('	</div>');
    document.write('</div>');
}

function include_feeling_btn(newsid){
    document.write('<form method="post" name="feelingpost" action="">');
    document.write('	<input type="hidden" name="newsid" value="' + newsid + '">');
    document.write('	<input type="hidden" name="ftypeid" value="">');
    document.write('	<table id="k-post" cellspacing="0" cellpadding="0" border="0">');
    document.write('		<colgroup>');
    document.write('			<col width="16.6%" span="6" />');
    document.write('		</colgroup>');
    document.write('		<tbody>');
    document.write('			<tr>');
    document.write('				<td><a href="javascript:void(0)" onClick="javascript:onFeelingPost(1);return false;"><img src="/images/article/kimochi_aha.png" alt="なるほど（納得、参考になった、ヘー）" width="24" height="24" /></a><br /><button onclick="javascript:onFeelingPost(1)" title="なるほど（納得、参考になった、ヘー）">なるほど</button></td>');
    document.write('				<td><a href="javascript:void(0)" onClick="javascript:onFeelingPost(2);return false;"><img src="/images/article/kimochi_amaze.png" width="24" height="24" alt="驚いた" /></a><br /><button onclick="javascript:onFeelingPost(2)" title="驚いた">驚いた</button></td>');
    document.write('				<td><a href="javascript:void(0)" onClick="javascript:onFeelingPost(3);return false;"><img src="/images/article/kimochi_funny.png" width="24" height="24" alt="面白い" /></a><br /><button onclick="javascript:onFeelingPost(3)" title="面白い">面白い</button></td>');
    document.write('				<td><a href="javascript:void(0)" onClick="javascript:onFeelingPost(4);return false;"><img src="/images/article/kimochi_nice.png" width="24" height="24" alt="ナイス" /></a><br /><button onclick="javascript:onFeelingPost(4)" title="ナイス">ナイス</button></td>');
    document.write('				<td><a href="javascript:void(0)" onClick="javascript:onFeelingPost(5);return false;"><img src="/images/article/kimochi_guts.png" width="24" height="24" alt="ガッツ（がんばれ！）" /></a><br /><button onclick="javascript:onFeelingPost(5)" title="ガッツ（がんばれ！）">ガッツ</button></td>');
    document.write('				<td><a href="javascript:void(0)" onClick="javascript:onFeelingPost(6);return false;"><img src="/images/article/kimochi_lovely.png" width="24" height="24" alt="かわいい" /></a><br /><button onclick="javascript:onFeelingPost(6)" title="かわいい">かわいい</button></td>');
    document.write('			</tr>');
    document.write('		</tbody>');
    document.write('	</table>');
    document.write('</form>');
}

var flActionFlg = false;

function flOneTime(){
  if(flActionFlg == true){
    alert("ただ今処理中です。");
    return false;
  }
  return true;
}

function onFeelingPost(ftypeid){
	if (flOneTime()) {
	    flActionFlg = true;
	    document.feelingpost.action = "https://" + blogtop_tooldomain + "/tool/feelingpost.do";
	    document.feelingpost.ftypeid.value = ftypeid;
	    document.feelingpost.submit();
	}
}

function onAuthFeelingPost(auth){
	if (flOneTime()) {
	    flActionFlg = true;
	    document.feelingpost.action = "https://" + blogtop_tooldomain + "/tool/feelingpost.do";
	    document.feelingpost.auth.value = auth;
	    document.feelingpost.submit();
	}
}

function include_feeling_ranking(){	
	document.write('<div class="kimochi-list" id="kimochi0">\n');
	document.write('	<table cellpadding="0" cellspacing="0" border="0" class="topReadTable">\n');
	document.write('	<tbody>\n');
	document.write('	<tr><th class="tab current"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',0);" title="なるほど"><img src="img/kimochi_aha.png" width="24" height="24" alt="なるほど" /><br />なるほど</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',1);" title="驚いた"><img src="img/kimochi_amaze.png" width="24" height="24" alt="驚いた" /><br />驚いた</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',2);" title="面白い"><img src="img/kimochi_funny.png" width="24" height="24" alt="面白い" /><br />面白い</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',3);" title="ナイス"><img src="img/kimochi_nice.png" width="24" height="24" alt="ナイス" /><br />ナイス</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',4);" title="ガッツ"><img src="img/kimochi_guts.png" width="24" height="24" alt="ガッツ" /><br />ガッツ</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',5);" title="かわいい"><img src="img/kimochi_lovely.png" width="24" height="24" alt="かわいい" /><br />かわいい</a></th></tr>\n');
	document.write('	</tbody>\n');
	document.write('	</table>\n');
	document.write('	<table class="topReadTable" cellpadding="0" cellspacing="0" border="0">\n');
	document.write('	<thead><tr><th width="10%">順位</th><th width="50%" align="left">タイトル</th><th width="30%" align="left">ブログ名</th><th width="10%" align="left">玉数</th></tr></thead>\n');
	document.write('	<tbody>\n');
	for(i =0; i < aha_feeling_news_title.length; i++ ){
		document.write('<tr><th>' + aha_feeilng_rank[i] + '</th><td><a href="' + aha_feeling_news_url[i] + '">' + aha_feeling_news_title[i] + '</a></td><td><a href="' + aha_feeling_blog_url[i] + '">' + aha_feeling_blog_name[i] + '</a></td><td class="count">'+ aha_feeling_num[i] +'</td></tr>\n');
	}	
	document.write('	</tbody>\n');
	document.write('</table>\n');
	document.write('</div>\n');

	document.write('<div class="kimochi-list" id="kimochi1">\n');
	document.write('	<table cellpadding="0" cellspacing="0" border="0" class="topReadTable">\n');
	document.write('	<tbody>\n');
	document.write('	<tr><th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',0);" title="なるほど"><img src="img/kimochi_aha.png" width="24" height="24" alt="なるほど" /><br />なるほど</a></th>\n');
	document.write('	<th class="tab current"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',1);" title="驚いた"><img src="img/kimochi_amaze.png" width="24" height="24" alt="驚いた" /><br />驚いた</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',2);" title="面白い"><img src="img/kimochi_funny.png" width="24" height="24" alt="面白い" /><br />面白い</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',3);" title="ナイス"><img src="img/kimochi_nice.png" width="24" height="24" alt="ナイス" /><br />ナイス</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',4);" title="ガッツ"><img src="img/kimochi_guts.png" width="24" height="24" alt="ガッツ" /><br />ガッツ</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',5);" title="かわいい"><img src="img/kimochi_lovely.png" width="24" height="24" alt="かわいい" /><br />かわいい</a></th></tr>\n');
	document.write('	</tbody>\n');
	document.write('	</table>\n');
	document.write('	<table class="topReadTable" cellpadding="0" cellspacing="0" border="0">\n');
	document.write('	<thead><tr><th width="10%">順位</th><th width="50%" align="left">タイトル</th><th width="30%" align="left">ブログ名</th><th width="10%" align="left">玉数</th></tr></thead>\n');
	document.write('	<tbody>\n');
	for(i =0; i < amaze_feeling_news_title.length; i++ ){
		document.write('<tr><th>' + amaze_feeilng_rank[i] + '</th><td><a href="' + amaze_feeling_news_url[i] + '">' + amaze_feeling_news_title[i] + '</a></td><td><a href="' + amaze_feeling_blog_url[i] + '">' + amaze_feeling_blog_name[i] + '</a></td><td class="count">'+ amaze_feeling_num[i] +'</td></tr>\n');
	}	
	document.write('	</tbody>\n');
	document.write('</table>\n');
	document.write('</div>\n');	
	
	document.write('<div class="kimochi-list" id="kimochi2">\n');
	document.write('	<table cellpadding="0" cellspacing="0" border="0" class="topReadTable">\n');
	document.write('	<tbody>\n');
	document.write('	<tr><th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',0);" title="なるほど"><img src="img/kimochi_aha.png" width="24" height="24" alt="なるほど" /><br />なるほど</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',1);" title="驚いた"><img src="img/kimochi_amaze.png" width="24" height="24" alt="驚いた" /><br />驚いた</a></th>\n');
	document.write('	<th class="tab current"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',2);" title="面白い"><img src="img/kimochi_funny.png" width="24" height="24" alt="面白い" /><br />面白い</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',3);" title="ナイス"><img src="img/kimochi_nice.png" width="24" height="24" alt="ナイス" /><br />ナイス</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',4);" title="ガッツ"><img src="img/kimochi_guts.png" width="24" height="24" alt="ガッツ" /><br />ガッツ</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',5);" title="かわいい"><img src="img/kimochi_lovely.png" width="24" height="24" alt="かわいい" /><br />かわいい</a></th></tr>\n');
	document.write('	</tbody>\n');
	document.write('	</table>\n');
	document.write('	<table class="topReadTable" cellpadding="0" cellspacing="0" border="0">\n');
	document.write('	<thead><tr><th width="10%">順位</th><th width="50%" align="left">タイトル</th><th width="30%" align="left">ブログ名</th><th width="10%" align="left">玉数</th></tr></thead>\n');
	document.write('	<tbody>\n');
	for(i =0; i < funny_feeling_news_title.length; i++ ){
		document.write('<tr><th>' + funny_feeilng_rank[i] + '</th><td><a href="' + funny_feeling_news_url[i] + '">' + funny_feeling_news_title[i] + '</a></td><td><a href="' + funny_feeling_blog_url[i] + '">' + funny_feeling_blog_name[i] + '</a></td><td class="count">'+ funny_feeling_num[i] +'</td></tr>\n');
	}	
	document.write('	</tbody>\n');
	document.write('</table>\n');
	document.write('</div>\n');		
	
	document.write('<div class="kimochi-list" id="kimochi3">\n');
	document.write('	<table cellpadding="0" cellspacing="0" border="0" class="topReadTable">\n');
	document.write('	<tbody>\n');
	document.write('	<tr><th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',0);" title="なるほど"><img src="img/kimochi_aha.png" width="24" height="24" alt="なるほど" /><br />なるほど</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',1);" title="驚いた"><img src="img/kimochi_amaze.png" width="24" height="24" alt="驚いた" /><br />驚いた</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',2);" title="面白い"><img src="img/kimochi_funny.png" width="24" height="24" alt="面白い" /><br />面白い</a></th>\n');
	document.write('	<th class="tab current"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',3);" title="ナイス"><img src="img/kimochi_nice.png" width="24" height="24" alt="ナイス" /><br />ナイス</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',4);" title="ガッツ"><img src="img/kimochi_guts.png" width="24" height="24" alt="ガッツ" /><br />ガッツ</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',5);" title="かわいい"><img src="img/kimochi_lovely.png" width="24" height="24" alt="かわいい" /><br />かわいい</a></th></tr>\n');
	document.write('	</tbody>\n');
	document.write('	</table>\n');

	document.write('	<table class="topReadTable" cellpadding="0" cellspacing="0" border="0">\n');
	document.write('	<thead><tr><th width="10%">順位</th><th width="50%" align="left">タイトル</th><th width="30%" align="left">ブログ名</th><th width="10%" align="left">玉数</th></tr></thead>\n');
	document.write('	<tbody>\n');
	for(i =0; i < nice_feeling_news_title.length; i++ ){
		document.write('<tr><th>' + nice_feeilng_rank[i] + '</th><td><a href="' + nice_feeling_news_url[i] + '">' + nice_feeling_news_title[i] + '</a></td><td><a href="' + nice_feeling_blog_url[i] + '">' + nice_feeling_blog_name[i] + '</a></td><td class="count">'+ nice_feeling_num[i] +'</td></tr>\n');
	}	
	document.write('	</tbody>\n');
	document.write('</table>\n');
	document.write('</div>\n');	
	
	document.write('<div class="kimochi-list" id="kimochi4">\n');
	document.write('	<table cellpadding="0" cellspacing="0" border="0" class="topReadTable">\n');
	document.write('	<tbody>\n');
	document.write('	<tr><th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',0);" title="なるほど"><img src="img/kimochi_aha.png" width="24" height="24" alt="なるほど" /><br />なるほど</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',1);" title="驚いた"><img src="img/kimochi_amaze.png" width="24" height="24" alt="驚いた" /><br />驚いた</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',2);" title="面白い"><img src="img/kimochi_funny.png" width="24" height="24" alt="面白い" /><br />面白い</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',3);" title="ナイス"><img src="img/kimochi_nice.png" width="24" height="24" alt="ナイス" /><br />ナイス</a></th>\n');
	document.write('	<th class="tab current"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',4);" title="ガッツ"><img src="img/kimochi_guts.png" width="24" height="24" alt="ガッツ" /><br />ガッツ</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',5);" title="かわいい"><img src="img/kimochi_lovely.png" width="24" height="24" alt="かわいい" /><br />かわいい</a></th></tr>\n');
	document.write('	</tbody>\n');
	document.write('	</table>\n');
	document.write('	<table class="topReadTable" cellpadding="0" cellspacing="0" border="0">\n');
	document.write('	<thead><tr><th width="10%">順位</th><th width="50%" align="left">タイトル</th><th width="30%" align="left">ブログ名</th><th width="10%" align="left">玉数</th></tr></thead>\n');
	document.write('	<tbody>\n');
	for(i =0; i < guts_feeling_news_title.length; i++ ){
		document.write('<tr><th>' + guts_feeilng_rank[i] + '</th><td><a href="' + guts_feeling_news_url[i] + '">' + guts_feeling_news_title[i] + '</a></td><td><a href="' + guts_feeling_blog_url[i] + '">' + guts_feeling_blog_name[i] + '</a></td><td class="count">'+ guts_feeling_num[i] +'</td></tr>\n');
	}	
	document.write('	</tbody>\n');
	document.write('</table>\n');
	document.write('</div>\n');	
	
	document.write('<div class="kimochi-list" id="kimochi5">\n');
	document.write('	<table cellpadding="0" cellspacing="0" border="0" class="topReadTable">\n');
	document.write('	<tbody>\n');
	document.write('	<tr><th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',0);" title="なるほど"><img src="img/kimochi_aha.png" width="24" height="24" alt="なるほど" /><br />なるほど</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',1);" title="驚いた"><img src="img/kimochi_amaze.png" width="24" height="24" alt="驚いた" /><br />驚いた</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',2);" title="面白い"><img src="img/kimochi_funny.png" width="24" height="24" alt="面白い" /><br />面白い</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',3);" title="ナイス"><img src="img/kimochi_nice.png" width="24" height="24" alt="ナイス" /><br />ナイス</a></th>\n');
	document.write('	<th class="tab"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',4);" title="ガッツ"><img src="img/kimochi_guts.png" width="24" height="24" alt="ガッツ" /><br />ガッツ</a></th>\n');
	document.write('	<th class="tab current"><a href="javascript:void(0)" onclick="changeTab(\'kimochi\',5);" title="かわいい"><img src="img/kimochi_lovely.png" width="24" height="24" alt="かわいい" /><br />かわいい</a></th></tr>\n');
	document.write('	</tbody>\n');
	document.write('	</table>\n');
	document.write('	<table class="topReadTable" cellpadding="0" cellspacing="0" border="0">\n');
	document.write('	<thead><tr><th width="10%">順位</th><th width="50%" align="left">タイトル</th><th width="30%" align="left">ブログ名</th><th width="10%" align="left">玉数</th></tr></thead>\n');
	document.write('	<tbody>\n');
	for(i =0; i < lovely_feeling_news_title.length; i++ ){
		document.write('<tr><th>' + lovely_feeilng_rank[i] + '</th><td><a href="' + lovely_feeling_news_url[i] + '">' + lovely_feeling_news_title[i] + '</a></td><td><a href="' + lovely_feeling_blog_url[i] + '">' + lovely_feeling_blog_name[i] + '</a></td><td class="count">'+ lovely_feeling_num[i] +'</td></tr>\n');
	}	
	document.write('	</tbody>\n');
	document.write('</table>\n');
	document.write('</div>\n');
}
