﻿   

//logo以及注册登录按钮等内容
function loadHead()
{
    var headCode = "";

    headCode+='<div class="nav">';
    headCode+='<ul>';
    headCode+='<li><span><a href="/index.aspx"><img src="/images/qyt.png" class="png"/></a></span></li>';
    headCode+='<li><a href="/gdj/index.aspx"><img src="/images/gdj.png" class="png"/></a></li>';
    headCode+='<li><a href="/community/index.aspx" target="_blank"><img src="/images/lt.png" class="png"/></a></li>';
    headCode+='<li><a href="http://www.qipai.com/#/home/product/" target="_blank"><img src="/images/qpj.png" class="png"/></a></li>';
    headCode+='<li><a href="/campaign/inviteFriend/index.aspx" target="_blank"><img src="/images/pphd.png" class="png"/></a></li>';
    headCode+='<li class="dl" id="logstate"><a href="#null" onclick="openSelectWindow(\'/member/login.aspx\',397,204);">登录</a>   <a href="/member/register.aspx?source=' + location.href.replace('#null', '') + '">注册</a></li>';
    headCode+='</ul>';
    headCode+='</div>';

    document.write(headCode);

}


function loadHead_new()
{
    var headCode = "";

    headCode+='<div class="nav">';
    headCode+='<ul>';
    headCode+='<li class="navl">';
    headCode+='<ol>';
    headCode+='<li><span><a href="/index.aspx"><img src="images/newqyt_new.png" class="png"/></a></span></li>';
    headCode+='<li><a href="/qzz/index.aspx"><img src="images/newqzz_new.png" class="png"/></a></li>';
    headCode+='<li><a href="/qhd/index.html" ><img src="images/newqhd_new.png" class="png"/></a></li>';
    headCode+='<li><a href="/qyj/index.aspx" ><img src="images/qyj_new.png" class="png"/></a></li>';
    headCode+='<li><a href="http://www.qipai.com/#/home/product/" target="_blank"><img src="images/newqpj_new.png" class="png"/></a></li>';
    headCode+='<li><a href="http://qipai.tmall.com/shop/view_shop.htm?prc=1" target="_blank"><img src="images/qsc_new.png" class="png"/></a></li>';
    headCode+='<li><a href="/vip/index.html"><img src="images/jfvip_new.png" class="png"/></a></li>';
    headCode+='</ol>';
    headCode+='<div class="clear"></div>';
    headCode+='</li>';
    headCode += '<li class="navr" id="logstate"><a href="#null" onclick="openSelectWindow(\'/member/login.aspx\',397,204);">登录</a>   <a href="/member/register.aspx?source=' + location.href.replace('#null', '') + '">注册</a></li>';
    headCode+='</ul>';
    headCode+='<div class="clear"></div>';
    headCode+='</div>';

    document.write(headCode);

}

function loadHead_memberInfo()
{
    var headCode = "";

    headCode+='<div class="nav">';
    headCode+='<ul>';
    headCode+='<li class="navl">';
    headCode+='<ol>';
    headCode+='<li><a href="/index.aspx"><img src="/images/newqyt.png" class="png"/></a></li>';
    headCode+='<li><a href="/qzz/index.aspx"><img src="/images/newqzz.png" class="png"/></a></li>';
    headCode+='<li><a href="/qhd/index.html" ><img src="/images/newqhd.png" class="png"/></a></li>';
    headCode+='<li><a href="/qyj/index.aspx" ><img src="/images/qyj.png" class="png"/></a></li>';
    headCode+='<li><a href="http://www.qipai.com/#/home/product/" target="_blank"><img src="/images/newqpj.png" class="png"/></a></li>';
    headCode+='<li><a href="http://qipai.tmall.com/shop/view_shop.htm?prc=1" target="_blank"><img src="/images/qsc.png" class="png"/></a></li>';
    headCode+='<li><a href="/vip/index.html"><img src="/images/jfvip.png" class="png"/></a></li>';
    headCode+='</ol>';
    headCode+='<div class="clear"></div>';
    headCode+='</li>';
    headCode+='<li class="navr" id="logstate"><a href="#null" onclick="openSelectWindow(\'/member/login.aspx\',397,204);">登录</a>   <a href="/member/register.aspx?source=' + location.href.replace('#null', '') + '">注册</a></li>';
    headCode+='</ul>';
    headCode+='<div class="clear"></div>';
    headCode+='</div>';


    document.write(headCode);

}

