function getCookieVal (offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
		endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i <= clen) {	//while open
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
			return getCookieVal (j);
		i = document.cookie.indexOf("", i) + 1;
		if (i == 0)
			break; 
	}	//while close
	return "";
}

document.write(" \
<table width=970 border=0 cellspacing=0 cellpadding=0 bgcolor=#FFFFFF> \
<tr valign=bottom> \
 <td><div style=margin-bottom:7px><a href=http://www.chosun.com/><img src=http://image.chosun.com/common/200611/gnb_cslogo.gif width=94 height=13 hspace=9 border=0 /></a></div></td> \
 <td align=right> \
 \
  <table border=0 cellspacing=0 cellpadding=0> \
  <tr> \
   <td><a href=http://myhome.chosun.com/><img src=http://image.chosun.com/common/200611/gnbmu_myhome.gif width=56 height=28 border=0 /></td> \
   <td><a href=http://www.chosun.com/><img src=http://image.chosun.com/common/200611/gnbmu_news.gif width=56 height=28 border=0 /></td> \
   <td><a href=http://spn.chosun.com/><img src=http://image.chosun.com/common/200611/gnbmu_se.gif width=94 height=28 border=0 /></td> \
   <td><a href=http://newsplus.chosun.com/><img src=http://image.chosun.com/common/200611/gnbmu_newsplus.gif width=94 height=28 border=0 /></td> \
   <td><img src=http://image.chosun.com/common/200611/gnbmu_cafe.gif width=94 height=28 usemap=#cafeblog border=0 /></td> \
   <td><a href=http://morningplus.chosun.com/etc/index.html target=mplus><img src=http://image.chosun.com/common/200611/gnbmu_mplus.gif width=94 height=28 border=0 /></td> \
  </tr> \
  </table> \
  <map name=cafeblog>  \
  <area shape=rect coords=10,1,43,28 href=http://cafe.chosun.com/ target=ucc></area> \
  <area shape=rect coords=44,1,86,28 href=http://blog.chosun.com/ target=ucc></area> \
  </map> \
 \
 </td> \
</tr> \
</table> \
 \
<div style=width:970px;height:2px;background:#C60909;><img src=http://image.chosun.com/common/200611/dot_blank.gif width=970 height=2 border=0 /></div> \
<div style=width:970px;height:3px;background:#F9F7F3;><img src=http://image.chosun.com/common/200611/dot_blank.gif width=970 height=3 border=0 /></div> \
");





//if (!GetCookie("chk_adult_redbook")) {	if (!GetCookie('SMSESSION') || GetCookie('SMSESSION') == "LOGGEDOFF" || !GetCookie('SM_USER')){
if (GetCookie("chk_adult_redbook")=="") {	
	if (GetCookie("SMSESSION")=="" || GetCookie("SMSESSION") == "LOGGEDOFF" || GetCookie("SM_USER")==""){

		if(GetCookie("SM_USER")=="bryant1224") {
		  alert(GetCookie("chk_adult_redbook"));
		  alert(GetCookie("SMSESSION"));
		  alert(GetCookie("SM_USER"));
		}

		var returl = document.location; 
		if (returl == ""){
			returl = "http://redbook.chosun.com";
		}
		returl = escape(returl);
		location.href = "http://membership.chosun.com/login/adult/auth.jsp?returl=" + returl + "&site=redbook";
	}
}