//输出牌子
function brand(sStr)
{
    if (empty(sStr))
    {
        sStr = '八桂';
    }
    document.write('<dd style="background:url(http://www.8gol.com/img/comm/layout/grass.gif) no-repeat center bottom;height:41px; margin-left:38px;_margin-left:19px; text-align:center;"><img src="http://www.8gol.com/img/comm/layout/grass1.gif" style="float:left;"/><span style="float:left;display:block; height:26px; background:url(http://www.8gol.com/img/comm/layout/grass2.gif); line-height:26px; color:#FFFFFF;">'+sStr+'</span><img style="float:left" src="http://www.8gol.com/img/comm/layout/grass3.gif"/></dd>');
    
    document.write('<dd style="padding-top:8px;margin-left:10px; background:none;"><img src="http://www.8gol.com/img/comm/layout/top_2_bg2.gif" style="float:left;"/><span style="float:left;display:block; height:27px; background:url(http://www.8gol.com/img/comm/layout/top_1_bg.gif); line-height:28px; color:#FFFFFF; width:700px;"><a href="http://www.'+DOMAIN+'/about/bulletin.html" style="position:absolute;float:left;text-decoration: none;color:#FFF" title="进入公告中心">公告中心：</a><marquee scrollamount=3 style="float:right;width:640px;" onmousemove="stop();" onmouseout="start();" id="top_guen_span"></marquee></span><img src="http://www.8gol.com/img/comm/layout/top_2_bg.gif" style="float:left;"/></dd>');
}
function head_login()
{
    if (is_login())
    {
        return ('欢迎 <a href="" onclick="enter_space();return false;">'+eval(get_cookie('user[name]'))+'</a> |&nbsp; <a href="" onclick="on_exit(); return false;">注销登录</a> |&nbsp; ');
    }
    else
    {
        return ('<a href="" onclick="go_login(); return false;">登录系统</a> | &nbsp; <a href="" onclick="go_register(); return false;">注册帐号</a> | &nbsp;');
    }
}
function enter_space()
{
    if (is_login())
    {
        my_space();
    }
    else
    {
        window.document.location.href='http://www.'+DOMAIN+'/login.html';
    }
}

function dis_head_menu(mid, nDis)
{
	document.getElementById('hm'+mid).style.display = nDis == 1?'block':'none';
}