function loadHead_Luntan()
{
    var headCode = "";

    headCode+='<div class="nav">';
    headCode+='<ul>';
    headCode+='<li class="navl">';
    headCode+='<ol>';
    headCode+='<li><a href="/index.aspx"><img src="/images/newqyt.png" class="png"/></a></li>';
    headCode+='<li><a href="/qzz/index.aspx"><img src="/images/newqzz.png" class="png"/></a></li>';
    headCode+='<li><a href="/qhd/index.html" ><img src="/images/newqhd.png" class="png"/></a></li>';
    headCode+='<li><a href="/qyj/index.aspx" ><img src="/images/qyj.png" class="png"/></a></li>';
    headCode+='<li><a href="http://www.qipai.com/#/home/product/" target="_blank"><img src="/images/newqpj.png" class="png"/></a></li>';
    headCode+='<li><a href="http://qipai.tmall.com/shop/view_shop.htm?prc=1" target="_blank"><img src="/images/qsc.png" class="png"/></a></li>';
    headCode+='<li><a href="/vip/index.html"><img src="/images/jfvip.png" class="png"/></a></li>';
    headCode+='</ol>';
    headCode+='<div class="clear"></div>';
    headCode+='</li>';
    headCode+='<li class="navr" id="logstate"><a href="#null" onclick="openSelectWindow(\'/member/login.aspx\',397,204);">登录</a>   <a href="/member/register.aspx?source=' + location.href.replace('#null', '') + '">注册</a></li>';
    headCode+='</ul>';
    headCode+='<div class="clear"></div>';
    headCode+='</div>';


    document.write(headCode);

}



function loadHead_qyj()
{
    var headCode = "";

    headCode+='<div class="nav">';
    headCode+='<ul>';
    headCode+='<li class="navl">';
    headCode+='<ol>';
    headCode+='<li><a href="/index.aspx"><img src="/images/newqyt.png" class="png"/></a></li>';
    headCode+='<li><a href="/qzz/index.aspx"><img src="/images/newqzz.png" class="png"/></a></li>';
    headCode+='<li><a href="/qhd/index.html" ><img src="/images/newqhd.png" class="png"/></a></li>';
    headCode+='<li><span><a href="/qyj/index.aspx" ><img src="/images/qyj.png" class="png"/></a></span></li>';
    headCode+='<li><a href="http://www.qipai.com/#/home/product/" target="_blank"><img src="/images/newqpj.png" class="png"/></a></li>';
    headCode+='<li><a href="http://qipai.tmall.com/shop/view_shop.htm?prc=1" target="_blank"><img src="/images/qsc.png" class="png"/></a></li>';
    headCode+='<li><a href="/vip/index.html"><img src="/images/jfvip.png" class="png"/></a></li>';
    headCode+='</ol>';
    headCode+='<div class="clear"></div>';
    headCode+='</li>';
    headCode+='<li class="navr" id="logstate"><a href="#null" onclick="openSelectWindow(\'/member/login.aspx\',397,204);">登录</a>   <a href="/member/register.aspx?source=' + location.href.replace('#null', '') + '">注册</a></li>';
    headCode+='</ul>';
    headCode+='<div class="clear"></div>';
    headCode+='</div>';

    document.write(headCode);

}

function loadHead_qhd()
{
    var headCode = "";

    headCode+='<div class="nav">';
    headCode+='<ul>';
    headCode+='<li class="navl">';
    headCode+='<ol>';
    headCode+='<li><a href="/index.aspx"><img src="/images/newqyt.png" class="png"/></a></li>';
    headCode+='<li><a href="/qzz/index.aspx"><img src="/images/newqzz.png" class="png"/></a></li>';
    headCode+='<li><span><a href="/qhd/index.html" ><img src="/images/newqhd.png" class="png"/></a></span></li>';
    headCode+='<li><a href="/qyj/index.aspx" ><img src="/images/qyj.png" class="png"/></a></li>';
    headCode+='<li><a href="http://www.qipai.com/#/home/product/" target="_blank"><img src="/images/newqpj.png" class="png"/></a></li>';
    headCode+='<li><a href="http://qipai.tmall.com/shop/view_shop.htm?prc=1" target="_blank"><img src="/images/qsc.png" class="png"/></a></li>';
    headCode+='<li><a href="/vip/index.html"><img src="/images/jfvip.png" class="png"/></a></li>';
    headCode+='</ol>';
    headCode+='<div class="clear"></div>';
    headCode+='</li>';
    headCode+='<li class="navr" id="logstate"><a href="#null" onclick="openSelectWindow(\'/member/login.aspx\',397,204);">登录</a>   <a href="/member/register.aspx?source=' + location.href.replace('#null', '') + '">注册</a></li>';
    headCode+='</ul>';
    headCode+='<div class="clear"></div>';
    headCode+='</div>';

    document.write(headCode);

}


