// Funktion zur Einbindung der korrekten Stylesheetdatei in den Browser

var plattform = "win";

if (navigator.userAgent.indexOf("Win")!= -1) {
         plattform = "win";
}
if (navigator.userAgent.indexOf("Mac")!= -1) {
         plattform = "mac";
}
if((navigator.userAgent.indexOf("Mac")!= -1) && (navigator.userAgent.indexOf("MSIE 5") != -1)) {
         plattform = "win";
}

if ((navigator.userAgent.indexOf("Mac")!= -1) || ( (navigator.userAgent.indexOf("MSIE") < 0) &&  (navigator.appVersion.substring(0,1) < 6)) ){
 plattform = "mac";
}





document.write("<link href=\"../../lib/css/"+plattform+".css\" REL=\"STYLESHEET\" TYPE=\"text/css\">");

// Ausgabe der entsprechenden div-Dateien - Achtung IE5 benötigt dafür Mac-Datei

if((navigator.userAgent.indexOf("Mac")!= -1) && (navigator.userAgent.indexOf("MSIE 5") != -1)) {
         plattform = "mac";
}
document.write("<link href=\"../../lib/css/div"+plattform+".css\" REL=\"STYLESHEET\" TYPE=\"text/css\">");

/*****************************************************************************************************************/
// reloads the window if Nav4 resized
function MM_reloadPage(init) {
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

/*****************************************************************************************************************/
// Funktion zum Öffnen eines Childwindow an einer bestimmten Position
function popup(PopURL,FName,x,y,posx,posy)
{
        if (!(posx)) posx=20;
        if (!(posy)) posy=20;
        ie=(document.all)?true:false;
        ie4 = navigator.appVersion.indexOf("MSIE 4");
        if (! window.cc_child)
        {
                cc_child = window.open(PopURL, FName,'location=no,menubar=no,resizable=no,status=no,scrollbars=yes,width='+x+',height='+y+', top='+posy+', left='+posx);
                //if (posx) cc_child.moveTo(posx,posy);
                window.cc_child.focus();
                return;
        }

        if (ie && ie4 < 0)
        {
                if (window.cc_child.closed)
                {
                        cc_child = window.open(PopURL, FName,'location=no,menubar=no,resizable=no,status=no,scrollbars=yes,width='+x+',height='+y+', top='+posy+', left='+posx);
                        //if (posx) cc_child.moveTo(posx,posy);
                        window.cc_child.focus();
                        return;
                }
        }

        if (window.cc_child)
        {
                if (ie && ie4 < 0)
                        {  window.cc_child.close(); }
                cc_child = window.open(PopURL, FName,'location=no,menubar=no,resizable=no,status=no,scrollbars=yes,width='+x+',height='+y+', top='+posy+', left='+posx);
                //if (posx) cc_child.moveTo(posx,posy);
                window.cc_child.focus();
        }
}
function popPrint(PopURL,FName,x,y,posx,posy)
{
        if (!(posx)) posx=20;
        if (!(posy)) posy=20;
        ie=(document.all)?true:false;
        ie4 = navigator.appVersion.indexOf("MSIE 4");
        if (! window.cc_child)
        {
                cc_child = window.open(PopURL, FName,'location=no,menubar=yes,resizable=no,status=no,scrollbars=yes,width='+x+',height='+y+', top='+posy+', left='+posx);
                window.cc_child.focus();
                return;
        }

        if (ie && ie4 < 0)
        {
                if (window.cc_child.closed)
                {
                        cc_child = window.open(PopURL, FName,'location=no,menubar=yes,resizable=no,status=no,scrollbars=yes,width='+x+',height='+y+', top='+posy+', left='+posx);
                        window.cc_child.focus();
                        return;
                }
        }

        if (window.cc_child)
        {
                if (ie && ie4 < 0)
                        {  window.cc_child.close(); }
                cc_child = window.open(PopURL, FName,'location=no,menubar=no,resizable=yes,status=no,scrollbars=yes,width='+x+',height='+y+', top='+posy+', left='+posx);
                window.cc_child.focus();
        }
}
/**************************************************************************************************************/

// Funktion zum Öffnen eines Childwindow an einer bestimmten Position MIT TOOLBAR!
function popupA(PopURL,FName,x,y,posx,posy)
{
        if (!(posx)) posx=20;
        if (!(posy)) posy=20;
        ie=(document.all)?true:false;
        ie4 = navigator.appVersion.indexOf("MSIE 4");
        if (! window.cc_child)
        {
                cc_child = window.open(PopURL, FName,'location=no,menubar=no,toolbar=yes,resizable=no,status=no,scrollbars=yes,width='+x+',height='+y);
                if (posx) cc_child.moveTo(posx,posy);
                window.cc_child.focus();
                return;
        }

        if (ie && ie4 < 0)
        {
                if (window.cc_child.closed)
                {
                        cc_child = window.open(PopURL, FName,'location=no,menubar=no,toolbar=yes,resizable=no,status=no,scrollbars=yes,width='+x+',height='+y);
                        if (posx) cc_child.moveTo(posx,posy);
                        window.cc_child.focus();
                        return;
                }
        }

        if (window.cc_child)
        {
                if (ie && ie4 < 0)
                        {  window.cc_child.close(); }
                cc_child = window.open(PopURL, FName,'location=no,toolbar=yes,menubar=no,resizable=no,status=no,scrollbars=yes,width='+x+',height='+y);
                if (posx) cc_child.moveTo(posx,posy);
                window.cc_child.focus();
        }
}
/**************************************************************************************************************/




function popupB(PopURL,FName,x,y,posx,posy)
{
        if (!(posx)) posx=20;
        if (!(posy)) posy=20;
        ie=(document.all)?true:false;
        ie4 = navigator.appVersion.indexOf("MSIE 4");
        if (! window.cc_child)
        {
                cc_child = window.open(PopURL, FName,'location=no,menubar=no,toolbar=yes,resizable=no,status=no,scrollbars=yes,width='+x+',height='+y);
                if (posx) cc_child.moveTo(posx,posy);
                window.cc_child.focus();
                return;
        }

        if (ie && ie4 < 0)
        {
                if (window.cc_child.closed)
                {
                        cc_child = window.open(PopURL, FName,'location=no,menubar=no,toolbar=yes,resizable=no,status=no,scrollbars=yes,width='+x+',height='+y);
                        if (posx) cc_child.moveTo(posx,posy);
                        window.cc_child.focus();
                        return;
                }
        }

        if (window.cc_child)
        {
                if (ie && ie4 < 0)
                        {  window.cc_child.close(); }
                cc_child = window.open(PopURL, FName,'location=no,toolbar=yes,menubar=no,resizable=no,status=no,scrollbars=yes,width='+x+',height='+y);
                if (posx) cc_child.moveTo(posx,posy);
                window.cc_child.focus();
        }
}
/**************************************************************************************************************/


/**************************************************************************************************************/

// Funktion zum Öffnen eines Childwindow an einer bestimmten Position MIT TOOLBAR!+scroll
function popupB(PopURL,FName,x,y,posx,posy)
{
        if (!(posx)) posx=20;
        if (!(posy)) posy=20;
        ie=(document.all)?true:false;
        ie4 = navigator.appVersion.indexOf("MSIE 4");
        if (! window.cc_child)
        {
                cc_child = window.open(PopURL, FName,'location=no,menubar=no,toolbar=yes,resizable=no,status=no,scrollbars=yes,width='+x+',height='+y);
                if (posx) cc_child.moveTo(posx,posy);
                window.cc_child.focus();
                return;
        }

        if (ie && ie4 < 0)
        {
                if (window.cc_child.closed)
                {
                        cc_child = window.open(PopURL, FName,'location=no,menubar=no,toolbar=yes,resizable=no,status=no,scrollbars=yes,width='+x+',height='+y);
                        if (posx) cc_child.moveTo(posx,posy);
                        window.cc_child.focus();
                        return;
                }
        }

        if (window.cc_child)
        {
                if (ie && ie4 < 0)
                        {  window.cc_child.close(); }
                cc_child = window.open(PopURL, FName,'location=no,toolbar=yes,menubar=no,resizable=no,status=no,scrollbars=yes,width='+x+',height='+y);
                if (posx) cc_child.moveTo(posx,posy);
                window.cc_child.focus();
        }
}
/**************************************************************************************************************/



// Kaskadiertes Popup
function popuptext(PopURL,FName,x,y,posx,posy)
{
        ns=( document.layers )?true:false;
        ie=( document.all )?true:false;
        ie4 = navigator.appVersion.indexOf("MSIE 4");

        if( ! window.cc_child_text )
        {
                if( ie )
                {
                        x = x +20;
                }
                cc_child_text = window.open( PopURL, FName,'location=no,menubar=no,resizable=no,status=no,scrollbars=yes,width='+x+',height='+y );
                if ( posx )
                        cc_child_text.moveTo( posx,posy );
                window.cc_child_text.focus();
                return;
        }
        if (ie && ie4 < 0)
        {
                if( window.cc_child_text.closed )
                {
                        if( ie )
                        {
                                x = x +20;
                        }
                        cc_child_text = window.open( PopURL, FName,'location=no,menubar=no,resizable=no,status=no,scrollbars=yes,width='+x+',height='+y );
                        if ( posx )
                                cc_child_text.moveTo( posx,posy );
                        window.cc_child_text.focus();
                        return;
                }
        }

        if( window.cc_child_text )
        {
                if (ie && ie4 < 0)
                {
                        window.cc_child_text.close();
                }
                cc_child_text = window.open( PopURL, FName,'location=no,menubar=no,resizable=no,status=no,scrollbars=yes,width='+x+',height='+y );
                if( posx )
                        cc_child_text.moveTo( posx,posy );
                window.cc_child_text.focus();
        }
}
/**************************************************************************************************/
// Funktion zum Öffnen eines Childwindow an einer bestimmten Position
function popupmessage(PopURL,FName,x,y,posx,posy)
{       alert ("THIS");
        if (!(posx)) posx=100;
        if (!(posy)) posy=100;
        ie=(document.all)?true:false;
        ie4 = navigator.appVersion.indexOf("MSIE 4");
        if (! window.cc_child)
        {
                cc_child = window.open(PopURL, FName,'location=no,menubar=no,resizable=no,status=no,scrollbars=no,width='+x+',height='+y);
                if (posx) cc_child.moveTo(posx,posy);
                window.cc_child.focus();
                return;
        }

        if (ie && ie4 < 0)
        {
                if (window.cc_child.closed)
                {
                        cc_child = window.open(PopURL, FName,'location=no,menubar=no,resizable=no,status=no,scrollbars=yes,width='+x+',height='+y);
                        if (posx) cc_child.moveTo(posx,posy);
                        window.cc_child.focus();
                        return;
                }
        }

        if (window.cc_child)
        {
                if (ie && ie4 < 0)
                        {  window.cc_child.close(); }
                cc_child = window.open(PopURL, FName,'location=no,menubar=no,resizable=no,status=no,scrollbars=yes,width='+x+',height='+y);
                if (posx) cc_child.moveTo(posx,posy);
                window.cc_child.focus();
        }
}
/**************************************************************************************************/
// Funktion zum Öffnen eines Childwindow an einer bestimmten Position
function popupclose()
{
     top.window.close();
}
/**************************************************************************************************/
// Funktion Rollover

function rollover(bild_org,bild_change)
{
     imgChange    = new Image();
     imgChange.src = bild_change;
         if(navigator.appName == "Netscape")
                {
                    document.linie.document.images[bild_org].src = imgChange.src;
                }
                else
                {
                  window.document.images[bild_org].src = imgChange.src;
                }
}
function rollover1(bild_org,bild_change)
{
     imgChange    = new Image();
     imgChange.src = bild_change;
     window.document.images[bild_org].src = imgChange.src;
}
function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}



