var opera = (navigator.userAgent.toLowerCase().indexOf("opera") != -1);
var minId = 0;
var mnrId = 0;
var mImg = new Image();
mImg.src = "gfx/collapse.gif";
var pImg = new Image();
pImg.src = "gfx/expand.gif";

function menyStart(id)
{
	if (!document.getElementById("mexpand" + id)) return;
	document.getElementById("mexpand" + id).style.position = 'relative';
	opera = true;
	mclick(id);
	minId = 0;
}

function mclick(id)
{
	minId = id;
	var imgId = document.getElementById("img" + id);
	var mexpandId = document.getElementById("mx" + id);
	var imgMId = document.getElementById("img" + mnrId);
	var mexpandMId = document.getElementById("mx" + mnrId);

	if (mexpandId.style.display == 'block') {
		mexpandMId.style.display = 'none';
		imgId.src = pImg.src;
		mnrId = 0;
	} else {
		if (mnrId != 0) {
			mexpandMId.style.display = 'none';
			// if (!opera) mexpandMId.style.position = 'absolute';
			imgMId.src = pImg.src;
		}
		mexpandId.style.display = 'block';
		imgId.src = mImg.src;
		mnrId = id;
	}
	return false;
}