function getElementPos(elementId) {
var ua = navigator.userAgent.toLowerCase();
var isOpera = (ua.indexOf('opera') != -1);
var isIE = (ua.indexOf('msie') != -1 && !isOpera); // not opera spoof
var el = document.getElementById(elementId);
if(el.parentNode === null || el.style.display == 'none') {
  return false;
}      
var parent = null;
var pos = [];     
var box;     
if(el.getBoundingClientRect)    //IE
{         
  box = el.getBoundingClientRect();
  var scrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop);
  var scrollLeft = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);
  return {x:box.left + scrollLeft, y:box.top + scrollTop};
}else if(document.getBoxObjectFor)    // gecko    
{
  box = document.getBoxObjectFor(el); 
  var borderLeft = (el.style.borderLeftWidth)?parseInt(el.style.borderLeftWidth):0; 
  var borderTop = (el.style.borderTopWidth)?parseInt(el.style.borderTopWidth):0; 
  pos = [box.x - borderLeft, box.y - borderTop]; 
} else    // safari & opera    
{
  pos = [el.offsetLeft, el.offsetTop];  
  parent = el.offsetParent;     
  if (parent != el) { 
   while (parent) {  
    pos[0] += parent.offsetLeft; 
    pos[1] += parent.offsetTop; 
    parent = parent.offsetParent;
   }  
  }   
  if (ua.indexOf('opera') != -1 || ( ua.indexOf('safari') != -1 && el.style.position == 'absolute' )) { 
   pos[0] -= document.body.offsetLeft;
   pos[1] -= document.body.offsetTop;         
  }    
}              
if (el.parentNode) { 
    parent = el.parentNode;
   } else {
    parent = null;
   }
while (parent && parent.tagName != 'BODY' && parent.tagName != 'HTML') { // account for any scrolled ancestors
  pos[0] -= parent.scrollLeft;
  pos[1] -= parent.scrollTop;
  if (parent.parentNode) {
   parent = parent.parentNode;
  } else {
   parent = null;
  }
}
return {x:pos[0], y:pos[1]};
}

function SelectType()
{
    var post=getElementPos("span_Industry");
    var text = "";//499 189 IE
    var h=-21;//507 177 FF
    if(document.getElementById("dh_bg_rightv2"))//第二种
    {
        if(document.all){//判断是否IE
            post.x=500;
            post.y=182;
        }   
    }else{
        if(document.all){//判断是否IE
            post.x=507;
            post.y=177;
        }
    }
    
    text += "<div class=\"list_class\" id='div_Industry' style='display:none; position: absolute;z-index:999999;top:"+(post.y-117)+"px; left:"+(post.x-150)+"px;' onmouseover=\"InitIndustry(this)\">";
    text += "<ul>";
    text += "<li><a  onclick=\"inputIndustry(1,'法律咨询')\" style=\"border:0px\">法律咨询</a></li>";
    text += "<li><a  onclick=\"inputIndustry(2,'律师')\" >律师</a></li>";
    text += "<li><a  onclick=\"inputIndustry(3,'律所')\">律所</a></li>";
    text += "<li><a  onclick=\"inputIndustry(4,'法律法规')\" >法律法规</a></li>";
    text += "<li><a  onclick=\"inputIndustry(5,'案例')\" style=\"border:0px\">案例</a></li>";
    text += "<li><a  onclick=\"inputIndustry(6,'常识')\">常识</a></li>";
    text += "<li><a  onclick=\"inputIndustry(7,'论文')\" >论文</a></li>";
    text += "<li><a  onclick=\"inputIndustry(8,'文书')\">文书</a></li>";
    text += "<li><a onclick=\"inputIndustry(9,'合同')\" style=\"border:0px\">合同</a></li>";
    text += "<li><a  onclick=\"inputIndustry(10,'法律词典')\" style=\"border:0px\">法律词典</a></li>";
    text += "</ul>"
    text += "</div>";

    document.write(text);
}


