//new ypSlideOutMenu("number menu", "slide position", left, top, width, height)
new ypSlideOutMenu("menu1", "down", 155, 25, 179, 200)
new ypSlideOutMenu("menu2", "down", 380, 25, 183, 200)
new ypSlideOutMenu("menu3", "down", 602, 25, 193, 200)


var activeMenu = null;
var defaultMenu = null;
var tHome, tILT, tSelfPaced, tCourseware, tSupport;


function showMenu(item) {


	if(activeMenu) {
		activeMenu.className = defaultMenu;
	}

	if(item) {
		defaultMenu = item.className;
		tHome = document.getElementById("mHome").className;
		tLogoff = document.getElementById("mLogoff").className;
		document.getElementById("mHome").className = "";
		document.getElementById("mLogoff").className = "";
		item.className = "actived";
		activeMenu = item;
	} else {
		activeMenu = null;
		document.getElementById("mHome").className = tHome;
		document.getElementById("mLogoff").className = tILT;
	}
}

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);
}