﻿//***********************************************************************
//* init.js
//* 红心游戏世界帮助信息使用
//* 用于动态加载导航菜单和页尾内容
//* 页面上必须定义两个id分别为nav 和　footer的div ,用来存放导航和页尾信息．
//* 2007年１２月　２０日　ｓｈｉｊｑ＠ｓｌｏｆ．ｃｏｍ
//************************************************************************

//从ｊｓ中引用另一格ｊｓ的方法１
//引用下面的js用来显示游戏下载的链接
document.write ("<script src='http://www.homygame.com/ngscom/download/js/gamelist.js'><\/script>");
document.write ("<script src='../js/siteInfo.js'><\/script>");

//从ｊｓ中引用另一格ｊｓ的方法２
//document.scripts[0].src="http://www.homygame.com/ngscom/download/js/gamelist.js"

//此处为要加载的onload 方法
function generic()
{
	
	var divNav = document.getElementById("innerNav");
	var str="";
	//游戏导航栏内容
	if(divNav){
str+='<dl>';
str+='<dt>其他相关下载</dt>';
str+='<dd><a href="http://www.homygame.com/download/game/dx9.0Redist.exe">DirectX9</a></dd>';
str+='<dd><a href="http://www.homygame.com/ngscom/download/green/">红心网吧版下载地址</a></dd>';
str+='<dd><a href="http://www.homygame.com/ngscom/download/setup.exe">2008版大厅下载</a></dd>';
str+='<dd><a href="http://61.156.12.35/gameconf/2008update/ngs.exe">08版大厅升级包(红豆补丁)</a></dd>';
str+='<dt>红豆系列游戏下载</dt>';
str+='<dd><a href="http://61.156.12.35/gameconf/2008update/MjBean258Game.exe">红豆258麻将下载</a></dd>';
str+='<dd><a href="http://61.156.12.35/gameconf/2008update/QdBeanGame_has_hall.exe">红豆青岛保皇下载</a></dd>';
str+='<dd><a href="http://61.156.12.35/gameconf/2008update/LandBeanGame_has_hall.exe">红豆无混斗地主下载</a></dd>';
str+='<dd><a href="http://61.156.12.35/gameconf/2008update/HunLandGame_has_hall.exe">红豆带混斗地主下载</a></dd>';
str+='<dd><a href="http://61.156.12.35/gameconf/2008update/Land2Game_has_hall.exe">红豆二人斗地主下载</a></dd>';
str+='<dd><a href="http://61.156.12.35/gameconf/2008update/NmgABeanGame_has_hall.exe">红豆内蒙打大A下载</a></dd>';
str+='</dl>';
var navStr=str;
divNav.innerHTML=navStr;
}

//页面底部网站信息内容在 /js/siteInfo.js中定义
var siteInfoDiv = document.getElementById("siteInfo");
	if(siteInfoDiv){
	siteInfoDiv.innerHTML=siteInfo;
	}
}


//添加Ｏｎｌｏａｄ方法,以下内容为了ｏｎｌｏａｄ同时加载多个方法而作
if(typeof window.addEventListener != 'undefined')
{
//.. gecko, safari, konqueror, Mozilla/Firefox and 标准 浏览器
window.addEventListener('load', generic, false);
}

else if(typeof document.addEventListener != 'undefined')
{
//.. opera 7 浏览器
document.addEventListener('load', generic, false);
}

else if(typeof window.attachEvent != 'undefined')
{
//.. win/ie 浏览器
window.attachEvent('onload', generic);
}
else
{
//.. mac/ie5及更早的浏览器
//if there's an existing onload function
if(typeof window.onload == 'function')
{
//保留以前的方法
var existing = onload;
//添加新方法
window.onload = function()
{
//调用以前的方法
existing();
//调用新加的方法
generic();
};
}

else
{
//设置Onload方法
window.onload = generic;
}

}
