// JavaScript Document
var site_url = "http://"+location.host+"/";
var static_url = "http://static.3722.com/";
var passport_url = "http://passport.3722.com/";
var index_url = "http://www.3722.com/";

var w3c=(document.getElementById)? true: false;
var agt=navigator.userAgent.toLowerCase();
var ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1) && (agt.indexOf("omniweb") == -1));

function IeTrueBody(){
    return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}

function GetScrollTop(){
    return ie ? IeTrueBody().scrollTop : window.pageYOffset;
}

/*
// 暂时去掉
//随机title
var WD_DocumentTitles = new Array
	(
		'逐鹿龙门 问天下谁是英雄 问鼎江湖 封世间第一武侠',
		'侠之大者 尽在龙门',
		'龙门，真江湖，最武侠——2010写实武侠巅峰之作',
		'超炫，超酷，超有端——龙门，玩就玩最好的',
		'龙门 我顶巅峰巨作 最华丽PK网游',
		'游戏让您无限畅玩，精品服务打造优质我顶平台',
		'问仙　问仙华丽飞天  自由畅享游戏仙境',
		'欢迎来到我顶！尽情享受来自我顶的高品质服务！'
	);
var WD_DocumentTitleIndex = Math.floor(Math.random() * WD_DocumentTitles.length);
document.title += ' | ' + WD_DocumentTitles[WD_DocumentTitleIndex];
*/
function addHome()
{
	if (window.sidebar)
	{
		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","http://www.3722.com/");
	}
	else if(document.all)
	{
		document.body.style.behavior="url(#default#homepage)";
		document.body.setHomePage("http://www.3722.com/");
	}
}

function checkGameList()
{
	$("#header_gamelist").css('display', 'block');
}

function noneGameList()
{
	$("#header_gamelist").css('display', 'none');
}
function url_redirenct(address){
	window.location.href=address;
}

$(document).ready(function(){
	$("#header_gamelist").click(function(){
		$("#header_gamelist").css('display', 'none');
	});
});
