<!-- 


/********** 初期設定 **********/

var work1, work2;


work1  = "<div style='width:70px; border: 1px #FFFFFF dashed; background: #FFFFFF'><table><tr><td align='center'><font size='2'><a href='javascript:show();'>一覧表示</a></font></td></tr></table></div>";
work2  = "<div style='border: 1px #FFFFFF dashed; width: 190px; background: #FFFFFF'><table width='190'><tr><td align='left'><font size='2' color='#333333'>記事の一つ一つが面白くついついいろいろなところを読んでしまいました。　スタンフォードとカルテックは距離的には近いのでしょうか。機会があればスタンフォードに遊びに行きたいです。嘘です、勉強をしに。</font></td></tr><tr><td align='right'><font size='1' color='#999999'>ああ&nbsp;&nbsp;04/18 00:26</font><br></td></tr></table></div>";
work2 += "<font size='1'><br></font>";
work2 += "<div style='border: 1px #FFFFFF dashed; width: 190px; background: #FFFFFF'><table width='190'><tr><td align='left'><font size='2' color='#333333'>こんにちは。<br><br>とてもわかりやすくて為になりますね！<br><br>私は留学は数年後してみたいと考えていますが、生活費などの話などとても学びになっています。<br>ありがとうございます！</font></td></tr><tr><td align='right'><font size='1' color='#999999'>すみ&nbsp;&nbsp;02/02 16:17</font><br></td></tr></table></div>";
work2 += "<font size='1'><br></font>";
work2 += "<div style='border: 1px #FFFFFF dashed; width: 190px; background: #FFFFFF'><table width='190'><tr><td align='left'><font size='2' color='#333333'>気軽な意見交換の場として<br>利用ください。</font></td></tr><tr><td align='right'><font size='1' color='#999999'>Samus&nbsp;&nbsp;12/29 08:31</font><br></td></tr></table></div>";
work2 += "<font size='1'><br></font>";
work2 += "<table><tr><td align='center'><div style='width:70px; border:1px #FFFFFF dashed; background: #FFFFFF'><font size='2'><a href='javascript:hide();'>隠す</a></font></div></td></tr></table>";



/********** 書き込み内容3件分表示 **********/

document.write("<div style='width: 200px; background: #FFFFFF'>");
document.write("<table align='canter' width='200'>");
document.write("  <tr>");
document.write("    <td align='center'><hr align='center' width=190 style='color:#FFFFFF;'>");
document.write("<font size='2' color='#333333'>掲示板</font>");
document.write("<br><hr align='center' width=190 style='color:#FFFFFF;'></td>");
document.write("  </tr>");
document.write("  <tr align='center'>");
document.write("    <td>");
document.write("      <div style='border: 1px #FFFFFF dashed; width: 190px; background: #FFFFFF'>");
document.write("      <table width='190'>");
document.write("        <tr>");
document.write("          <td align='left'>");
document.write("            <font size='2' color='#333333'>akiraさんへ<br>参考にしていただいてありがとうございます！</font></td>");
document.write("        </tr>");
document.write("        <tr>");
document.write("          <td align='right'>");
document.write("            <font size='1' color='#999999'>samus&nbsp;&nbsp;06/26 13:05</font><br></td>");
document.write("        </tr>");
document.write("      </table>");
document.write("      </div>");
document.write("      <font size='1'><br></font>");
document.write("      <div style='border: 1px #FFFFFF dashed; width: 190px; background: #FFFFFF'>");
document.write("      <table width='190'>");
document.write("        <tr>");
document.write("          <td align='left'>");
document.write("            <font size='2' color='#333333'>こんにちは。現在、秋の大学院出願に向けてTOEFLの勉強をしています。ブログのエントリ、大変参考になりました。ありがとうございます。</font></td>");
document.write("        </tr>");
document.write("        <tr>");
document.write("          <td align='right'>");
document.write("            <font size='1' color='#999999'>akira&nbsp;&nbsp;06/25 13:17</font><br></td>");
document.write("        </tr>");
document.write("      </table>");
document.write("      </div>");
document.write("      <font size='1'><br></font>");
document.write("      <div style='border: 1px #FFFFFF dashed; width: 190px; background: #FFFFFF'>");
document.write("      <table width='190'>");
document.write("        <tr>");
document.write("          <td align='left'>");
document.write("            <font size='2' color='#333333'>Graduation admition essays という本、本当に良い本ですね。　ただのサンプル集という領域を越えています。　対外この手の本は立ち読みなどの経験から面白くもない他人の経験を読むだけに終わることが多いのですが。<br><br>他にもエッセイの書き方として、私は、「論文の書き方」をおすすめします。</font></td>");
document.write("        </tr>");
document.write("        <tr>");
document.write("          <td align='right'>");
document.write("            <font size='1' color='#999999'>ああ&nbsp;&nbsp;05/16 10:04</font><br></td>");
document.write("        </tr>");
document.write("      </table>");
document.write("      </div>");
document.write("      <font size='1'><br></font>");


