function G(item){return document.getElementById(item);}
function toDesktop(surl, sname){
try{
var WshShell=new ActiveXObject("WScript.Shell");
var urlLink=WshShell.CreateShortcut(WshShell.SpecialFolders("Desktop") + "\\" + sname + ".url");
urlLink.TargetPath=surl;
urlLink.Save();
alert("创建一个 “象牙塔考研社区” 图标到桌面！");
}catch(e){alert("当前浏览器不允许此操作！");return;}}
function setFavorite(){
	if(document.all){
		window.external.addFavorite('http://www.xyata.com', '象牙塔考研社区 - 用心做研友们最爱的考研网');
	}else if(window.sidebar){window.sidebar.addPanel('象牙塔考研社区', 'http://www.xyata.com', "");}
}  
function setMyHome(){
	if(document.all){  
		document.body.style.behavior = 'url(#default#homepage)';  
		document.body.setHomePage('http://www.xyata.com');  
	}else if (window.sidebar){  
		if (window.netscape){  
			try{  
				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
			}catch(e){  
				alert("该操作被浏览器拒绝，如果想启用该功能，请在地址栏内输入：about:config，然后将项：signed.applets.codebase_principal_support 的值改为 true");  
			}  
		}  
		var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);  
		prefs.setCharPref('browser.startup.homepage', 'http://www.xyata.com');  
	}  
}
function chkSearch(op){
	if(null != G("head_search") && G("head_search").style.display=="none"){
		G("head_search").style.display="block";
	}else{
		var type=G("a_"+op).innerHTML;
		G("label_type").innerHTML=type;
		if(null!=op&&""!=op){G("seType").value=op;}
		G("head_search").style.display="none";
	}
}
function checkSe(){var c=G("seContent").value;if("请输入您要搜索的关键词"==c){G("seContent").value="";}return true;}
var gTime;
function remove_head(){if(G("head_search").style.display=="block"){G("head_search").style.display="none";}}
function addHeadTime(){gTime=setTimeout("remove_head()",500);}
function removeHeadTime(){if(gTime != null){clearTimeout(gTime);gTime = null;}}
/**顶部导航收缩菜单*/
function display(op){G(op).style.display='block';}
function disappear(op){G(op).style.display='none';}