function loadHead_QzzPrize()
{
    var headCode="";
    headCode+="<div class=\"nav\">";
    headCode+="<ul>";
    headCode+="<li class=\"navl\">";
    headCode+="<ol>";
    headCode+='<li><a href="/index.aspx"><img src="/images/newqyt.png" class="png"/></a></li>';
    headCode+='<li><a href="/gdj/index.aspx"><img src="/images/newgdj.png" class="png"/></a></li>';
    headCode+='<li><a href="/qzz/index.aspx"><img src="/images/newqzz.png" class="png"/></a></li>';
    headCode+='<li><a href="/community/index.aspx" target="_blank"><img src="/images/newqlt.png" class="png"/></a></li>';
    headCode+='<li><a href="http://www.qipai.com/#/home/product/" target="_blank"><img src="/images/newqpj.png" class="png"/></a></li>';
    headCode+='<li><a href="/qhd/index.html" ><img src="/images/newqhd.png" class="png"/></a></li>';
    headCode+='<li><a href="/vip/index.html"><img src="/images/jfvip.png" class="png"/></a></li>';
    headCode+="</ol>";
    headCode+="<div class=\"clear\"></div>";
    headCode+="</li>";
    headCode+="<li class=\"navr\" id=\"logstate\"><a href=\"#null\" onclick=\"openSelectWindow('/member/login.aspx',397,204);\">登录</a> <a href=\"/member/register.aspx\">注册</a></li>";
    headCode+="</ul>";
    headCode+="<div class=\"clear\"></div>";
    headCode+="</div>";
    document.write(headCode);

}

function loadHead_QZZ()
{
    var headCode = "";

    headCode+='<div class="nav">';
    headCode+='<ul>';
    headCode+='<li class="navl">';
    headCode+='<ol>';
    headCode+='<li><a href="/index.aspx"><img src="/images/newqyt.png" class="png"/></a></li>';
    headCode+='<li><span><a href="/qzz/index.aspx"><img src="/images/newqzz.png" class="png"/></a></span></li>';
    headCode+='<li><a href="/qhd/index.html" ><img src="/images/newqhd.png" class="png"/></a></li>';
    headCode+='<li><a href="/qyj/index.aspx" ><img src="/images/qyj.png" class="png"/></a></li>';
    headCode+='<li><a href="http://www.qipai.com/#/home/product/" target="_blank"><img src="/images/newqpj.png" class="png"/></a></li>';
    headCode+='<li><a href="http://qipai.tmall.com/shop/view_shop.htm?prc=1" target="_blank"><img src="/images/qsc.png" class="png"/></a></li>';
    headCode+='<li><a href="/vip/index.html"><img src="/images/jfvip.png" class="png"/></a></li>';
    headCode+='</ol>';
    headCode+='<div class="clear"></div>';
    headCode+='</li>';
    headCode+='<li class="navr" id="logstate"><a href="#null" onclick="openSelectWindow(\'/member/login.aspx\',397,204);">登录</a>   <a href="/member/register.aspx?source=' + location.href.replace('#null', '') + '">注册</a></li>';
    headCode+='</ul>';
    headCode+='<div class="clear"></div>';
    headCode+='</div>';

    document.write(headCode);

}



function loadHead_vip()
{
    var headCode = "";

    headCode+='<div class="nav">';
    headCode+='<ul>';
    headCode+='<li class="navl">';
    headCode+='<ol>';
    headCode+='<li><a href="/index.aspx"><img src="/images/newqyt.png" class="png"/></a></li>';
    headCode+='<li><a href="/qzz/index.aspx"><img src="/images/newqzz.png" class="png"/></a></li>';
    headCode+='<li><a href="/qhd/index.html" ><img src="/images/newqhd.png" class="png"/></a></li>';
    headCode+='<li><a href="/qyj/index.aspx" ><img src="/images/qyj.png" class="png"/></a></li>';
    headCode+='<li><a href="http://www.qipai.com/#/home/product/" target="_blank"><img src="/images/newqpj.png" class="png"/></a></li>';
    headCode+='<li><a href="http://qipai.tmall.com/shop/view_shop.htm?prc=1" target="_blank"><img src="/images/qsc.png" class="png"/></a></li>';
    headCode+='<li><span><a href="/vip/index.html"><img src="/images/jfvip.png" class="png"/></a></span></li>';
    headCode+='</ol>';
    headCode+='<div class="clear"></div>';
    headCode+='</li>';
    headCode+='<li class="navr" id="logstate"><a href="#null" onclick="openSelectWindow(\'/member/login.aspx\',397,204);">登录</a>   <a href="/member/register.aspx?source=' + location.href.replace('#null', '') + '">注册</a></li>';
    headCode+='</ul>';
    headCode+='<div class="clear"></div>';
    headCode+='</div>';

    document.write(headCode);

}



