InitMessage();
var Config={
	TxRegPath:"http://reg.148365.com/js/loginbar.aspx",
	FyMsgPath:"http://reg.148365.com/toolbar/ReadNote.aspx",
	FyToolTip:"http://www.148365.com/commendlawyer/tooltip.aspx",
	RefreshNoteTimeLength:600,	//ȡ¶ŵʱ() ʱ+2 æʱ-2
	WaitMsg:60//Ϣͣȴʱ()
}
//Ӳ˵ݳʼ
var TxChildMenu = new Object();
TxChildMenu.navigation = new Array();
TxChildMenu.group = new Array();
TxChildMenu.friend = new Array();
TxChildMenu.finance = new Array();
TxChildMenu.setting = new Array();

TxChildMenu.navigation[0]= "ҳ,http://www.148365.com,_self,images/toolbar/www.gif";
TxChildMenu.navigation[1]= "̳,http://bbs.148365.com,_self,images/toolbar/bbs.gif";
TxChildMenu.navigation[2]= "ѯ,http://ask.148365.com,_self,images/toolbar/bbs.gif";
TxChildMenu.navigation[3]= ",http://data.148365.com,_self,images/toolbar/bbs.gif";
TxChildMenu.navigation[4]= "ȫվ,http://so.148365.com,_self,images/toolbar/bbs.gif";
TxChildMenu.navigation[5]= ",http://www.148365.com/person/default.aspx?frame=MsgXT,_blank,images/toolbar/message.gif";
TxChildMenu.navigation[6]= "ҳ,http://lawyer.148365.com/blog/,_blank,images/toolbar/bbs.gif";
//TxChildMenu.navigation[7]= "ͼ,http://photo.148365.com,_blank,images/toolbar/bbs.gif";

TxChildMenu.finance[0]= "˻,http://www.148365.com/person/default.aspx?frame=myBank,_blank,images/toolbar/bank.gif";	//javaScript:void(null)
TxChildMenu.finance[1]= ",http://www.148365.com/person/default.aspx?frame=Buy,_blank,images/toolbar/gold.gif";

TxChildMenu.setting[0]= ",http://www.148365.com/person/,_self,images/toolbar/mail.gif";
TxChildMenu.setting[1]= "Ϣ,http://www.148365.com/person/default.aspx?frame=userInfo,_self,images/toolbar/info.gif";
TxChildMenu.setting[2]= "޸ͷ,http://www.148365.com/person/default.aspx?frame=EditFace,_self,images/toolbar/face.gif";
TxChildMenu.setting[3]= "޸,http://www.148365.com/person/default.aspx?frame=EditPwd,_self,images/toolbar/pwd.gif";
TxChildMenu.setting[4]= "޸Ϣ,http://www.148365.com/person/default.aspx?frame=EditUserInfo,_self,images/toolbar/mail.gif";

function AddBookmark() {
    var title=document.title;
    var url=location.href;
    if (window.sidebar) window.sidebar.addPanel(title, url,"");
    else if( window.opera && window.print ){
    var mbm = document.createElement('a');
    mbm.setAttribute('rel','sidebar');
    mbm.setAttribute('href',url);
    mbm.setAttribute('title',title);
    mbm.click();}
    else if( document.all ) window.external.AddFavorite( url, title);
}
function SetHome(obj){
    vrl=parent.location.href;
    try{
        obj.style.behavior='url(#default#homepage)';obj.setHomePage(vrl);
    }
    catch(e){
        if(window.netscape) {
            try {
                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
            }  
            catch (e) { 
                alert("Ǹֱ֧Ϊҳַ롰about:configسȻ[signed.applets.codebase_principal_support]Ϊtrueղء԰ȫʾóɹ");  
            }
            var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
            prefs.setCharPref('browser.startup.homepage',vrl);
       }
    }
}

