function ShowMember()
{
 var strMemberID;

 strMemberID = getCookie('memberid');

 if((typeof(strMemberID) == "undefined")||(strMemberID == null))
 {
  document.write('<table width="500" border="0" cellspacing="2" cellpadding="0">');
  document.write('<form action="/SignIn.asp" method="Post" target="_self">');
  document.write('<tr>');
  document.write('<td width="60"><img src="/forums/images/b_username.gif" width="57" height="5">');
  document.write('<input size=20 name="EMail">');
  document.write('</td>');
  document.write('<td width="60"><img src="/forums/images/b_password.gif" width="57" height="5">');
  document.write('<input name="Password" type="password" size=14></td>');
  document.write('<td valign="bottom" width="380">');
  document.write('<input type="image" src="/forums/images/login_b.gif" width="51" height="13" border="0"><input type="hidden" name="Page" value="' + location.href + '"><input type="hidden" name="ClientDateTime">');
  document.write('<a href="/SignUp.asp?Page=' + encodeURIComponent(location.href) + '" target="_blank" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'imgRegister\',\'\',\'/forums/images/b_02.gif\',1)"><img src="/forums/images/b_01.gif" name="imgRegister" width="72" height="13" border="0"></a>');
  document.write('</td>');
  document.write('</tr>');
  document.write('</form>');
  document.write('</table>');
 }
 else
 {
  var strLoginID, strLoginName;

  strLoginID = getCookieWithKeys('memberid', 'loginid');
  strLoginName = getCookieWithKeys('memberid', 'loginname');

  document.write('<table border="0" cellspacing="2" cellpadding="2">');
  document.write('<tr>');
  document.write('<td bgcolor="#FFFFFF" class="body" align="center"><b><font color="#990000">Welcome ,  ' + strLoginName + '</font></b></td>');
  document.write('<td><table width="120" border="0" cellspacing="0" cellpadding="0">');
  document.write('<tr height="13">');
  document.write('<td width="5"><img src="/forums/images/blank.gif" width="5" height="13"></td>');
  document.write('<td width="53"><img src="/forums/images/b_login_r.gif" width="53" height="13"></td>');
  document.write('<td width="5"><img src="/forums/images/blank.gif" width="5" height="13"></td>');
  document.write('<td width="57"><a href="/SignOut.asp?URLR=' + encodeURIComponent(location.href) + '" target="_self"> <img src="/forums/images/b_logout_o.gif" width="57" height="13" border="0"></a></td>');
  document.write('</tr>');
  document.write('</table></td>');
  document.write('</tr>');
  document.write('</table>');
 }
}


function ShowMember1()
{
	var strMemberID;

	strMemberID = getCookie('memberid');

	if((typeof(strMemberID) == "undefined")||(strMemberID == null))
	{


  document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0">');
  document.write('<form action="/SignIn.asp" method="Post">');
  document.write('<tr>');
  document.write('<td width="13" height="13" align="left" valign="top"><img src="images/bg_box2_corner_top_l.gif" width="13" height="13"></td>');
  document.write('<td align="left" valign="top" background="images/bg_box2_top.gif"></td>');
  document.write('<td width="10" height="13" align="right" valign="top"><img src="images/bg_box2_corner_top_r.gif" width="13" height="13"></td>');
  document.write('</tr>');
  document.write('<tr>');
  document.write('<td background="images/bg_box2_l.gif" width="13">&nbsp;</td>');
  document.write('<td bgcolor="#FFFFFF" valign="top">');
  document.write('<label>');
  document.write('<div align="center"><span class="body">E-Mail</span><br>');
  document.write('<input type="text" size=8 name="EMail" id="EMail"><br>');
  document.write('<span class="body">Password</span><br>');
  document.write('<input size=8 name="Password" id="Passwd" type="password">');
  document.write('<br><br><input name="Submit" type="submit" class="button" value="LOGIN"><input type="hidden" name="Page" value="default.asp"><br>');
  document.write('<br><font size="1">[ <a href="/SignUp.asp?Page=' + encodeURIComponent(location.href) + '" class="body">สมัครสมาชิก</a> ]</font> </div>');
  document.write('</label>');
  document.write('</td>');
  document.write('<td background="images/bg_box2_r.gif" width="10">&nbsp;</td>');
  document.write('</tr>');
  document.write('<tr>');
  document.write('<td width="13" height="13" align="left" valign="top"><img src="images/bg_box2_corner_bot_l.gif" width="13" height="13"></td>');
  document.write('<td align="left" valign="top" background="images/bg_box2_bottom.gif"></td>');
  document.write('<td width="10" height="13" align="right" valign="top"><img src="images/bg_box2_corner_bot_r.gif" width="13" height="13"></td>');
  document.write('</tr>');
  document.write('</form>');    
  document.write('</table>');

	}
	else
	{
		var strLoginID, strLoginName;

		strLoginID = getCookieWithKeys('memberid', 'loginid');
		strLoginName = getCookieWithKeys('memberid', 'loginname');

   document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0">');
   document.write('<form action="/Forums/MemberEdit.aspx" method="Post">');   
   document.write('<tr>');
   document.write('<td width="13" height="13" align="left" valign="top"><img src="images/bg_box2_corner_top_l.gif" width="13" height="13"></td>');
   document.write('<td align="left" valign="top" background="images/bg_box2_top.gif"></td>');
   document.write('<td width="10" height="13" align="right" valign="top"><img src="images/bg_box2_corner_top_r.gif" width="13" height="13"></td>');
   document.write('</tr>');
   document.write('<tr>');
   document.write('<td background="images/bg_box2_l.gif" width="13">&nbsp;</td>');
   document.write('<td bgcolor="#FFFFFF" valign="top">');
   document.write('<label>');
   document.write('<div align="center">');
   document.write('<table width="100%" border="0" cellpadding="0" cellspacing="1">');
   document.write('<tr><td align="center"><span class="body"><strong><br>ขอต้อนรับสมาชิก</strong><br><br></span></td>');
   document.write('</tr>');
   document.write('</table>');
   document.write('<span class="body">');
   document.write('<input name="Submit2" type="submit" class="button" value="ห้องสมาชิก">');
   document.write('</span><br><br>');
   document.write('<font class="body">[ <a href="/SignOut.asp?URLR=' + location.href + '" class="body">ออกจากระบบ</a> ]</font><br><br>');
   document.write('</div>');
   document.write('</label>');
   document.write('</td>');
   document.write('<td background="images/bg_box2_r.gif" width="10">&nbsp;</td>');
   document.write('</tr>');
   document.write('<tr>');
   document.write('<td width="13" height="13" align="left" valign="top"><img src="images/bg_box2_corner_bot_l.gif" width="13" height="13"></td>');
   document.write('<td align="left" valign="top" background="images/bg_box2_bottom.gif"></td>');
   document.write('<td width="10" height="13" align="right" valign="top"><img src="images/bg_box2_corner_bot_r.gif" width="13" height="13"></td>');
   document.write('</tr>');
   document.write('</form>');       
   document.write('</table>');



  
	}
}



function initMember()
{
 var strMemberIDValue = getCookie("memberid");
 setCookieParameter("memberid", 6 * 60* 60 * 1000, "/", "mannature.com");
}