/*****************************************************************************************************************/
// Funktion zum Öffnen eines Childwindow an einer bestimmten Position für webspecials in Flash
function pop(PopURL,FName,x,y,posx,posy)
{
        if (!(posx)) posx=20;
        if (!(posy)) posy=20;
        ie=(document.all)?true:false;
        ie4 = navigator.appVersion.indexOf("MSIE 4");
        if (! window.cc_child)
        {
                cc_child = window.open(PopURL, FName,'location=no,menubar=no,resizable=no,status=no,scrollbars=no,width='+x+',height='+y);
                if (posx) cc_child.moveTo(posx,posy);
                window.cc_child.focus();
                return;
        }

        if (ie && ie4 < 0)
        {
                if (window.cc_child.closed)
                {
                        cc_child = window.open(PopURL, FName,'location=no,menubar=no,resizable=no,status=no,scrollbars=no,width='+x+',height='+y);
                        if (posx) cc_child.moveTo(posx,posy);
                        window.cc_child.focus();
                        return;
                }
        }

        if (window.cc_child)
        {
                if (ie && ie4 < 0)
                        {  window.cc_child.close(); }
                cc_child = window.open(PopURL, FName,'location=no,menubar=no,resizable=no,status=no,scrollbars=no,width='+x+',height='+y);
                if (posx) cc_child.moveTo(posx,posy);
                window.cc_child.focus();
        }
}