/*ɼ*/
function getRdmID(min,max){return parseInt(Math.random()*(max-min+1)+min);}
var firecord=getRdmID(1000000,9999999);
window.onfocus=function(){
	//עἤ
	//FyCookie_UpdateIsReading(firecord,365*24*60);
	FyCookie_ClearReading();
	Fy_ReadMsg();
}
/**/
/*showbox new  author:candy*/
function ShowBox(id,username,content,url,face,type){
	var obj=new Object();
	
	obj.id=id?id:0;
	if(username=='δ¼')username='ο';
	obj.title=username?'𾴵'+username+'':'𾴵ĻԱ';
	obj.content=content?content:'';
	obj.type=type;
	obj.url = url?url:'http://www.148365.com/person/showMsg.aspx?id='+obj.id+'&type='+(type==2?1:0); 
	obj.target='_blank';
	obj.width=990;
	obj.pagepos=0;
	obj.height=30;
	obj.top=-100;
	obj.faceid=face;
	obj.getfriendset=function(){		
		if(TxBBS_GetCookie("BFS")==null||TxBBS_GetCookie("BFS")==''){
			return 'true';
		}else{
			return TxBBS_GetCookie("BFS");
		}
	}
	
	obj.setfriendset=function(bl){
		var expDate = new Date();
		expDate.setTime(expDate.getTime()+365*24*60*60*1000);
		TxBBS_SetCookie("BFS",bl,expDate,"/",TxBBS_GetDomain(document.domain));
	}
	obj.getsysset=function(){		
		if(TxBBS_GetCookie("BSS")==null||TxBBS_GetCookie("BSS")==''){
			return 'true';
		}else{
			return TxBBS_GetCookie("BSS");
		}
	}
	obj.setsysset=function(bl){
		var expDate = new Date();
		expDate.setTime(expDate.getTime()+365*24*60*60*1000);
		TxBBS_SetCookie("BSS",bl,expDate,"/",TxBBS_GetDomain(document.domain));
	}
	obj.getapplication=function(){
		if(TxBBS_GetCookie("BA")==null||TxBBS_GetCookie("BA")==''){
			return 'true';
		}else{
			return TxBBS_GetCookie("BA");
		}
	}
	obj.getautohide=function(){
		if(TxBBS_GetCookie("BAH")==null||TxBBS_GetCookie("BAH")==''){
			return true;
		}else{
			return TxBBS_GetCookie("BAH");
		}
	}
	obj.getautohidetime=function(){
		if(TxBBS_GetCookie("BAHT")==null||TxBBS_GetCookie("BAHT")==''){
			return 40*1000;
		}else{
			return parseInt(TxBBS_GetCookie("BAHT"))*1000;
		}
	}
	obj.setapplication=function(bl){
		var expDate = new Date();
		expDate.setTime(expDate.getTime()+365*24*60*60*1000);
		TxBBS_SetCookie("BA",bl,expDate,"/",TxBBS_GetDomain(document.domain));
	}
	obj.setautohide=function(bl){
		var expDate = new Date();
		expDate.setTime(expDate.getTime()+365*24*60*60*1000);
		TxBBS_SetCookie("BAH",bl,expDate,"/",TxBBS_GetDomain(document.domain));
	}
	obj.setautohidetime=function(time){
		var expDate = new Date();
		expDate.setTime(expDate.getTime()+365*24*60*60*1000);
		TxBBS_SetCookie("BAHT",time,expDate,"/",TxBBS_GetDomain(document.domain));
	}
	obj.setshowtalk=function(bl){
		var expDate = new Date();
		expDate.setTime(expDate.getTime()+365*24*60*60*1000);
		TxBBS_SetCookie("BST",bl,expDate,"/",TxBBS_GetDomain(document.domain));
	}
	obj.getshowtalk=function(){
		if(TxBBS_GetCookie("BST")==null||TxBBS_GetCookie("BST")==''){
			return 'true';
		}else{
			return TxBBS_GetCookie("BST");
		}
	}
	obj.left=(screen.width-obj.width-20)/2;
	obj.box=document.createElement('div');	
	obj.boxcontent=document.createElement('div');
	obj.face=document.createElement('img');
	obj.link=document.createElement('a');
	obj.rightdiv=document.createElement('div');	
	obj.leftdiv=document.createElement('div');	
	obj.closebutton=document.createElement('span');
	obj.setbutton=document.createElement('span');
	
	obj.SetWindow;
	obj.BackDiv;
	obj.CreateDiv=function(){
		var div = document.createElement('div');
		div.style.height='20px';
		return div;
	}
	obj.CreateLabel=function(){
		return document.createElement('label');
	}
	obj.autohidetext=document.createElement('input');
	obj.showfriend=document.createElement('input');
	obj.showsys=document.createElement('input');
	obj.closebox=document.createElement('input');
	obj.talkbox=document.createElement('input');
	obj.ok=document.createElement('input');
	obj.talkok=document.createElement('a');
	obj.talkcannel=document.createElement('a');
	obj.cannel=document.createElement('input');
	obj.SetInit=function(){
		var me=this;
		this.SetWindow=document.createElement('div');
		this.SetWindow.style.width='300px';
	    this.SetWindow.style.height="200px";
	    this.SetWindow.style.backgroundColor="#fff";
	    this.SetWindow.style.border="1px solid #5C738C";
	    this.SetWindow.style.textAlign="center";
	    this.SetWindow.innerHTML='';
	    
	    var row=this.CreateDiv();
	    row.innerHTML='&nbsp;';
	    row.style.background='url(http://pic.148365.com/reg/images/toolbar/1.jpg)';
	    row.style.height='30px';
	    this.SetWindow.appendChild(row);
	    
	    
	    row=this.CreateDiv();
	    row.innerHTML='Ϣͣʱ()';
	    row.style.fontSize='12px';
	    this.autohidetext.type='text';
	    this.autohidetext.style.width='40px';
	    row.appendChild(this.autohidetext);
	    this.SetWindow.appendChild(row);
	    
	    row=this.CreateDiv();
	    this.showfriend.type='checkbox';
	    var l=this.CreateLabel();
	    l.innerHTML='ʾѶ';
	    l.style.fontSize='12px';
	    row.appendChild(this.showfriend);
	    row.appendChild(l);
	    this.SetWindow.appendChild(row);
	    
	    row=this.CreateDiv();
	    this.showsys.type='checkbox';
	    l=this.CreateLabel();
	    l.innerHTML='ʾϵͳ';
	    l.style.fontSize='12px';
	    row.appendChild(this.showsys);
	    row.appendChild(l);
	    this.SetWindow.appendChild(row);
	    
	    row=this.CreateDiv();
	    this.talkbox.type='checkbox';
	    l=this.CreateLabel();
	    l.innerHTML='쵯';
	    l.style.fontSize='12px';
	    row.appendChild(this.talkbox);
	    row.appendChild(l);
	    this.SetWindow.appendChild(row);
	    
	    row=this.CreateDiv();
	    this.closebox.type='checkbox';
	    l=this.CreateLabel();
	    l.innerHTML='رն';
	    l.style.fontSize='12px';
	    row.appendChild(this.closebox);
	    row.appendChild(l);
	    this.SetWindow.appendChild(row);
	    
	    row=this.CreateDiv();
	    this.ok.value="ȷ";
	    this.ok.type='button';
	    this.ok.onclick=function(){me.Set();}
	    row.appendChild(this.ok);
	    this.cannel.value="ȡ";
	    this.cannel.type='button';
	    this.cannel.onclick=function(){me.HideSet();}
	    row.appendChild(this.cannel);
	    this.SetWindow.appendChild(row);

	    this.BackDiv=document.createElement('div');
	    this.BackDiv.style.opacity="0.50";
	    this.BackDiv.style.filter="Alpha(opacity=50);";
	    this.BackDiv.style.backgroundColor="#CCCCCC";
	    this.BackDiv.style.height=document.body.scrollHeight+"px";
	    this.BackDiv.style.width="100%";
	    this.BackDiv.style.marginTop="0px";
	    this.BackDiv.style.marginLeft="0px";
	    this.BackDiv.style.position="absolute";
	    this.BackDiv.style.top="0px";
	    this.BackDiv.style.left="0px";
	    this.BackDiv.style.zIndex=10000;
	}
	obj.ShowSet=function(){
		this.SetInit();
		document.body.appendChild(this.BackDiv);
		document.body.appendChild(this.SetWindow);
	    this.autohidetext.value=this.getautohidetime()/1000;
	    if(this.getfriendset()=='true')this.showfriend.checked=true;
	    if(this.getsysset()=='true')this.showsys.checked=true;
	    if(this.getapplication()=='false')this.closebox.checked=true;
	    if(this.getshowtalk()=='true')this.talkbox.checked=true;
        this.SetWindow.style.position="absolute";
	    var x=document.body.clientWidth/2,y=document.body.clientHeight/2;
        x=x-this.SetWindow.clientWidth/2;
        y=y-this.SetWindow.clientHeight/2;
        this.SetWindow.style.top="300px";
        this.SetWindow.style.left=x+"px";
        this.SetWindow.style.zIndex=10001;
		this.SetWindow.style.display='';
		this.BackDiv.style.display='';
	}
	obj.HideSet=function(){
		this.SetWindow.style.display='none';
		this.BackDiv.style.display='none';
	}
	obj.HideTalk=function(){
		this.SetWindow.style.display='none';
		this.BackDiv.style.display='none';
	}
	obj.TalkInit=function(){
		var me=this;
		
	    this.SetWindow=document.createElement('div');
		this.SetWindow.style.width='400px';
	    this.SetWindow.style.height="150px";
	    this.SetWindow.style.backgroundColor="#fff";
	    this.SetWindow.style.border="1px solid #5C738C";
	    this.SetWindow.style.textAlign="center";
	    this.SetWindow.innerHTML='';
	    var row=this.CreateDiv();
	    row.innerHTML='&nbsp;';
	    row.style.background='url(http://pic.148365.com/reg/images/toolbar/1.jpg)';
	    row.style.height='30px';
	    this.SetWindow.appendChild(row);
	    
	    row=this.CreateDiv();
	    row.style.fontSize='14px';
	    row.style.lineHeight='20px';
	    row.style.padding='10px';
	    row.style.paddingBottom='30px';
	    row.style.textAlign='left';
	    row.innerHTML='<a style="color:#0000ff;text-decoration:none;" href="'+this.url+'" target="_blank">׼ʱͨʾ'+me.content+'</a>';
	    this.SetWindow.appendChild(row);
	    
	    
	    row=this.CreateDiv();
	    this.talkok.innerHTML="&nbsp;";
	    this.talkok.style.fontSize='14px';
	    this.talkok.style.marginRight='10px';
	    this.talkok.target='_blank';
	    this.talkok.href=me.url;
	    row.appendChild(this.talkok);
	    this.talkcannel.innerHTML="ȡ&nbsp;";
	    this.talkcannel.style.fontSize='14px';
	    this.talkcannel.style.marginLeft='10px';
	    this.talkcannel.href='javascript:void(0)';
	    this.talkcannel.onclick=function(){me.HideTalk();}
	    row.appendChild(this.talkcannel);
	    this.SetWindow.appendChild(row);
	    
	    this.BackDiv=document.createElement('div');
	    this.BackDiv.style.opacity="0.50";
	    this.BackDiv.style.filter="Alpha(opacity=50);";
	    this.BackDiv.style.backgroundColor="#CCCCCC";
	    this.BackDiv.style.height=document.body.scrollHeight+"px";
	    this.BackDiv.style.width="100%";
	    this.BackDiv.style.marginTop="0px";
	    this.BackDiv.style.marginLeft="0px";
	    this.BackDiv.style.position="absolute";
	    this.BackDiv.style.top="0px";
	    this.BackDiv.style.left="0px";
	    this.BackDiv.style.zIndex=10000;
	}
	obj.ShowTalk=function(){
		this.TalkInit();
		document.body.appendChild(this.BackDiv);
		document.body.appendChild(this.SetWindow);
        this.SetWindow.style.position="absolute";
	    var x=document.body.clientWidth/2,y=document.body.clientHeight/2;
        x=x-this.SetWindow.clientWidth/2;
        y=y-this.SetWindow.clientHeight/2;
        this.SetWindow.style.top="300px";
        this.SetWindow.style.left=x+"px";
        this.SetWindow.style.zIndex=10001;
		this.SetWindow.style.display='';
		this.BackDiv.style.display='';
	}
	obj.Set=function(){
		var t=this.autohidetext.value;
		if(parseInt(t)){
			if(parseInt(t)>60) t=60;
			if(parseInt(t)<3)t=3;
			this.setautohidetime(t);
		}
		if(!this.showfriend.checked)this.setfriendset(false);
		else this.setfriendset(true);
		if(!this.showsys.checked)this.setsysset(false);
		else this.setsysset(true);
		if(this.closebox.checked)this.setapplication(false);
		else this.setapplication(true);
		if(!this.talkbox.checked)this.setshowtalk(false);
		else this.setshowtalk(true);
		this.HideSet();
	}
	obj.opacity=8;
	obj.timer=null;
	obj.floattimer=null;
	obj.speed=10;
	obj.pause=false;
	obj.close=false;
	obj.Down=function(){
		var me=this;
		this.box.style.top=(this.pagepos+this.top)+'px';
		var fun = function(){ 
			if(me.pause==false){
				if(parseInt(me.box.style.top)>=me.pagepos){
					window.clearInterval(me.timer);
					me.Float();
					if(me.getautohide()){
						if(me.timer)window.clearInterval(me.timer);	
						me.timer=window.setTimeout(function(){me.close=true;me.Up();},me.getautohidetime());
					}
				}else{
					me.box.style.top=(parseInt(me.box.style.top)+1)+'px';					
				}
			}
		}
		if(this.timer) window.clearInterval(this.timer);	
		this.timer = window.setInterval(fun,this.speed);
	}
	obj.Up=function(){
		var me=this;
		var fun = function(){ 
			if(me.pause==false){
				if(parseInt(me.box.style.width)<=0&&parseInt(me.box.style.height)<=0){
					me.Hide();
					window.clearInterval(me.timer);	
					window.clearTimeout(me.floattimer);
					me=null;					
				}else{
					me.box.style.width=(parseInt(me.box.style.width)-66)+'px';
					me.box.style.height=(parseInt(me.box.style.height)-2)+'px';
				}
			}
		}
		if(this.timer) window.clearInterval(this.timer);
		this.timer = window.setInterval(fun,this.speed);
	}
	obj.Hide=function(){
		this.box.style.display='none';		
	}
	obj.Init=function(){

		if(this.url.toLowerCase().indexOf('online.aspx')!=-1){
			if(this.getshowtalk()=='true') this.ShowTalk();
	
		}
		
		if(this.getapplication()=='false') return;
		if(this.type==1){
			if(this.getsysset()=='false') return;
		}
		
		if(this.type==2){
			if(this.getfriendset()=='false') return;
		}
		
		if(typeof window.pageYOffset!='undefined')this.pagepos=window.pageYOffset;

		else if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat') this.pagepos=document.documentElement.scrollTop;
		
		else if(typeof document.body!='undefined') this.pagepos=document.body.scrollTop;
		
		else this.pagepos=0;
		
		var me=this;
		this.box.style.width=this.width+'px';
		this.box.style.height=this.height+'px';
		this.box.style.filter='alpha(opacity='+this.opacity+'0)';
		this.box.style.opacity='0.'+this.opacity;
		this.box.style.position='absolute';
		this.box.style.top=(this.pagepos+this.top)+'px';
		this.box.style.left=this.left+'px';
		this.box.style.background='url(http://pic.148365.com/reg/images/toolbar/1.jpg)';
		//this.box.style.border='1px #cdcdcd solid';
		this.box.style.padding='0px';
		this.box.style.fontSize='14px';
		this.box.style.lineHeight='170%';
		this.box.style.whiteSpace='nowrap';
		this.box.style.overflow='hidden';
		this.box.onmouseover=function(){if(me.close){me.pause=false;}else{me.pause=true;}}
		this.box.onmouseout=function(){me.pause=false;}
		
		this.boxcontent.style.styleFloat='left';
		this.boxcontent.style.cssFloat='left';
		this.boxcontent.style.textAlign='center';
		this.boxcontent.style.width='920px';
		this.boxcontent.style.overflow='hidden';
		this.boxcontent.appendChild(this.face);
		this.boxcontent.appendChild(this.link);
		this.face.src='http://pic.148365.com/reg/images/qqface/'+this.faceid+'.gif';
		this.face.align="absmiddle";
		this.link.style.color='#fff';
		//this.link.style.textDecoration='underline';
		this.link.style.textDecoration='none';
		if(this.title!='') this.link.innerHTML=this.title+this.content+'&nbsp;&nbsp;>>';
		if(this.url!='') this.link.href=this.url;
		if(this.target!='')this.link.target=this.target;
		
		this.rightdiv.style.styleFloat='right';
		this.rightdiv.style.cssFloat='right';
		this.rightdiv.style.width='35px';
		
		this.leftdiv.style.styleFloat='left';
		this.leftdiv.style.cssFloat='left';
		this.leftdiv.style.width='35px';
		
		
		
		this.closebutton.style.textAlign='center';
		this.closebutton.style.width='30px';
		this.closebutton.style.fontSize='12px';
		this.closebutton.style.cursor='pointer';
		this.closebutton.style.color='#fff';
		this.closebutton.style.padding='1px';
		//this.closebutton.style.border='1px solid #fff';
		this.closebutton.style.marginLeft='3px';
		this.closebutton.innerHTML='ر';
		this.closebutton.onclick=function(){me.close=true;me.pause=false;me.Up();}
		
		this.setbutton.style.textAlign='center';
		this.setbutton.style.width='30px';
		this.setbutton.style.fontSize='12px';
		this.setbutton.style.cursor='pointer';
		this.setbutton.style.color='#fff';
		this.setbutton.style.padding='1px';
		//this.setbutton.style.border='1px solid #fff';
		this.setbutton.style.marginLeft='3px';
		this.setbutton.innerHTML='';
		this.setbutton.onclick=function(){me.ShowSet();}
		
		this.leftdiv.appendChild(this.setbutton);
		this.rightdiv.appendChild(this.closebutton);
		
		
		this.box.appendChild(this.leftdiv);
		this.box.appendChild(this.boxcontent);
		this.box.appendChild(this.rightdiv);
		
		if(document.body){
			document.body.appendChild(this.box);
		}
		
		this.Down();
	}
	obj.Float=function(){
		if(!this.close){
			var spos;
			var me=this;
			if(typeof window.pageYOffset!='undefined')spos=window.pageYOffset;
			else if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat') spos=document.documentElement.scrollTop;
			else if(typeof document.body!='undefined') spos=document.body.scrollTop;
			this.box.style.top=spos+'px';
			this.floattimer=setTimeout(function(){me.Float();},100);
		}
	}	
	
	obj.Init();	
	return obj;
}


/**/
var lastScript;
function loadScript(url){

var h=document.getElementsByTagName("head")[0];
var f=document.createElement("script");
var d=new Date().getTime();
f.type="text/javascript";
f.id=d;
if(url.indexOf('?')==-1){
f.src=url+'?'+d;
}else{
f.src=url+'&'+d;
}
h.appendChild(f);
if(lastScript&&g(lastScript)){
    if((new Date()).getTime()-lastScript>1000){
        g(lastScript).parentNode.removeChild(g(lastScript))
    }
};
lastScript=d;
}

