if( top != self )
{
  if( window.opera ) window.onload=opera_befreien;
  else top.location = self.location;
}

function opera_befreien()
{
  document.links[ 'befreien' ].click();
}

function set_opacity( obj, opacity )
{
  opacity = ( opacity == 100 ) ? 99.999 : opacity;
  obj.style.filter       = "alpha( opacity :" + opacity + " )";
  obj.style.KHTMLOpacity = opacity / 100;
  obj.style.MozOpacity   = opacity / 100;
  obj.style.opacity      = opacity / 100;
}

function show_Angebote()
{
  set_opacity( document.getElementById( 'overlay_panel' ), 60 );
  document.body.scrollTop = '0';
  document.getElementById( 'overlay_panel' ).style.display = 'block';
  document.getElementById( 'x_Angebote_div_trans' ).style.display = 'none';
  document.getElementById( 'x_Angebote_div_IF' ).style.zIndex = '2000000';
  document.getElementById( 'x_Angebote_div_IF' ).style.top = '50px';
  document.getElementById( 'x_Angebote_div_IF' ).style.width = '612px';
  document.getElementById( 'x_Angebote_IF' ).style.height = '3500px';
  document.getElementById( 'x_Angebot_panel' ).style.top = '0px';
  document.getElementById( 'x_Angebote_div_IF' ).style.left = '200px';
  document.getElementById( 'x_Angebote_pos_div_IF' ).style.left = '-5px';
  document.getElementById( 'x_Angebot_panel' ).style.height = '3600px';
}

function hide_Angebote()
{
  document.getElementById( 'x_Angebote_div_IF' ).style.left = '7px';
  document.getElementById( 'x_Angebote_pos_div_IF' ).style.left = '-7px';
  document.getElementById( 'x_Angebote_div_IF' ).style.width = '598px';
  document.getElementById( 'x_Angebote_div_trans' ).style.display = 'block';
  document.getElementById( 'x_Angebote_div_IF' ).style.zIndex = '1';
  document.getElementById( 'x_Angebote_div_IF' ).style.top = '-316px';
  document.getElementById( 'x_Angebote_IF' ).style.height = '269px';
  document.getElementById( 'x_Angebot_panel' ).style.top = '184px';
  document.getElementById( 'x_Angebot_panel' ).style.height = '133px';
  document.getElementById( 'overlay_panel' ).style.display = 'none';
}

function load_Angebot( dsi, active )
{
  new Ajax.Request(
                    '/programm/other_menu.php?dsi=' + dsi + '&active=' + active + '&update_srting=' + new Date().getTime(),
                    { method: 'get', onComplete: other_menu }
                  );
  new Ajax.Request(
                    '/programm/other_Angebot.php?dsi=' + dsi + '&active=' + active + '&update_srting=' + new Date().getTime(),
                    { method: 'get', onComplete: other_Angebot }
                  );
}

function other_menu( originalRequest )
{
  $( 'x_Angebote_div_IF_menu' ).innerHTML = originalRequest.responseText;
}

function other_Angebot( originalRequest )
{
  $( 'x_Angebote_pos_div_IF' ).innerHTML = originalRequest.responseText;
  if( document.getElementById( 'overlay_panel' ).style.display == 'block' ) document.getElementById( 'x_Angebote_IF' ).style.height = '3500px';
}

function load_Nachweis( xx )
{
  new Ajax.Request(
                    '/programm/get_nachweis.php?xx=' + xx + '&update_srting=' + new Date().getTime(),
                    { method: 'get', onComplete: request_nachweis }
                  );
}

function request_nachweis( originalRequest )
{
  $( 'nachweis_foot_span' ).innerHTML = originalRequest.responseText;
}

function over_menu( object )
{
  object.style.backgroundColor='rgb( 255, 153,   0 )';
  for( var i = 0; i < object.childNodes.length; i++ )
  {
    if( object.childNodes[ i ].nodeName == "A" )
    {
      ( object ).childNodes[ i ].style.color='rgb( 255, 153,   0 )';
    }
  }
}

function out_menu( object )
{
  object.style.backgroundColor='rgb( 162,  71,  18 )';
  for( var i = 0; i < object.childNodes.length; i++ )
  {
    if( object.childNodes[ i ].nodeName == "A" )
    {
      ( object ).childNodes[ i ].style.color='rgb( 162,  71,  18 )';
    }
  }
}

function out_menu_u( object )
{
  object.style.backgroundColor='rgb( 210, 110,  50 )';
  for( var i = 0; i < object.childNodes.length; i++ )
  {
    if( object.childNodes[ i ].nodeName == "A" )
    {
      ( object ).childNodes[ i ].style.color='rgb( 162,  71,  18 )';
    }
  }
}
