   var isArticle = false;
  jQuery(document).ready(function(e){
    var ajax = new Ajax.Request(base + "/getUserHtml.jspa", {
    "method" :"post",
    "parameters" : "",
    "onSuccess" : function(data) {
        jQuery("#userhtml").html(data.responseText);
        // 更新点击率  -click.chinabeston.com -192.168.180.23:8080
        if (isArticle){
            doUpdateClickCounter("clickCounterFrame","http://click.chinabeston.com/skeletonClick/click","article",articleId);
        }
        function doUpdateClickCounter(frameId,path,bizCode,bizId){
            var userId;
            if (typeof(user) != 'undefined'){
                userId = user.id;
            }
            var url = window.location.href;
            var param;
            if(userId){
                param = jQuery.param({
                    "action" : "click",
                    "bizCode" : bizCode,
                    "bizId" : bizId,
                    "userId" : userId,
                    "projectCode" : "silkroad",
                    "url" : url 
                });
            }else{
                param = jQuery.param({
                    "action" : "click",
                    "bizCode" : bizCode,
                    "bizId" : bizId,
                    "projectCode" : "silkroad",
                    "url" : url
                });
            }
            document.getElementById(frameId).src=path+"?"+param;
        };
        if (typeof(user) != 'undefined'){
            // beatlet使用
            if ($("user.id")){
                $("user.id").value = user.id;
            }
            jQuery("#myquestion").html("<a href='/beat/ques!suzhouAsk.jspa'>我要提问</a>");
        }else{
            jQuery("#myquestion").click(function(e){
                e.preventDefault();
                jQuery.nyroModalManual({
                  width:'200',
                  height:'400',
                  url: base+'/poplogin.jspa?redirect='+document.URL
                });
                return false;
            });
            jQuery("#loginPop").click(function(e){
                e.preventDefault();
                jQuery.nyroModalManual({
                  width:'200',
                  height:'400',
                  url: base+'/poplogin.jspa?redirect='+document.URL
                });
                return false;
            });
            
            jQuery("#registerHref").click(function(e){
                e.preventDefault();
                jQuery.nyroModalManual({
                  url: base+'/register.jspa'
                });
                return false;
                
            });
        }
        jQuery("#cnport").hover(function(){
            $("chinaportUl").toggle();
        },function(){
            $("chinaportUl").toggle();
        });
    
        jQuery("#cnport2").hover(function(){
            $("chinaport2Ul").toggle();
        },function(){
            $("chinaport2Ul").toggle();
            });
        }.bind(this)
    });
    
  });