/*end*/
/**/
function g(x){if(document.getElementById(x)){return document.getElementById(x);}else{return null}};
function TxTB_getRandom(){return "&dom=" + Math.random();}
function DateToStr(CurTime){return CurTime.getFullYear() + '-' + (CurTime.getMonth()+1) + '-' + CurTime.getDate() + ' ' + CurTime.getHours() + ':' + CurTime.getMinutes() + ':' + CurTime.getSeconds();}
function StrToDate(CompareTime){var reg = /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/;var r = CompareTime.match(reg);if(r==null){return new Date('1980','0','1','0','0','0');}else{return new Date(r[1], r[3]-1,r[4],r[5],r[6],r[7]);}}
function TrimStr(value){return value.replace(/(^\s*)|(\s*$)/g,"").replace(/(\s)\1+/g,' ');}
/*end*/
/*û*/
var TxTB_UserID = TxBBS_CurrentUserID();
var TxTB_UserName = TxBBS_CurrentUserName();
var Tx_NewMsgIsReading=0;
/*ûend*/
/**/
var isIE=false;
var isFireFox=false;
/*end*/
//var m_backurl= document.URL;
/*¼ע*/
function TxTB_UserLogout(){loadScript(Config.TxRegPath + "?FunName=Logout" + TxTB_getRandom());
}
function Tx_LogoutFinish(value){
	TxTB_UserID = 0;
	ResetUserLoginStatus();
	//Ż
	FyCookie_ClearMsg();
}
function TxTB_UserLogin(){
	if (g('_UserName').value.length<1) 
	{
		alert("ûIDΪ");
		g('_UserName').focus();return;
	}else if (g('_Password').value.length<1) 
	{
		alert("벻Ϊ");
		g('_Password').focus();return;
	}
	var temp="FunName=Login&LoginName="+ escape(g('_UserName').value) +"&Password="+g('_Password').value+"&ExpDT="+g('ExpDT').value;
	loadScript(Config.TxRegPath + "?" + temp + TxTB_getRandom());
}
function Tx_LoginFun(value){
	if (value!=""){	
		var arr = value.split("|");
		if (arr.length==2){
			if(arr[0]=="true"){
				TxTB_UserID = arr[1];
				TxTB_UserName = g('_UserName').value;
				ResetUserLoginStatus();
                if(TxBBS_CurrentUserType()==1){
                    g('GoMyWork').style.display='';
                    g('GoMyBlog').style.display='';
                    g('GoAskToMe').style.display='';
                }
			}
			else
				alert(arr[1]);
		}
		else if(arr.length==3)//ʦ¼
		{
		    if(arr[0]=="lawyer"){
				TxTB_UserID = arr[1];
				TxTB_UserName = g('_UserName').value;
				ResetUserLoginStatus();
                if(TxBBS_CurrentUserType()==1){
                    g('GoMyWork').style.display='';
                    g('GoMyBlog').style.display='';
                    g('GoAskToMe').style.display='';
                }
				//ת
				//location='http://reg.148365.com/recreg.aspx';
				//location="http://"+arr[2]+".148365.com/oa/home.aspx";
				//location='http://www.148365.com/person/freead.aspx';
				
//				if(location.href=="http://www.148365.com"){
//				    location=location.href;
//				}
//				else{
//				    location='http://www.148365.com/person/';
//				}
				
			}
			else if(arr[0]=="user"){//ͨû¼
			    TxTB_UserID = arr[1];
				TxTB_UserName = g('_UserName').value;
				ResetUserLoginStatus();  
				g('GoMyAdvice').style.display='';
				//location='http://www.148365.com/person/';
				
				//if(location.href=="http://www.148365.com"){
				    //location=location.href;
				//}
				//else{
				    //location='http://www.148365.com/person/';
				//}
				
				//ת
				/*
				if(arr[2]=='0'){
				    location="http://www.148365.com/admin/main.aspx";
				}else{
				    location="http://"+arr[2]+".148365.com/user/home.aspx";
				}
				*/
			}
			else if(arr[0]=="company"){
			    TxTB_UserID = arr[1];
				TxTB_UserName = g('_UserName').value;
				ResetUserLoginStatus();  
				g('GoMyAdvice').style.display='';
				if(location.href=="http://www.148365.com"){
				    location=location.href;
				}
				else{
				    location='http://www.148365.com/person/';
				}
				
				//location='http://www.148365.com/person/';
			}else
				alert(arr[1]);
		}
		else
			alert("Ӧʽ");
	}
}
/*õ¼״̬*/
function ResetUserLoginStatus(){

	if (TxTB_UserID == 0){
		g('TxLogin').style.display="";
		g('TxUserInfo').style.display="none";
	}else{
		g('TxLogin').style.display="none";
		g('TxUserInfo').style.display="";
		g('UserNameInfo').innerHTML = TxTB_UserName;
        if(TxBBS_CurrentUserType()==1){
            g('GoMyWork').style.display='';
            g('GoMyBlog').style.display='';
            g('GoAskToMe').style.display='';
        }
        else if(TxBBS_CurrentUserType()==0||TxBBS_CurrentUserType()==4){
            g('GoMyAdvice').style.display='';
            document.getElementById("TheUserInfo").innerHTML="˲";
        }
	}
	
}
/*¼end*/
/*¶Ų*/
var MSG;
var i=0;
/*״̬*/
function CheckIsReading(){
	try{
		if(FyCookie_GetIsReading()!=null){
			i++;
			if(FyCookie_GetIsReading()!=''){
				var isreadstr=FyCookie_GetIsReading().split('|');
				if(isreadstr[0]){
					var expDate = new Date();
					timespan=expDate.getTime()-StrToDate(isreadstr[1]).getTime();
					if(timespan>Config.WaitMsg*1000){
						if(isreadstr[2]==firecord){
							FyCookie_ClearReading();
							Fy_ReadMsg();
						}
							/*					
						if(isFireFox){
						    if(MSG){					        
						        window.clearInterval(MSG.timer); 
						        MSG.Pop.innerHTML="";
						        MSG.container.removeChild(MSG.Pop);
						    }
						}
						if(isIE){
						    if(MSG){
						    	if(!MSG.pause){
						    		Fy_ReadMsg();
						    	}
						    }else{
						    */
						    /*
						    }
						}*/
					}
				}
			}
		}
	}catch(e){
		window.status=e.description;
	}
	var t = window.setTimeout("CheckIsReading()",5000);
}
/*ʾҳ*/
function Fy_ShowPageMsg(msgid,msgtitle,msgcontent,msgtype,msgurl,msgface){
	FyCookie_SetIsReading(true,365*24*60);
	FyCookie_RemoveOneMsg(msgid);
	if(MSG){
		MSG.showpage(msgid,msgtitle,msgcontent,msgtype,msgurl,msgface);
	}
}
/*ʾ*/
function Fy_ShowMsg(msgid,msgtitle,msgcontent,msgtype,msgurl,msgface){
	FyCookie_SetIsReading(true,365*24*60);
	var arraymsgs=Fy_GetArrayMsgs();
	//FyCookie_RemoveOneMsg(msgid);
	
	//new ShowBox(msgid,TxBBS_CurrentUserName(),msgcontent,msgurl,msgface,msgtype);
	
	/*
	if(isIE){
	    MSG = new CLASS_MSN_MESSAGE(msgid,350,150,"",msgtitle,msgcontent,msgtype,msgurl,msgface);
	    MSG.rect(null,null,null,screen.height); 
	    MSG.setmsgs(arraymsgs);
	    MSG.show();
	}
	if(isFireFox){
	    MSG = new Class_MSN_FireFox_Message(msgid,250,150,"",msgtitle,msgcontent,msgtype);
	    MSG.show();
	}*/
}
/*һ*/
function Fy_ReadMsg(){
	if(TxTB_UserID>0){
		if(FyCookie_GetIsReading()==null||FyCookie_GetIsReading()==''){
		    var msg=FyCookie_GetOneMsg();
		    var msgs=msg.split('|');
		    if(msgs.length=2){
			    loadScript(Config.FyMsgPath + "?type=GetMsg&id="+msgs[0]+"&mtype="+msgs[1] + TxTB_getRandom());
		    }
		}
	}else{
		FyCookie_ClearMsg();
	}
}
//ȡδ
function Fy_GetMsgs(){
	if(TxTB_UserID>0){
		loadScript(Config.FyMsgPath + "?type=GetMsgs");
	}else{
		FyCookie_ClearMsg();
	}
}
//״̬
function FyCookie_SetIsReading(isread,expires){
	var expDate = new Date();
	expDate.setTime(expDate.getTime()+expires*1000);
	TxBBS_SetCookie("FyIsRead",isread+'|'+DateToStr(new Date())+'|'+firecord,expDate,"/",TxBBS_GetDomain(document.domain));
}
function FyCookie_UpdateIsReading(newfirecord,expires){
	var ck=FyCookie_GetIsReading();
	if(ck){
		var s=ck.split('|');
		if(s.length==3){
			TxBBS_SetCookie("FyIsRead",s[0]+'|'+s[1]+'|'+newfirecord,expires,"/",TxBBS_GetDomain(document.domain));
		}
	}
}
function FyCookie_GetIsReading(){return TxBBS_GetCookie("FyIsRead");}
function FyCookie_ClearReading(){FyCookie_SetIsReading("",0);}
//õһδID|MTYPE
function FyCookie_GetOneMsg(){
	var fymsg=FyCookie_GetMsg();
	if(fymsg){
		var parms= fymsg.split('|');
		if(TxTB_UserID==parseInt(parms[0])){
			var s;
			if(parms[1]!=''){
				s=parms[1].split(',');
				if(s.length>0) return s[0]+'|'+1;
			}
			if(parms[2]!=''){
				s=parms[2].split(',');
				if(s.length>0) return s[0]+'|'+2;
			}
		}
	}else{
		return '';
	}
}
//IDƳһδ
function FyCookie_RemoveOneMsg(msgId){
	var fymsg=FyCookie_GetMsg();
	if(fymsg){
		var parms= fymsg.split('|');
		if(TxTB_UserID==parseInt(parms[0])){
			var bl=false;
			var s;
			var str='';
			if(parms[1]!=''){
				s=parms[1].split(',');
				for(i=0;i<s.length;i++){
					if(parseInt(s[i])==msgId){
						bl=true;
					}else{
						str=str+s[i]+',';					
					}
				}
				if(str!='')str=str.substr(0,str.length-1);
				parms[1]=str;
			}
			str='';
			if(parms[2]!=''&&!bl){
				s=parms[2].split(',');
				for(i=0;i<s.length;i++){
					if(parseInt(s[i])==msgId)
					{
						bl=true;
					}else{
						str=str+s[i]+',';					
					}
				}
				if(str!='')str=str.substr(0,str.length-1);
				parms[2]=str;
			}
			if(bl){
				FyCookie_SetMsg(parms[0]+'|'+parms[1]+'|'+parms[2]+'|'+(parseInt(parms[3])-1),3600*24*365);
				
				//Fy_NodeDataFill((parseInt(parms[3])-1));
			}
		}
	}
}
//ݵcookie
function Fy_SetMsgs(userid,sys,friend,num){
    if(sys==''&&friend==''){
		window.setTimeout("Fy_GetMsgs()",(Config.RefreshNoteTimeLength+2)*1000);
    }else{
		//window.setTimeout("Fy_GetMsgs()",(Config.RefreshNoteTimeLength-2)*1000);
		FyCookie_SetMsg(userid+'|'+sys+'|'+friend+'|'+num,3600*24*365);
    }
	var fymsg=FyCookie_GetMsg();
	if(fymsg){
		var parms= fymsg.split('|');
		if(parms[1]!=''&&sys!=''){
			var s=parms[1].split(',');
			var s1=sys.split(',');
			sys='';
			for(i=0;i<s1.length;i++){
				var has=false;
				for(j=0;j<s.length;j++){
					if(s[j]==s1[i]) has=true;
				}
				if(!has) sys=sys+','+s1[i];
			}
			sys=parms[1]+sys;
		}
		if(parms[2]!=''&&friend!=''){
			var s=parms[2].split(',');
			var s1=friend.split(',');
			friend='';
			for(i=0;i<s1.length;i++){
				var has=false;
				for(j=0;j<s.length;j++){
					if(s[j]==s1[i]) has=true;
				}
				if(!has) friend=friend+','+s1[i];
			}
			friend=parms[2]+friend;
		}
		num=(sys==''?0:sys.split(',').length)+(friend==''?0:friend.split(',').length);
	}
	FyCookie_SetMsg(userid+'|'+sys+'|'+friend+'|'+num,3600*24*365);
	
	Fy_NodeDataFill(num);
	//ʼȡ
	//Fy_ReadMsg();
}
//õ
function Fy_GetArrayMsgs(){
	var arr=new Array();
	var fymsg=FyCookie_GetMsg();
	if(fymsg){
		var parms= fymsg.split('|');
		if(parms.length==4){
			var sys;
			var friend;
			if(parms[1]!=''){
				sys=parms[1].split(',');
				for(i=0;i<sys.length;i++){
					arr.push(sys[i]+'|1');
				}
			}
			if(parms[2]!=''){
				friend=parms[2].split(',');
				for(i=0;i<friend.length;i++){
					arr.push(friend[i]+'|2');
				}
			}
		}
	}
	if(arr.length==0){
		return null;
	}
	return arr;
}
//õŻ
function FyCookie_GetMsg(){return TxBBS_GetCookie("FyMsg");}
//öŻ
function FyCookie_SetMsg(value,expires){
	var expDate = new Date();
	expDate.setTime(expDate.getTime()+expires*1000);
	TxBBS_SetCookie("FyMsg",value,expDate,"/",TxBBS_GetDomain(document.domain));
}
//Ż
function FyCookie_ClearMsg(){FyCookie_SetMsg("",0)}
//д¶
function FyTB_EditNewNote(){window.open('http://www.148365.com/person/default.aspx?frame=SendMsg');}
//
function FyTB_ReadNoteInfo(){window.open('http://www.148365.com/person/');}

