

function iUp(who)
{
  path='img/menu/';
  /*
  e=document.getElementById('e'+N);
  e.src=path+fileName(N)+'-this.gif';
  */
  return path+who+'-over.gif';
}

function iOut(who)
{
  path='img/menu/';
  /*     
  e=document.getElementById('e'+N);
  e.src=path+fileName(N)+'.gif';
  */
  return path+who+'.gif';
}

function CI(who,what)
{
  obj=document.getElementById(who)
  if (what)
  {
    obj.src=iUp(who)
  }
  else
  {
    obj.src=iOut(who)
  }
}

/** ----- MENU ---- **/

function testOut(mX,mY)
{
	if(active_name!='')
	{
	  an=active_name;
		ol=document.getElementById(active_name+'_left').offsetWidth;
		ow=document.getElementById(active_name+'_width').offsetWidth;
		ot=document.getElementById(active_name+'_width').offsetTop+47+20;
		/*
		bl=document.getElementById(active_name+'_td').offsetLeft;
		bw=document.getElementById(active_name+'_td').offsetWidth;
		*/
		bl=280;
		bw=document.getElementById(active_name+'_td').offsetWidth;
		if( ((mX < ol) || (mX > (ol+ow)) || (mY < 47) || (mY > ot))&&((mX < bl) || (mX > (bl+bw)) || (mY < 1) || (mY > 48)) ){
			document.getElementById(active_name+'_div').style.visibility='hidden';
			an=active_name;
      if ((now_menu!=an)||(now_sub!=''))
      {
			  document.getElementById(active_name).src='img/menu/'+active_name+'.gif';
			};
			active_name='';
		}
		else
		{
		  if ((now_menu!=an)||(now_sub!=''))
		  {
        document.getElementById(active_name).src='img/menu/'+active_name+'-over.gif';
		  }
		}
	}
	an='';
};

function inArray(str,arr){
	for(i=0;i<arr.length;i++){
		if(arr[i]==str){
			return 1;
		}
	}
	return 0;
}
function subOver(x)
{
	document.getElementById(x).style.backgroundColor='#A1EB7C';
}
function subOut(x)
{
	document.getElementById(x).style.backgroundColor='#ffffff';
};


function mOver(obj,type)
{
	id=String(obj.id);
	name=id;
	if(inArray(name,sub_menus)){
		active_name=name;
		document.getElementById(active_name+'_left_img').style.width=280;
		document.getElementById(active_name+'_div').style.visibility='visible';
	}
};

function mOut(obj,type)
{
}