/*****************************************************************************************************************/
// Funktion des Lauftextes ar01


// By Ernst Straka (ernst.straka@central-europe.basf.org http://www.rs-systems.at/straka)
// Courtesy of SimplytheBest.net (http://simplythebest.net/info/dhtml_scripts.html)
var a1 =   80; // left of ticker in pixel, or 0 to position relative
var b1 =   500; // top of ticker in pixel, or 0 to position relative
var d1 = 300; // width of ticker in pixel
var ie = document.all ? true : false;
var first = true;
var f2 = a1 + d1;
var g3 = a1 - f2;
var h = f2;

function tick1() {
h = h - 4;   //1 - x , X=anzahl pixel pro vorgang
if (h < g3) h = f2;
il = a1 - h;
ir = f2 - h;
if (ie) {
ticktext1.style.posLeft = h;
ticktext1.style.posTop = b1;
ticktext1.style.clip = "rect(auto "+ir+"px auto "+il+"px)";
if (first) ticktext1.style.visibility = "visible";
}
else {
document.ticktext1.pageX = h;
document.ticktext1.clip.left = il;
document.ticktext1.clip.right = ir;
if (first) document.ticktext1.visibility = "show";
}
first = false;
}


/*****************************************************************************************************************/
// Funktion des Lauftextes ar02



// By Ernst Straka (ernst.straka@central-europe.basf.org http://www.rs-systems.at/straka)
// Courtesy of SimplytheBest.net (http://simplythebest.net/info/dhtml_scripts.html)

var l1 =   100; // left of ticker in pixel, or 0 to position relative
var t1 =   100; // top of ticker in pixel, or 0 to position relative
var w1 = 600; // width of ticker in pixel
var ie = document.all ? true : false;
var first = true;
var l2 = l1 + w1;
var l3 = l1 - l2;
var l = l2;


function tick2() {


l = l - 4;   //1 - x , X=anzahl pixel pro vorgang
if (l < l3) l = l2;
cl = l1 - l;
cr = l2 - l;
if (ie) {
ticktext2.style.posLeft = l;
ticktext2.style.posTop = t1;
ticktext2.style.clip = "rect(auto "+cr+"px auto "+cl+"px)";
if (first) ticktext2.style.visibility = "visible";
}
else {
document.ticktext2.pageX = l;
document.ticktext2.clip.left = cl;
document.ticktext2.clip.right = cr;
if (first) document.ticktext2.visibility = "show";
}
first = false;
}

