var nButton1=new Array();
var nButton2=new Array();

function register_images ()
{ nButton1["link"]                     = './deequier/index.htm';
  nButton2["link"]                     = "./literatur/index.htm";

  nButton1["image"]                    = 'pics/button_deequier41.jpg';
  nButton1["alphaimage"]               = 'pics/button_deequier41.jpg';
  nButton1["activeLink"]               = new Array();
  nButton1["activeLink"]["image"]      = 'pics/button_deequier42.jpg';
  nButton1["activeLink"]["alphaimage"] = 'pics/button_deequier42.jpg';

  nButton2["image"]                     = 'pics/button_literatur41.jpg';
  nButton2["alphaimage"]                = 'pics/button_literatur41.jpg';
  nButton2["activeLink"]                = new Array();
  nButton2["activeLink"]["image"]       = 'pics/button_literatur42.jpg';
  nButton2["activeLink"]["alphaimage"]  = 'pics/button_literatur42.jpg';
}


function assign_all()
{ HeaderLayer=ContLayer.assignLayerObj ("header");

  LogoCont=HeaderLayer.assignLayerObj ("logo_cont");
  Logo1Layer=LogoCont.assignLayerObj ("logo1").isAnimationLayerObj();

  Logo2Layer=LogoCont.assignLayerObj ("logo2").isAnimationLayerObj();
  Logo3Layer=LogoCont.assignLayerObj ("logo3").isAnimationLayerObj();

  ButtonCont=ContLayer.assignLayerObj ("button_cont");

    Button1LayerOrg=ButtonCont.assignLayerObj ("button1");

  Button1LayerOrg.hideLayer();
  //alert ("width:" + Button1LayerOrg.width);
  Button1Layer = ButtonCont.createLayerObj_absolute (Button1LayerOrg.x, Button1LayerOrg.y, Button1LayerOrg.width, Button1LayerOrg.height).isAnimationLayerObj().isLinkLayerObj (nButton1);;

  Button1Layer.setzIndex(1);
  Button1Layer.insertLink();
  Button1Layer.addEventHandler ("onmouseover");
  Button1Layer.addEventHandler ("onmouseout");

  Button2LayerOrg=ButtonCont.assignLayerObj ("button2");
  Button2LayerOrg.hideLayer();
  Button2Layer = ButtonCont.createLayerObj_absolute (Button2LayerOrg.x, Button2LayerOrg.y, Button2LayerOrg.width, Button2LayerOrg.height).isAnimationLayerObj().isLinkLayerObj (nButton2);
  Button2Layer.setzIndex(1);
  Button2Layer.insertLink();
  Button2Layer.addEventHandler ("onmouseover");
  Button2Layer.addEventHandler ("onmouseout");


  WelcomeLayer=ContLayer.assignLayerObj ("welcome");

  Button3Layer=WelcomeLayer.assignLayerObj ("button3").isAnimationLayerObj();
  ButtonBorder=Button3Layer.assignLayerObj ("button_border");

  newsCont_standard=ButtonBorder.assignLayerObj ("news_cont");
  newsCont_standard.hideLayer();

  newsContLayer=
  ButtonBorder.createLayerObj_absolute(newsCont_standard.x, newsCont_standard.y,
                                       newsCont_standard.width, newsCont_standard.height);
  newsContLayer.setBgColor("#DAEBF3");
 }

function animate ()
{
  aTObjMain=new Animation_TransactionObj('Main', "no_repeat");

  aTObjMain.add_Aninmation_LayerObj (Logo1Layer);
  aTObjMain.add_Aninmation_LayerObj (Logo2Layer);
  aTObjMain.add_Aninmation_LayerObj (Logo3Layer);

  aTObjMain.add_Aninmation_LayerObj (Button1Layer);
  aTObjMain.add_Aninmation_LayerObj (Button2Layer);
  aTObjMain.add_Aninmation_LayerObj (Button3Layer);

  Button1Layer.add_AninmationObj_slide (1000, 'slide_back_from_parent_left', 0);
  Button2Layer.add_AninmationObj_slide (1000, 'slide_back_from_parent_left', 0);
  Button3Layer.add_AninmationObj_slide (1000, 'slide_back_from_parent_left', 0);

  Button3Layer.add_AninmationObj_pause (2000, '', 1, 0);

  Logo1Layer.add_AninmationObj_slide (800, 'slide_back_from_parent_random', 2);
  Logo2Layer.add_AninmationObj_slide (800, 'slide_back_from_parent_random', 3);
  Logo3Layer.add_AninmationObj_slide (800, 'slide_back_from_parent_random', 4);

  aTObjMain.start_animation  ();

  // News - Object
  var tmpNewsLayerObj=null;
  var tmpNewsLObj=null;
  aTObjNews=new Animation_TransactionObj('News', "repeat");

  for (var i=0; i<nNews.length;i++ )
  {
    tmpNewsLayerObj=newsContLayer.createLayerObj_absolute (0, 0,
                                                           newsCont_standard.width,
                                                           newsCont_standard.height).isAnimationLayerObj().isLinkLayerObj (nNews[i]);
    tmpNewsLayerObj.insertLink();
    tmpNewsLayerObj.addEventHandler ("onmouseover");
    tmpNewsLayerObj.addEventHandler ("onmouseout");
    //tmpNewsLayerObj.hideLayer();
    tmpNewsLObj=aTObjNews.add_Aninmation_LayerObj (tmpNewsLayerObj);
    tmpNewsLObj.add_AninmationObj_slide (2000, 'ticker_from_parent_bottom', (3*i));
    tmpNewsLObj.add_AninmationObj_pause (500, '', (3*i)+1);
    tmpNewsLObj.add_AninmationObj_fade  (2000, 'ticker_from_parent_bottom', (3*i)+2, nNews[i]["style"].color, nNews[i]["style"].ticker_backgroundColor);
  }
 aTObjNews.start_animation  ();

}


function writeIE4OccupacyClass(aclassname)
{ if (bw.ie)
  { document.writeln ('<style type="text/css">');
    document.writeln ('<!--');
    if (this.ieVersion>=5.5)
    { document.writeln ('.' + aclassname + ' {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=75, finishopacity=75, style=3)}') }
    else
    { document.writeln ('.' + aclassname + ' {filter:Alpha(opacity=75, finishopacity=75, style=3)}') }
      document.writeln ('-->');
      document.writeln ('</style>');
  }
}

if ( bw.ie )
{ 
  writeIE4OccupacyClass("containertext")
  writeIE4OccupacyClass("containertextcenter");
}


