function openx(zoneid){
<!--//<![CDATA[
   var m3_u = (location.protocol=='https:'?'https://a.51wball.com/www/delivery/ajs.php':'http://a.51wball.com/www/delivery/ajs.php');
   var m3_r = Math.floor(Math.random()*99999999999);
   //by dda, use cache
   m3_r = 0;
   if (!document.MAX_used) document.MAX_used = ',';
   document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
   document.write ("?zoneid="+zoneid + "&jquery=1");
   document.write ('&amp;cb=' + m3_r);
   if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
   document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));
   document.write ("&amp;loc=" + escape(window.location));
   if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
   if (document.context) document.write ("&context=" + escape(document.context));
   if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
   document.write ("'><\/scr"+"ipt>");
//]]>-->
}
function searchFocus(obj) {
	if(obj.value == '请输入搜索内容') {
		obj.value = '';
	}
	$('#sc').attr('class','y f');
}

function searchBlur(obj) {
	if(obj.value == '' ) {
		obj.value = '请输入搜索内容';
		$('#sc').attr('class','y');
	}
}
//搜索框结束

//添加收藏
function addColl(url,title)
{
	var ctrl = (navigator.userAgent.toLowerCase()).indexOf('mac') != -1 ? 'Command/Cmd': 'CTRL';
	if (document.all) {
		window.external.addFavorite(url, title)
	} else if (window.sidebar) {
		window.sidebar.addPanel(title, url, "")
	} else {
		alert('您可以尝试通过快捷键' + ctrl + ' + D 加入到收藏夹~')
	}
}
//添加收藏结束

//设为首页
function setHomepage(url)
{
	if (document.all) {
		document.body.style.behavior = 'url(#default#homepage)';
		document.body.setHomePage(window.location.href);
	}
	else if (window.sidebar) {
		if (window.netscape){
			try {
				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
			}
			catch (e) {
				alert("该操作被浏览器拒绝，如果想启用该功能，请在地址栏内输入 about:config,然后将项 signed.applets.codebase_principal_support 值该为true");
			}
		}
		try{
			var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
			prefs.setCharPref('browser.startup.homepage', window.location.href);
		}catch(e){}
	}
}//设为首页结束