//¼
function Fy_NodeDataFill(value){
	if (value!=0){g('Message').innerHTML = "<span onclick='FyTB_ReadNoteInfo2()' id=newmsgtip style='cursor:hand;color:red;font-size:12px;'>" + value + "Ϣ</span>δ&nbsp;";}
	else{g('Message').innerHTML = "<span style=\"cursor:hand;color:#0000ff;font-size:12px;\" onclick=\"FyTB_EditNewNote('')\">¶</span>";}
}
/*Ч*/
var i=0;
function toolTip(){
	g('newmsgtip').innerHTML();
}
/*¶Ųend*/



function TxTB_MenuItemLoad(funName){
	Tx_ClearMenuItem();
	var arr=null;
	switch (funName){
	case "navigation":
		arr=TxChildMenu.navigation;
		break;
	case "finance":
		arr=TxChildMenu.finance;
		break;
	case "setting":
		arr=TxChildMenu.setting;
		break;
	default:
	}
	var tempArr;
	if (arr!=null){
		if (arr.length==0) return false;

		for (var i=0;i<arr.length;i++){
			tempArr=arr[i].split(",");
			if (tempArr[0]=="-1")
				AddmenuItemSplitLine()
			else{
				Tx_AddMenuItem(funName,tempArr[3],tempArr[0],tempArr[1],tempArr[2]);//Tx_AddMenuItem('images/toolbar/code.gif','help','http://test.148365.com/msg','_blank');
			}
		}
	}else
		return false;
	return true;
}
function Tx_ToHomePage(){location = 'http://www.148365.com/';}
function Tx_ToEn(){location = 'http://en.148365.com/';}
window.onerror = function(){return true;};
if(document.all){
    window.attachEvent('onload',InitSound);
}
function InitSound(){
//	Tx_LoadFinished=true;
//	if (Tx_NewMsgInfo!=""){
//		Tx_GetMyNewNoteFun(Tx_NewMsgInfo);
//		Tx_NewMsgInfo="";
//		Tx_DebugInfo(null)
//	}
}
//ģOffice XPķ
function Tx_MouseOver(src,BackColor) 
{
	if (!src.contains(event.fromElement)) 
	{
//		src.style.cursor="hand";
		src.bgColor = BackColor;
		src.style.bordercolor = "#000000";
	}
}
function Tx_MouseOut(src, BackColor)
{
	if (!src.contains(event.toElement))
	{
//		src.style.cursor="default";
		src.bgColor = BackColor; 
		src.style.bordercolor = "#000000";
	}
}

function getReal(el) {
	temp = el;
	while ((temp != null) && (temp.tagName != "BODY")) {
		if (temp.tagName == "TD"){
			return temp;
			}
		temp = temp.parentElement;
	}
	return el;
}

var cswmTI="";

function Tx_ClearStatus(){
	ClearToolbarStatus(g('menutable'));
	g('ie5menu').style.visibility="hidden";
}
function Tx_HideMenu(){
	cswmTI=setTimeout("Tx_ClearStatus();",250);
}
function Tx_StopHideMenu(){
	clearTimeout(cswmTI);
}

function Tx_GetTableItem(obj){
	var obj1=obj;
	while(obj1.tagName!="TABLE" && obj1.tagName!="BODY"){
	    if(document.all){
		    obj1 = obj1.parentElement;
		}else{
		    obj1 = obj1.parentNode.parentNode.parentNode;
		}
	}
	if (obj1.tagName != "TABLE") return null;
	return obj1;
}

//ղ˵
function Tx_ClearMenuItem(){
	while (g('MenuItem').rows.length!=0)
		g('MenuItem').deleteRow(0);
}

//˵
function Tx_AddMenuItem(funName,ImgSrc,DispInfo,Href,Target,OnItemClick){
	var obj=g('MenuItem');
	var oTR=obj.insertRow(-1);
	oTR.borderColor = "#f1f1f1";
	
//	var oTR = obj.insertRow();
//	oTR.borderColor = "#f1f1f1";
	var oTD = oTR.insertCell(0);
 
	var tableobj = document.createElement("table");
	tableobj.height = "22px";

	tableobj.cellSpacing=0;
	tableobj.cellPadding=0;

	tableobj.className = "TxMainMenu";

	if (Href!=""){
		tableobj.onmouseout = new Function("this.className = 'TxMainMenu'");
		tableobj.onmouseover = new Function("this.className = 'TxMainMenu1'");
	}
	oTD.appendChild(tableobj);

	oTR=tableobj.insertRow(-1);
	oTR.bgColor="#f1f1f1";
	oTR.borderColor="#b6bdd2";
	
//	oTR=tableobj.insertRow();
//	oTR.bgColor="#f1f1f1";
//	oTR.borderColor="#b6bdd2";
	
	if (Href!=""){
		oTR.onmouseout=new Function("Tx_MouseOut(this,'#f1f1f1')");
		oTR.onmouseover=new Function("Tx_MouseOver(this,'#B6BDD2')");
	}

	if (typeof(OnItemClick)!='undefined'){
		oTD=oTR.insertCell(0);	//oTD.bgColor = "#dbd8d1";
		oTD.width="20px";
		oTD.align="center";
		oTD.innerHTML = "<img border='0' src='" + ImgSrc + "' title='Ͷ' style='cursor:hand'>";
		oTD.onclick=OnItemClick;
		       
		oTD=oTR.insertCell(1);	//oTD.className = "flyoutLink";
		oTD.nowrap="";
		if (Href!=""){
			oTD.style.cursor="hand";
			oTD.title = 'Blog';
			oTD.onclick = function(){
							if (Target=="_self")
								location.href = Href;
							else
								window.open(Href);
						}
		}
		oTD.innerHTML = "<nobr>&nbsp;"+ DispInfo + "&nbsp;</nobr>"; 
	}else{
		oTD=oTR.insertCell(0);
		oTD.nowrap="";
		if (Href!="")
			temp="<a class='mainbar' href=\"" + Href + "\" target=\"" + Target + "\" class='a_link'>" + DispInfo + "</a>";
		else
			temp=DispInfo;
		oTD.innerHTML = "<nobr>&nbsp;" + temp + "&nbsp;</nobr>";
	}
}

function AddmenuItemSplitLine(){
	var obj=MenuItem;
	var oTR = obj.insertRow();
	var oTD = oTR.insertCell(0);
 
	//oTD.width = "90%";
	oTD.height = "3";
	oTD.className = "TDSplit";
	oTD.innerHTML = "<table height=1 border=0 cellpadding=0 cellspacing=0><tr><td></td></tr></table>";
}

function ClearToolbarStatus(obj){
	if (obj.rows.length<1) return;
	row=obj.rows[0];
	for (i=0;i<row.cells.length;i++){
		row.cells[i].className = "toolbar";
	}
}

// õIEиԪλʹԪһ
function getIEPosX(elt) { return getIEPos(elt,"Left"); }
function getIEPosY(elt) { return getIEPos(elt,"Top"); }
function getIEPos(elt,which) {
 iPos = 0
 while (elt!=null) {
  iPos += elt["offset" + which]
  elt = elt.offsetParent
 }
 return iPos
}

function Tx_menu_down(obj){
	var obj1=Tx_GetTableItem(obj);
	if (obj1 == null) return;

	ClearToolbarStatus(obj1);
	obj.className = "toolbar1";
	var funName=document.all?obj.funName:obj.getAttribute("funName");
	if (!TxTB_MenuItemLoad(funName)){
		g('ie5menu').style.visibility="hidden";
		return;
	}
	if(document.all){
	g('ie5menu').style.left = parseInt(obj.offsetLeft) + parseInt(obj1.offsetLeft);	//document.body.scrollLeft + 
	g('ie5menu').style.top = getIEPosY(obj1) + parseInt(obj1.offsetTop) + parseInt(obj1.offsetHeight);//document.body.scrollTop +  + 1
	}else{
	g('ie5menu').style.left = parseInt(obj.offsetLeft) + parseInt(obj1.offsetLeft)+'px';	//document.body.scrollLeft + 
	g('ie5menu').style.top = getIEPosY(obj1) + parseInt(obj1.offsetTop) + parseInt(obj1.offsetHeight)+'px';//document.body.scrollTop +  + 1
	}
    
    if(document.all){
	obj1 = obj1.parentElement;
	}else{
	obj1=obj1.parentNode;
	}
	while (obj1.tagName!="BODY"){
	    if(document.all){
		g('ie5menu').style.left = parseInt(g('ie5menu').style.left) + parseInt(obj1.offsetLeft);
		}else{
		g('ie5menu').style.left = parseInt(g('ie5menu').style.left) + parseInt(obj1.offsetLeft)+'px';
		}
//		ie5menu.style.top = parseInt(ie5menu.style.top) + parseInt(obj1.offsetHeight);
        
//	alert(obj1.parentNode.innerHTML)
//	alert(obj1.parentNode.innerHTML)
    if(document.all){
	obj1 = obj1.parentElement;
	}else{
	obj1=obj1.parentNode;
	}	
	}
//	ie5menu.style.top = parseInt(ie5menu.style.top);	// - 9

	g('ie5menu').style.visibility="visible";
    if(canclose){
        PBarHidden();
    }
}

function Tx_menu_out(obj){
	if (g('ie5menu').style.visibility=="hidden")
		obj.className = "toolbar";
	else
		Tx_HideMenu();
}

