/* ======================================================================= */
/* ====== <a href="#" onmouseover="mOver(this);"></a> 	================== */
/* ======================================================================= */

function mOver(aObj){
	imgObj = aObj.getElementsByTagName('img');
	
	imgObj[0].src = imgObj[0].src.replace("_off.","_on.");
	
	aObj.onmouseout = function()
	{
		imgObj[0].src = imgObj[0].src.replace("_on.","_off.");
	}
}
function mOverButton(inpObj){
	
	inpObj.src = inpObj.src.replace("_off.","_on.");
	
	inpObj.onmouseout = function()
	{
		this.src = this.src.replace("_on.","_off.");
	}
}

/* ====================================================================== */
/* ======       SHOW HIDE						       ================== */
/* ====================================================================== */
normalState = "_normal.";
overState = "_over.";
activeState = "_down.";

var currentSubBlok=null;

function showBlok(aElm,subBlokId,mOver)
{
	var imgElm = aElm.getElementsByTagName('img')[0];
	var subBlokObj = document.getElementById(subBlokId);
	
	imgElm.src = imgElm.src.replace(normalState,overState);
	
	if(currentSubBlok)
	{
		currentSubBlok.style.visibility="hidden";
	}
		
	if(subBlokObj)
	{
	/*	subBlokObj.style.left=aElm.offsetLeft+"px"; */
		subBlokObj.style.visibility="visible";
		currentSubBlok=subBlokObj;
		document.onmouseup = function()
		{
			currentSubBlok.style.visibility="hidden";
			document.onmouseup=null;
		}
	}
	
	aElm.onmouseout = function()
	{
		var imgElm = this.getElementsByTagName('img')[0];
		imgElm.src = imgElm.src.replace(overState,normalState);
	}
}
/* ====================================================================== */
/* ======       NAVIGATION						       ================== */
/* ====================================================================== */
	function setNavigation() {
		var navi;
		var naviItems;

		navi = document.getElementById("navigation");
		naviItems = navi.getElementsByTagName("a");

		for(var i=0;i<naviItems.length;i++) {
			if(naviItems[i].href==document.location.href) {	
				naviItems[i].className="active";
			} 
		}
}
/* ====================================================================== */
/* ======       MENU							       ================== */
/* ====================================================================== */
	function setMenu() {
		var menu;
		var items;

		menu = document.getElementById("menu");
		items = menu.getElementsByTagName("a");

		for(var i=0;i<items.length;i++) {
			if(items[i].href==document.location.href) {	
				items[i].className="active";
			} 
		}
	
}

