if (window==window.top){
    T.OnDOMLoaded.Clear();
    top.location.replace(T.GetQBarDomainPath())
}
var t=parent==window?0:parent.document.documentElement.scrollTop;
var h=parent==window?0:(parent.RESULT1.custom.img0height||90);
if (t>h+30){window.setTimeout(function(){parent.scrollTo(0,h+30)},800)}
T.OnDOMLoaded.Load(Init);
function Init(){
	if(window!=top){document.documentElement.className='style'+parent.barCDdata.cssStyle}
	else {document.documentElement.style.overflowY='auto'}
	T.LoadData2("http://mng.qbar.qq.com/cgi-bin/cafecgi_online_showinfo.cgi?typeid=0",Onsuccess);
}
function Onsuccess(RESULT){
	T.RenderDOM('DOM_basic',RESULT);
	if(window!=top)parent.document.title='关于本吧_'+RESULT.cafe_info.name+'_Q吧';

	if(window!=top){
		$('#D_1').get(0).onclick=function(){
			window.setTimeout(function(){
				var svctype=top.RESULT1.cafe_info.svc_type;
				location.href=(svctype>20&&svctype<31)?'../home_.htm':'home_.htm'
			},3);
			return false
		}
	}else{
		$('#D_1').attr('target','_self')
	}
	if (T.$('memList')){
		T.RenderDOM('memList',RESULT);
	}
	T.AutoWinHeight();
}
function GetCatalogID(id,type){
	if (!Catalog[id]) id=1001;
	if (!type){
		if (id<1001) id=1001;
		return parseInt(Catalog[id].pid)
	}else{
		return (id<1001)?1001:id;
	}
}
var copytimer;
function CopyURL(url){
	if (copytimer) window.clearTimeout(copytimer);
	var obj=document.getElementById("D_copyurl");
	clipboardData.setData('Text',BASE);
	var tc=obj.className;
	obj.innerHTML="√已复制到剪贴板";
	obj.className+=" Fred";
	copytimer=window.setTimeout(function(){
		obj.innerHTML="复制Q吧地址";
		obj.className=tc
	},2000);
	obj.blur()
}
function ShowTime(t,flg)
{
    t=Number(t)*1000;
    t=new Date(t);
    var rt=t.getFullYear()+"-",mt=t.getMonth()+1,dt=t.getDate();
    if (mt<10) mt="0"+mt 
    if (dt<10) dt="0"+dt
    rt+=mt+"-"+dt;
    if (flg){
        var ht=t.getHours(),mt=t.getMinutes();
        if (ht<10) ht="0"+ht
        if (mt<10) mt="0"+mt
        rt+=" "+ht+":"+mt;
    }
    return "<span>"+rt+"</span>"
}
var gCurrent;
function Attention(obj,uin){
	gCurrent=obj;
	T.PostData2("http://w.qbar.qq.com/cgi-bin/cafe_profile_cgi_fav_user_add",["qq="+uin],AttBack);
}
function AttBack(){
	var ti=gCurrent.innerHTML,tc=gCurrent.className;
	gCurrent.innerHTML="√ 已关注！";
	gCurrent.className+=" Fred";
	window.setTimeout(function(){
		gCurrent.innerHTML=ti;
		gCurrent.className=tc
	},2000);
}