// 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);
	
	//alert(fatherObj.style.className);
	
	if(action == "show"){
		obj.style.display = "block";
		fatherObj.className = "active"; 
	}
	if(action == "close"){
		obj.style.display = "none";
		fatherObj.className = ""; 
	}
	if(action != "show" && action != "close"){
		alert("Wrong parameter!\n\nThe parameter can be only \"show\" or \"close\".");
		return false;
	}
	
	return;
	
}