if(!window.T){T={}}
T.DH={initialize: function(){
if(this.isInternetExplorer()==false){
return;}
if(T.HS.hasKey("DhtmlHistory_pageLoaded")==false){
this.fireOnNewListener=false;
this.firstLoad=true;
T.HS.put("DhtmlHistory_pageLoaded",true);}
else{
this.fireOnNewListener=true;
this.firstLoad=false;}},addListener: function(callback){
this.listener=callback;
if(this.fireOnNewListener==true){
this.fireHistoryEvent(this.currentLocation);
this.fireOnNewListener=false;}},isFirstInitFlag:1,add: function(newLocation,_historyData,isReplace){
var self=this;
var historyData='';
var addImpl=function(){
if(self.currentWaitTime>0)
self.currentWaitTime=self.currentWaitTime-self.WAIT_TIME;
newLocation=self.removeHash(newLocation);
var idCheck=document.getElementById(newLocation);
if(idCheck!=undefined||idCheck!=null){
var message="can not have same value as _any_ id's:"+newLocation;
throw message;}
T.HS.put(newLocation,historyData);
self.ignoreLocationChange=true;
this.ieAtomicLocationChange=true;
self.currentLocation=newLocation;
if(self.isInternetExplorer()){if(isReplace)self.iframe.contentWindow.location.replace(BASE+"b.htm?"+newLocation);
else self.iframe.src=BASE+"b.htm?"+newLocation;}
window.location.hash=newLocation;
this.ieAtomicLocationChange=false;};
window.setTimeout(addImpl,this.currentWaitTime);
this.currentWaitTime=this.currentWaitTime+this.WAIT_TIME;},ReplaceAdd: function(newLocation,data){
this.add(newLocation,data,1)},isFirstLoad: function(){
if(this.firstLoad==true){
return true;}
else{
return false;}},isInternational: function(){
return false;},getVersion:function(){
return "0.03";},getCurrentLocation:function(){
var currentLocation=this.removeHash(window.location.hash);
return currentLocation;},currentLocation:null,listener:null,iframe:null,ignoreLocationChange: null,WAIT_TIME:1200,currentWaitTime:900,fireOnNewListener:null,firstLoad:null,ieAtomicLocationChange:null,create:function(){
var initialHash=this.getCurrentLocation();
this.currentLocation=initialHash;
if(this.isInternetExplorer()){
document.write("<iframe style='border:0px;width:1px;"
+"height:1px;position:absolute;bottom:0px;"
+"right:0px;visibility:visible;'"
+"name='DhtmlHistoryFrame' id='DhtmlHistoryFrame'></iframe>");
this.WAIT_TIME=400}
var self=this;
window.onunload=function(){
self.firstLoad=null};
if(this.isInternetExplorer()==false){
if(T.HS.hasKey("DhtmlHistory_pageLoaded")==false){
this.ignoreLocationChange=true;
this.firstLoad=true;
T.HS.put("DhtmlHistory_pageLoaded",true);}
else{
this.ignoreLocationChange=false;
this.fireOnNewListener=true}}
else{
this.ignoreLocationChange=true}
if(this.isInternetExplorer()){
this.iframe=document.getElementById("DhtmlHistoryFrame");}
var self=this;
var locationHandler=function(){
self.checkLocation();};
setInterval(locationHandler,1500);},fireHistoryEvent: function(newHash,data){
var historyData=data||T.HS.get(newHash);
this.listener.call(null,newHash,historyData);},checkLocation: function(){
if(this.isInternetExplorer()==false
&&this.ignoreLocationChange==true){
this.ignoreLocationChange=false;
return;}
if(this.isInternetExplorer()==false
&&this.ieAtomicLocationChange==true){
return;}
var hash=this.getCurrentLocation();
if(hash==this.currentLocation)
return;
this.ieAtomicLocationChange=true;
if(this.isInternetExplorer()&&this.getIFrameHash()!=hash){
this.iframe.src=BASE+"b.htm?"+hash;}
else if(this.isInternetExplorer()){
return;}
this.currentLocation=hash;
this.ieAtomicLocationChange=false;
this.fireHistoryEvent(hash);},getIFrameHash: function(){
var historyFrame=document.getElementById("DhtmlHistoryFrame");
var doc=historyFrame.contentWindow.document;
var hash=new String(doc.location.search);
if(hash.length==1&&hash.charAt(0)=="?")
hash="";
else if(hash.length>=2&&hash.charAt(0)=="?")
hash=hash.substring(1);
return hash;},removeHash: function(hashValue){
if(hashValue==null||hashValue==undefined)
return null;
else if(hashValue=="")
return "";
else if(hashValue.length==1&&hashValue.charAt(0)=="#")
return "";
else if(hashValue.length>1&&hashValue.charAt(0)=="#")
return hashValue.substring(1);
else
return hashValue;},iframeLoaded: function(newLocation,data){
if(this.ignoreLocationChange==true&&!data){
this.ignoreLocationChange=false;
return;}
var hash=new String(newLocation.search);
if(hash.length==1&&hash.charAt(0)=="?")
hash="";
else if(hash.length>=2&&hash.charAt(0)=="?")
hash=hash.substring(1);
if(this.pageLoadEvent!=true){
window.location.hash=hash;}
this.fireHistoryEvent(hash,data);},isInternetExplorer: function(){
var userAgent=navigator.userAgent.toLowerCase();
if(document.all&&userAgent.indexOf('msie')!=-1){
return true;}
else{
return false;}}};
T.HS={debugging: false,storageHash: new Object(),hashLoaded: false,put: function(key,value){
this.assertValidKey(key);
if(this.hasKey(key)){
this.remove(key);}
this.storageHash[key]=value;
this.saveHashTable();},get: function(key){
this.assertValidKey(key);
this.loadHashTable();
var value=this.storageHash[key];
if(value==undefined)
return null;
else
return value;},remove: function(key){
this.assertValidKey(key);
this.loadHashTable();
delete this.storageHash[key];
this.saveHashTable();},reset: function(){
this.storageField.value="";
this.storageHash=new Object();},hasKey: function(key){
this.assertValidKey(key);
this.loadHashTable();
if(typeof this.storageHash[key]=="undefined")
return false;
else
return true;},isValidKey: function(key){
if(typeof key!="string")
key=key.toString();
var matcher=/^[a-zA-Z0-9_ \!\@\#\$\%\^\&\*\(\)\+\=\:\;\,\.\/\?\|\\\~\{\}\[\]]*$/;
return matcher.test(key);},storageField: null,init: function(){
var styleValue="position: absolute; top:-1000px; left:-1000px;";
if(this.debugging==true){
styleValue="width: 99%; height: 15em;";}
var newContent=
"<form id='historyStorageForm' "
+"method='GET' "
+"style='"+styleValue+"'>"
+"<textarea id='historyStorageField' "
+"style='"+styleValue+"'"
+"left:-1000px;' "
+"name='historyStorageField'></textarea>"
+"</form>";
document.write(newContent);
this.storageField=document.getElementById("historyStorageField");},assertValidKey: function(key){
if(this.isValidKey(key)==false){
throw "Please provide a valid key for "+"T.HS,key="+key;}},loadHashTable: function(){
if(this.hashLoaded==false){
var serializedHashTable=this.storageField.value;
if(serializedHashTable!=""&&
serializedHashTable!=null){
this.storageHash=eval('('+serializedHashTable+')');}
this.hashLoaded=true;}},saveHashTable: function(){
this.loadHashTable();
var serializedHashTable=JSON.stringify(this.storageHash);
this.storageField.value=serializedHashTable;}};
Array.prototype.______Array=function(){return '______Array'}
var JSON={
org: 'http://www.JSON.org',
copyright: '(c)2005 JSON.org',
license: 'http://www.crockford.com/JSON/license.html',
stringify: function(arg){
var c,i,l,s='',v;
switch(typeof arg){
case 'object':if(arg){
if(arg.______Array=='______Array'){
for(i=0; i<arg.length;++i){
v=this.stringify(arg[i]);
if(s){
s+=',';}
s+=v;}
return '['+s+']';}else if(typeof arg.toString!='undefined'){
for(i in arg){
v=arg[i];
if(typeof v!='undefined'&&typeof v!='function'){
v=this.stringify(v);
if(s){
s+=',';}
s+=this.stringify(i)+':'+v;}}
return '{'+s+'}';}}
return 'null';
case 'number':return isFinite(arg)? String(arg): 'null';
case 'string':l=arg.length;
s='"';
for(i=0; i<l; i+=1){
c=arg.charAt(i);
if(c>=' '){
if(c=='\\'||c=='"'){
s+='\\';}
s+=c;}else{
switch(c){
case '\b':s+='\\b';
break;
case '\f':s+='\\f';
break;
case '\n':s+='\\n';
break;
case '\r':s+='\\r';
break;
case '\t':s+='\\t';
break;
default:
c=c.charCodeAt();
s+='\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);}}}
return s+'"';
case 'boolean':return String(arg);
default:
return 'null';}},
parse: function(text){
var at=0;
var ch=' ';
function error(m){
throw{
name: 'JSONError',
message: m,
at: at-1,
text: text};}
function next(){
ch=text.charAt(at);
at+=1;
return ch;}
function white(){
while(ch!=''&&ch<=' '){
next();}}
function str(){
var i,s='',t,u;
if(ch=='"'){
outer:	while(next()){
if(ch=='"'){
next();
return s;}else if(ch=='\\'){
switch(next()){
case 'b':s+='\b';
break;
case 'f':s+='\f';
break;
case 'n':s+='\n';
break;
case 'r':s+='\r';
break;
case 't':s+='\t';
break;
case 'u':u=0;
for(i=0; i<4; i+=1){
t=parseInt(next(),16);
if(!isFinite(t)){
break outer;}
u=u*16+t;}
s+=String.fromCharCode(u);
break;
default:
s+=ch;}}else{
s+=ch;}}}
error("Bad string");}
function arr(){
var a=[];
if(ch=='['){
next();
white();
if(ch==']'){
next();
return a;}
while(ch){
a.push(val());
white();
if(ch==']'){
next();
return a;}else if(ch!=','){
break;}
next();
white();}}
error("Bad array");}
function obj(){
var k,o={};
if(ch=='{'){
next();
white();
if(ch=='}'){
next();
return o;}
while(ch){
k=str();
white();
if(ch!=':'){
break;}
next();
o[k]=val();
white();
if(ch=='}'){
next();
return o;}else if(ch!=','){
break;}
next();
white();}}
error("Bad object");}
function num(){
var n='',v;
if(ch=='-'){
n='-';
next();}
while(ch>='0'&&ch<='9'){
n+=ch;
next();}
if(ch=='.'){
n+='.';
while(next()&&ch>='0'&&ch<='9'){
n+=ch;}}
if(ch=='e'||ch=='E'){
n+='e';
next();
if(ch=='-'||ch=='+'){
n+=ch;
next();}
while(ch>='0'&&ch<='9'){
n+=ch;
next();}}
v=+n;
if(!isFinite(v)){
error("Bad number");}else{
return v;}}
function word(){
switch(ch){
case 't':if(next()=='r'&&next()=='u'&&next()=='e'){
next();
return true;}
break;
case 'f':if(next()=='a'&&next()=='l'&&next()=='s'&&
next()=='e'){
next();
return false;}
break;
case 'n':if(next()=='u'&&next()=='l'&&next()=='l'){
next();
return null;}
break;}
error("Syntax error");}
function val(){
white();
switch(ch){
case '{':return obj();
case '[':return arr();
case '"':return str();
case '-':return num();
default:
return ch>='0'&&ch<='9' ? num(): word();}}
return val();}};
T.HS.init();
T.DH.create();
var STATIC_RESULT={};
var sn='s0';
var count;
var dym_req='';
var loct=0;
var uin=0;
var cancelJoin=0;
function LoadStaticData(){if(window!=top)return;
//STATIC_RESULT={};
window.name='';
//var url='http://'+sn+'.qbar.qq.com/cgi-bin/cafe_cgi_index_static_app.cgi';
var url='http://qbar.qq.com/cgi-bin/cafe_cgi_index_static_app.cgi';
var hash=window.location.hash;
if(hash)hash=window.location.href.replace(/^.*#|^.*#\?/g,'');
count=0;
T.LoadData(url,IndexDataLoad);}
function LoadDynamicData(data){T.LoadData('http://'+sn+'.qbar.qq.com/cgi-bin/cafe_cgi_index_dynamic_app.cgi?'+dym_req,IndexDataLoad);}
function IndexDataLoad(data){
	for(c in data){
		if(!STATIC_RESULT[c]||c!='sys_param')STATIC_RESULT[c]=data[c];
		else if(c=='sys_param')STATIC_RESULT.sys_param.sys_time=data[c].sys_time;
	}

if(data.sys_param.dym_req){dym_req=data.sys_param.dym_req;
count++;
if (count==1) { window.setTimeout(LoadDynamicData,1000*count) }
else if(count<4){T.UpdateLastTime();window.setTimeout(LoadDynamicData,1000*count)}
else{T.ERROR.MSG(14)}
return;}
IndexDataAllLoaded();}
var Boards={};
function IndexDataAllLoaded(){if(isFirstInit){if(STATIC_RESULT.sys_param.uin>10000){uin=STATIC_RESULT.sys_param.uin;}
if(STATIC_RESULT.cafe_info.svc_type==11)
{
top.location.replace('http://'+STATIC_RESULT.cafe_info.crtor_uin+'.qzone.qq.com/club')
return;
}
var boards=STATIC_RESULT.boards;
for(var i=0; i<boards.length; i++){Boards[boards[i].brdid]=boards[i];
var a={'0':8,'1':32,'2':64,'3':128,'4':256,'5':512,'6':1024,'7':2048};
Boards[boards[i].brdid].sty=boards[i].style;
//Boards[boards[i].brdid].readpriv=a[boards[i].readpriv];
//Boards[boards[i].brdid].postpriv=a[boards[i].postpriv];
//Boards[boards[i].brdid].simrplpriv=a[boards[i].simrplpriv];

if(boards[i].type=="6")Boards['atd']=boards[i];}}
T.RESULT_LAST=STATIC_RESULT;
Init();
if(isFirstInit){isFirstInit=false;
Init_DHistory();
BindElemEvent();}}
var isFirstInit=true;
function OutBrdHREF(p,sty){if(p.type==3||sty==2)return "p,"+p.brdid;return(p.sty==2?"p,":"l,")+p.brdid;}
function ViewRank(n,obj){var hrefs=obj.parentNode.getElementsByTagName("A");
for(var i=0;i<hrefs.length;i++){hrefs[i].className='';}
obj.className='theActiveOne';
for(var i=0;i<3;i++){T.$('D_UserList'+i).style.display='none';}
T.$('D_UserList'+n).style.display='block';}
function BindElemEvent(){T.$('D_keyword').attachEvent("onmouseover",function(){
T.$('D_keyword').select();
T.SetElemProgidAlpha(T.$('D_keyword'),90);});
T.$('D_keyword').attachEvent("onmouseout",function(){
T.SetElemProgidAlpha(T.$('D_keyword'),50);});}
function Init_DHistory(){
if(navigator.userAgent.indexOf('MSIE 7')>0)return;
T.DH.initialize();
T.DH.addListener(OnHistoryChange);
var p=T.DH.getCurrentLocation();}
function OnHistoryChange(u,historyData){u=u||'home';
var p1=u.split(',')[0];
u=u.replace(/\,/,'/#');
if(u.indexOf('/')==-1)	u+='/';
p1=p1+'/';
T.RESULT_LAST=historyData;
if(p1=='home/')ResetNormal();


var w=T.$('DOM_mainFrame').contentWindow;
if(T.$('DOM_mainFrame2')){if(p1=='lzx/'||p1=='jh/'||p1=='l/'||p1=='p/'||p1=='all/'||p1=='allzx/')w=T.$('DOM_mainFrame2').contentWindow;
else if(p1!='r/'){$('html').css('overflow','');$('div.bodyLeft').show();document.body.className='';
$('div.bodyiframe>iframe').get(0).setAttribute('id','DOM_mainFrame');
if($('div.rigRead>iframe').get(0))$('div.rigRead>iframe').get(0).setAttribute('id','');w=T.$('DOM_mainFrame').contentWindow}}
var p=w.location.pathname.replace('/'+T.GetDomainName()+'/','').replace(/^\//,'');
//u=u.replace('all/#1','all/');

if(p!=p1)window.setTimeout(function(){w.location.replace(BASE+u)},T.isIE?50:200);
else{
w.location.replace(BASE+u);
window.setTimeout(function(){
try{
w.T.ResetAllXMP();
w.Init();}catch(e){
window.setTimeout(function(){
try{
w.T.ResetAllXMP();
w.Init();
}catch(e){}
},300);}},T.isIE?50:220);
T.PingPGV();
}
var t=document.documentElement.scrollTop;
if (t>125)window.setTimeout(function(){window.scrollTo(0,120)},300);
AutoSetFullViewMode();}
var isFirstLoad=1;


function OnMainLoad(R,u,replaceFlag)
{
	u=u.replace(/((\,\d+)|all|allzx|lw)\,1$/,'$1');
	if (isFirstLoad)
	{
		window.setTimeout(function()
		{
			OnMainLoadRun(R,u,replaceFlag)
		},30);
		isFirstLoad = 0;
	}
	else OnMainLoadRun(R,u,replaceFlag);
}


function OnMainLoadRun(R,u,replaceFlag){
u=u.replace('/#',',');	
OnHistoryChange(u,R);
window.clearTimeout(T.emptyResultTimer);
document.body.style.height='600px';
if(navigator.userAgent.indexOf('MSIE 7')>0)
{
window.location.hash=u;
return;
}
if(replaceFlag)T.DH.ReplaceAdd(u,R);
else T.DH.add(u,R);

}


var CGI_Path={};
CGI_Path['lw']='http://bbs.qbar.qq.com/cgi-bin/cafe_cgi_bbs_leaveword_view.cgi?brdid=5&pageno=${p1}';
CGI_Path['p']='http://bbs.qbar.qq.com/cgi-bin/cafe_cgi_bbs_general_article_view.cgi?style=2&brdid=${p1}&pageno=${p2}';
CGI_Path['l']='http://bbs.qbar.qq.com/cgi-bin/cafe_cgi_bbs_general_article_view.cgi?brdid=${p1}&pageno=${p2}';
CGI_Path['jh']='http://bbs.qbar.qq.com/cgi-bin/cafe_cgi_bbs_general_article_view_elite.cgi?brdid=${p1}&pageno=${p2}';
CGI_Path['lzx']='http://bbs.qbar.qq.com/cgi-bin/cafe_cgi_bbs_general_article_view.cgi?sort=1&brdid=${p1}&pageno=${p2}';
CGI_Path['r']='http://bbs.qbar.qq.com/cgi-bin/cafe_cgi_bbs_general_article_read2.cgi?atclid=${p1}';
CGI_Path['all']='http://bbs.qbar.qq.com/cgi-bin/cafe_cgi_bbs_total_article_view.cgi?pageno=${p1}';
CGI_Path['allzx']='http://bbs.qbar.qq.com/cgi-bin/cafe_cgi_bbs_total_article_view.cgi?sort=1&pageno=${p1}';
CGI_Path['about']='http://mng.qbar.qq.com/cgi-bin/cafecgi_mng_showinfo.cgi';
CGI_Path['e']='http://mng.qbar.qq.com/cgi-bin/cafecgi_mng_showallinfo.cgi';
CGI_Path['s']='http://bbs.qbar.qq.com/cgi-bin/cafe_cgi_search_article.cgi?size=40&keyword=${p1}&type=5&begin=${p2}';
CGI_Path['home']='';
function MAIN(u,replaceFlag){

if(!u)u=T.DH.getCurrentLocation();
if(!u)u='home';

u=String(u);
u=decodeURIComponent(u);
var parr;
parr=u.split(/\?|,/);
var fun=parr[0];
var p1=parr[1];
var p2=parr[2];
var p3=parr[3];
if(u!='home'&&u.indexOf(',')==-1&&u.replace(/\w/g,'')!=''){p1=fun;
fun='r';}
var purl=CGI_Path[fun];
var url=String(purl.process({p1:p1,p2:p2,p3:p3}));
url=url.replace(/\&*\w+\=(\&|$)/g,'');

if(isFirstLoad)
{
	var u=fun+(u.indexOf(',')>0?('/#'+u.replace(/\w*\,/,'')):'');
	if(fun=='home')u='home/';
	u=u.replace(/all\/#all/,'all/');
	u=u.replace(/allzx\/#allzx/,'allzx/');

	u=u.replace(/(\#\d+)\,1$/,'$1');
	u=u.replace(/all\/#1$/,'all/');
	u=u.replace(/allzx\/#1$/,'allzx/');
	
	T.$('DOM_mainFrame').contentWindow.location.replace(BASE+u);

	if(u.indexOf('lw')>-1)window.setTimeout(LW,1500);
}
else{
	if (fun=='home') {LoadStaticData()}
	else
	{
		if (fun!='') LW();
		else alert('找不到MAIN("'+fun+'")');
	}
}
isFirstLoad=false;

var p;
T.Event(event);
function LW(){if(replaceFlag)T.LoadData([1,url],new Function('R',"OnMainLoad(R,'"+u+"',1)"));
else T.LoadData([1,url],new Function('R',"OnMainLoad(R,'"+u+"')"));}
return false;}
function Lock(){var d=document.createElement("DIV");
d.style.width=document.body.clientWidth;
d.style.height=document.body.scrollHeight;
d.style.position="absolute";
d.setAttribute("id","DOM_T_DOMmaskDIV");
d.style.left=d.style.top="0px";
d.style.zIndex=100;
d.style.backgroundColor="#D0D6DB";
d.style.filter="Alpha(opacity=10)";
d.style.MozOpacity=0.10;
d.style.cursor='wait';
d.onclick=function(){d.removeNode()}
document.body.appendChild(d);}
if(location.href!='http://qbar.qq.com/'&&location.href!='http://qbar.qq.com')T.OnDOMLoaded.Load(LoadStaticData);
else location.replace('http://web.qbar.qq.com');
//T.OnDOMLoaded.Load(InitIndex);
var SearchAll={
type:5,
keyword:'',
begin:0,
count:0,
total:0,
timespent:0,
entrys:[]}
var schflag=-1;
function setCk(gpid){if(gpid!=null){
exp=new Date();
time=3*60*1000;
exp.setTime(exp.getTime()+time);
document.cookie=escape("gp")+"="+parseInt(gpid)+"; "+"expires="+exp.toGMTString()}}
function SchCheckInput(jumpUin,n){if(n==0&&jumpUin.value=="搜索本Q吧帖子"){jumpUin.value="";}
if(n==1&&jumpUin.value==""){jumpUin.value="搜索本Q吧帖子";}}
function OutBrdMenu(){boards=STATIC_RESULT.boards;
var _$outArr=[];
var _$foldChildMenu=false;
for(var i=0; i<boards.length; i++){var p=boards[i];
if(p.type==0){_$foldChildMenu=(p.offset==1);
var _$str="<td class='b white f14 dhmenubg01 space01' style='word-break:break-all;' menutype='0'>";
if(_$foldChildMenu){_$str+="<a class=href title='"+p.intro.toTitle()+"' onclick='ExpandCollMenuTD(this)'>"+p.title+"</a><img expand='0' src='http://imgcache.qbar.qq.com/qbar/qbar/images/bu_dw_or.gif' align=absMiddle border=0>";}
else{_$str+="<span title='"+p.intro.toTitle()+"'>"+p.title.toHTML()+"</span>";}
_$str+="</td>";
_$outArr.push(_$str);}
else if(p.type==1){_$foldChildMenu=0;
_$outArr.push("<td height=13><table width='100%' cellpadding=0 cellspacing=0 border=0><tr><td width=5 height=1 nowrap></td><td width='100%' background='http://imgcache.qbar.qq.com/qbar/qbar/images/bg_dot02.gif'></td><td width=5 nowrap></td></tr></table></td>");}
else if(p.type>1&&p.type!=4&&p.type!=6){var _$str="<td class='space01' style='word-break:break-all;display:";
_$str+=(_$foldChildMenu?'none':'');
_$str+="'>";
_$str+=(p.offset==1)?"<img defer_src='http://imgcache.qbar.qq.com/qbar/qbar/images/bu_group.gif' width=5 height=12 align=absmiddle border=0>":"";
_$str+="<img width=10 height=10 align=absmiddle  defer_src='http://imgcache.qbar.qq.com/qbar/qbar/images/";
if(p.type==2)_$str+="ico_note_L.gif";
else if(p.type==3)_$str+="ico_note_P.gif";
else if(p.type==5)_$str+="ico_note_memo.gif";
else if(p.type==6){}
else if(p.type==7)_$str+="ico_note_link.gif";
else if(p.type==8)_$str+="ico_note_L.gif";
else if(p.type==9){if(p.style==0)_$str+="ico_note_L.gif";
else _$str+="ico_note_P.gif";}
_$str+="'>&nbsp;";
if(p.type==7){_$str+="<a class='black' href='"+p.url.toTitle()+"' title='"+p.intro.toTitle()+"' target='_blank' class='c'>"+p.title.toHTML()+"</a>";}
else if(p.type==8){continue;
_$str+="<a class='black' href='"+p.url.toTitle()+"' title='以后不会在新窗口打开的&#13;"+p.intro.toTitle()+"' target='_blank' class='c'>"+p.title.toHTML()+"</a>";}
else if(p.type==6){}
else if(p.type==5){_$str+="<a class='black' href='"+BASE+"oth/lw.htm?"+p.brdid+"' target='DOM_mainFrame' title='"+p.intro.toTitle()+"' class='c'>"+p.title.toHTML()+"</a>";}
else if(p.type==3){_$str+="<a class='black' onclick='return CheckBrdPriv("+p.brdid+",this,event)' href='"+BASE+"p/?brdid="+p.brdid+"' title='"+p.intro.toTitle()+"' class='c' target='DOM_mainFrame'>"+p.title.toHTML()+"</a>";}
else if(p.type==2){_$str+="<a class='black' href='#";
if(p.style==0)_$str+="l";
else if(p.style==1)_$str+="b";
else if(p.style==2)_$str+="p";
else if(p.style==3)_$str+="m";
_$str+=","+p.brdid+"' title='"+p.intro.toTitle()+"' class='c'>"+p.title.toHTML()+"</a>";}
else if(p.type==9){_$str+="<a class='black' target='DOM_mainFrame'";
if(p.style!=0)_$str+=" onclick='return CheckBrdPriv("+p.brdid+",this,event)'";
_$str+=" href='"+BASE;
if(p.style==0)_$str+="l";
else _$str+="p";
_$str+="/?brdid="+p.brdid+"' title='"+p.intro.toTitle()+"' class='c'>"+p.title.toHTML()+"</a>";}
_$outArr.push(_$str);}
else if(p.type==4){continue;
var _$str="<td class='space01' style='word-break:break-all;display:";
_$str+=(_$foldChildMenu?'none':'');
_$str+="'>";
_$str+=(p.offset==1)?"<img defer_src='http://imgcache.qbar.qq.com/qbar/qbar/images/bu_group.gif' width=5 height=12 align=absmiddle border=0>":"";
_$str+="<img align=absmiddle defer_src='http://imgcache.qbar.qq.com/qbar/qbar/images/ico_note_L.gif' width=10 height=10>";
_$str+="<b style='color:blue'>[不可用]</b><a class='black' target='DOM_mainFrame' href='";
if(p.style==0)_$str+="admin_l";
else if(p.style==2)_$str+="admin_p";
_$str+="/?"+p.brdid+"' title='"+p.intro.toTitle()+"' class='c' target='mainFrame'>"+p.title.toHTML()+"</a>";
_$str+="<img defer_src='http://imgcache.qbar.qq.com/qbar/qbar/images/ico_key.gif' width=10 height=11>";
_$outArr.push(_$str);}}
return "<tr>"+_$outArr.join("</tr><tr>")+"</tr>";}
function ExpandCollMenu(obj){var img=obj.getElementsByTagName('img')[0];
img.className=(img.className=="navBarShow")?"navBarHidden":"navBarShow";
obj=$(obj.parentNode).next('LI').get(0);
for(var i=0; i<200; i++){if(!obj)return;
if(obj.className=='leftNavType0')break;
if(img.className=="navBarShow")obj.style.display="";
else obj.style.display="none";
obj=$(obj).next('LI').get(0)}}

function AutoSetFullViewMode(flag)
{
var a=$("#DOM_mainFrame");
var w=parseInt(a.get(0).clientWidth);
var mw = parent.document.documentElement.clientWidth-50;
if(w<mw && flag==2){
if(T.$('DOM_mainFrame').name=='Dname_mainFrame')$('div.bodyLeft').hide();
var pScreenWiwth=document.documentElement.clientWidth-6;
var pScreenHeight=document.documentElement.scrollHeight-18; //5
if (pScreenWiwth<970)pScreenWiwth=970;
//else if (pScreenWiwth>1570)pScreenWiwth=1570;
if (pScreenHeight<700)pScreenHeight=700;
document.body.style.overFlow='hidden';
a.css('position','absolute');
a.css('top','29px');
a.css('right','0px');
a.css('width',pScreenWiwth+'px')}
else{
if(T.$('DOM_mainFrame').name=='Dname_mainFrame')$('div.bodyLeft').show();
a.css('position','');
a.css('top','');
a.css('width','100%');
var h=document.documentElement.clientHeight-35}}


function ResetNormal()
{
	$('html').css('overflow-y','scroll');
	$('html').css('overflow-x','auto');
	$('div.bodyLeft').show();
	$('div.bodyiframe').css('width','');
	document.body.className='';
	$('div.bodyiframe>iframe').get(0).setAttribute('id','DOM_mainFrame');
	if($('div.rigRead>iframe').get(0))$('div.rigRead>iframe').get(0).setAttribute('id','');
}

function OnDomLoaded(){InitIndex();}
var STATIC_RESULT={};
var sn='s0';
var count=0;
var dym_req='';
var loct=0;
var uin=0;
var cancelJoin=0;
var lastBackUrl='';
function InitIndex(){T.UpdateLastTime();
var qb=T.GetQbarBasic();
if(qb.length==0&&loct==0){loct=1;
T.LoadQbarBasic(null,InitIndex);
return;}
if(qb.length==0)return;
sn=qb[1];

LoadStaticData();}
function SetCancelJoin(){cancelJoin=1;}
function Init(){var u=window.location.href.replace(/(\/\?brdid\=)|(\?brdid\=)|(\/\?)|(\?)/,',');
u=u.replace(/\&pageno=\d/,',').replace(/\,\D.*/g,'');
u=u.replace(/((\,\d+)|all|allzx|lw)\,1$/,'$1');
u=u.replace(BASE.replace(/\/$/,''),'');
if(u!=window.location.href){
u=u.replace('#','');
u=u.replace(/^\//,'');
u=u.replace(',,',',');
u=u.replace(/\,$/,'');
if(u!='')window.location.hash='#'+u;}

if(!T.$('DOM_ALL')){OnMainLoad(STATIC_RESULT,'home');
return;}
T.RenderDOM('DOM_ALL',STATIC_RESULT,0);

$('UL>LI>H5').each(function(){
if($(this).attr('offset')==1)ExpandCollMenu(this);});

SetBrdImage();

var topBackStyle=T.$("DOM_topBanner").style;
var backimg;
var backflg=true;
var headimg=STATIC_RESULT.cafe_info.head_img;
if (!headimg) headimg = "1.gif";
if (/^http:\/\/.+/.test(headimg))
{
backimg=headimg;
backflg=false;
}
else if (/\d\.jpg$/.test(headimg) || /\d\.gif$/.test(headimg))
{
backimg=headimg;
}
else
{
backimg=headimg+".gif";
}
document.title = STATIC_RESULT.cafe_info.name+":Q吧";

var backimgurl = "";
if (backflg) backimgurl="url(http://imgcache.qbar.qq.com/qbar/qbar2/images_banner/"+backimg+")";
else backimgurl="url("+backimg+")";
var _$headHeight=90;//STATIC_RESULT.cafe_info.headimgheight;
if(!_$headHeight)_$headHeight=100;
_$headHeight=parseInt(_$headHeight);
if(_$headHeight>120)_$headHeight=120;
if(_$headHeight<1)T.$("DOM_topBanner").outerHTML="";
if(_$headHeight>0&&_$headHeight<50)T.$("DOM_topBanner").innerHTML="";
if(_$headHeight>0)topBackStyle.backgroundImage=backimgurl;
window.setTimeout(function(){
OnLoginSuccess(STATIC_RESULT,'');},30);
T.RenderDOM('DOM_MainFooter',STATIC_RESULT);
document.title=STATIC_RESULT.cafe_info.name+"_Q吧";
var hash=GetURLHash(window.location.href);
if(hash.length>1){hash=hash.replace(/(\w)\?/,'$1/?');}
if(hash.replace(/#/g,'')=="")hash="home";
T.$('D_search').onclick=Search;
T.$('D_copyQbarURL').onclick=function(){
var obj=T.$('D_copyQbarURL');
if(window.clipboardData){
window.clipboardData.clearData();
window.clipboardData.setData("Text", BASE);
obj.innerHTML='[成功]';
obj.style.color="red";
window.setTimeout(function(){obj.innerHTML='[复制]';obj.style.color=""},2000);
}else{
alert("你的浏览器不支持复制地址到剪切板");
}}
//if(isFirstLoad==1&&top.location.hash=='#home'){$('#DOM_mainFrame').get(0).src=BASE+'home/';}


window.attachEvent('onresize',function(){
if(T.$('DOM_mainFrame2')){
//window.setTimeout(function(){
var h=document.documentElement.clientHeight-30;
$('#DOM_mainFrame2').css('height',h-1);
$('#DOM_mainFrame').css('height',h);
//},100);
}
});
window.setTimeout(function(){T.LoadDeferImg()},300);}
function GetURLHash(url){if(url.indexOf("#")<1)return "";
return url.replace(/.*#/,'');}
var QBAR1={
LoadFavorite:function(){
T.LoadJS("http://imgcache.qbar.qq.com/qbar/qbar2/QBAR1.js",QBAR1.LoadFavorite);}}
function JoinInvite()
{
	if($('DIV.C_join_l A').html()=='邀请好友')Invite();
	else T.PostData2('http://mng.qbar.qq.com/cgi-bin/cafecgi_mng_joinapply.cgi','typeid=1&answer1=00&answer2=00&answer3=&answer4=&answer5=',cb);
function cb(R){alert("已成功加入");
$('DIV.C_join_l A').html('邀请好友');
$('DIV.C_join_l A').get(0).title='邀请好友加入到这个Q吧';
//$('DIV.C_join_l').hide('slow');
STATIC_RESULT.sys_param=R.sys_param;
var l=T.$('DOM_mainFrame').contentWindow.location;
if (l.href.indexOf(BASE+'home/')>-1){
l.replace(BASE+'home/');}}}
function Logout(){var qbartype=STATIC_RESULT.cafe_info.type;
if(qbartype==2){if(!window.confirm("您确认要退出登录状态吗？\n\n由于本Q吧是隐藏型，退出后将返回Q吧门户"))return;}
else{if(!window.confirm("您确认要退出登录状态吗？"))return;}
var u='http://mng.qbar.qq.com/cgi-bin/cafecgi_mng_logout.cgi';
T.LoadData(u,o);
function o(){T.UpdateLastTime();
if(qbartype==2){window.location.replace("http://web.qbar.qq.com/");}
else window.location.replace(BASE);}}
function CheckBrdPriv(_$brdid,obj,evt){return true;
T.Event(evt);
var level=STATIC_RESULT.sys_param.level;
if(Boards[_$brdid].readpriv>30&&(Boards[_$brdid].readpriv>level||!level)){T.MSG("由于您的权限不够，将转入列表型模式");
obj.href=BASE+"l/?brdid="+_$brdid;}
return true;}
var acl={'32':'一','64':'二','128':'三','256':'四','512':'五','1024':'六','2048':'七'};
function FocusMenu(obj){if(!obj)obj=document.getElementById("DOM_indexHrefTD");
obj.blur();
var tds=obj.parentNode.parentNode.cells;
var tdindex=obj.parentNode.cellIndex;
for(var i=0;i<tds.length;i++){if(tds[i].className=="FocusMenu"){tds[i].className="UnFocusMenu";
tds[i-1].style.visibility=tds[i+1].style.visibility="visible";}}
tds[tdindex].className="FocusMenu";
tds[tdindex-1].style.visibility=tds[tdindex+1].style.visibility="hidden";}
function FoldSimpleReply(obj){var ds=T.$('DOM_replyDIV').style;
var st=/▼/.test(obj.innerHTML);
if(st){ds.height="auto";
obj.innerHTML="back...<SPAN style='FONT-SIZE:7px'>▲</SPAN>";}
else{ds.height="95px";
obj.innerHTML="more...<SPAN style='FONT-SIZE:7px'>▼</SPAN>";}
T.AutoWinHeight();}
function GetOffset(e){var t=e.offsetTop;
var l=e.offsetLeft;
while(e=e.offsetParent){t+=e.offsetTop;
l+=e.offsetLeft;}
return[t,l];}
var _$hideTimer;
function ShowCollBrdDiv(){window.clearTimeout(_$hideTimer);
_$hideTimer=window.setTimeout(function(){
var pos=GetOffset(T.$('DOM_menuIndex'));
var sty=T.$('DOM_ShowCollBrdDiv').style;
sty.display='';
sty.position='absolute';
if(!T.isIE)T.$('MediaPlayer').style.visibility="hidden";
sty.top=pos[0]+20;
sty.left=pos[1]-32;
var div=T.$('DOM_ShowCollBrdDiv');
div.onmouseout=TryHideCollBrdDiv;
div.onmouseover=function(){window.clearTimeout(_$hideTimer);};
div.onclick=ShowHideBrd;},100);}
function TryHideCollBrdDiv(){window.clearTimeout(_$hideTimer);
_$hideTimer=window.setTimeout(HideCollBrdDiv,500);}
function HideCollBrdDiv(){T.$('DOM_ShowCollBrdDiv').style.display="none";
if(!T.isIE)T.$('MediaPlayer').style.visibility="inherit";}
function ShowHideBrd(){HideCollBrdDiv();
var sty=T.$('DOM_idx_A1').style;
if(sty.display=='none'){sty.display='';
T.$('DOM_idx_B1').style.width="800px";
T.$('DOM_ShowCollBrdDiv').innerHTML="←隐藏导航";}
else{sty.display='none';
T.$('DOM_idx_B1').style.width="990px";
T.$('DOM_ShowCollBrdDiv').innerHTML="→显示导航<br><div onclick='window.event.cancelBubble=true'>"+T.$('DOM_idx_A1').innerHTML+"</div>";}}
var MPObject=new Object();
MPObject.mediaTimer=null;
MPObject.mediaIndex=-1;
MPObject.MP;
MPObject.lastTime=new Date();
MPObject.tryCount=10;
MPObject.autoPlay=0;
MPObject.InitToolbarSelect=function(){this._$toolbar=T.$('DOM_MediaPlayerToolbar');
this._$select=this._$toolbar.getElementsByTagName('select')[0];
if(!T.isIE){this._$select.add=this._$select.appendChild;}
if(this._$select.options.length==0){for(var i=0;i<STATIC_RESULT.music.musiclist.length;i++){this._$select.add(new Option(STATIC_RESULT.music.musiclist[i].name,STATIC_RESULT.music.musiclist[i].url));}}
if(MPObject.mediaIndex>-1)this._$select.options[MPObject.mediaIndex].selected=true;}
function ShowMusicToolbar(){MPObject.InitToolbarSelect();
T.$('DOM_MediaPlayerToolbar').style.display='';
var _$mplayer=T.$('MediaPlayer');
MPObject._$select.onchange=function(){if(_$mplayer.playState==2)_$mplayer.Stop();
MPObject._$select.disabled=true; MPObject._$select.disabled=false;
HideMusicToolbar();
MediaStop();
MPObject.tryCount=5;
MPObject.autoPlay=1;
MPObject.mediaIndex=MPObject._$select.selectedIndex;
window.setTimeout(Play,50);}
MPObject._$toolbar.onmouseout=TryHideMusicToolbar;
MPObject._$toolbar.onmouseover=function(){window.clearTimeout(MPObject.mediaTimer)};
MPObject._$select.onclick=function(){MPObject._$toolbar.onmouseout=function(){}
window.clearTimeout(MPObject.mediaTimer);
MPObject.mediaTimer=window.setTimeout(HideMusicToolbar,4000);}
window.clearTimeout(MPObject.mediaTimer);
MPObject._$select.onmouseover=function(){window.clearTimeout(MPObject.mediaTimer)}
T.$('DOM_ShowCollBrdDiv').style.display="none";
window.clearTimeout(MPObject.mediaTimer);
MPObject.mediaTimer=window.setTimeout(HideMusicToolbar,5000);}
function MediaToPlay(){if(T.isIE)window['MediaPlayer'].Play();
else MediaPlay();}
function TryPlayNext(){if(MPObject.mediaIndex==-1)MPObject.mediaIndex=0;
MPObject.tryCount--;
if(MPObject.tryCount==0)return;
window.clearTimeout(MPObject.mediaTimer);
MPObject.mediaTimer=window.setTimeout(function(){MPObject.autoPlay=1;
if(MPObject.mediaIndex>=STATIC_RESULT.music.musiclist.length||MPObject.mediaIndex<0){MPObject.mediaIndex=0;}
PlayNext()},1000);}
function Play(){var _$mp=T.$('MediaPlayer');
if(MPObject.mediaIndex==-1)MPObject.mediaIndex=0;
if(T.isIE)_$mp.filename=STATIC_RESULT.music.musiclist[MPObject.mediaIndex].url;
window.clearTimeout(MPObject.mediaTimer);
window['MediaPlayer'].Stop();
MPObject.autoPlay=1;
MPObject.mediaTimer=window.setTimeout(function(){
window['MediaPlayer'].Play();},400);}
function PlayNext(){if(new Date()-MPObject.lastTime<10000){MPObject.lastTime=new Date();
TryPlayNext=function(){MPObject.mediaIndex++;MediaPlay()};
return;}
MPObject.autoPlay=1;
MPObject.InitToolbarSelect();
MPObject.mediaIndex++;
if(MPObject.mediaIndex>=STATIC_RESULT.music.musiclist.length||MPObject.mediaIndex<0)MPObject.mediaIndex=0;
Play();}
function TryHideMusicToolbar(){window.clearTimeout(MPObject.mediaTimer);
MPObject.mediaTimer=window.setTimeout(HideMusicToolbar,1000);}
function HideMusicToolbar(){var _$toolbar=T.$('DOM_MediaPlayerToolbar');
_$toolbar.style.display='';
var _$select=_$toolbar.getElementsByTagName('select')[0];
T.$('DOM_MediaPlayerToolbar').style.display='none';
_$select.disabled=true; _$select.disabled=false;}
function MediaStop(){window['MediaPlayer'].Stop();}
MPObject.BindEvent=function(){this.MP=T.$('MediaPlayer');
this.MP.onmouseover=ShowMusicToolbar;
this.MP.onmouseout=TryHideMusicToolbar;}
MPObject.OffMusic=function(obj){if(T.GetCookie("gOffMusic")!=1){
T.SetCookie('gOffMusic',"1",new Date(new Date().getTime()+1000*3600*24*31),'/','qbar.qq.com');
obj.innerHTML="启用自动播放";}
else{T.SetCookie('gOffMusic',"0",new Date(),'/','qbar.qq.com');
obj.innerHTML="关闭自动播放";}}
function MediaPlay(){if(MPObject.mediaIndex<0||MPObject.mediaIndex>=STATIC_RESULT.music.musiclist.length)MPObject.mediaIndex=0;
if(new Date()-MPObject.lastTime>30000)MPObject.tryCount=10;
if(new Date()-MPObject.lastTime<1000){MPObject.lastTime=new Date();
return;}
MPObject.autoPlay=1;
var src=STATIC_RESULT.music.musiclist[MPObject.mediaIndex].url;
window['MediaPlayer'].Play();
MPObject.BindEvent();};
var listMode;
function OnLoginSuccess(R,speed){
STATIC_RESULT.sys_param=R.sys_param;
SetBrdImage();
	
window.setTimeout(function(){T.TryHideLoader(1)},5000);
window.setTimeout(function(){T.TryHideLoader(1)},8000);
var role=R.sys_param.urole;



if(role>20){
	if(T.$('D_custDesCtl'))
	{
		$('#D_custDesCtl').show();
		T.$('D_custDesCtl').onclick=function(){
			//var imginfo=window.showModalDialog(BASE+"mng/CustomIndex.htm",null, "dialogHeight:350px;dialogWidth:1000px;center:yes;status:0;help:no;scroll:no;resizable:yes");
			//return;
		if($('#DOM_mainFrame').get(0).contentWindow.location!=BASE+'home/')
		{
			if(confirm('只有返回首页才能自定义,继续使用自定义功能吗?'))
			$('#DOM_mainFrame').get(0).contentWindow.location=BASE+'home/';
			return;
		}

		var loaded=0;
		T.LoadJS('http://imgcache.qbar.qq.com/JQ/JQ.js?'+T.GetRand(),
			function(){loaded+=1;ck()});
		T.LoadJS('http://imgcache.qbar.qq.com/JQ/interface_ist_idg_idp.js?'+T.GetRand(),
			function(){loaded+=2;ck()})
		T.LoadJS('http://imgcache.qbar.qq.com/JQ/dimensions.js?'+T.GetRand(),
			function(){loaded+=4;ck()})
		T.LoadJS('http://imgcache.qbar.qq.com/b03js/customIndex.js?'+T.GetRand(),
			function(){loaded+=8;ck()})
		
		function ck()
		{
			if(loaded==15)InitIndexDesign()
		}
		
		
		/*
		T.LoadJS('http://imgcache.qbar.qq.com/JQ/JQ.js?'+T.GetRand(),function(){
		T.LoadJS('http://imgcache.qbar.qq.com/JQ/interface_ist_idg_idp.js?'+T.GetRand(),function(){
		T.LoadJS('http://imgcache.qbar.qq.com/JQ/dimensions.js?'+T.GetRand(),function(){
		T.LoadJS('http://imgcache.qbar.qq.com/b03js/customIndex.js?'+T.GetRand(),
			function(){InitIndexDesign()})
		})
		})
		});
		*/
		} //T.$('D_custDesCtl').onclick=function(){
	}
	$('#D_adminCtl').show(speed);
}else $('#D_adminCtl').hide(speed);
if(role>=10)
{
	//$('DIV.C_join_l').hide(speed);
	$('DIV.C_join_l A').html('邀请好友');
}
else if(role==0)$('DIV.C_join_l').show(speed);
var u=T.DH.getCurrentLocation();


	if(isFirstLoad)
	{
		if(u.indexOf('all')>-1)listMode=2;
		window.MAIN(u);
		if(T.DH.iframe.src=='')
		{
			var hash=window.location.hash.replace('#','');
			if (hash=='')hash='home';
			if(navigator.userAgent.indexOf('MSIE 7')>0)return;
			window.setTimeout(function(){
				T.DH.iframe.src = BASE+"b.htm?" + hash;
			},700);
		}
	}
	else if(u!='home'&&u!='about')
	{
		var w=T.$('DOM_mainFrame').contentWindow;
		if(w.location.href.indexOf(BASE+'e/')>-1)return;
		if(w.location.href.indexOf(BASE+'r/')>-1/* && w.T.$('D_editor') && w.T.$('D_editor').value!=''*/)return;
		if(!T.afterLoginRS)window.MAIN(u);
	}
}
function GetRssPath(){var str=T.GetCookie("gNIS");
var cafes=str.split("|");
if(cafes.length<1)return "";
var temp=[];
for(var i=0;i<cafes.length;i++){temp=cafes[i].split(":");
if(temp[0]&&temp[1]&&temp[1]==G.qbarid){return "http://rss.qbar.qq.com/rss/"+(temp[1]%100)+"/"+(temp[0])+".xml";}}
return "";}
function SetDocumentDomain(){document.domain="qq.com";}
function Search(){var keyword=document.getElementById("D_keyword").value.trim2();
if(keyword!=""){var str=BASE+"s/?k="+keyword.URI();
T.$("DOM_mainFrame").contentWindow.location=str;}}
function SchFocus(str,n){if(n==0&&str.value=="搜索本Q吧帖子")str.value="";
if(n==1&&str.value=="")str.value="搜索本Q吧帖子";}
function ToFav()
{
	T.PostData2("http://w.qbar.qq.com/cgi-bin/cafe_cgi_profile_fav_add.cgi",["tarcafeid="+STATIC_RESULT.cafe_info.id],Back);
	function Back()
	{
		var obj=document.getElementById("D_Atten");
		obj.style.color="#F00";
		obj.innerHTML="√已关注";
		window.setTimeout(
			function()
			{
				obj.style.color="#000";
				obj.innerHTML="关注";
			},
			2000
		);
		obj.blur();

		if (Fav.ts)
		{
			Fav.ts[2].loaded=false;
		}
	}
}

function ShowTime(time)
{
    var date = new Date(time*1000);
    var y = date.getFullYear();
    var m = date.getMonth()+1;
	m = (m<10?'0':'')+m;
    var d= date.getDate();
	d = (d<10?'0':'')+d;
	var h = date.getHours();
	h = (h<10?'0':'')+h;
	var mi = date.getMinutes();
	mi = (mi<10?'0':'')+mi;
	
	rt=y+"."+m+"."+d;
	return rt;
}

function IsHaveReadPriv(brdid,prv)
{
	var prv=prv||Boards[brdid].readpriv;
	if(prv==''||prv=='|0|')return true;
	var uin=STATIC_RESULT.sys_param.uin;
	if(uin)
	{
	if(prv.indexOf('|10|')>-1&&STATIC_RESULT.sys_param.urole>=10)return true;
	if(STATIC_RESULT.sys_param.urole>20)return true;
	var owner=Boards[brdid].owner;
	if(owner&&owner.indexOf('|'+uin+'|')>-1)return true;
	var ucircle = STATIC_RESULT.sys_param.ucircle;
if(ucircle=='')return false;
//a=a.replace(/\|/,'\\<').replace(/\|$/,'\\>').replace(/\|/g,'\\\\|)|(\\\\|')
ucircle=ucircle.replace(/\|/,'<').replace(/\|$/,'>').replace(/\|/g,'\\|)|(\\|').replace('<','(\\|').replace('>','\\|)')
//a=a.replace(/\|/,'<').replace(/\|$/,'>').replace(/\|/g,'\|\)|\(\|').replace('<','(\|').replace('>','\|)')

	var b=new RegExp(ucircle);

	return b.test(prv);
	}
	return false;
}

function IsNeedPriv(brdid)
{
	var prv=Boards[brdid].readpriv;
	if(prv!=''&&prv.indexOf('|0|')==-1)return true;
	return false;
}

function SetBrdImage()
{
	var a='http://imgcache.qbar.qq.com/b03style/img_default/';
	$('div.leftNavBody img.C_brdimg').each(function(i){
		if(!IsHaveReadPriv(this.getAttribute("brdid"))){
			this.src=a+'hidnav.gif';
			this.title='您无权查看本版';
		}
		else
		{
			this.src=a+'hidnav2.gif';
			this.title='您有权查看本版';
		}
	})
}

function Invite()
{
	var str=BASE+"invite/";
	document.getElementById("DOM_mainFrame").src=str;
	var t=document.documentElement.scrollTop;
	if (t>125)window.setTimeout(function(){window.scrollTo(0,120)},300);
}