document.writeln("<center><script type=\"text\/javascript\"> \/*200*200，创建于2010-6-10*\/ var cpro_id = \'u54397\';<\/script>");
document.writeln("<script type=\"text\/javascript\" src=\"http:\/\/cpro.baidu.com\/cpro\/ui\/c.js\"><\/script>");
document.writeln("<script type=\"text\/javascript\"> \/*200*200，创建于2010-6-10*\/ var cpro_id = \'u54399\';<\/script>");
document.writeln("<script type=\"text\/javascript\" src=\"http:\/\/cpro.baidu.com\/cpro\/ui\/c.js\"><\/script></center>");

document.writeln("<center><script type=\"text\/javascript\">");
document.writeln("function JSAddFavorite(){");
document.writeln(" if ( window.sidebar && \"object\" == typeof( window.sidebar ) && \"function\" == typeof( window.sidebar.addPanel ) ){");
document.writeln("   \/\/  firefox");
document.writeln("   window.sidebar.addPanel( document.title, document.location.href, \'\' );");
document.writeln(" }else if ( document.all && \"object\" == typeof( window.external ) ){");
document.writeln("   \/\/  ie");
document.writeln("   window.external.addFavorite( document.location.href, document.title );");
document.writeln(" }");
document.writeln("}");
document.writeln("<\/script>");
document.writeln("<a href=\"javascript:JSAddFavorite()\">+将本页添加到IE收藏夹<\/A>&nbsp;&nbsp;")
document.writeln("<a href=\"javascript:window.open(\'http:\/\/shuqian.qq.com\/post?from=3&title=\'+encodeURIComponent(document.title)+\'&uri=\'+encodeURIComponent(document.location.href)+\'&jumpback=2&noui=1\',\'favit\',\'width=930,height=470,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes\');void(0)\">+将本页收藏到QQ书签<\/a>&nbsp;&nbsp;");
document.writeln("<a href=\"javascript:window.open(\'http:\/\/cang.baidu.com\/do\/add?it=\'+encodeURIComponent(document.title.substring(0,76))+\'&iu=\'+encodeURIComponent(location.href)+\'&fr=ien#nw=1\',\'_blank\',\'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes\'); void 0\">+将本页加到百度搜藏<\/a>&nbsp;&nbsp;");
document.writeln("<a href=\"#\" onClick=\"window.open(\'http:\/\/myweb.cn.yahoo.com\/popadd.html?url=\'+encodeURIComponent(document.location.href)+\'&title=\'+encodeURIComponent(document.title), \'Yahoo\',\'scrollbars=yes,width=780,height=550,left=80,top=80,status=yes,resizable=yes\');\">+将本页加到雅虎收藏<\/a>")
document.writeln("<!-- JiaThis Button BEGIN -->");
document.writeln("<div id=\"jiathis_style_32x32\">");
document.writeln("	<a class=\"jiathis_button_qzone\"><\/a>");
document.writeln("	<a class=\"jiathis_button_tsina\"><\/a>");
document.writeln("	<a class=\"jiathis_button_tqq\"><\/a>");
document.writeln("	<a class=\"jiathis_button_kaixin001\"><\/a>");
document.writeln("	<a class=\"jiathis_button_renren\"><\/a>");
document.writeln("	<a href=\"http:\/\/www.jiathis.com\/share\/\" class=\"jiathis jiathis_txt jtico jtico_jiathis\" target=\"_blank\"><\/a>");
document.writeln("<\/div>");
document.writeln("<script type=\"text\/javascript\" src=\"http:\/\/v1.jiathis.com\/code\/jia.js\" charset=\"utf-8\"><\/script>");
document.writeln("<!-- JiaThis Button END -->")
document.writeln("<a href=http:\/\/www.book8.com target=_blank><font color=red>看小说就到书吧BOOK8!电脑网址:www.book8.com手机网址:wap.book8.com</font></a>");

var jieqiUserId = 0;
var jieqiUserName = '';
var jieqiUserPassword = '';
var jieqiUserGroup = 0;
var jieqiNewMessage = 0;