function SelectFenZhan()
{ 
    var post=getElementPos("toplogo2div");
    var h=post.y;
    //if(location.href=="http://www.148365.com/"){
        //h=post.y-150;
    //}
    //h=post.y-66;
    var text = "";
        text+="\<div style=\"top:"+h+"px; left: "+post.x+"px;position:absolute;z-index:999999; display:none\" id=\"h_qiehuan\" onmouseover=\"Initfenzhan(this)\">";
        text+="\<div style=\"background: rgb(243, 246, 250) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;\" id=\"h_qiehuan2\">";
        text+="<table class=\"areamenu\"><tr><td><ul id=\"tab1\">";
        text+="\<li style=\"width:150px;\"><span>A</span> -  <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('安徽',24)\">安徽</a> <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('澳门',3218)\">澳门</a> </li>";
        text+="\<li style=\"width:200px;\"><span>B</span> -  <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('北京',8)\" style=\"color:Red;\">北京</a> </li>";
        text+="\<li><span>C</span> -  <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('重庆',2)\">重庆</a> </li>";
        text+="\<li style=\"width:150px;\"><span>F</span> -  <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('福建',26)\">福建</a> </li>";
        text+="\<li style=\"width:200px;\"><span>G</span> -  <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('广东',19)\" style=\"color:Red;\">广东</a> <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('广西',10)\">广西</a> <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('甘肃',32)\">甘肃</a> <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('贵州',29)\">贵州</a> </li>";
        text+="\<li style=\"width:250px;\"><span>H</span> -  <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('河北',4)\">河北</a> <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('河南',13)\">河南</a> <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('湖南',22)\">湖南</a> <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('湖北',31)\">湖北</a> <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('海南',30)\">海南</a> <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('黑龙江',3)\" style=\"color:Red;\">黑龙江</a> </li>";
        text+="\<li style=\"width:150px;\"><span>J</span> -  <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('江苏',12)\" style=\"color:Red;\">江苏</a> <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('江西',16)\">江西</a> <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('吉林',20)\" style=\"color:Red;\">吉林</a> </li>";
        text+="\<li style=\"width:200px;\"><span>L</span> -  <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('辽宁',14)\">辽宁</a> </li>";
        text+="\<li><span>N</span> -  <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('内蒙古',15)\">内蒙古</a> <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('宁夏',1)\">宁夏</a> </li>";
        text+="\<li style=\"width:150px;\"><span>Q</span> -  <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('青海',9)\">青海</a> </li>";
        text+="\<li style=\"width:200px;\"><span>S</span> -  <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('上海',23)\" style=\"color:Red;\">上海</a> <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('四川',21)\">四川</a> <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('山西',28)\">山西</a> <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('山东',33)\">山东</a> <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('陕西',27)\">陕西</a> </li>";
        text+="\<li><span>T</span> -  <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('天津',11)\" style=\"color:Red;\">天津</a> <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('台湾',17)\">台湾</a> </li>";
        text+="\<li style=\"width:150px;\"><span>X</span> -  <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('新疆',7)\">新疆</a> <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('西藏',6)\">西藏</a> <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('香港',18)\">香港</a> </li>";
        text+="\<li style=\"width:200px;\"><span>Y</span> -  <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('云南',5)\">云南</a> </li>";
        text+="\<li><span>Z</span> -  <a onmouseover=\"qiehuanfenzhan()\" target=\"_self\" href=\"javascript:ghome('浙江',25)\" style=\"color:Red;\">浙江</a> </li> ";          
        text+="</ul></td></tr>";
//        text+="\<tr><td style=\"border-bottom:1px solid red; color:Red;\">热门城市:</td></tr>";
//        text+="\<tr style=\"height:30px;\"><td>&nbsp;&nbsp;";
//        text+="\<a href=\"http://www.148365.com/guangzhou/\" target=\"_parent\">广州</a>&nbsp;&nbsp;";
//        text+="\<a href=\"http://www.148365.com/shenzhen/\" target=\"_parent\">深圳</a>&nbsp;&nbsp;";
//        text+="\<a href=\"http://www.148365.com/hangzhou/\" target=\"_parent\">杭州</a>&nbsp;&nbsp;";
//        text+="\<a href=\"http://www.148365.com/jinan/\" target=\"_parent\">济南</a>&nbsp;&nbsp;";
//        text+="\<a href=\"http://www.148365.com/qingdao/\" target=\"_parent\">青岛</a>&nbsp;&nbsp;";
//        text+="\<a href=\"http://www.148365.com/dalian/\" target=\"_parent\">大连</a>&nbsp;&nbsp;";
//        text+="\<a href=\"http://www.148365.com/chengdu/\" target=\"_parent\">成都</a>&nbsp;&nbsp;";
//        text+="\<a href=\"http://www.148365.com/wuhan/\" target=\"_parent\">武汉</a>&nbsp;&nbsp;";
//        text+="\<a href=\"http://www.148365.com/suzhou/\" target=\"_parent\">苏州</a>&nbsp;&nbsp;";
//        text+="\<a href=\"http://www.148365.com/nanjing/\" target=\"_parent\">南京</a>&nbsp;&nbsp;";
//        text+="\<a href=\"http://www.148365.com/shenyang/\" target=\"_parent\">沈阳</a>&nbsp;&nbsp;";
//        text+="\<a href=\"http://www.148365.com/kunming/\" target=\"_parent\">昆明</a>&nbsp;&nbsp;";
//        text+="\<a href=\"http://www.148365.com/xian/\" target=\"_parent\">西安</a>&nbsp;&nbsp;";
//        text+="\<a href=\"http://www.148365.com/zhengzhou/\" target=\"_parent\">郑州</a>";
//        text+="</td></tr>";
        text+="</table></div>"
       
    document.write(text);
}

