//========================= 设置收藏首页脚本 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.putianyp.com';
var webname='莆田黄页';

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 =============

//========================= 设置字体大中小 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 =============