//========================= 设置收藏首页脚本 start =============
var isIE=(document.all&&document.getElementById&&!window.opera)?true:false; 
var isMozilla=(!document.all&&document.getElementById&&!window.opera)?true:false; 
var isOpera=(window.opera)?true:false;
var seturl='url(#default#homepage)';
var weburl='http://www.bigbigwatch.com';
var webname='bigbigwatch trade';

function myhomepage()	{
	if(isMozilla){
		try {netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");} 
		catch (e){alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”50566225并回车\n然后将[signed.applets.codebase_principal_support]设置为'true'");}
		var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
		prefs.setCharPref('browser.startup.homepage',weburl);
	}
	if(isIE){
		this.homepage.style.behavior=seturl;this.homepage.sethomepage(weburl); 
		this.homepage2.style.behavior=seturl;this.homepage2.sethomepage(weburl); 
	}
}

function addfavorite()
{
	if(isMozilla){
		if (document.all){ window.external.addFavorite(weburl,webname);}
		else if (window.sidebar){ window.sidebar.addPanel(webname, weburl,"");}
	}
	if(isIE){window.external.AddFavorite(weburl, webname);}	
}
//========================= 设置收藏首页脚本 end =============

function show0(no){
var Obj=eval("menusub0" + no);
var tempColl = document.all.tags("div");
 for(i=0; i<tempColl.length; i++)
 {
  if ((tempColl(i).id != Obj.id) && ((tempColl(i).className == "menusub0"))){  
   tempColl(i).style.display = "none";
   }   
 }
if(Obj.style.display=='none')
 {
   Obj.style.display='';
  }
else
 {
   Obj.style.display='none';
 }
}
function show(no){
var Obj=eval("menusub" + no);
var tempColl = document.all.tags("div");
 for(i=0; i<tempColl.length; i++)
 {
  if ((tempColl(i).id != Obj.id) && ((tempColl(i).className == "menusub"))){  
   tempColl(i).style.display = "none";
   }   
 }
if(Obj.style.display=='none')
 {
   Obj.style.display='';
  }
else
 {
   Obj.style.display='none';
 }
}
function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

//========================= 设置字体大中小 start =============
	function doZoom(size){
		var artibody = document.getElementById('artibody');
		if(!artibody){
			return;
		}
		var artibodyChild = artibody.childNodes;
		artibody.style.fontSize = size + 'px';
		//再对artibody div内的直接html节点设置fontSize属性
		for(var i = 0; i < artibodyChild.length; i++){
			if(artibodyChild[i].nodeType == 1){
				artibodyChild[i].style.fontSize = size + 'px';
			}
		}		
	}
//========================= 设置字体大中小 end =============
// =============禁止右键 start===如果有用在body中加入 onselectstart="return false"==========
document.oncontextmenu = function() { return false;}
// =============禁止右键 end =============