// JavaScript Document
function nTabs(thisObj,Num){
	if(thisObj.className == "s")return;
	var tabObj = thisObj.parentNode.id;
	var tabList = document.getElementById(tabObj).getElementsByTagName("h4");
	for(i=0; i <tabList.length; i++)
	{
		if (i == Num)
		{
			tabList[i].className = "s"; 
			document.getElementById(tabList[i].id+"_info").className = "dis";
		}else{
			tabList[i].className = "d"; 
			document.getElementById(tabList[i].id+"_info").className = "undis";
		}
	} 
}
function qiehuan(num){//导航菜单，支持7个切换
	for(var id=1;id<=7;id++)
	{
		if(id==num)
		{
			document.getElementById("nav_"+id).className="daohang_l_bg1";
		}
		else
		{
			document.getElementById("nav_"+id).className="";
		}
	}
}

function getIcon(color) {
	var icon = new GIcon();
	icon.image = "http://google.com/mapfiles/ms/micons/" + color + ".png";
	icon.iconSize = new GSize(32, 32);
	icon.iconAnchor = new GPoint(15, 32);
	return icon;
}
function addBookmark(title) {
			 var url=parent.location.href;
			 if (window.sidebar) { 
					window.sidebar.addPanel(title, url,""); 
			 } else if( document.all ) {
			 window.external.AddFavorite( url, title);
			 } else if( window.opera && window.print ) {
			 return true;
			 }
}
function SetHome(obj, vrl) {
            try {
                obj.style.behavior = 'url(#default#homepage)'; obj.setHomePage(vrl);
            }
            catch (e) {
                if (window.netscape) {
                    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', vrl);
                }
            }
        }
function show(num)
{
   document.getElementById("a"+num).style.display="block";
}
function hide(num)
{
   document.getElementById("a"+num).style.display="none";
}
