var content1_location=null;
var clickMenu = '';
var clickSubMenu = '';

function setStyle(objId, style, value) 
{
    document.getElementById(objId).style[style] = value;
}

function load_one_frame(frame1, src1)
{
    eval("top." + frame1 + ".location.href='" + src1 + "';");
}

function load_two_frames(frame1, src1, frame2, src2)
{
    eval("top." + frame1 + ".location.href='" + src1 + "';");
    eval("top." + frame2 + ".location.href='" + src2 + "';");
}

function scrollToTop()
{
    window.scrllTo(0,0);
}

function menu_high_light(id)
{
    document.getElementById(id+"Anchor").style.fontWeight="bold";
    document.getElementById(id+"Anchor").style.color="#eA0000";
}

function menu_low_light(id)
{
    if ( clickMenu != id )
    {
      document.getElementById(id+"Anchor").style.fontWeight="bold";
      document.getElementById(id+"Anchor").style.color="#78BAD7";
    }
}

function activate_menu(id)
{
    document.getElementById(id).style.backgroundImage="url(/deu/images/core_images/reiter.gif)";
    document.getElementById(id+"Anchor").style.fontWeight="bold";
    document.getElementById(id+"Anchor").style.color="#eA0000";
    document.getElementById(id+"Sub").style.display="inline";
    if ( clickSubMenu != '' )
    {
      document.getElementById(clickSubMenu).style.fontWeight="normal";
    }
    clickSubMenu = '';
    clickMenu = id;
}

function deactivate_menu(id)
{
    document.getElementById(id).style.backgroundImage="";
    document.getElementById(id+"Anchor").style.fontWeight="bold";
    document.getElementById(id+"Anchor").style.color="#78BAD7";
    document.getElementById(id+"Sub").style.display="none";
    //clickMenu = '';
}

function activate_subMenu(id)
{
    document.getElementById(id).style.fontWeight="normal";
    document.getElementById(id).style.color="#eA0000";
}

function deactivate_subMenu(id)
{
    if ( clickSubMenu != id )
    {
      document.getElementById(id).style.fontWeight="normal";
      document.getElementById(id).style.color="white";
    }
}

function active_Menu(id)
{
  for(var i=0; i < menu.length; i++)
  {
    if (id == menu[i])
    {
      menu_high_light(menu[i]);
    }
    else
    {
      menu_low_light(menu[i]);
    }
  }
  return;
}

function inactive_Menu(id)
{
  for(var i=0; i < menu.length; i++)
  {
    if (id == menu[i])
    {
      menu_low_light(menu[i]);
    }
  }
  return;
}

function show_menu(id)
{
  for(var i=0; i < menu.length; i++)
  {
    if (id == menu[i])
    {
      activate_menu(menu[i]);
    }
    else
    {
      deactivate_menu(menu[i]);
    }
  }
  return;
}

function show_subMenu(menu,id)
{
  var menuarray = eval(menu);

  for(var i=0; i < menuarray.length; i++)
  {
    if (id == menuarray[i])
    {
      activate_subMenu(menuarray[i]);
      if ( clickSubMenu != '' )
      {
        document.getElementById(clickSubMenu).style.fontWeight="normal";
        document.getElementById(clickSubMenu).style.color="white";
      }
      clickSubMenu = id;
    }
    else
    {
      deactivate_subMenu(menuarray[i]);
    }
  }
  return;
}

function active_subMenu(menu,id)
{
  var menuarray = eval(menu);
  for(var i=0; i < menuarray.length; i++)
  {
    if (id == menuarray[i])
    {
      activate_subMenu(menuarray[i]);
    }
    else
    {
      deactivate_subMenu(menuarray[i]);
    }
  }
  return;
}

function inactive_subMenu(menu,id)
{
  var menuarray = eval(menu);

  for(var i=0; i < menuarray.length; i++)
  {
    if (id == menuarray[i])
    {
      deactivate_subMenu(menuarray[i]);
    }
  }
  return;
}

function activate_single_menu(id)
{
    document.getElementById(id).style.backgroundImage="url(/deu/images/core_images/reiter.gif)";
    document.getElementById(id+"Anchor").style.fontWeight="bold";
    document.getElementById(id+"Anchor").style.color="white";
}

function deactivate_single_menu(id)
{
    document.getElementById(id).style.backgroundImage="";
    document.getElementById(id+"Anchor").style.fontWeight="bold";
    document.getElementById(id+"Anchor").style.color="#78BAD7";
}

function show_single_menu(id)
{
  for(var i=0; i < menu.length; i++)
  {
    if (id == menu[i])
    {
      activate_single_menu(menu[i]);
    }
    else
    {
      deactivate_single_menu(menu[i]);
    }
  }
  return;
}