function showNewTop(areaid){
    ShowADS2(areaid);
}

//最先显示的几个广告位
function ShowADS(){
//if(document.getElementById('hotkeyv2')){
//        document.getElementById('hotkeyv2').innerHTML="<font style='color:#ffff00;font-size:14px'>北京一流律师团队代理全国刑事、合同、工程、房产、婚姻各类疑难大案  电话：13366369663</font>";
//    }
    
    var areaid=0;
    if(location.search.indexOf('a')!=-1){
	    if(!isNaN(parseInt(location.search.split('=')[1]))){	    
	        areaid=parseInt(location.search.split('=')[1]);
	    }
    }
    else{
        if(GetAreaCookie('UserAreaID')==-1){ 
            loadScript("http://reg.148365.com/toolbar/GetAreaID.aspx");
            return;
            
        }else{
            areaid=GetAreaCookie('UserAreaID');
        }
    }
    if(areaid==0||areaid==-1)areaid=8;
    //LOGO右侧
    if(document.getElementById('topadv')){
        $('#topadv').attr('src','http://pic.148365.com/lawyer/topad/NewTopAd_'+areaid+'.htm');
    }
    
    //通栏广告
    if(document.getElementById('tonglan')){
        $('#tonglan').attr('src','http://pic.148365.com/www/ControlIndex/TongLanv3_'+areaid+'.htm');
    }
    //首席律师
    if(document.getElementById('homeadlawyer')){
        $('#homeadlawyer').attr('src','http://pic.148365.com/www/ControlIndex/HomeADLawyer_'+areaid+'.htm');
    }
    //头条右侧
    if(document.getElementById('topicRightad')){
        $('#topicRightad').attr('src','http://lawyer.148365.com/topad/topicright.aspx?areaid='+areaid);
    }
    //第一个横幅
    if(document.getElementById('topads0')){
        $('#topads0').attr('src','http://lawyer.148365.com/topad/advicetop.aspx?areaid='+areaid);
    }
    
    //第二个横幅
    if(document.getElementById('topads1')){
        $('#topads1').attr('src','http://lawyer.148365.com/TopAD/ServerNextAd.aspx?areaid='+areaid);
    }
    
    
    //今日之星
    if(document.getElementById('todaystar')){
        $('#todaystar').attr('src','http://www.148365.com/ControlIndex/NewTodayStar.aspx?areaid='+areaid);
    }
    //公益律师广告
    if(document.getElementById('gongyi')){
        //$('#gongyi').attr('src','http://www.148365.com/CommendLawyer/CommendLawyer3v.aspx?a='+areaid);
    }
    //推荐律师链接
    if(document.getElementById("headtuiguang")){
        $('#headtuiguang').attr('href','http://lawyer.148365.com/');
    }
    
}
//最先显示的几个广告位
function ShowADS2(areaid){
if(areaid==0||areaid==-1)areaid=8;
//if(document.getElementById('hotkeyv2')){
//        document.getElementById('hotkeyv2').innerHTML="<font style='color:#ffff00;font-size:14px'>北京一流律师团队代理全国刑事、合同、工程、房产、婚姻各类疑难大案  电话：13366369663</font>";
//    }
    //LOGO右侧
    if(document.getElementById('topadv')){
        $('#topadv').attr('src','http://pic.148365.com/lawyer/topad/NewTopAd_'+areaid+'.htm');
    }
    
    //通栏广告
    if(document.getElementById('tonglan')){
        $('#tonglan').attr('src','http://pic.148365.com/www/ControlIndex/TongLanv3_'+areaid+'.htm');
    }
    //首席律师
    if(document.getElementById('homeadlawyer')){
        $('#homeadlawyer').attr('src','http://pic.148365.com/www/ControlIndex/HomeADLawyer_'+areaid+'.htm');
    }
    //头条右侧
    if(document.getElementById('topicRightad')){
        $('#topicRightad').attr('src','http://lawyer.148365.com/topad/topicright.aspx?areaid='+areaid);
    }
    
    //第一个横幅
    if(document.getElementById('topads0')){
        $('#topads0').attr('src','http://lawyer.148365.com/topad/advicetop.aspx?areaid='+areaid);
    }
    
    //第二个横幅
    if(document.getElementById('topads1')){
        $('#topads1').attr('src','http://lawyer.148365.com/TopAD/ServerNextAd.aspx?areaid='+areaid);
    }
    
    //今日之星
    if(document.getElementById('todaystar')){
        $('#todaystar').attr('src','http://www.148365.com/ControlIndex/NewTodayStar.aspx?areaid='+areaid);
    }
    //公益律师广告
    if(document.getElementById('gongyi')){
        //$('#gongyi').attr('src','http://www.148365.com/CommendLawyer/CommendLawyer3v.aspx?a='+areaid);
    }
    //推荐律师链接
    if(document.getElementById("headtuiguang")){
        $('#headtuiguang').attr('href','http://lawyer.148365.com/');
    }
    
}


