if (window.location.hash == "#r")
{
	window.location.hash = "";
	location.reload(true);
}

function resizelogo()
{
	var img = document.getElementById("bizLogoImg");

	if(img.offsetWidth>100)
	{
		img.width=100;
	}
	if(img.offsetHeight>100)
	{
		img.Height=100;
	}
}

function resizeframe()
{
    try
    {
		document.all["frmbinfo"].style.height=document.frames["frmbinfo"].document.body.scrollHeight;
    }
    catch(e)
    {}
}

function InitTab()
{
	if((g_ListType >= 0) && (g_ListType < 5))
	{
		var table = document.getElementById("tcscap");
		if(table)
		{
			var row = table.rows[0];
			if(row)
			{
				var tabs = row.childNodes;
				if(tabs)
				{
					tabs[g_ListType].className = "ct2selitem";
				}
			}
		}
	}
}


function win_onload()
{
	if(vs_init())
	{
		g_vs.addScript("/bbs_js/init_search.js");
		window.setTimeout("ins_init_search("+g_BC_GID+");",1000);

		document.ongotomy = bl_ongotomy;
		top.onlogin = bl_onlogin;
		//window.setTimeout("g_vs.QQLogin.checkLogin(true);",100);
		
		//added by simon 发送bbs首页统计信息
		g_Sid = g_vs.QQLogin.getSid();
		g_vs.QQLogin.checkLogin(true);
	    if(!g_vs.sendRequest("/cgi/rpv?kfguin="+g_Sid+"&q="+g_Cookie_Uin+"&y=11&", 'GET', null, bl_oncgipostreturn))
	    {
		    g_vs.showError(AJAX_EXCEPTION);
	    }

	}
}

function bl_oncgipostreturn()
{
}

function bl_onlogin()
{
	top.onqqloginsuccess = bl_onqqloginsuccess;
	g_vs.QQLogin.showLoginWindow();
	return false;
}

function bl_onqqloginsuccess()
{
	g_vs.QQLogin.checkLogin(true);

	var tabql = document.getElementById("tabql");
	if(tabql)
	{
		var win = g_vs.getWindowFromElement(tabql);
		var destroy = true;
		//alert(win);
		if(typeof(win.onclose) == "function")
		{
			destroy = win.onclose();
		}
		win.hide();
		if(destroy)
		{
			win.destroy();
		}
	}	
}

function bl_ongotomy()
{
	document.location.href = "/smy.htm?sid="+g_BC_GID;
	return false;
}

