var ClubID;
function club_head(nClubID, nClubStatus, sSubject)
{
  var nStatus = 0;
  sStatus = "1";
  if ("" != sStatus) {
      nStatus = parseInt(sStatus);
  }
  if (0 == nStatus) {
      document.location.href = 'http://club.meet8.com/new/index.html';
      return;
  }
	var sDomain = "2305";
	if (sDomain == ""){
		sDomain = nClubID;
	}
	ClubID = nClubID;
    var str = "";
	str +=  ('<table width="718" align="center">');
	str +=  ('<tr>');
	str +=  ('<td align="right"><table width="718" height="21">');
	str +=  ('<tr>');
	str +=  ('<td width="718" height="15"><div align="right"><a href="http://www.meet8.com/member/mycc.html">my缘</a> <span id="myspace"></span> | <a href="http://www.meet8.com/invite/index.html" >送股</a> | <a href="http://search.meet8.com/php/member/search_index.php">搜索</a> | <a href="http://blog.meet8.com/php/bubble/index.php">冒泡</a> | <a href="#" onClick="blogHome();return false;">博客</a> | <a href="http://photo.meet8.com/new/index.html">相册</a> | <a href="#" onClick="clubHome();return false;">圈子</a> | <a href="http://pod.meet8.com/php/video/chip.php">赌友</a>  | <a href="http://pod.meet8.com/php/video/chip.php">下注</a> | <a href="http://vip.meet8.com/vip/vip_how_to_get_stock.html" >会员的网站</a> | <a href="http://bank.meet8.com/vip1.html" >上市</a> | ');
	str +=  (' <scr'+'ipt>document.write(getLoginLinkNew());</scr'+'ipt>');
	str +=  ('</div></td>');
	str +=  ('</tr>');
	str +=  ('</table>');
	str +=  ('<table width="794" height="48" background="http://img.meet8.com/club/title3-.gif">');
	str +=  ('<tr>');
	str +=  ('<td width="590" height="42"><div align="right">');
	str +=  ('<table width="590" height="19" class="club_title">');
	str +=  ('<tr>');
	str +=  ('<td width="190" class="club_title_big"><span class="style5"><strong><a href="http://2305.club.meet8.com" title="部落名称：卡拉永远ok">卡拉永远ok</a>');
	if (0 == nClubStatus) {
    str +=  ('              <font style="color:red">（已关闭）</font>');
	}
	str +=  ('</strong>');
	str +=  ('</span></td>');
	str +=  ('<td width="400"><div align="left" style="width:400px;"> <a  href="http://club.meet8.com/tb2305.html">论坛</a> | <a href="http://club.meet8.com/tp2305.html">相册</a> | <a href="http://club.meet8.com/tv2305.html">影音</a> | <a href="http://club.meet8.com/te2305.html">活动</a> | <a href="http://club.meet8.com/home/230/member/5/index.html">成员</a> | <a href="http://club.meet8.com/php/club/club_invite.php?clubid=2305">邀请</a> | <span id="is_manage"></span><span id="is_login"></span></div></td>');
	str +=  ('</tr>');
	str +=  ('</table></td>');
	str +=  ('<td width="247" id="myclub_name" align="right" style="line-height:25px; padding-bottom:10px;">&nbsp;</td>');
	str +=  ('</tr>');
	str +=  ('</table>');
	str +=  ('<table width="795" border="0" cellpadding="0" cellspacing="0">');
	str +=  ('<tr>');
	str +=  ('<td width="787"><a href="http://2305.club.meet8.com" title="部落名称：卡拉永远ok">首页</a>');
	str +=  (' → '+sSubject+'</td>');
	str +=  ('</tr>');
	str +=  ('</table></td>');
	str +=  ('</tr>');
	str +=  ('</table>');
	document.write(str);
	
}

	//按1000个ID一个目录返回某ID所在的子目录
	function getsubdir(id, stype){
		var str="";
		var sreturn = "";
		if (999 < id)
		{
			id = id + "";
			for(i=0; i<id.length; i=i+3)
			{
				str = (id.substring(i,i+3));
				if (3 > str.length || (i+3)>=id.length)
				{
					sreturn += "/"+stype+"/"+str;
				}
				else
				{
					sreturn += "/"+str;
				}
			}
			return (sreturn);
		}
		else if(0 < id){
			return ("/"+stype+"/"+id);
		}
		else{
			return ;
		}
	}
    function blogHome() {
        if (isLogin()) {
            //已登陆的转至‘同城’
            document.location.href = "http://blog.meet8.com/php/blog/blog_index.php?opFlag=city";
        } else {
            document.location.href = "http://blog.meet8.com/blog/search/new/index.html";
        }
    }
	function photoHome() {
        if (isLogin()) {
            //已登陆的转至‘同城’
            document.location.href = "http://photo.meet8.com/php/photo/photo_index.php?opFlag=city";
        } else {
            document.location.href = "http://photo.meet8.com/photo/search/new/index.html";
        }
    }
    
    function mp3Home() {
        if (isLogin()) {
            //已登陆的转至‘同城’
            document.location.href = "http://mp3.meet8.com/php/mp3/mp3_index.php?opFlag=city";
        } else {
            document.location.href = "http://mp3.meet8.com/index.html";
        }
    }
    function getLoginLinkNew() {
        var bLogined = isLogin();
        var sLoginLink = '';
        if (bLogined) {
            sLoginLink = '<a href="#" onclick="execLogout(); return false;" class="agrey333">退出</a>';
        } else {
            sLoginLink = '<a href="http://www.meet8.com/member/login.html" class="agrey333">登录</a>';
        }
        return sLoginLink;
    } 

	//-----部落内页是否具有发布权限

	function echoPutOut2(url,str)
	{
		if (isLogin())
		{
			//document.write('<input name="Submit22" onclick="window.open(\'/php/club/'+url+'.php?clubid=' + ClubID + '\',\'_self\',\'\')" type="submit" class="cher_anniu" value="'+str+'">');
			document.write('<a href="/php/club/'+url+'.php?clubid=' + ClubID + '" target="_blank" class="ButtonLink" onMouseUp="this.blur()"><span style="color:#FFFFFF">'+str+'</span></a>');
		}
	}
	function getUserID(){
		if (isLogin())
		{
			document.write('<input type="hidden" name="iptUsrID" id="iptUsrID" value="'+parseInt(getCookie('MyID'))+'">');
		}
	}
	function clubDetail2() {
        nClubID = FormMyClub.clublist.value;
		var str = "";
		if("0" == nClubID || "" == nClubID){
				alert("请选择部落，再点击前往");
				return false;
		}
		str = "http://"+nClubID+".club.meet8.com";
		window.open(str, "_self", "");
    }