function Tx_menu_over(evt,obj){
	Tx_StopHideMenu();
    if(document.all){
	    toEl = getReal(window.event.toElement);
	    fromEl = getReal(window.event.fromElement);
	}else{
	    toEl = getReal(evt.target);
	    fromEl = null;
	}
	if (toEl == fromEl) return;

	if (g('ie5menu').style.visibility=="hidden"){
		obj.className = "toolbar0";
		return;
	}
	
	Tx_menu_down(obj);
	
    if(canclose){
        PBarHidden();
    }
}
function getIEVersonNumber(){
	var ua = navigator.userAgent;
	var msieOffset = ua.indexOf("MSIE ");
	if(msieOffset < 0)
		return 0;
	return parseFloat(ua.substring(msieOffset + 5, ua.indexOf(";", msieOffset)));
}

var canclose=true;
var smalltime=5
function Fy_menu_over(){
    if(canclose){
        g("PBar").style.display="";
        g("SmallForm").style.display="";
        g("SmallBar").style.display="none";
        g("SmallMsg").style.display="none";
        g("callme").className="toolbar1";
        g("callme").style.background="#fff";
    }
}
function Fy_menu_out(){
    if(canclose){
        PBarHidden();
    }
}
function SmallFormSubmit(){
    if(smallcheck()){
        canclose=false;
        g("SmallForm").style.display="none";
        g("SmallBar").style.display="";
        g("SmallMsg").style.display="none";
        CallMe(g("SmallName").value,g("SmallTel").value,g("SmallTime").value);
    }
}

function CallMe(name,tel,time){
    loadScript("http://reg.148365.com/js/CallMeBar.aspx?name="+name+"&tel="+tel+"&time="+time+"&dom="+Math.random());
}
function Fy_CallMe(value){
	if (value!=""){
		    if(value=="1"){
		        smallmsg="ύɹ!";
		    }else{
		        smallmsg="ʧ,ϵԱ!";
		    }
            setTimeout("SmallMsgShow()",3000);
	}
}

function smallcheck(){
    if(TrimStr(g("SmallName").value)==""){
        return false;
    }
    if(TrimStr(g("SmallTel").value)==""){
        return false;
    }
    if(TrimStr(g("SmallTime").value)==""){
        return false;
    }
    return true;
}
var smallmsg="";
function SmallMsgShow(){
    g("SmallForm").style.display="none";
    g("SmallBar").style.display="none";  
    g("SmallMsg").style.display="";    
    g("msg").innerHTML=smallmsg; 
    TimerClose();
}
function TimerClose(){
    if(smalltime>=0){  
        g("msg1").innerHTML=smalltime+"Զر"; 
        smalltime=smalltime-1;
        setTimeout("TimerClose()",1000);
    }else{
        canclose=true;
        smalltime=5;
        Fy_menu_out();
    }
}
function PBarHidden(){
        g("PBar").style.display="none";
        g("SmallForm").style.display="none";
        g("SmallBar").style.display="none";
        g("SmallMsg").style.display="none";
        g("callme").className="toolbar";
        g("callme").style.background="no";
}




function Tx_MainBarInit(BarWidth){

    var app=navigator.appName;
    var verStr=navigator.appVersion;
    if(app.indexOf('Netscape')==-1&&app.indexOf('Microsoft')==-1){
		alert('IEܳʼ');
		return;
    }
	if(app.indexOf('Microsoft')!=-1){
	    var isIE5Min = (getIEVersonNumber() >= 5);
	    if (!isIE5Min){
		    //alert('ʹ5.0ϰ汾');
		    //return;
	    }
	    isIE=true;
        document.documentElement.addBehavior("#default#userdata");
	}else{
	    isFireFox=true;
	}
	if (BarWidth==0) BarWidth=950;

//	if(location.href.indexOf('photo.148365.com')==-1){
//	    document.write('<center><iframe scrolling="no" height="47px" width="990px" src="http://photo.148365.com/top1.htm" frameborder="0"></iframe></center>');
//	}

	//if(location.href.indexOf('http://www.148365.com/')>-1){
	    //document.write('<center><div id="idFade" style="padding-bottom:5px;text-align:center"><a href="http://www.148365.com/hp/" target="_blank"><img src="http://www.148365.com/images/hp2009.jpg" style="border:0px"/></a></div><iframe scrolling="no" height="47px" width="990px" src="http://lawyer.148365.com/topad/topad.aspx" frameborder="0"></iframe></center>');
	    //document.write('<center><div id="idFade" style="padding-bottom:5px;text-align:center"><a href="http://lawyer.148365.com/Holiday/Year2010.aspx" target="_blank"><img src="http://lawyer.148365.com/images/topyear2010.gif" style="border:0px"/></a></div><iframe scrolling="no" height="47px" width="990px" src="http://lawyer.148365.com/topad/topad.aspx" frameborder="0"></iframe></center>');
	//}else{
	    //document.write('<center><iframe scrolling="no" height="47px" width="990px" src="http://lawyer.148365.com/topad/topad.aspx" frameborder="0"></iframe></center>');
	//}
	//document.write('<center><iframe scrolling="no" height="47px" width="990px" src="http://lawyer.148365.com/topad/topad.aspx" frameborder="0"></iframe></center>');
    var areaid=GetAreaCookie("UserAreaID");
    if(areaid<1)areaid=8;
	//document.write('<center><div id="idFade" style="padding-bottom:5px;text-align:center"><a href="http://it.people.com.cn/GB/42891/11342019.html" target="_blank"><img src="http://www.148365.com/images/rmw.gif" style="border:0px"/></a></div><iframe scrolling="no" height="47px" width="990px" src="http://lawyer.148365.com/topad/topad.aspx" frameborder="0"></iframe></center>');
	document.write('<center><iframe scrolling="no" height="47px" width="990px" src="http://lawyer.148365.com/topad/topad_'+areaid+'.htm" frameborder="0"></iframe></center>');
	
	document.write("<center><span class=\"DSMenuBox\" onMouseOut=\"Tx_HideMenu();\">");
	document.write("<DIV id=\"ie5menu\" onMouseOver=\"Tx_StopHideMenu();\">");
	document.write("<table id=\"MenuItem\" border=\"0\" bgcolor=\"#f9f8f7\" bordercolor=\"#000000\" cellpadding=\"0\" cellspacing=\"0\"></table>");
	document.write("</DIV>");
	document.write("</span>");
	document.write("<table cellSpacing=\"0\" cellPadding=\"0\" align=\"center\" background=\"http://pic.148365.com/reg/images/toolbar/d_01.gif\" id=\"TxTB_MainTable\" width=\"" + BarWidth + "\">");
	document.write("<tr>");
	document.write("	<td style=\"padding-left:4px;text-align:left;\">");
	document.write("		<div id=\"TxLogin\">");
	document.write("			<div class=\"TxTB_LoginInput\">");
	document.write("				û<input id=\"_UserName\" type=\"text\" value=\"\" class='RegLoginInp' style='WIDTH:60px' NAME=\"_UserName\"");
	document.write("					onMouseOver=\"this.style.borderColor='#ff0000'\" onMouseOut=\"this.style.borderColor='#84a1bd'\">");
	document.write("				룺<input id='_Password' type='password' class='RegLoginInp' style='WIDTH:60px' onkeydown='if(event.keyCode==13)TxTB_UserLogin();'");
	document.write("					NAME='_Password' onMouseOver=\"this.style.borderColor='#ff0000'\" onMouseOut=\"this.style.borderColor='#84a1bd'\">");
	document.write("			</div>");
	document.write("			<div style='height:22px;padding-top:2px;display:inline;'><select name='ExpDT' id='ExpDT' style='height:19px;'>");
	document.write("					<option value='1'>1</option>");
	document.write("					<option value='7'>1</option>");
	document.write("					<option value='30'>1</option>");
	document.write("					<option value='365' selected>1</option>");
	document.write("				</select></div>");
	document.write("			<div style='height:22px;padding-top:1px;display:inline;padding-left:4px;'>");
	document.write("				<input type='button' class='TopInputButton' name='Submit' value='¼' onClick='TxTB_UserLogin()'>");
	//document.write("				<input type='button' class='TopInputButton' name='Submit' value='ο' onClick=\"window.location='http://bbs.148365.com/gbbs_2.html'\">");
	document.write("				<input type='button' class='TopInputButton' name='Submit' value='ע' onClick=\"window.location='http://reg.148365.com/register.aspx'\">");
	document.write("				<input type='button' class='TopInputButton' name='Submit' value='' onClick=\"window.location='http://reg.148365.com/FindPassword.aspx'\">");
	document.write("			</div>");
	document.write("		</div>");
	document.write("		<div id='TxUserInfo' style='font-size:12px;display:none;'>");
	document.write("			&nbsp;ӭ<font style='COLOR:#ff0000;font-size:12px;'><span id='UserNameInfo' style='color:#ff0000;font-size:12px;'></span></font>&nbsp;");
	document.write("			<span id='Message' style='font-size:12px;'></span>&nbsp;&nbsp;<span><a style='text-decoration:underline;cursor:pointer;font-size:12px;color:#0000ff;' onClick=\"GoPerson()\"></a> - </span>");
    document.write("<span><a style='text-decoration:underline;cursor:pointer;font-size:12px;color:#0000ff;' onClick=\"GoUserInfo()\" id='TheUserInfo'>Ϣ</a> - </span>");
	document.write("<span id='GoMyBlog' style='display:none;'><a style='text-decoration:underline;cursor:pointer;font-size:12px;color:#0000ff;' onClick=\"GoBlog()\">ҵҳ</a> - </span>");
    //document.write("<span><a style='text-decoration:underline;cursor:pointer;font-size:12px;color:#0000ff;' onClick=\"GoFayou()\">ҵķ</a> - </span>");
	document.write("<span id='GoMyWork' style='display:none;'><a style='text-decoration:underline;cursor:pointer;font-size:12px;color:#0000ff;' onclick='GoWork()'>칫</a> - </span>");
    document.write("<span id='GoAskToMe' style='display:none;'><a style='text-decoration:underline;cursor:pointer;font-size:12px;color:#0000ff;' onClick=\"GoAskToMe()\">ҵѯ</a> - </span>");
    document.write("<span id='GoMyAdvice' style='display:none;'><a style='text-decoration:underline;cursor:pointer;font-size:12px;color:#0000ff;' onClick=\"GoMyAdvice()\">ҵѯ</a> - </span>");
	document.write("<a style='text-decoration:underline;cursor:pointer;font-size:12px;color:#0000ff;' onclick='TxTB_UserLogout()'>˳</a>");
	document.write("		</div>");
	document.write("	</td>");
//	document.write("	<td width='60px'>");
//	document.write("	</td>");
	document.write("	<td width='1' bgcolor='#999999'></td><td width='1' bgcolor='#FFFFFF'></td>");
	document.write("	<td width='260px;'>");
	document.write("		<div style='height:22px;padding-top:2px;padding-left:2px;'>");
	document.write("			<TABLE id='menutable' align='center' height='18' cellSpacing='0' cellPadding='0' width='100%' border='0'>");
	document.write("				<TR>");
//	document.write("					<TD width='40' align='center' class='toolbar' onmouseover=\"this.className = 'toolbar0'\" ");
//	document.write("						onmouseout=\"this.className = 'toolbar'\" onmousedown=\"this.className = 'toolbar1'\"");
//	document.write("						onmouseup=\"this.className = 'toolbar0';Tx_ToHomePage();\" nowrap>ҳ</TD>");
//	document.write("					<TD width='40' align='center' funName='navigation' class='toolbar' onmouseover='Tx_menu_over(event,this)'");
//	document.write("						onmouseout='Tx_menu_out(this)' onmousedown='Tx_menu_down(this)' nowrap></TD>");
//	document.write("					<TD width='40' align='center' funName='finance' class='toolbar' onmouseover='Tx_menu_over(event,this)' ");
//	document.write("						onmouseout='Tx_menu_out(this)' onmousedown='Tx_menu_down(this)' nowrap>ղ</TD>");
//	document.write("					<TD width='80' align='center' funName='setting' class='toolbar' onmouseover='Tx_menu_over(event,this)' ");
//	document.write("						onmouseout='Tx_menu_out(this)' onmousedown='Tx_menu_down(this)' nowrap >Ϊҳ</TD>");
	document.write("					<TD width='35' align='center' class='toolbar' onmouseover=\"this.className = 'toolbar0'\" ");
	document.write("						onmouseout=\"this.className = 'toolbar'\" onmousedown=\"this.className = 'toolbar1'\"");
	document.write("						onmouseup=\"this.className = 'toolbar0';location.href='http://www.148365.com/sitemap.html'\" nowrap></TD>");
		document.write("				<TD width='35' align='center' class='toolbar' onmouseover=\"this.className = 'toolbar0'\" ");
	document.write("						onmouseout=\"this.className = 'toolbar'\" onmousedown=\"this.className = 'toolbar1'\"");
	document.write("						onmouseup=\"this.className = 'toolbar0';AddBookmark();\" nowrap>ղ</TD>");
		document.write("				<TD width='60' align='center' class='toolbar' onmouseover=\"this.className = 'toolbar0'\" ");
	document.write("						onmouseout=\"this.className = 'toolbar'\" onmousedown=\"this.className = 'toolbar1'\"");
	document.write("						onmouseup=\"this.className = 'toolbar0';SetHome(this);\" nowrap>Ϊҳ</TD>");
	document.write("					<TD width='35' align='center' class='toolbar' onmouseover=\"this.className = 'toolbar0'\" ");
	document.write("						onmouseout=\"this.className = 'toolbar'\" onmousedown=\"this.className = 'toolbar1'\" ");
	document.write("						onmouseup=\"this.className = 'toolbar0';ToTrans();\" nowrap><div id='TransID'></div></TD>");
		document.write("				<TD width='50' align='center' class='toolbar' onmouseover=\"this.className = 'toolbar0'\" ");
	document.write("						onmouseout=\"this.className = 'toolbar'\" onmousedown=\"this.className = 'toolbar1'\" ");
	document.write("						onmouseup=\"this.className = 'toolbar0';ToIP();\" nowrap><div id='TransID'>IP</div></TD>");
	
		document.write("				<TD width='35' align='center' class='toolbar' onmouseover=\"this.className = 'toolbar0'\" ");
	document.write("						onmouseout=\"this.className = 'toolbar'\" onmousedown=\"this.className = 'toolbar1'\" ");
	document.write("						onmouseup=\"this.className = 'toolbar0';ToRss();\" nowrap><div id='TransID'>Rss</div></TD>");
	document.write("			        <TD width='35' align='center' class='toolbar' onmouseover=\"this.className = 'toolbar0'\" ");
	document.write("						onmouseout=\"this.className = 'toolbar'\" onmousedown=\"this.className = 'toolbar1'\"");
	document.write("						onmouseup=\"this.className = 'toolbar0';Tx_ToEn();\" nowrap><div style='padding-bottom:3px;color:red;font-family:Arial;font-weight:bold'>English</div></TD>");
	document.write("					<td width='10' class='toolbar'>&nbsp;</td>");
	document.write("				</TR>");
	document.write("			</TABLE>");
	document.write("		</div>");
	document.write("	</td>");
	document.write("</tr>");
	document.write("</table></center>");
	document.write('<DIV id="STATICMENU" style="Z-INDEX: 999; right:40px !important;right:3px; VISIBILITY: visible; WIDTH: 76px; POSITION: absolute; TOP: -200px;">');
    document.write('<table width="100" border="0" cellspacing="0" cellpadding="0"><tr><td colspan="3"><img src="http://pic.148365.com/adviceimages/qq/QQ_3.gif" width="106" border="0" usemap="#ToolTipMap"></td></tr><tr><td width="4" height="78" background="http://pic.148365.com/adviceimages/qq/QQ_8.gif"></td><td width="98" align="center" style="background:#fff;" id="tooltipcontent">');
    document.write('</td><td width="4" background="http://pic.148365.com/adviceimages/qq/QQ_7.gif"></td></tr><tr><td colspan="3"><img src="http://pic.148365.com/adviceimages/qq/QQ_12.gif" width="106" height="44"></td></tr></table></DIV><map name="ToolTipMap"><area shape="circle" coords="89,10,11" href="javascript:gogo();" target="_self"></map>');
    ResetUserLoginStatus();

}
function ToRss(){window.location='http://www.148365.com/rss/';}
function ToIP(){window.location='http://data.148365.com/ip.aspx';}
function GoWork(){window.location='http://reg.148365.com/User/ToDomain.aspx?UserID='+TxBBS_CurrentUserID()+'&type=1';}
function GoBlog(){window.location='http://reg.148365.com/User/ToDomain.aspx?UserID='+TxBBS_CurrentUserID()+'&type=2';}
function GoUserInfo(){
if(TxBBS_CurrentUserType()==1){
window.location='http://lawyer.148365.com/user/'+TxBBS_CurrentUserID()+'.html';
}
else{

    window.location='http://reg.148365.com/user/toDomain.aspx?type=2&UserID='+TxBBS_CurrentUserID();
}
}
function GoFayou(){window.location='http://reg.148365.com/go.aspx';}
function GoMyAdvice(){
    window.location='http://www.148365.com/person/default.aspx?frame=myAdvice';
}
function GoAskToMe(){window.location='http://www.148365.com/person/default.aspx?frame=askToMe';}
function GoPerson(){
    href='http://www.148365.com/person/';
    window.location=href;
}
function h(obj,url){obj.style.behavior='url(#default#homepage)';obj.setHomePage(url);}