function SelectMemu(e)
{
    var as = document.getElementById("divMemu").getElementsByTagName("a");
    for(var i = 0;i < as.length; i ++)
    {
        as[i].className = "";
        as[i].style.color = "";
    }
    if(as[e])
    {
        as[e].className = "top_chick";
        as[e].style.color = "White";
        as[e].style.fontSize = "14px";
    }
}

var href="http://so.148365.com/SearchV2.aspx?Channel=4&Field=0&Query=@con@";
function inputIndustry(ty,te)
{
var id=ty-1;
switch(id)
    {
        case 0:{href='http://so.148365.com/SearchV2.aspx?Channel=4&Field=0&Query=@con@';break;}
        case 1:{href='http://lawyer.148365.com/';break;}
        case 2:{href='http://lawyer.148365.com/office/';break;}
        case 3:{href='http://so.148365.com/SearchV2.aspx?Channel=0&Field=0&Query=@con@';break;}
        case 4:{href='http://so.148365.com/SearchV2.aspx?Channel=1&Field=0&Query=@con@';break;}
        case 5:{href='http://so.148365.com/SearchV2.aspx?Channel=6&Field=0&Query=@con@';break;}
        case 6:{href='http://so.148365.com/SearchV2.aspx?Channel=3&Field=0&Query=@con@';break;}
        case 7:{href='http://so.148365.com/SearchV2.aspx?Channel=7&Field=0&Query=@con@';break;}
        case 8:{href='http://so.148365.com/SearchV2.aspx?Channel=8&Field=0&Query=@con@';break;}
        case 9:{href='http://so.148365.com/SearchV2.aspx?Channel=13&Field=0&Query=@con@';break;}
    }
    if(id==1||id==2)
    {
        window.open(href);
    }

    var o1 = document.getElementById("span_Industry");
    var o2 = document.getElementById("input_Industry");
    
    o1.innerHTML = te;
    o2.value = ty;
    
    if(te != "所有行业")
    {
        o1.style.color = "#000000";
    }
    else
    {
        o1.style.color = "#999999";
    }
    
    document.getElementById("div_Industry").style.display = "none";
}

