var ns4=false;
var ie4=false;
var dom=false;

if (navigator.appName=="Netscape") {
  if (navigator.appVersion.substring(0,1) == "4")
  {
    ns4=true;
  }
  else {
    dom=true;
  }
} 
else {
  ie4=true;
}




///////////////////////////////////////////////////////////////////////////
//funktion uebertraegt den content in den beweglichen layer
function fill_layer()
{
if (ns4) {
   with(document.parentDiv.document.childDiv.document) {
     open();
     write(layercontent);
     close();
   }
}

if (dom) {
    document.write(layercontent);

}


if (ie4) {
childDiv.innerHTML=layercontent;
}

}

///////////////////////////////////////////////////////////////////////////
//funktion liefert die position eines objekts zurueck
function showpos(parm,achse)
{
    if (achse=="x")
        return(window.document.parentDiv.document.childDiv.document.anchors[parm].x);
    if (achse=="y")
        return(window.document.anchors[parm].y);
}


///////////////////////////////////////////////////////////////////////////
//funktion bewegt den content-layer up/down
function movelayer(speed,direction)
{    
    if (((direction==1) && (iactscroll<0)) || ((direction==0) && (iactscroll>imaxscroll)))
    {
        if (ns4)
        {    ypos = parseInt(document.parentDiv.document.childDiv.top);
            if (direction==0)
            {ypos-=speed;
             iactscroll-=1;}
            else
            {ypos += speed;
             iactscroll+=1;}
            document.parentDiv.document.childDiv.top=ypos;
        }
    
        if (dom)
        {    ypos = parseInt(document.getElementById('childDiv').style.top);
            if (direction==0)
            {ypos-=speed;
             iactscroll-=1;}
            else
            {ypos += speed;
             iactscroll+=1;}
            document.getElementById('childDiv').style.top=ypos;
        }

        if (ie4) 
        {    ypos = parseInt(childDiv.style.top);
            if (direction==0)
            {ypos -= speed;
            iactscroll-=1;}
            else
            {ypos += speed;
            iactscroll+=1;}
            childDiv.style.top=ypos;
        }

            //sliding-funktionalitaet
            speed -= 1;
            if (speed != 0)
                setTimeout('movelayer('+speed+','+direction+')', 80);
    }
}


///////////////////////////////////////////////////////////////////////////
//funktion bewegt den content-layer left/right
function slidelayer(speed,direction)
{    
    if (((direction==1) && (iactscroll<0)) || ((direction==0) && (iactscroll>imaxscroll)))
    {
        if (ns4) 
        {    xpos = parseInt(document.parentDiv.document.childDiv.left);
            if (direction==0)
            {xpos-=speed;
            iactscroll-=1;}
            else
            {xpos += speed;
            iactscroll+=1;}
            document.parentDiv.document.childDiv.left=xpos;
        }
    
        if (ie4) 
        {    xpos = parseInt(childDiv.style.left);
            if (direction==0)
            {xpos -= speed;
            iactscroll-=1;}
            else
            {xpos += speed;
            iactscroll+=1;}
            childDiv.style.left=xpos;
        }

        //sliding-funktionalitaet
        speed -= 1;
        if (speed != 0)
        setTimeout('slidelayer('+speed+','+direction+')', 60);
    }
}


//////////////////////////////////////////////////////////////////////////////
//funktion laedt die benoetigten bilder der seite im voraus
function preloadImages() 
{  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


/////////////////////////////////////////////////////////////////////////////
//funktion tauscht bilder einer seite dynamisch aus
function movepic(img_name,img_src) 
{document[img_name].src=img_src;}

