//new ypSlideOutMenu("number menu", "slide position", left, top, width, height)
new ypSlideOutMenu("menu1", "down", 228, 25, 183, 200)
new ypSlideOutMenu("menu2", "down", 414, 25, 197, 200)


var activeMenu = null;
var defaultMenu = null;
var tHome, t4Art, t2Souren, tContact;


function showMenu(item) {


	if(activeMenu) {
		activeMenu.className = defaultMenu;
	}

	if(item) {
		defaultMenu = item.className;
		tHome = document.getElementById("mHome").className;
		t4Art = document.getElementById("m4Art").className;
		t2Souren = document.getElementById("m2Souren").className;
		tContact = document.getElementById("mContact").className;
		tFotos = document.getElementById("mFotos").className;

		document.getElementById("mHome").className = "";
		document.getElementById("m4Art").className = "";
		document.getElementById("m2Souren").className = "";
		document.getElementById("mContact").className = "";
		document.getElementById("mFotos").className = "";
		item.className = "actived";
		activeMenu = item;
	} else {
		activeMenu = null;
		document.getElementById("mHome").className = tHome;
		document.getElementById("m4Art").className = t4Art;
		document.getElementById("m2Souren").className = t2Souren;
		document.getElementById("mContact").className = tContact;
		document.getElementById("mFotos").className = tFotos;
	}
}

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);
}