function InitIndustry(obj)
{
    var o1 = document.getElementById("div_Industry");
    o1.style.display = "block";

    obj.onmouseout = function()
    {
        o1.style.display = "none";
    }
}
function fenzhanshow(obj)
{
    var o1 = document.getElementById("div_Industry");
    o1.style.display = "block";

    obj.onmouseout = function()
    {
        o1.style.display = "none";
    }
}
var initKeyText = "请输入关键词";

function initKey(obj)
{
    if(obj.value == initKeyText)
    {
        obj.value = "";
    }
    obj.onblur = function()
    {
        if(this.value == "" || this.value == initKeyText)
        {
            this.value = initKeyText;
            this.className = "input_1";
        }
    }
    obj.onkeyup = function()
    {
        this.className = "input_1";
    }
    
    obj.onkeydown = function()
    {
//        if(event.keyCode == "13")
//        {
//            goSearch();
//        }
    }
}

function goSearch()
{
       var content=document.getElementById('input_SearchKey').value;
       if(content=="请输入关键词"){
            alert(content);
            return;
       }
       if(content!="")
       {
           href=href.replace("@con@",escape(content));
           window.open(href);
       }
       else
       {
            alert('搜索内容不可以为空！');
            return;
       }
}


function tab(name,num,count)
{
    if(name=="social")
    {
        if(num==4)
            document.getElementById("shouxidiv").style.display="none";
        else
            document.getElementById("shouxidiv").style.display="block";
    }
    for(var i=1;i<=count;i++){
        document.getElementById(name+i).className="";
        document.getElementById(name+"_cont"+i).style.display="none";
    }
    document.getElementById(name+num).className="current";
    document.getElementById(name+"_cont"+num).style.display="";
}

function Initfenzhan(obj)
{
    var o2=document.getElementById("h_qiehuan");
    o2.style.display="block";
    obj.onmouseout = function()
    {
        o2.style.display = "none";
    }
}
function qiehuanfenzhan()
{
    var o2=document.getElementById("h_qiehuan");
    o2.style.display="block";
    obj.onmouseout = function()
    {
        o2.style.display = "none";
    }
}
function ghome(name,id){    
    if(self.top){
    self.top.location.href = 'http://www.148365.com/?a=' + id;
    }else{
    location.href = 'http://www.148365.com/?a=' + id;
    }
    return;
    var path='';
    if(id==1){
        path='/nx/';
    }else if(id==2){
        path='/cq/';
    }else if(id==3){
        path='/hlj/';
    }else if(id==4){
        path='/hebei/';
    }else if(id==5){
        path='/yn/';
    }else if(id==6){
        path='/xz/';
    }else if(id==7){
        path='/xj/';
    }else if(id==8){
        path='/bj/';
    }else if(id==9){
        path='/qh/';
    }else if(id==10){
        path='/gx/';
    }else if(id==11){
        path='/tj/';
    }else if(id==12){
        path='/js/';
    }else if(id==13){
        path='/henan/';
    }else if(id==14){
        path='/ln/';
    }else if(id==15){
        path='/nmg/';
    }else if(id==16){
        path='/jx/';
    }else if(id==17){
        path='/tw/';
    }else if(id==18){
        path='/xg/';
    }else if(id==19){
        path='/gd/';
    }else if(id==20){
        path='/jl/';
    }else if(id==21){
        path='/sc/';
    }else if(id==22){
        path='/hunan/';
    }else if(id==23){
        path='/sh/';
    }else if(id==24){
        path='/ah/';
    }else if(id==25){
        path='/zj/';
    }else if(id==26){
        path='/fj/';
    }else if(id==27){
        path='/sx/';
    }else if(id==28){
        path='/shanxi/';
    }else if(id==29){
        path='/gz/';
    }else if(id==30){
        path='/hainan/';
    }else if(id==31){
        path='/hubei/';
    }else if(id==32){
        path='/gs/';
    }else if(id==33){
        path='/sd/';
    }else if(id==3218){
        path='/am/';
    }
    if(self.top){
    self.top.location.href = 'http://www.148365.com' + path;
    }else{
    location.href = 'http://www.148365.com' + path;
    }
}