function loadHead4()
{
    var headCode = "";

    headCode+='<div class="nav">';
    headCode+='<ul>';
    headCode+='<li class="navl">';
    headCode+='<ol>';
    headCode+='<li><a href="/index.aspx"><img src="/images/newqyt.png" class="png"/></a></li>';
    headCode+='<li><a href="/gdj/index.aspx"><img src="/images/newgdj.png" class="png"/></a></li>';
    headCode+='<li><a href="/qzz/index.aspx"><img src="/images/newqzz.png" class="png"/></a></li>';
    headCode+='<li><a href="/community/index.aspx" target="_blank"><img src="/images/newqlt.png" class="png"/></a></li>';
    headCode+='<li><a href="http://www.qipai.com/#/home/product/" target="_blank"><img src="/images/newqpj.png" class="png"/></a></li>';
    headCode+='<li><a href="/qhd/index.html" ><img src="/images/newqhd.png" class="png"/></a></li>';
    headCode+='<li><a href="/vip/index.html"><img src="/images/jfvip.png" class="png"/></a></li>';
    headCode+='</ol>';
    headCode+='<div class="clear"></div>';
    headCode+='</li>';
    headCode+='<li class="navr" id="logstate"><a href="#null" onclick="openSelectWindow(\'/member/login.aspx\',397,204);">登录</a>   <a href="/member/register.aspx?source=' + location.href.replace('#null', '') + '">注册</a></li>';
    headCode+='</ul>';
    headCode+='<div class="clear"></div>';
    headCode+='</div>';

    document.write(headCode);

}







function loadHead_Comunity(type)
{

    var typeCode="";
    
    
    if(type=="0")
    {
    typeCode="> <i>柒论坛</i> ";
    }

    if(type=="1")
    {
       typeCode=" > <a href=\"/community/index.aspx\">柒论坛</a> > <i>中华立领</i>";
    }
    if(type=="2")
    {
       typeCode=" > <a href=\"/community/index.aspx\">柒论坛</a>  > <i>潮流风尚</i>";
    }
    if(type=="3")
    {
       typeCode=" > <a href=\"/community/index.aspx\">柒论坛</a> > <i>励志人生</i>";
    }
    if(type=="4")
    {
       typeCode=" > <a href=\"/community/index.aspx\">柒论坛</a> > <i>先锋态度</i>";
    }
    if(type=="5")
    {
       typeCode=" > <a href=\"/community/index.aspx\">柒论坛</a> > <i>财智生活</i>";
    }
    if(type=="6")
    {
       typeCode=" > <a href=\"/community/index.aspx\">柒论坛</a> > <i>搜藏天下</i>";
    }
    if(type=="7")
    {
       typeCode=" > <a href=\"/community/index.aspx\">柒论坛</a> > <i>柒新闻</i>";
    }
    if(type=="8")
    {
       typeCode=" > <a href=\"/community/index.aspx\">柒论坛</a> > <i>柒活动</i>";
    }
    
    if(type=="11")
    {
       typeCode=" > <a href=\"/community/index.aspx\">柒论坛</a> > <a href=\"/community/thread.aspx?type=1\">中华立领</a> > <i>文章页</i>";
    }
    if(type=="22")
    {
       typeCode=" > <a href=\"/community/index.aspx\">柒论坛</a>  > <a href=\"/community/thread.aspx?type=2\">潮流风尚</a> > <i>文章页</i>";
    }
    if(type=="33")
    {
       typeCode=" > <a href=\"/community/index.aspx\">柒论坛</a> > <a href=\"/community/thread.aspx?type=3\">励志人生</a> > <i>文章页</i>";
    }
    if(type=="44")
    {
       typeCode=" > <a href=\"/community/index.aspx\">柒论坛</a> > <a href=\"/community/thread.aspx?type=4\">先锋态度</a> > <i>文章页</i>";
    }
    if(type=="55")
    {
       typeCode=" > <a href=\"/community/index.aspx\">柒论坛</a> > <a href=\"/community/thread.aspx?type=5\">财智生活</a> > <i>文章页</i>";
    }
    if(type=="66")
    {
       typeCode=" > <a href=\"/community/index.aspx\">柒论坛</a> > <a href=\"/community/thread.aspx?type=6\">搜藏天下</a> > <i>文章页</i>";
    }
    if(type=="77")
    {
       typeCode=" > <a href=\"/community/index.aspx\">柒论坛</a> > <a href=\"/community/thread.aspx?type=7\">柒新闻</a> > <i>文章页</i>";
    }
    if(type=="88")
    {
       typeCode=" > <a href=\"/community/index.aspx\">柒论坛</a> > <a href=\"/community/thread.aspx?type=8\">柒活动</a> > <i>文章页</i>";
    }


    var headCode = "";
    
    headCode += "<div class=\"forumnavej\"><div style=\"position:absolute;width:15px;height:6px;\"><div style=\"position:relative;left:245px;left:245px\9;_left:190px;*left:190px;top:0px;width:15px;height:6px;\"></div></div>";//<img src=\"/images/newjiao.gif\"/>
headCode += "<p><a href=\"#\">柒贤汇</a>"+typeCode+"</p>";
headCode += "</div>";
    
//    headCode+='<div class="nav">';
//    headCode+='<ul><li class="navl">';
//    headCode+='<p><a href="http://www.qipai.cn/"></a>  '+typeCode+'</p></li>';
//    headCode+='<li class="navr" id="logstate"><a href="#null" onclick="openSelectWindow(\'/member/login.aspx\',397,204);">登录</a>   <a href="/member/register.aspx?source=' + location.href.replace('#null', '') + '">注册</a></li>';
//    headCode+='</ul>';
//    headCode+='<div class="clear"></div></div>';


    document.write(headCode);

}


