function swingMenu(itemID, whichWay, hideLeft, hideRight) {
	if(whichWay == 'open') {
		if (document.layers) {
			swingCommand = "document." + itemID + ".display = 'block'";
		} else if (document.all) {
			swingCommand = "document.all." + itemID + ".style.display='block';";
		} else if (document.getElementById) {
			swingCommand = "document.getElementById('" + itemID + "').style.display = 'block'";
		}
		eval(swingCommand);
		if (hideLeft != '') {
			if (document.layers) {
				hideLeftCommand = "document." + hideLeft + ".display = 'none'";
			} else if (document.all) {
				hideLeftCommand = "document.all." + hideLeft + ".style.display='none';";
			} else if (document.getElementById) {
				hideLeftCommand = "document.getElementById('" + hideLeft + "').style.display = 'none'";
			}
			eval(hideLeftCommand);
		}
		
		if (hideRight != '') {
			if (document.layers) {
				hideRightCommand = "document." + hideRight + ".display = 'none'";
			} else if (document.all) {
				hideRightCommand = "document.all." + hideRight + ".style.display='none';";
			} else if (document.getElementById) {
				hideRightCommand = "document.getElementById('" + hideRight + "').style.display = 'none'";
			}
			eval(hideRightCommand);
		}	
	} else if (whichWay == 'close') {
		if (document.layers) {
			swingCommand = "document." + itemID + ".display = 'none'";
		} else if (document.all) {
			swingCommand = "document.all." + itemID + ".style.display='none';";
		} else if (document.getElementById) {
			swingCommand = "document.getElementById('" + itemID + "').style.display = 'none'";
		}
		setTimeout("eval(swingCommand)", 500);
	}
}

function closeNeighbors(hideLeft, hideRight) {
	if (hideLeft != '') {
		if (document.layers) {
			hideLeftCommand = "document." + hideLeft + ".display = 'none'";
		} else if (document.all) {
			hideLeftCommand = "document.all." + hideLeft + ".style.display='none';";
		} else if (document.getElementById) {
			hideLeftCommand = "document.getElementById('" + hideLeft + "').style.display = 'none'";
		}
		eval(hideLeftCommand);
	}
	if (hideRight != '') {
		if (document.layers) {
			hideRightCommand = "document." + hideRight + ".display = 'none'";
		} else if (document.all) {
			hideRightCommand = "document.all." + hideRight + ".style.display='none';";
		} else if (document.getElementById) {
			hideRightCommand = "document.getElementById('" + hideRight + "').style.display = 'none'";
		}
		eval(hideRightCommand);
	}
}


function Close() {

swingMenu('resourceSub', 'open', '', '');
closeNeighbors('companySub', '');

}

function Close2() {

swingMenu('companySub', 'open', '', '');
closeNeighbors('resourceSub', '');

}

function Close3() {

swingMenu('companySub', 'open', '', '');
closeNeighbors('productSub', '');

}


function Close4() {

swingMenu('productSub', 'open', '', '');
closeNeighbors('resourceSub', '');

}

function Close5() {

swingMenu('companySub', 'open', '', '');
closeNeighbors('productSub', 'resourceSub');

}

function Close6() {

swingMenu('productSub', 'open', '', '');
closeNeighbors('resourceSub', '');

}

function Close7() {

swingMenu('companySub', 'open', '', '');
closeNeighbors('productSub', 'resourceSub');

}

function Close8() {

swingMenu('resourceSub', 'open', '', '');
closeNeighbors('productSub', '');

}