function ShowTag(obj,n)
{
  obj.style.fontWeight='bold';
    
  document.getElementById("abc0").style.display="none";
  
  var a='A';
  document.getElementById("abc"+a).style.display="none";

  for(var tmp=0;tmp<25;tmp++){
    var t=a.charCodeAt(0)
    t++;
    a=String.fromCharCode(t);
    document.getElementById("abc"+a).style.display="none";
  }
 
  document.getElementById("abc"+n).style.display="";
}
function AddAdvice()
{
	var txt=document.getElementById("AdviceCont").value;
var hf="http://ask.148365.com/addadvice.aspx?title="+escape(txt);
window.open(hf);
}
//显示用户信息页广告
function ShowUserInfoAD(){
//    if(document.getElementById('hotkeyv2')){
//            document.getElementById('hotkeyv2').innerHTML="<font style='color:#ffff00;font-size:14px'>北京一流律师团队代理全国刑事、合同、工程、房产、婚姻各类疑难大案  电话：13366369663</font>";
//        }
    
    var areaid=0;
    if(GetAreaCookie('UserAreaID')==-1){
        loadScript("http://reg.148365.com/toolbar/GetAreaID.aspx?method=ShowUserInfoAD2");
        return;
        
    }else{
        areaid=GetAreaCookie('UserAreaID');
   }
    if(areaid==0||areaid==-1)areaid=8;
    //LOGO右侧
    if(document.getElementById('topadv')){
        $('#topadv').attr('src','http://pic.148365.com/lawyer/topad/NewTopAd_'+areaid+'.htm');
    }
    //通栏广告
    if(document.getElementById('tonglan')){
        $('#tonglan').attr('src','http://pic.148365.com/www/ControlIndex/TongLanv3_'+areaid+".htm");
    }
    //推荐律师链接
    if(document.getElementById("headtuiguang")){
        $('#headtuiguang').attr('href','http://lawyer.148365.com/');
    }
}
//当取不到cookie时，二次加载用此方法
function ShowUserInfoAD2(areaid){
if(areaid==0||areaid==-1)areaid=8;
//    if(document.getElementById('hotkeyv2')){
//            document.getElementById('hotkeyv2').innerHTML="<font style='color:#ffff00;font-size:14px'>北京一流律师团队代理全国刑事、合同、工程、房产、婚姻各类疑难大案  电话：13366369663</font>";
//        }
        

    //LOGO右侧
    if(document.getElementById('topadv')){
        $('#topadv').attr('src','http://pic.148365.com/lawyer/topad/NewTopAd_'+areaid+'.htm');
    }
    //通栏广告
    if(document.getElementById('tonglan')){
        $('#tonglan').attr('src','http://pic.148365.com/www/ControlIndex/TongLanv3_'+areaid+".htm");
    }
    //推荐律师链接
    if(document.getElementById("headtuiguang")){
        $('#headtuiguang').attr('href','http://lawyer.148365.com/');
    }
}

