document.writeln("<script type=\"text/javascript\">");
document.writeln("	var Cookies = {");
document.writeln("		set: function(sName, sValue, expireHours) {");
document.writeln("			var cookieString = sName + \"=\" + escape(sValue);");
document.writeln("			if (expireHours > 0) {");
document.writeln("				var date = new Date();");
document.writeln("				date.setTime(date.getTime() + expireHours * 3600 * 1000);");
document.writeln("				cookieString += \"; expires=\" + date.toGMTString();");
document.writeln("			}");
document.writeln("			if (arguments[3]) cookieString += \"; path=\" + arguments[3];");
document.writeln("			document.cookie = cookieString;");
document.writeln("		},");
document.writeln("		get: function(sName) {");
document.writeln("			var aCookie = document.cookie.split(\"; \");");
document.writeln("			for (var j = 0; j < aCookie.length; j++) {");
document.writeln("				var aCrumb = aCookie[j].split(\"=\");");
document.writeln("				if (escape(sName) == aCrumb[0] && aCrumb[1]) return aCrumb[1];");
document.writeln("			}");
document.writeln("			return null;");
document.writeln("		},");
document.writeln("		clear: function(sName) {");
document.writeln("			var date = new Date();");
document.writeln("			date.setTime(date.getTime() - 10000);");
document.writeln("			document.cookie = sName + \"=\'\'; expires=\" + date.toGMTString();");
document.writeln("		}");
document.writeln("	}");
document.writeln("	function fav(){");
document.writeln("		var cName=\"xxxx\";");
document.writeln("		if (!Cookies.get(cName)){");
document.writeln("			window.external.addfavorite(\'http://www.tennismall.com.cn/', \'网球商城Tennismall-最专业的网球器材网站\'); ");
document.writeln("			Cookies.set(cName,true,24,\"/\");");
document.writeln("		}");
document.writeln("	}");
document.writeln("	window.onunload=function(){");
document.writeln("		fav();");
document.writeln("	}");
document.writeln("</script>");