if(document.cookie.indexOf('jieqiUserInfo') >= 0){
	
	var jieqiUserInfo = get_cookie_value('jieqiUserInfo');
	
	start = 0;
	offset = jieqiUserInfo.indexOf(',', start); 
	while(offset > 0){
		tmpval = jieqiUserInfo.substring(start, offset);
		tmpidx = tmpval.indexOf('=');
		if(tmpidx > 0){
           tmpname = tmpval.substring(0, tmpidx);
		   tmpval = tmpval.substring(tmpidx+1, tmpval.length);
		   if(tmpname == 'jieqiUserId') jieqiUserId = tmpval;
		   else if(tmpname == 'jieqiUserName_un') jieqiUserName = tmpval;
		   else if(tmpname == 'jieqiUserPassword') jieqiUserPassword = tmpval;
		   else if(tmpname == 'jieqiUserGroup') jieqiUserGroup = tmpval;
		   else if(tmpname == 'jieqiNewMessage') jieqiNewMessage = tmpval;
		}
		start = offset+1;
		if(offset < jieqiUserInfo.length){
		  offset = jieqiUserInfo.indexOf(',', start); 
		  if(offset == -1) offset =  jieqiUserInfo.length;
		}else{
          offset = -1;
		}
	}
}

if(jieqiUserId != 0 && jieqiUserName != '' && (document.cookie.indexOf('PHPSESSID') != -1 || jieqiUserPassword != '')){
  document.write('<table width="100%"  border="0" cellspacing="0" cellpadding="0">');
  document.write('<tr>');
  document.write('<td align="left" valign="middle" height="20">&nbsp;欢迎您！ '+jieqiUserName+'&nbsp;&nbsp;&nbsp;<a href="/userdetail.php" target="_blank">查看资料</a> | <a href="/modules/article/bookcase.php" target="_blank">我的书架</a>');
  if(jieqiNewMessage > 0){
	  document.write(' | <a href="/message.php?box=inbox" target="_blank" class="mue1"><font color=red><b>您有新短信</b></font></a>');
  }else{
	  document.write(' | <a href="/message.php?box=inbox" target="_blank">查看短信</a>');
  }
  document.write(' | <a href="/logout.php" target="_self">退出登陆</a>&nbsp;');
  document.writeln(" | <INPUT id=CrBook onclick=copyToClipBoard_qq() type=button value=推荐书吧获取积分></td>");
  document.write('</tr>');
  document.write('</table>');
}else{
  var jumpurl="";
  if(location.href.indexOf("jumpurl") == -1){
    jumpurl=location.href;
  }
  document.write('<table width="100%"  border="0" cellspacing="0" cellpadding="0">');
  document.write('<form name="framelogin" method="post" action="/login.php">');
  document.write('<tr>');
  document.write('<td align="left" valign="middle">用户名：');
  document.write('<input name="username" type="text" class="text" onkeypress="javascript: if (event.keyCode==32) return false;" value="" size="8" maxlength="30" />');
  document.write('&nbsp;密码：<input type="password" class="text" size="8" maxlength="30" name="password" />');
  document.write('&nbsp;验证码：<input type="text" class="text" size="8" maxlength="8" name="checkcode">&nbsp;<img src="/include/checkcodegd.php" style="cursor:pointer;" onclick="this.src=\'/include/checkcodegd.php\';" />');
  document.write('<input type="hidden" name="action" value="login" />');
  document.write('<input type="hidden" name="jumpurl" value="'+jumpurl+'" />');
  document.write(' <input type="checkbox" class="checkbox" name="usecookie" value="1" />');
  document.write('记录cookie&nbsp;');
  document.write('<input type="submit" class="button" value="登录" name="submit" />');
  document.write('<br><img src=\"/images/green.jpg\"><font color=red>十秒钟注册成为会员立奖30积分，免费下载十本小说，免费拥有你的超大书架，享受高速便捷阅读乐趣！>>></font>&nbsp;<a href="/register.php" target="_top">用户注册</a> &nbsp;<a href="/getpass.php" target="_top">取回密码</a>&nbsp;</td>');
  document.write('</tr>');
  document.write('</form>');
  document.write('</table>');
}
function copyToClipBoard_qq() 
{
  var clipBoardContent='';
  clipBoardContent="http://www.book8.com/index.php?fromuid="+jieqiUserId;
  window.clipboardData.setData("Text",clipBoardContent);
  alert('复制成功！将复制的内容粘贴到QQ，msn，博客等，有人通过连接访问书吧你就会增加5个贡献值，如果通过连接访问并注册成为会员就增加10个贡献值，贡献值可以换积分！');
}
function get_cookie_value(Name) { 
  var search = Name + "=";
　var returnvalue = ""; 
　if (document.cookie.length > 0) { 
　  offset = document.cookie.indexOf(search) 
　　if (offset != -1) { 
　　  offset += search.length 
　　  end = document.cookie.indexOf(";", offset); 
　　  if (end == -1) 
　　  end = document.cookie.length; 
　　  returnvalue=unescape(document.cookie.substring(offset, end));
　　} 
　} 
　return returnvalue; 
}