//window.onload =function() {
//    if(document.getElementById('hotkeyv2')){
//        document.getElementById('hotkeyv2').innerHTML="<font style='color:#ffff00;font-size:14px'>北京一流律师团队代理全国刑事、合同、工程、房产、婚姻各类疑难大案  电话：13366369663</font>";
//    }
//}
function getonlineuser(){
		var numY;
		var numP;
		var D = new Date();
		hours = D.getHours();
		
		var oldDate=new Date();
		oldDate.setFullYear(2008,11,25);
		
		var n=parseInt((D-oldDate)/(24*3600*1000));
		var lawyersumcount=100322+(5*n);
		var officesumcount=11176+(2*n);
		var gongzhongsumcount=379273+(75*n);
		
		switch(hours){
			case 0:
			numP = 8000;	
			numY = 150;
			gongzhongsumcount=gongzhongsumcount+2;
			break;
			case 1:
			numP = 7000;	
			numY = 130;
			gongzhongsumcount=gongzhongsumcount+4;
			break;
			case 2:
			numP = 6000;	
			numY =100;
			gongzhongsumcount=gongzhongsumcount+4;
			break;
			case 3:
			numP = 5000;	
			numY = 80; 
			gongzhongsumcount=gongzhongsumcount+6;
			break;
			case 4:
			numP = 4000;	
			numY = 50; 
			gongzhongsumcount=gongzhongsumcount10;
			break;
			case 5:
			numP = 4000;	
			numY = 50; 
			gongzhongsumcount=gongzhongsumcount+15;
			break;
			case 6:
			numP = 8000;	
			numY = 100;
			lawyersumcount=lawyersumcount+1;
			gongzhongsumcount=gongzhongsumcount+20;
			break;
			case 7:
			numP = 10000;	
			numY = 120;
			lawyersumcount=lawyersumcount+1;
			gongzhongsumcount=gongzhongsumcount+25;
			break;
			case 8:
			numP = 12000;	
			numY = 150;
			lawyersumcount=lawyersumcount+2;
			gongzhongsumcount=gongzhongsumcount+30;
			break;
			case 9:
			numP = 15000;	
			numY = 230;
			lawyersumcount=lawyersumcount+2;
			gongzhongsumcount=gongzhongsumcount+35;
			officesumcount=officesumcount+1;
			break;
			case 10:
			numP = 16000;	
			numY = 280;
			lawyersumcount=lawyersumcount+2;
			gongzhongsumcount=gongzhongsumcount+40;
			officesumcount=officesumcount+1;
			break;
			case 11:
			numP = 18000;	
			numY = 350;
			lawyersumcount=lawyersumcount+3;
			gongzhongsumcount=gongzhongsumcount+45;
			officesumcount=officesumcount+1;
			break;
			case 12:
			numP = 15000;	
			numY = 330;
			lawyersumcount=lawyersumcount+3;
			gongzhongsumcount=gongzhongsumcount+45;
			officesumcount=officesumcount+1;
			break;
			case 13:
			numP = 12000;	
			numY = 300; 
			lawyersumcount=lawyersumcount+3;
			gongzhongsumcount=gongzhongsumcount+45;
			officesumcount=officesumcount+1;
			break;
			case 14:
			numP = 15000;	
			numY = 400; 
			lawyersumcount=lawyersumcount+3;
			gongzhongsumcount=gongzhongsumcount+45;
			officesumcount=officesumcount+1;
			break;
			case 15:
			numP = 18000;	
			numY = 430; 
			lawyersumcount=lawyersumcount+3;
			gongzhongsumcount=gongzhongsumcount+50;
			officesumcount=officesumcount+1;
			break;
			case 16:
			numP = 20000;	
			numY = 500; 
			lawyersumcount=lawyersumcount+4;
			gongzhongsumcount=gongzhongsumcount+55;
			officesumcount=officesumcount+2;
			break;
			case 17:
			numP = 18000;	
			numY = 410; 
			lawyersumcount=lawyersumcount+4;
			gongzhongsumcount=gongzhongsumcount+60;
			officesumcount=officesumcount+2;
			break;
			case 18:
			numP = 15000;	
			numY = 370;
			lawyersumcount=lawyersumcount+4;
			gongzhongsumcount=gongzhongsumcount+60;
			officesumcount=officesumcount+2;
			break;
			case 19:
			numP = 10000;	
			numY = 300; 
			lawyersumcount=lawyersumcount+4;
			gongzhongsumcount=gongzhongsumcount+65;
			officesumcount=officesumcount+2;
			break;
			case 20:
			numP = 13000;	
			numY = 300; 
			lawyersumcount=lawyersumcount+5;
			gongzhongsumcount=gongzhongsumcount+70;
			officesumcount=officesumcount+2;
			break;
			case 21:
			numP = 15000;	
			numY = 320; 
			lawyersumcount=lawyersumcount+5;
			gongzhongsumcount=gongzhongsumcount+70;
			officesumcount=officesumcount+2;
			break;
			case 22:
			numP = 12000;	
			numY = 280; 
			lawyersumcount=lawyersumcount+5;
			gongzhongsumcount=gongzhongsumcount+75;
			officesumcount=officesumcount+2;
			break;
			case 23:
			numP = 8000;	
			numY = 200; 
			lawyersumcount=lawyersumcount+5;
			gongzhongsumcount=gongzhongsumcount+75;
			officesumcount=officesumcount+2;
			break;
			default:
			num = 0
			break;
		}
		return numY+parseInt(10*Math.random());
}
function showYesterdayAdvice(dat)
{
    if(dat!=""){
        var dats=dat.split('|');
        var date=new Date();
        
        var count=parseInt(date.getTime()/180000-6330000);
  
        var online=getonlineuser();
        
        document.getElementById('hotkeyv2').innerHTML="已有 "+count+" 人在此解决了法律问题 今日法律咨询："+dats[0]+" 昨日法律咨询："+dats[1]+" 当前在线 "+online+" 位律师";
    }
}
function ShowHotSkill(areaID)
{
    var info="专长律师：<a href='http://lawyer.148365.com/beijingp"+areaID+"s1.html' target='_blank'>债务债权</a>&nbsp;";
    info+="<a href='http://lawyer.148365.com/beijingp"+areaID+"s4.html' target='_blank'>婚姻家庭</a>&nbsp;";
    info+="<a href='http://lawyer.148365.com/beijingp"+areaID+"s8.html' target='_blank'>刑事辩护</a>&nbsp;";
    info+="<a href='http://lawyer.148365.com/beijingp"+areaID+"s13.html' target='_blank'>公司法务</a>&nbsp;";
    info+="<a href='http://lawyer.148365.com/beijingp"+areaID+"s14.html' target='_blank'>合同纠纷</a>&nbsp;";
    info+="<a href='http://lawyer.148365.com/beijingp"+areaID+"s15.html' target='_blank'>劳动纠纷</a>&nbsp;";
    info+="<a href='http://lawyer.148365.com/beijingp"+areaID+"s32.html' target='_blank'>交通事故</a>&nbsp;";
    info+="<a href='http://lawyer.148365.com/beijingp"+areaID+"s23.html' target='_blank'>保险纠纷</a>&nbsp;";
    info+="<a href='http://lawyer.148365.com/beijingp"+areaID+"s25.html' target='_blank'>房地产</a>&nbsp;";
    info+="<a href='http://lawyer.148365.com/beijingp"+areaID+"s33.html' target='_blank'>医疗事故</a>&nbsp;";
    //info+="<a href='http://lawyer.148365.com/beijingp"+areaID+"s4.html' target='_blank'>消费维权</a>&nbsp;";
    document.getElementById('hotkeyv2').innerHTML=info;
}
window.onload =function() {
$("#divMemu").children(0).children(0).next().next().next().next().next().next().next().next().next().next().next().next().children(0).html("律师推广");
var hf="http://www.148365.com/yesterday.aspx";
//loadScript(hf);//显示咨询数量
ShowHotSkill(GetAreaCookie('UserAreaID'));

}