/********** 一覧表示 **********/

document.write("      <span id='all'>");
document.write("      <div style='width:70px; border: 1px #FFFFFF dashed; background: #FFFFFF'>");
document.write("      <table>");
document.write("        <tr>");
document.write("          <td align='center'>");
document.write("            <font size='2'><a href='javascript:show();'>一覧表示</a></font></td>");
document.write("        </tr>");
document.write("      </table>");
document.write("      </div>");
document.write("      </span></td>");


/********** 書き込みフォーム表示 **********/

document.write("  </tr>");
document.write("  <tr>");
document.write("    <td align='center'>");
document.write("      <table border='0' cellpadding='0' cellspacing='0'>");
document.write("        <form name='frm' method='POST' action='http://asp.atomicweb.co.jp/id/samus/petit_bbs/' target='_blank' onSubmit='return fnc_check(document.frm.name.value)'>");
document.write("        <tr>");
document.write("          <td align='right'>");
document.write("            <font size='2' color='#000000'>名前&nbsp;&nbsp;</font></td>");
document.write("          <td align='left' width='140'>");
document.write("            <input type='text' name='name' style='width:140px'></td>");
document.write("        </tr>");
document.write("        <tr>");
document.write("          <td align='right'>");
document.write("            <font size='2' color='#000000'>内容&nbsp;&nbsp;</font></td>");
document.write("          <td align='left' width='140'>");
document.write("            <textarea name='text' rows='4' style='width:140px'></textarea></td>");
document.write("        </tr>");
document.write("        <tr align='right'>");
document.write("          <td colspan='2'>");
document.write("            <input type='submit' value='書き込み'></td>");
document.write("        </tr>");
document.write("        </form>");
document.write("      </table></td>");
document.write("  </tr>");
document.write("  <tr>");
document.write("    <td align='right'>");
document.write("      <font size='1'><br></font><font size='2' color='#000000'>ぷち掲示板&nbsp;<a href='http://asp.atomicweb.co.jp/' target='_blank'>AtomicASP</a></font></td>");
document.write("  </tr>");
document.write("</table>");
document.write("</div>");


/********** クッキー読み込み **********/

var theData   = "";
var theName   = "AtmMiniBBS=";
var theCookie = document.cookie+";";
var start = theCookie.indexOf(theName);
var end;

if (start != -1){	
	end = theCookie.indexOf(";",start);
	theData = unescape(theCookie.substring(start+theName.length, end));
}
document.frm.name.value = theData;


/********** ファンクション **********/

function fnc_check(name){

	var strName = name;

	if(document.frm.name.value == ""){
		alert("名前を入力してください");
		return false;
	}else if(document.frm.text.value == ""){
		alert("内容を入力してください");
		return false;
	}else{
		var theName  = "AtmMiniBBS";
		var theValue = document.frm.name.value;
		var theDay   = 31;

		setDay = new Date();
		setDay.setTime(setDay.getTime()+(theDay*1000*60*60*24));
		expDay = setDay.toGMTString();
		cook = theName + "="+escape(theValue)+";expires="+expDay;
		document.cookie = cook;
              document.frm.name.value += "　"
              document.frm.text.value += "　"
	}

}

function show(){all.innerHTML = work2;}
function hide(){all.innerHTML = work1;}



-->