//页面加载完后判断用户是否有情登录
 jQuery(document).ready(function() {
    jQuery.ajax({ url:'/member/memberLogState.aspx',
		  type:"post",
		  dataType:"html",
		  data: "",
		  success:function(msg){
		      if(msg !="no")
		      {
		        jQuery("#logstate").html(msg);
		       
		      }
		  }        		
        });
    });

//注销
function postLogOut(){   
	jQuery.ajax({ url:  '/member/memberLogout.ashx',
		type:"post",
		dataType:"html",
		data: "",
		success:function(msg){
			//jQuery("#loginID").html(msg);
			if(msg == 'yes')
			{
			    window.location.reload();
			}
			else
			{
			    return false;
			}
		}
	});
}


function checkMemberLogion(){
 jQuery.ajax({ url:'/member/memberLogState.aspx',
		  type:"post",
		  dataType:"html",
		  data: "",
		  success:function(msg){
		      if(msg =="no")
		      {
		        alert('请先登录');
		        openSelectWindow('/member/login.aspx','397','204');
		        return false;
		      }
		  }        		
        });
}


function checkMemberLogionInvited(){
 jQuery.ajax({ url:'/member/memberLogState.aspx',
		  type:"post",
		  dataType:"html",
		  data: "",
		  success:function(msg){
		      if(msg =="no")
		      {
		        openSelectWindow('/member/login.aspx','397','204');
		        return false;
		      }
		      else
		      {
		        //老版本
		        window.location='InviteFried.aspx';
		        
//		        //新版本
//		        openSelectWindow('/campaign/man/InviteFriends.aspx','511','279');
//		        //openSelectWindow('/member/login.aspx','397','204');

		        
		      }
		  }        		
        });
}

function Footer(){
    var footCode="<div class=\"copyright\"><ul><li class=\"footl\"><img src=\"images/newlogob_new.jpg\" class=\"png\"/></li><li class=\"footr\">福建柒牌集团有限公司版权所有 2010 闽ICP备05016025号-2</li><li class=\"footrr\"><a href=\"http://www.qipai.com/\" target=\"_blank\">柒牌官网</a>&nbsp;|&nbsp;<a href=\"http://t.sina.com.cn/sevenbrand\" target=\"_blank\">柒牌微博</a>&nbsp;|&nbsp;<a href=\"/community/index.aspx\"  target=\"_blank\">柒牌论坛</a></li></ul><div class=\"clear\"></div></div>";
    
    document.write(footCode);


}