/*λ*/
var tooltiptimer;
function Fy_GetToolTip(){
    var areaid=GetAreaCookie("UserAreaID");
    if(areaid==-1)areaid=0;
    loadScript(Config.FyToolTip+'?areaid='+areaid);
}
function Fy_ShowToolTip(ids,userids,usernames,realnames,userids2,usernames2){
    var id=ids.split('|');
    var userid=userids.split('|');
    var username=usernames.split('|');
    var realname=realnames.split('|');
    var userid2=userids2.split('|');
    var username2=usernames2.split('|');
    var tip='<table width="100%" cellspacing="0" cellpadding="3">';
    tip=tip+'<tr><td style="" width="100%" align="left"><img src="http://pic.148365.com/adviceimages/qq/jian.gif"/></td></tr>';
    var hasxu=false;
for(i=0;i<id.length;i++){
    a=id[i];
    b=userid[i];
    c=username[i];
    d=realname[i];
    if(b==0){
        if(!hasxu){
        tip=tip+''
+'<tr>'
+'<td width="100%" align="left">&nbsp;<a style="color: #FF0000;" href="http://www.148365.com/tuiguang/view.aspx?cid='+a+'" target="_blank">λԴ[]</a></td>'
+'</tr>';
        hasxu=true;
        }
    }else{
        tip=tip+''
+'<tr>'
+'<td width="100%" align="left">&nbsp;<a style="color: #0000FF;" href="http://reg.148365.com/user/todomain.aspx?type=2&userid='+b+'" target="_blank">'+d+'</a></td>'
+'</tr>';
    }
}
tip=tip+'<tr><td style="" width="100%" align="left"><img src="http://pic.148365.com/adviceimages/qq/reply.gif"/></td></tr>';
for(i=0;i<userid2.length;i++){
    e=userid2[i];
    f=username2[i];
        tip=tip+''
+'<tr>'
+'<td width="100%" align="left">&nbsp;<a style="color: #0000FF;" href="http://reg.148365.com/user/todomain.aspx?type=2&userid='+e+'" target="_blank">'+f+'</a></td>'
+'</tr>';
}
tip=tip+'</table>';
    g('tooltipcontent').innerHTML=tip;
    var top=-(parseInt(g('STATICMENU').clientHeight)-40);
   g('STATICMENU').style.top = top+"px";
    g('STATICMENU').onmouseover=function(){
        stmnGAP1 = 1; 
        stmnGAP2 = 1; 
        stmnBASE = 1; 
    } 
    g('STATICMENU').onmouseout=function(){
        stmnGAP1 = top;
        stmnGAP2 = top;
        stmnBASE = top;
    }
    stmnGAP1 = top;
    stmnGAP2 = top;
    stmnBASE = top;
    qqdown();
}
var stmnGAP1 = 1; 
var stmnGAP2 = 1; 
var stmnBASE = 1; 
var stmnActivateSpeed = 200;
var stmnScrollSpeed = 10;
var stmnTimer;
function qqdown()
{
var stmnStartPoint, stmnEndPoint, stmnRefreshTimer;

stmnStartPoint = parseInt(g('STATICMENU').style.top, 10);
var scrollPos; 
if (typeof window.pageYOffset != 'undefined') { 
   scrollPos = window.pageYOffset; 
}
else if (typeof document.compatMode != 'undefined' && 
     document.compatMode != 'BackCompat') { 
   scrollPos = document.documentElement.scrollTop; 
}
else if (typeof document.body != 'undefined') { 
   scrollPos = document.body.scrollTop; 
} 

stmnEndPoint = scrollPos + parseInt(stmnGAP2);
if (stmnEndPoint < parseInt(stmnGAP1)) stmnEndPoint = parseInt(stmnGAP1);

stmnRefreshTimer = stmnActivateSpeed;
if ( stmnStartPoint != stmnEndPoint ) {
                stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 );
                g('STATICMENU').style.top = parseInt(g('STATICMENU').style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount )+"px";
                stmnRefreshTimer = stmnScrollSpeed;
}
stmnTimer = setTimeout ("qqdown();", stmnRefreshTimer);
}
function gogo(){g('STATICMENU').style.display='none';window.clearTimeout(stmnTimer);}

/*λend*/

/*վ*/
var indexmenu={
	Show:function(){
		if(document.getElementById('topbar').style.display==''){
			document.getElementById('topbar').style.display='none';
		}else{
			document.getElementById('topbar').style.display='';
		}
	},
	Hide:function(){
		document.getElementById('topbar').style.display='none';
	},
	Init:function(){
		document.write(''
		+'<div class="topbar_wraper">'
	+'<div id="topbar" class="none" style="display:none;" onclick="indexmenu.Hide();">'
	+'	<table width="482px"><tr>'
	+'	<td width="310">'
	+'	<div class="topbar_list clearfix">'
	+'		<ul>'
	+'			<li>'
	+'				<a href="http://www.148365.com/office/" style="color:#07519a;">ʦ칫(E-Office)TMѿעᣡ</a>'
	+'			</li>'
	+'			<li>'
	+'				<a href="http://www.148365.com/qq.html" style="color:#07519a;">й߷ɷQQˣ  ӭѼ룡</a>'
	+'			</li>'
	+'			<li>'
	+'				<a href="http://bbs.148365.com/post2_895627_1.html" style="color:#07519a;">ʦԱλ÷ʦƹ</a>'
	+'			</li>'
	+'			<li>'
	+'				<a href="http://www.148365.com/addadvice.aspx" style="color:red;">ʮʦѯ⣡</a>'
	+'			</li>'
	+'			<li>'
	+'				<a href="http://law.148365.com/" style="color:#07519a;">վѿʮⷨɷѯ</a>'
	+'			</li>'
	+'			<li>'
	+'				<a href="http://bbs.148365.com/" style="color:#07519a;">йķ</a>'
	+'			</li>'
	+'			<li>'
	+'				<a href="http://bbs.148365.com/post_926691_1.html" style="color:red;">googleμ2008ȸ跢̷</a>'
	+'			</li>'
	+'			<li>'
	+'				<a href="http://pay.148365.com/gold.htm" style="color:red;">湺ƽ̨ ǮҲʦ!</a>'
	+'			</li>'
	+'			<li>'
	+'				<a href="#" style="color:red;">ѯ绰010-51288148</a>'
	+'			</li>'
	+'		</ul>'
	+'	</div></td>'
	+'	<td align="center"><a href="http://photo.148365.com/"><img src="http://bbs.148365.com/cSmallImages/2008/10/20/20081020104107125.gif" border="0" /></a></td>'
	+'	</tr></table>'
	+'	<div style="text-align:center">'
	+'		<a href="http://reg.148365.com/regUserV2.aspx"><img src="http://pic.148365.com/reg/images/reg/sign1.gif" border="0" /></a>&nbsp;&nbsp;'
	+'		<a href="http://reg.148365.com/regLawyerV2.aspx"><img src="http://pic.148365.com/reg/images/reg/sign.gif" border="0" /></a>&nbsp;&nbsp;'
	+'		<a href="http://reg.148365.com/regOfficeV2.aspx"><img src="http://pic.148365.com/reg/images/reg/sign2.gif" border="0" /></a>'
	+'	</div>'
	+'</div>'
	+'<div style="border:0px;float:right;width:24px;border:0px;" onmouseover="indexmenu.Show();">'
	+'	<img src="http://www.148365.com/css/hot.png" border="0" alt="" usemap="#Map" />'
	+'</div>'
    +'    </div>'
		+'');
	}
}
//indexmenu.Init();