function comm_head()
{
    //document.write('<div style="background-color:#FF0000; width:1230px;height:440px;margin:-40px 0px 0px -165px;background:url(http://www.8gol.com/img/comm/60.png) center top no-repeat; position:absolute; z-index:-100"></div>');
	
    
    document.write('<div class="comm_head_menu"><a href="http://www.8gol.com" id="login"></a><div style="float:right; text-align:right;" class="a2 bluefont">'+
                    '地方站：<a title="南宁在线" href="http://nn.8gol.com">南宁</a> <a title="柳州在线" href="http://lz.8gol.com">柳州</a> <a title="桂林在线" href="http://gl.8gol.com">桂林</a> <a title="梧州在线" href="http://wz.8gol.com">梧州</a> <a title="北海在线" href="http://bh.8gol.com">北海</a> <a title="防城港在线" href="http://fc.8gol.com">防城港</a> <a title="钦州在线" href="http://qz.8gol.com">钦州</a> <a title="贵港在线" href="http://gg.8gol.com">贵港</a> <a title="玉林在线" href="http://yl.8gol.com">玉林</a> <a title="百色在线" href="http://bs.8gol.com">百色</a> <a title="贺州在线" href="http://hz.8gol.com">贺州</a> <a title="河池在线" href="http://hc.8gol.com">河池</a> <a title="来宾在线" href="http://lb.8gol.com">来宾</a> <a title="崇左在线" href="http://cz.8gol.com">崇左</a> '+
                    '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+head_login()+'<a href="http://www.'+DOMAIN+'">网站首页</a> | &nbsp;<a href="" onclick="window.external.AddFavorite(document.location.href,document.title); return false;">收藏本站</a><br /><a href="" onclick="enter_space();return false;" id="topmyspace" '+(is_login()?'class="curr"':'')+'><a/></div>');
	document.write('</div><div class="head_menu verdana">');
	
    document.write('<a href="http://info.'+DOMAIN+'"class="tmenuin"></a>');
    document.write('<a href="http://mart.'+DOMAIN+'"class="tmenuma"></a>');
    document.write('<a href="http://tour.'+DOMAIN+'" class="tmenutr"></a>');
	document.write('<a href="http://www.'+DOMAIN+'/place" style="width:85px;" class="tmenufq"></a>');
	document.write('<a href="http://www.'+DOMAIN+'/school" class="tmenuxy"></a>');
	document.write('<a href="http://bbs.'+DOMAIN+'/index.html" class="tmenubb"></a>');
	document.write('<a href="http://q.'+DOMAIN+'/" class="tmenuqz"></a>');
    document.write('<a href="http://m.'+DOMAIN+'" class="tmenump"></a>');
	document.write('<a href="http://www.'+DOMAIN+'/bus" class="tmenufw"></a>');
    document.write('</div>');
    return;

}
function comm_head2(sHead1, sHead2)
{
    if (is_null(sHead1))
    {
        sHead1 = '';
    }
    if (is_null(sHead2))
    {
        sHead2 = '';
    }
	document.write('<div class="comm_head2_1">'+sHead1+'</div><div style="background-color:#f1f1f1; margin-bottom:5px;"><div style="padding:5px;font-size:13px;">'+sHead2+'</div><img src="http://www.8gol.com/img/comm/layout/head_bg2_right2.gif" style="float:right; margin-top:-4px;"/><img src="http://www.8gol.com/img/comm/layout/head_bg2_left2.gif" style="float:left; margin-top:-4px;"/></div>');
}





function echo_login()
{
    if (is_login())
    {
        var sStr = '<div style=""><a href="http://user.8gol.com/'+currLoginID+'/my_edit.php" title="点击进入个人信息编辑" target="user'+currLoginID+'"><img src="'+my_pic(currLoginID, get_cookie('user[pic]'), 1)+'" style="width:98px; height:98px; border:1px solid #eee; float:left;margin-right:5px;"/></a>';
        sStr += '帐号： <a href="" onclick="enter_space();return false;" title="点击进入我的空间"><b><nobr>'+(eval(get_cookie('user[name]'))).substring(0,5)+'</nobr></b></a><br />注册：'+get_cookie('user[regdata]')+'<br />登录：'+get_cookie('user[count]')+' 次<br /><a href="" onclick="on_exit(); return false;" class="bluefont">注销登录</a>';
        sStr += '</div>';
    }
    else
    {
        var sStr ='<form id="form1" method="post" action="'+DPHP+'user/login.php" class="bluefont" style="padding:0px 5px 5px 5px;"><img src="http://www.8gol.com/img/comm/tit_login.gif" width="196" height="18"/> 邮箱：<input type="text" name="log_email" id="log_email" class="igreen" tabindex="1"/><input type="checkbox" name="checkbox" value="checkbox"  style="vertical-align:bottom"  tabindex="3"/>记住<br /> 密码：<input type="password" name="log_pass"  id="log_pass" class="igreen"  tabindex="2"/> <input type="image" name="imageField" src="http://www.8gol.com/img/comm/btn_login.gif" style="vertical-align:bottom;width:53px;height:23px;" tabindex="4"/><br /> <center><img src="http://www.8gol.com/img/comm/3.gif" /><a href="http://www.8gol.com/register.html">现在注册</a>&nbsp;&nbsp;&nbsp;&nbsp;<img src="http://www.8gol.com/img/comm/3.gif" /><a href="http://www.8gol.com/forget.html">忘记密码</a> </center> </form>';
    }
    
    document.write(sStr);
}

    var topBBSsnum = '';
    var topBBSnnum = 0;
    var topBBScnum = 0;
    var topBBSdis;
    var bbsObj = '';
$(document).ready( function(){
    bbsObj = bHomeIndex?'.bbsindextd1':'.topbbs > dt';

	/***右边***/
	//$('.mybox').offset().top - 
    if (bCommRight)
    {
        $('body').prepend('<dl class="rightinfo"></dl>');
        commRight ();
    }

    var topBbsCount = 0; 
    $(bbsObj+' > a').each(
        function(){
            ++topBbsCount;
        }).each(function(i){
            this.id = 'anum'+i;
            topBBSsnum += '<span id="num'+i+'" onmousemove="huan('+i+')">'+(topBbsCount--)+'</span>';
            topBBScnum = topBBSnnum = i;
        });
    $(bbsObj).prepend('<div class="num">'+topBBSsnum+'</div>');
    $('.num').css('opacity','0.7');
    huan(topBBSnnum);

    if (topBBSnnum >= 1) {
        $(bbsObj).live('mousemove', function(){
            clearTimeout(topBBSdis);
        }).live('mouseout', function(){
            topBBSdis = setTimeout('huant()', 3000);
        });
        huant();
    }
    
});


