//new ypSlideOutMenu("number menu", "slide position", left, top, width, height)
new ypSlideOutMenu("menu1", "down", 495, 26, 180, 200)
new ypSlideOutMenu("menu2", "down", 798, 26, 102, 200)


var activeMenu = null;
var defaultMenu = null;
var tHome, tCommunity, tEducation, tLearning;


function showMenu(item) {


	if(activeMenu) {
		activeMenu.className = defaultMenu;
	}

	if(item) {

		defaultMenu = item.className;
		tHome = document.getElementById("mHome").className;
		tCommunity = document.getElementById("mCommunity").className;
		tEducation = document.getElementById("mEducation").className;
		tLearning = document.getElementById("mLearning").className;

		document.getElementById("mHome").className = "";
		document.getElementById("mCommunity").className = "";
		document.getElementById("mEducation").className = "";
		document.getElementById("mLearning").className = "";
		item.className = "actived";
		activeMenu = item;
	} else {
		activeMenu = null;
		document.getElementById("mHome").className = tHome;
		document.getElementById("mCommunity").className = tCommunity;
		document.getElementById("mEducation").className = tEducation;
		document.getElementById("mLearning").className = tLearning;
	}
}

function expand(x) {
	var s;
	s = document.getElementById("img_" + x).src;
	s = s.substr(s.length - 5);
	if (s == "n.gif") {
		var i;
		for (i=1; i < 39; i++) {
			try {
				document.getElementById("detail_" + i).style.display = "none";
				document.getElementById("img_" + i).src = "/_images/arrow_down.gif";
			}
			catch (exc) {}
		}
		document.getElementById("detail_" + x).style.display = "block";
		document.getElementById("img_" + x).src = "/_images/arrow_up.gif";
	} else {
		document.getElementById("detail_" + x).style.display = "none";
		document.getElementById("img_" + x).src = "/_images/arrow_down.gif";
	}
}

var popWin = '';
function popWindow(file, height, width){
	if(window.showModalDialog){
		popWin = window.showModalDialog(file, '', 'dialogHeight:'+height+'px; dialogWidth:'+width+'px; resizable:yes; scroll:yes');
	}
	else{
		if(popWin.closed != undefined){if(!popWin.closed){popWin.close();};}
		popWin = window.open(file, 'help', 'height=' + height + ', width=' + width + ', resizable, scrollbars=yes, modal=yes, dialog=yes, menubar=yes');
		popWin.moveTo(20,20);
		popWin.focus();	
	}
}

function popImage(img, height, width) {
	var src;
	src = img.src;
	src = src.replace("thumb-", "");
	popWindow(src, height, width);
}