/*վend*/
////////////////////////////////////////////Ϊ򷱻ת/////////////////////////////////////////////////////
GM_str_s="רҵԶ˿ɥܷΪôϰڿبǲĶڽزǼŻɡΰαӶ½ȿ٭ٯٶٱٲٳծǳϴжڸԲдũڣݼƾۻմɾiٹܼнȰ۽ѫҽЭ¬±ȴ᳧ѹǲóز΅˫Ҷ̾ߴĶ߼߽Ż߿ԱǺӽܻӴy|Х࿺԰ΧͼԲʥ۳໵̳ް׹¢ݿѵ눙ǵGǽ׳Ǻ״ͷжۼܽױ橽¦欽测OӤѧʵܹ޶ѰٽҢʬ᫸ᰵᴿNϿiոɍ۹ϱ˧ʦĴ֡᥸ɲׯ®пӦӷώ޿䵯ǿ鵱¼峹黳̬Ҷҳͱ㫲ѵ㳷Ը\Ϸս꯻ǤִɨŸҿ£ӵšֿΒ̢ЮӵӒ񻻵°§Яҡ̯ߢߣߥܵի쵶ն޾ʱDoԽɹӻɱȨ追ܼǹɹդջж嵵׮Η¥鷘ƺӣͳݻŷŹ챱ϱձ뵻㺺ûŽٲכhmŢкǳ䥛ǲ䫼䯛Ũ䱛ͿӿЛɬԨ½ʪӜб̲ΫǱֲ¯˸̷ǻ̽Ȼְүǣ״̱Aʨè̡_`⻷֫o巩竚Q걵续űߴӸ컾}̱Ѣ񳰨յμǵשn˶ͳ}~ȷﰭ׼t»ͺֻƻඌ˰ҤѿȼɸYݳǩ¨׽ԼγɴڷֽƷŦϸ֯称ﾭ窰޽笻Ѥͳ篾м簼糴ά緱׺罼翼綶ĻƱԵƸǷɲӧٽ޷ʳְ೦вʤֽŧNHܳսܼ«έɲƻ뾣QٻӫݡݣݥݤݦݧҩݰݯݪݫݲݵӨݺݻ[өӪ޽Ǿޭ޴޻޺²ϺʴӬЫ΅]βЄϮBװTϿ[_`ԀڥƶϼڦڧڨѵѶךکڪګכϷþ֤ڬڭʶלթڮߴڰگםڱڲڳڴʫڵڶڷڸڹѯںڻڼמڽھջڿ˵ŵ·̿˭ŵ׻̸ıȵгνβנлҥǫ׽á̷Ǵ߹k긺OͰ˻ʷ̰ƶṺܴᷡóѺ޼ֻ¸޸ʹPQR׸׬SӮWԸԾȼQӻaתbԹcꣷdԯϽշꥴǱɴǨ˻ԶΥɼѡѷңۣۧۦ֣۩۪ǵN⠼붤ǥ蕷藸Ѷ۳ƱԿվٹťǮǯܲǦíͭաϳ綠ҿﭳﲷпêസ׶ĶABͶþCDָFG޾HIJⳤ\ʴȼբֹ]^ղ_`a׼½¤ѳùΤ킺ҳ˳˶Ԥ­ľFGƵHIӱJնKȧrstuvƮ쮷𗼢α¶ڹȲ@AԦѱR¿ʻפS溧TUVWXƭYɧZ³@𯼦\Ÿѻ]Ѽ^_ԧ`abcȵdefghiklmnoϺprӥstdػ촳ȣ־ֻϵû׼ӱиɾƴ";
//
GM_str_t="fchI|zGɇʂSReNxlIy̝녁aHC|Hā}xrⷕゥt΁wNLbHeɂȃS~zRzAEfhmPdƝBFσȌԌ܊rVTnQrQDRpCPD{Pcthe}qkՄӄńڄ݄̈́QT^tAfuRuPlsSdхBNPha^pl׃B~̖U\nᇘΆw Ǉ`҇IhTJ܆ԁUz߸jy푆}^􇂇WчO߇ZrK݇mӇc[DuڇoF@DA}ĉKԉȉΉ]ŉŉs׉|N߉P_|qϠ؉̎}^FAZYJ^WyDKIƋɌDʋzȋ܋ԋߌOW\meیmƱMӌڌόÌٌҌՎZqM獏sSuX[hGF{AnMV􍣍⼹p얎ŎÎ͎ΎLցKVfc]T쑪RUF[_w䛏؏ƶRԑnёBZYzّQÐŐґa@֑K͑vܑMTC|ؑ𑿑БߑL̔UВߓP_ᒁoMnrQܓ쓴钶ϓגD]͓ƓpQvӓSۓvRyzd[uPtΔfX]x\SYؔofr番ҕ@xԕϕᄞgCslqܘOЗgnfdŘ˗ɗژ䗫ә藨EnuzEǙΙxM{љ_geW{ݞ֚Кښ菡h@eϛ]arStI͞{oTaɛܝDќ\{۝yҝgIG❡TZiuݜo읙q՜YOn^uƝOcB[񝢞RsULM]VEI˞EutHz|l`ĠNtcqNTZCa៨Fc۠ӠޠُEwqNM{bzsCJMi؈oIH^m|hFtzkmcq\IavYT늮ܮXO󜯏bdW{ABVDTca`]_dğ}K}OwIPg{AmC\VXau^Za[ATo_|K~ALYB[\AUxdNeQxvdwF`[GZCQ]MQVSPa{\eB`Y~IUjDXjt@hf[eigcSZRfo{mutqwvswkoxV{v]y~CXMKUOEIB[HqYf@xWLok{j^gyCd^wcxm_pbyiKSdRIT^JC`UGYl~|}|ZDEP|N`dbp\cprOV_~zwtsi\`RQUyW_PT`buwNPEgeu@CcwdI[Û{đٖVLFÄz}ĒvĚXēL_ÓTĘDZs|ātevĜNݛŜŞœADWHˇdGʏJɐȔ˞{OnrKOod\LOG]RvʁɜwCjʎsȝΟn|pa{ȇȒˎWɉRɏPnW@~LɔE}ΞIMʒ_[rʉYV{EyʚvN`A@IN˒\̔]̓xAlmrϊgρΛQϖ͘MϠ|UU͐u·ϓ͑΁ϞωXsϐNϔQ\DarЖ\ыmuUbdтўcѝM@hwҊ^ҍҎҒҕҗ[XJҠ]CDMPUx|zׄu`ӅӋӆӇJIӓӏӑ׌ӘәӖhӍӛӕvM֎nӠGSӞՓKASOLECbXu{RwpV\ga~xtvgrECԇԟԊԑԜ\DԖԒQԍԏԎԃԄՊԓԔԌ՟Ԃp]_ZV`aTdNfbOՈTՌZxՎunՆ՘lՔ{~ՏՁrՄx\RՙeGCo]^@IX׋JOVBi՛՚փוqx{r՞tk֔֙ֆvևTPS׎VHחld׏Yrؐؑؓؒؕؔ؟t~؛|؜؝ؚHُA؞EvSBNFLJQMRO\ٗZVDUTEYWBgcldxـVHpnFksryهوٍَِّ٘Iדٚٛ٠AMXwsڅڎOSۄەV`JEۋ]QxPۙWUbۘXfkg|܇܈܉܎܍ܐDܗ݆ܛZMV_STWܠF]UpYdeIcb`^mov݂݅x݁y݈zwݏݗ݋ݜݔ\@ݠݚAHOoqp߅|_w^~\߀@Mh`Bt߃ޟEmxdfߊ߉zbw]udSPiByjwuYbYQTAlC{SO]}bgnRc^kj耚Jxu^[^oZX`QOXfgFKpUTCBGIoDsBeytK~XHzbAfxtPCqP||@yTonHNi{z~nSsh\JRZu|HNe^WK_adNF\vUVIiO}|IJ@R}DXVUtnky^gSMaORCBhu|jZDGCOdsnLTVWZ\]Jcebgh`l[|Y}GywubA]U@THDFIRXAH]EUS[`hyrׇZFVq\nov^XdxfghntywBDC@ABIHiRacM}WUl_jhefw}~DhAEL^QRSZ\`_dhjjw}hqTDAEFGLINHKRQW^lktvxos}~zRSWZY_gHzx|vw{A~RQPGHEUTSKR_sj}\tq~EKLJtyxW|u~EGT|OWVNUcQTq^wnbjf`dqor~\~zaNOEHKAFTLYXalsl[gw{qvmeFcBLMI@ZX[VshkgBFuSQOtfIdcR{o|zxrv@[MPZN]ZOY^ogAliktX\BFg_OVW^YQsWpwDILXUzSZstowx{BORWXZ[]eg_fblrpx}IubeSӇL\I犏fǬK"
//ת
function ToFanTi()
{
    val=document.body.innerHTML;
    for(var i=0;i<GM_str_s.length;i++)
    {
        t1=GM_str_s.charAt(i);
        t2=GM_str_t.charAt(i);
        val=val.replace(new RegExp(t1,"gm"),t2);
    }
    document.body.innerHTML=val;
}
function ToJianTi()
{
    val=document.body.innerHTML;
    for(var i=0;i<GM_str_s.length;i++)
    {
        t1=GM_str_s.charAt(i);
        t2=GM_str_t.charAt(i);
        val=val.replace(new RegExp(t2,"gm"),t1);
    }
    document.body.innerHTML=val;
}
function ToTrans()
{
    val=document.getElementById("TransID").innerHTML;
    if(val=="w"){
        document.getElementById("TransID").innerHTML="";
        ToJianTi();
       ChangeMenu(0);
       SetCookie(0);
    }
    else if(val==""){
        
        document.getElementById("TransID").innerHTML="";
        ToFanTi();
        ChangeMenu(1);
        SetCookie(1);
    }
    
}
function ChangeMenu(vl)
{
    //ת
    if(vl==1){
        TxChildMenu.navigation[0]= ",http://www.148365.com,_self,images/toolbar/www.gif";
        TxChildMenu.navigation[1]= "^Փ,http://bbs.148365.com,_self,images/toolbar/bbs.gif";
        TxChildMenu.navigation[2]= "ھԃ,http://ask.148365.com,_self,images/toolbar/bbs.gif";
        TxChildMenu.navigation[3]= "Y,http://data.148365.com,_self,images/toolbar/bbs.gif";
        TxChildMenu.navigation[4]= "ȫվ,http://so.148365.com,_self,images/toolbar/bbs.gif";
        TxChildMenu.navigation[5]= ",http://www.148365.com/person/default.aspx?frame=MsgXT,_blank,images/toolbar/message.gif";
        TxChildMenu.navigation[6]= ",http://lawyer.148365.com/blog/,_blank,images/toolbar/bbs.gif";
        TxChildMenu.navigation[7]= "׈Db,http://photo.148365.com,_blank,images/toolbar/bbs.gif";

        TxChildMenu.finance[0]= "y~,http://www.148365.com/person/default.aspx?frame=myBank,_blank,images/toolbar/bank.gif";	//javaScript:void(null)
        TxChildMenu.finance[1]= "ُI,http://www.148365.com/person/default.aspx?frame=Buy,_blank,images/toolbar/gold.gif";


        TxChildMenu.setting[0]= ",http://www.148365.com/person/,_self,images/toolbar/mail.gif";
        TxChildMenu.setting[1]= "Ϣ,http://www.148365.com/person/userInfo.aspx,_self,images/toolbar/info.gif";
        TxChildMenu.setting[2]= "޸^,http://www.148365.com/person/default.aspx?frame=EditFace,_self,images/toolbar/face.gif";
        TxChildMenu.setting[3]= "޸ܴa,http://www.148365.com/person/default.aspx?frame=EditPwd,_self,images/toolbar/pwd.gif";
        TxChildMenu.setting[4]= "޸Ϣ,http://www.148365.com/person/default.aspx?frame=EditUserInfo,_self,images/toolbar/mail.gif";
    }
    //ת
    else if(vl==0){
        TxChildMenu.navigation[0]= "ҳ,http://www.148365.com,_self,images/toolbar/www.gif";
        TxChildMenu.navigation[1]= "̳,http://bbs.148365.com,_self,images/toolbar/bbs.gif";
        TxChildMenu.navigation[2]= "ѯ,http://ask.148365.com,_self,images/toolbar/bbs.gif";
        TxChildMenu.navigation[3]= ",http://data.148365.com,_self,images/toolbar/bbs.gif";
        TxChildMenu.navigation[4]= "ȫվ,http://so.148365.com,_self,images/toolbar/bbs.gif";
        TxChildMenu.navigation[5]= ",http://www.148365.com/person/default.aspx?frame=MsgXT,_blank,images/toolbar/message.gif";
        TxChildMenu.navigation[6]= "ҳ,http://lawyer.148365.com/blog/,_blank,images/toolbar/bbs.gif";
        TxChildMenu.navigation[7]= "ͼ,http://photo.148365.com,_blank,images/toolbar/bbs.gif";

        TxChildMenu.finance[0]= "˻,http://www.148365.com/person/default.aspx?frame=myBank,_blank,images/toolbar/bank.gif";	//javaScript:void(null)
        TxChildMenu.finance[1]= ",http://www.148365.com/person/default.aspx?frame=Buy,_blank,images/toolbar/gold.gif";


        TxChildMenu.setting[0]= ",http://www.148365.com/person/,_self,images/toolbar/mail.gif";
        TxChildMenu.setting[1]= "Ϣ,http://www.148365.com/person/userInfo.aspx,_self,images/toolbar/info.gif";
        TxChildMenu.setting[2]= "޸ͷ,http://www.148365.com/person/default.aspx?frame=EditFace,_self,images/toolbar/face.gif";
        TxChildMenu.setting[3]= "޸,http://www.148365.com/person/default.aspx?frame=EditPwd,_self,images/toolbar/pwd.gif";
        TxChildMenu.setting[4]= "޸Ϣ,http://www.148365.com/person/default.aspx?frame=EditUserInfo,_self,images/toolbar/mail.gif";
    }
    
}
function SetCookie(val)
{
    document.cookie="isFT="+val;
}
function getCookie(str){
	var tmp,reg=new RegExp("(^| )"+str+"=([^;]*)(;|$)","gi");
	if(tmp=reg.exec(document.cookie))return(tmp[2]);
	return null;
}
var msg  = "ݣҪʡ" ; 
var interval = 100 
var spacelen = 100; 
var space10=" "; 
var seq=0; 
var cont=true;
function Scroll() { 
	len = msg.length; 
//	alert(typeof(document.askandsearch.key1));
    if(!g('keyword')) return false;
	
	g('keyword').value = msg.substring(0, seq+1); 
	seq++; 
	if ( seq >= len ) {
		setTimeout(function(){
								seq = 0;  
								var per=Math.round(Math.random()*(5-1))+1;
								switch (per){
									case 1: msg="ֻڴ⣬磺ͬ⣿";break;
									case 2: msg="ύɹǧרΪ⡣";break;
									case 3: msg="ύɹǧרΪ⡣";break;
									case 4: msg="⣬ѯ";break;
									case 5: msg="ֻڴ⣬磺ͨ¹⳥";break;
								}
								if (cont) {
									window.setTimeout("Scroll();", interval ); 
								}
								else{
									g('keyword').value="";
								}
							},2000);
	} 
	else{
		if (cont) { 
			window.setTimeout("Scroll();", interval );
		}
		else{
			g('keyword').value="";
		}
		}
}
$(function(){
    if(g('onlineusercount')){
        g('keyword').onfocus=function(){
            this.value='';
            cont=false;
        }
        g('keyword').onblur=function(){
            if(this.value==''){
            cont=true;
            Scroll();
            }
        }
        g('keyword').style.color='#FF6600';
        Scroll();
    }
    if(getCookie("isFT")=="1"){
       ToTrans();
    }
    //ϵͳ
    try{	
//        if(location.href.indexOf("fayou.148365.com")==-1)
//        {
//            var bl=true;
//            if(location.href.toLowerCase()=='http://www.148365.com')bl=false;
//            if(location.href.toLowerCase()=='http://www.148365.com/')bl=false;
//            //
//            if(bl) Fy_GetToolTip();
//        }
        
	    //ȡ
	   
	    
	    setTimeout("Fy_GetMsgs()",2*1000);
	    //COOKIE isreading
	    CheckIsReading();
        //window.status='ػϵͳ'
        //loadScript('http://reg.148365.com/js/interaction.js');
        
        //ʱ֪ͨ
        //setTimeout("TongZhi()",20*1000);
        setTimeout("UnShow()",20*1000);//ͶƱ
        
        
     }catch(e){}
 });
