function killErrors(){
	return true;
}
window.onerror = killErrors;

sfHover = function(){
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++){
		sfEls[i].onmouseover = function(){
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout = function(){
			this.className = this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
window.onload = sfHover;

function doZoom(size){
	var zoom = document.all?document.all['Zoom']:document.getElementById('Zoom');
	zoom.style.fontSize = size+'px';
}

function copyurl(){
	ttext = location.href+"?="+"一篇不错的文章！";
	clipboardData.setData("text",ttext);
	alert("地址复制成功！粘贴给好友请按[ CTRL + V ]。\n\n非常感谢您的推荐！");
}
function ReImgSize(){
	for (i=0; i<document.images.length; i++){
		if (document.all){
			if (document.images[i].width>500){
				document.images[i].width = "500"
				document.images[i].outerHTML = '<a href="'+document.images[i].src+'" target="_blank" title="在新窗口打开图片">'+document.images[i].outerHTML+'</a>'
			}
		}else{
			if (document.images[i].width>400){
				document.images[i].title = "在新窗口打开图片"
				document.images[i].style.cursor = "pointer"
				document.images[i].onclick = function(e){window.open(this.src)}
			}
		}
	}
}

  
function SetCookie(name, value)
//设定Cookie值
{
var expdate = new Date();
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
if(expires!=null) expdate.setTime(expdate.getTime() + ( expires * 1000 ));
document.cookie = name + "=" + escape (value) +((expires == null) ? "" : ("; expires="+ expdate.toGMTString()))
+((path == null) ? "" : ("; path=" + path)) +((domain == null) ? "" : ("; domain=" + domain))
+((secure == true) ? "; secure" : "");
}
 
function GetCookieVal(offset)
//获得Cookie解码后的值
{
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie(name)
//获得Cookie的原始值
{
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen)
{
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return GetCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}

function GetPrice(vipPrice,dailiPrice)
{
	
	level=GetCookie("grpid")
	
	if(level=="32")
	document.getElementById("price").innerText=vipPrice;
	if(level=="33")
	document.getElementById("price").innerText=dailiPrice;
	}

 

