var shownObjects = new Array();

function crossGetObject(id)
{
	var isDOM = document.getElementById ? true : false;
	var isIE = document.all ? true : false;
	var isNN = document.layers ? true : false;

	with (document)
	{
		if (isDOM && getElementById(id)) {
			return getElementById(id);
		} else if (isIE && all[id]) {
			return all[id];
		} else if (isNN && layers[id]) {
			return layers[id];
		} else {
			return false;
		}
	}
}

function crossSetClass(id, className)
{
	var obj;
	obj = crossGetObject(id);
	obj.className = className;
}

function pSwitcher(prefix, letter)
{
	var id = prefix + letter;
	var l;

	for (l in shownObjects)
	{
		if (shownObjects[l])
		{
			crossSetClass(l, 'hiddenmenu');
			shownObjects[l] = 0;
		}
	}
	crossSetClass(id, 'visiblemenu');
	shownObjects[id] = 1;
}
