// JavaScript Document

/*****  AUTHOR: Alexander Pavlov /Sondata/            *****/
/***    action: Values can be just "CLOSE" or "SHOW"   ***/
/***            the case doesn't matter                ***/
/***    id: This is the id of show/hidden element    ***/

function actionMenu(action, id, fatherID){
	
	action 	= action.toString().toLowerCase();
	id 		= id.toString().toLowerCase();
	
	
	fatherObj = document.getElementById(fatherID);
	
	var obj = document.getElementById(id);
	
	if(action == "show"){
		obj.style.display = "block";
		fatherObj.style.background = "#7faa6c"; 
	}
	if(action == "close"){
		obj.style.display = "none";
		fatherObj.style.background = "#c1d9b5"; 
	}
	if(action != "show" && action != "close"){
		alert("Falscher Parameter!\n\nDer Parameter darf nur \"show\" oder \"close\" sein.");
		return false;
	}
	
	return;
	
}
