var iTimeoutId;
function showmenu(mdivid,cuteid,count,contentid,classID){
	iTimeoutId = setTimeout("showmenu2('"+mdivid+"',"+cuteid+","+count+",'"+contentid+"',"+classID+")",200);
}
function hidemenu()
{
	clearTimeout(iTimeoutId); 
}
function showmenu2(mdivid,cuteid,count,contentid,classID){
	for(var i=0;i<count+1;i++){
		var obj=GE(mdivid+i)
		if(i==cuteid){
			obj.className='checked';
			loadAJAXTab('http://www.boootu.com:88/AjaxClass.jsp?ClassID='+classID,contentid);
		}else{
			obj.className='nochecked';
		}
	}
	
}
function GE(id) {
	if (typeof(id) != "string" || id == "") return null;
	if (document.getElementById && document.getElementById(id)) {
		return document.getElementById(id);
	} else if (document.all && document.all[id]) {
		return document.all[id];
	} else if (document.layers && document.layers[id]) {
		return document.layers[id];
	} else {
		return null;
	}
}
function getXmlhttp()
{
	var http_request;
	
	if(window.XMLHttpRequest) { 
		http_request = new XMLHttpRequest();
		if (http_request.overrideMimeType) {
			http_request.overrideMimeType("text/xml");
		}
	}
	else if (window.ActiveXObject) { 
		try {
			http_request = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				http_request = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {}
		}
	}
	if (!http_request) { 
		window.alert("can't create XMLHttpRequest object.");
		return null;
	}	
	return http_request;
}

function loadAJAXTab(url,objid){
		var divid=GE(objid);
		var xhttp=getXmlhttp();		
			xhttp.onreadystatechange=function(){
				if(xhttp.readyState == 4 && (xhttp.status==200 || window.location.href.indexOf("http")==-1))
				{					
					var str=xhttp.responseText;
					if(str.replace(/\r\n/g,'').length>2){
						divid.innerHTML=str;
					}else{
						divid.innerHTML='ÔÝÎÞÄÚÈÝ';
					}
				}
			}
		xhttp.open("GET",url,true);
		xhttp.setRequestHeader("If-Modified-Since","0");
		xhttp.send(null);
}
function searchform_onsubmit(){
	if(document.searchform.keyword.value=="")
	{
	  alert("ÇëÊäÈëËÑË÷¹Ø¼ü×Ö")
	  document.searchform.keyword.focus()
	  return false
	 }
}