function TongZhi()
{
    Fy_ShowMsg(0,'άվֹܽʹ','άվֹܽʹáĲ㣬½⣡',0,'',0);
}
//ʱԶϵַ
function AddLaweach()
{
    document.body.oncopy = function () {  
    setTimeout( function () { 
    var text = clipboardData.getData("text");
    if (text) { 
      text = text + "  [:  www.148365.com ]";
      clipboardData.setData("text", text);
        } 
        }, 100 )
    }
}
$(AddLaweach);
 
function UnShow()
{
var content=$('#idFade');
content.slideUp('slow');
}
//ʼ
function InitMessage()
{
var left=window.screen.width/2-200;
var msgTemp='<div id="ShowMessage" style="position: absolute; font-size:12px;left:'+left+'px;top:200px;z-index:999999;display:none">';
	msgTemp+='<div>';
	msgTemp+='<div style="float:left;width:400px; border:gray 1px solid; margin-left:10px; margin-top:10px">';
	msgTemp+='<div style="float:left;background:url(http://reg.148365.com/img/line.png); width:100%; height:26px; line-height:26px; text-indent:10px; font-size:13px;">';
    msgTemp+='<div style="float:left; width:60px;"></div>';
    msgTemp+='<div style="float:left; padding-left:295px;padding-top:5px"><img style="cursor:pointer" onclick="DisBox()" src="http://reg.148365.com/img/quxiao.png" /></div>';
    msgTemp+='</div>';
	msgTemp+='<div style="float:left; padding-left:10px; background-color:#F2F2F2; width:390px; height:300px">';
    msgTemp+='<div style="background-color:#CCCCCC;height: 25px; line-height: 25px; width: 380px;margin-top: 10px; text-align: center;">';
    msgTemp+='<span id="MsgCount" style="color:Red">0</span>δϢ <span id="MsgNext"></span>';
    msgTemp+='</div>';
    msgTemp+='<div style="float:left; margin-top:10px; width:100%; background-color:#F1F1F1; line-height:22px">';
    msgTemp+=' <span id="MsgDate"></span>,<span id="MsgUser"></span>͵Ϣ<span id="Reply"></span><br />';
    msgTemp+='Ϣ⣺ <strong><span id="MsgTitle"></span></strong>';
    msgTemp+='</div>';
    msgTemp+='<div id="MsgContent" style="float:left; padding-top:10px; line-height:21px; height:180px; width:380px; overflow:auto; border-top:#CCCCCC 1px solid; margin-top:10px; background-color:#F8F7F6">';
    msgTemp+='</div>';
    msgTemp+='</div>';
    msgTemp+='</div>';
    msgTemp+='</div>';
    msgTemp+='</div>';
document.write(msgTemp);
}
//ʾ֪ͨ
function FyTB_ReadNoteInfo2()
{
    document.getElementById("ShowMessage").style.display='';
    var fymsg=FyCookie_GetMsg();
    
    var array=fymsg.split('|');
    var count=array[3];
    var msgid=0;
    if(array[1]!=""){
        if(array[1].split(',').length>0){
            msgid=array[1].split(',')[0];
            var url=Config.FyMsgPath + "?type=getone&id="+msgid+"&mtype=1";
            loadScript(url);
        }
    }else if(array[2]!=""){
        if(array[2].split(',').length>0){
            msgid=array[2].split(',')[0];
            var url=Config.FyMsgPath + "?type=getone&id="+msgid+"&mtype=2";
            loadScript(url);
        }
    }
    FyCookie_RemoveOneMsg(msgid);
}

function ShowMessage(uName,date,title,content,face)
{
  
    var fymsg=FyCookie_GetMsg();
    
    var array=fymsg.split('|');
    var count=array[3];
    var msgid=0;
    var next="";
    if(array[1]!=""){
        if(array[1].split(',').length>0){
            msgid=array[1].split(',')[0];
            next="<a href='javascript:ShowNext("+msgid+",1)'>һ</a>";
        }
    }else if(array[2]!=""){
        if(array[2].split(',').length>0){
            msgid=array[2].split(',')[0];
            next="<a href='javascript:ShowNext("+msgid+",2)'>һ</a>";
        }
    }
    title="<img src='http://pic.148365.com/reg/images/qqface/"+face+".gif'>"+title;
 
    document.getElementById("MsgCount").innerHTML=count;
    document.getElementById("MsgDate").innerHTML=date;
    document.getElementById("MsgUser").innerHTML=uName;
    document.getElementById("MsgTitle").innerHTML=title;
    document.getElementById("MsgContent").innerHTML=content;
    document.getElementById("MsgNext").innerHTML=next;
    if(uName!="ϵͳ"){
        document.getElementById("Reply").innerHTML="<a href='http://www.148365.com/person/default.aspx?frame=SendMsg&username="+uName+"' target='_blank'><font style='color:#0000ff'>ظ</font></a>";
    }
}
function ShowNext(id,mtype)
{
    var url=Config.FyMsgPath + "?type=getone&id="+id+"&mtype="+mtype;
    loadScript(url);
    FyCookie_RemoveOneMsg(id);
}
function DisBox()
{
    document.getElementById("ShowMessage").style.display='none';
    var fymsg=FyCookie_GetMsg();
    var array=fymsg.split('|');
    var count=array[3];
    Fy_NodeDataFill(count);
}