/* Frames befreier für "Bottom" pages only */

if (top.frames.length<1) top.location.href="index.html" 


/* Auswahl CSS */

if (screen.width>=1024&&screen.width<1152) 
   {document.write("<link rel=stylesheet type=text/css href=vons1024.css>");}

else if (screen.width>=1152&&screen.width<1280) 
   {document.write("<link rel=stylesheet type=text/css href=vons1152.css>");}

else if (screen.width>=1280) 
   {document.write("<link rel=stylesheet type=text/css href=vons1280.css>");}
		
else if (screen.width>1024) 
   {document.write("<link rel=stylesheet type=text/css href=vons800.css>");}
                      
 
/* sound for OnMouseOver */

document.write('<bgsound src="#" id="mysound" loop="1" autostart="true">')

function playsound(thesound) {
if (document.all)
document.all.mysound.src = thesound;
}


   

/* change FUNCTIONs for more than 1 TargetFrame */
/*------------------------------------------------*/

function ChangeBBG(){
   {parent.topm.location = "top.html";
	parent.middle.location = "BBG.html";
  	parent.topm.document.location.href = "top.html";
	parent.middle.document.location.href = "BBG.html";} }


function ChangeDOLPHIN(){
   {parent.topm.location = "dolphintit.html";
	parent.middle.location = "dolphin.html";
  	parent.topm.document.location.href = "dolphintit.html";
	parent.middle.document.location.href = "dolphin.html";}
  	}

function ChangeDOLPHIN1(){
   {parent.topm.location = "dolphin1tit.html";
	parent.middle.location = "dolphin1.html";
  	parent.topm.document.location.href = "dolphin1tit.html";
	parent.middle.document.location.href = "dolphin1.html";}
  	}

function ChangeDOLPHIN2(){
   if (screen.width>=1024)
    {parent.topm.location = "dolphin2tit.html";
	parent.middle.location = "dolphin2HA.html";
  	parent.topm.document.location.href = "dolphin2tit.html";
	parent.middle.document.location.href = "dolphin2HA.html";}
  else
    {parent.topm.location = "dolphin2tit.html";
	parent.middle.location = "dolphin2.html";
  	parent.topm.document.location.href = "dolphin2tit.html";
	parent.middle.document.location.href = "dolphin2.html";}
  	}

function ChangeESPRIT(){
   {parent.topm.location = "esprittit.html";
	parent.middle.location = "esprit.html";
  	parent.topm.document.location.href = "esprittit.html";
	parent.middle.document.location.href = "esprit.html";}
  	}

function ChangeESPRIT1(){
   {parent.topm.location = "esprit1tit.html";
	parent.middle.location = "esprit1.html";
  	parent.topm.document.location.href = "esprit1tit.html";
	parent.middle.document.location.href = "esprit1.html";}
  	}

function ChangeESPRIT2(){
   if (screen.width>=1024)
    {parent.topm.location = "esprit2tit.html";
	parent.middle.location = "esprit2HA.html";
  	parent.topm.document.location.href = "esprit2tit.html";
	parent.middle.document.location.href = "esprit2HA.html";}
  else
    {parent.topm.location = "esprit2tit.html";
	parent.middle.location = "esprit2.html";
  	parent.topm.document.location.href = "esprit2tit.html";
	parent.middle.document.location.href = "esprit2.html";}
  	}

function ChangeFILZ(){
   {parent.topm.location = "top.html";
	parent.middle.location = "FILZ.html";
  	parent.topm.document.location.href = "top.html";
	parent.middle.document.location.href = "FILZ.html";} 	}	
	
function ChangeHOST(){
   {parent.topm.location = "top.html";
	parent.middle.location = "host.html";
  	parent.topm.document.location.href = "top.html";
	parent.middle.document.location.href = "host.html";} 	}

function ChangeINFO(){
   {parent.topm.location = "top.html";
	parent.middle.location = "info.html";
  	parent.topm.document.location.href = "top.html";
	parent.middle.document.location.href = "info.html";}	}

function ChangeKONTAKT(){
   {parent.topm.location = "top.html";
	parent.middle.location = "kontakt.html";
  	parent.topm.document.location.href = "top.html";
	parent.middle.document.location.href = "kontakt.html";}	}

function ChangeLMX(){
   {parent.topm.location = "lmxtit.html";
    parent.middle.location = "lmx.html";
    parent.topm.document.location.href = "lmxtit.html";
    parent.middle.document.location.href = "lmx.html";}
    }

function ChangeLMX1(){
   {parent.topm.location = "lmx1tit.html";
	parent.middle.location = "lmx1.html";
  	parent.topm.document.location.href = "lmx1tit.html";
	parent.middle.document.location.href = "lmx1.html";}
  	}

function ChangeLMX2(){
   if (screen.width>=1024)
    {parent.topm.location = "lmx2tit.html";
	parent.middle.location = "lmx2HA.html";
  	parent.topm.document.location.href = "lmx2tit.html";
	parent.middle.document.location.href = "lmx2HA.html";}
  else
    {parent.topm.location = "lmx2tit.html";
	parent.middle.location = "lmx2.html";
  	parent.topm.document.location.href = "lmx2tit.html";
	parent.middle.document.location.href = "lmx2.html";}
  	}

function ChangeMACH(){
   {parent.topm.location = "machtit.html";
	parent.middle.location = "mach.html";
  	parent.topm.document.location.href = "machtit.html";
	parent.middle.document.location.href = "mach.html";}
  	}

function ChangeMACH1(){
   {parent.topm.location = "mach1tit.html";
	parent.middle.location = "mach1.html";
  	parent.topm.document.location.href = "mach1tit.html";
	parent.middle.document.location.href = "mach1.html";}
  	}

function ChangeMACH2(){
   if (screen.width>=1024)
    {parent.topm.location = "mach2tit.html";
	parent.middle.location = "mach2HA.html";
  	parent.topm.document.location.href = "mach2tit.html";
	parent.middle.document.location.href = "mach2HA.html";}
  else
    {parent.topm.location = "mach2tit.html";
	parent.middle.location = "mach2.html";
  	parent.topm.document.location.href = "mach2tit.html";
	parent.middle.document.location.href = "mach2.html";}
  	}

function ChangeTEPPICH(){
   {parent.topm.location = "top.html";
	parent.middle.location = "teppich.html";
  	parent.topm.document.location.href = "top.html";
	parent.middle.document.location.href = "teppich.html";}  }

function ChangeVORTEILE(){
   {parent.topm.location = "top.html";
	parent.middle.location = "vorteile.html";
  	parent.topm.document.location.href = "top.html";
	parent.middle.document.location.href = "vorteile.html";}	}

function ChangeWS(){
   {parent.topm.location = "top.html";
	parent.middle.location = "ws.html";
  	parent.topm.document.location.href = "top.html";
	parent.middle.document.location.href = "ws.html";} }

	
/*  Druck ButtonLink  - change shadows + retour */

function Bover1()
{
document.all.b1a.style.borderTopColor = "#0C42A7";
document.all.b1a.style.borderLeftColor = "#0C42A7";
document.all.b1a.style.borderBottomColor = "#AAC6F9";
document.all.b1a.style.borderRightColor = "#AAC6F9";

document.all.b1b.style.backgroundColor = "#3678F1";

document.all.b1b.style.borderTopColor = "#0C42A7";
document.all.b1b.style.borderLeftColor = "#0C42A7";
document.all.b1b.style.borderBottomColor = "#AAC6F9";
document.all.b1b.style.borderRightColor = "#AAC6F9";

document.all.b1c.style.color = "#000064";
}

function Bout1()
{
document.all.b1a.style.borderTopColor = "#AAC6F9";
document.all.b1a.style.borderLeftColor = "#AAC6F9";
document.all.b1a.style.borderBottomColor = "#0C42A7";
document.all.b1a.style.borderRightColor = "#0C42A7";

document.all.b1b.style.backgroundColor = "cornflowerblue";

document.all.b1b.style.borderTopColor = "#0C42A7";
document.all.b1b.style.borderLeftColor = "#0C42A7";
document.all.b1b.style.borderBottomColor = "#AAC6F9";
document.all.b1b.style.borderRightColor = "#AAC6F9";

document.all.b1c.style.color = "white";
}

function Bover2()
{
document.all.b2a.style.borderTopColor = "#0C42A7";
document.all.b2a.style.borderLeftColor = "#0C42A7";
document.all.b2a.style.borderBottomColor = "#AAC6F9";
document.all.b2a.style.borderRightColor = "#AAC6F9";

document.all.b2b.style.backgroundColor = "#3678F1";

document.all.b2b.style.borderTopColor = "#0C42A7";
document.all.b2b.style.borderLeftColor = "#0C42A7";
document.all.b2b.style.borderBottomColor = "#AAC6F9";
document.all.b2b.style.borderRightColor = "#AAC6F9";

document.all.b2c.style.color = "#000064";
}

function Bout2()
{
document.all.b2a.style.borderTopColor = "#AAC6F9";
document.all.b2a.style.borderLeftColor = "#AAC6F9";
document.all.b2a.style.borderBottomColor = "#0C42A7";
document.all.b2a.style.borderRightColor = "#0C42A7";

document.all.b2b.style.backgroundColor = "cornflowerblue";

document.all.b2b.style.borderTopColor = "#0C42A7";
document.all.b2b.style.borderLeftColor = "#0C42A7";
document.all.b2b.style.borderBottomColor = "#AAC6F9";
document.all.b2b.style.borderRightColor = "#AAC6F9";

document.all.b2c.style.color = "white";
}

function Bover3()
{
document.all.b3a.style.borderTopColor = "#0C42A7";
document.all.b3a.style.borderLeftColor = "#0C42A7";
document.all.b3a.style.borderBottomColor = "#AAC6F9";
document.all.b3a.style.borderRightColor = "#AAC6F9";

document.all.b3b.style.backgroundColor = "#3678F1";

document.all.b3b.style.borderTopColor = "#0C42A7";
document.all.b3b.style.borderLeftColor = "#0C42A7";
document.all.b3b.style.borderBottomColor = "#AAC6F9";
document.all.b3b.style.borderRightColor = "#AAC6F9";

document.all.b3c.style.color = "#000064";
}

function Bout3()
{
document.all.b3a.style.borderTopColor = "#AAC6F9";
document.all.b3a.style.borderLeftColor = "#AAC6F9";
document.all.b3a.style.borderBottomColor = "#0C42A7";
document.all.b3a.style.borderRightColor = "#0C42A7";

document.all.b3b.style.backgroundColor = "cornflowerblue";

document.all.b3b.style.borderTopColor = "#0C42A7";
document.all.b3b.style.borderLeftColor = "#0C42A7";
document.all.b3b.style.borderBottomColor = "#AAC6F9";
document.all.b3b.style.borderRightColor = "#AAC6F9";

document.all.b3c.style.color = "white";
}


/* Sliding - MENU - Oben, TeBo, Tech Details, Funktionsweise +Unten */
/*-----------------------------------------------------------------*/

     self.onError=null;
        
        currentX = currentY = 0;  
        whichIt = null;           
        lastScrollX = 0; lastScrollY = 0;
        
        NS = (document.layers) ? 1 : 0;
        IE = (document.all) ? 1: 0;
        
        function heartBeat() {
        
                if(IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; }
            if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }
                
                if(diffY != lastScrollY) {
                        percent = .1 * (diffY - lastScrollY);
                        if(percent > 0) percent = Math.ceil(percent);
                        else percent = Math.floor(percent);
                                        if(IE) document.all.slide.style.pixelTop += percent;
                                        if(NS) document.slide.top += percent; 
                        lastScrollY = lastScrollY + percent;
            }
                if(diffX != lastScrollX) {
                        percent = .1 * (diffX - lastScrollX);
                        if(percent > 0) percent = Math.ceil(percent);
                        else percent = Math.floor(percent);
                        if(IE) document.all.slide.style.pixelLeft += percent;
                        if(NS) document.slide.left += percent;
                        lastScrollX = lastScrollX + percent;
                }       
        }

        function checkFocus(x,y) { 
        var totalY, totalX;
                floatx = document.slide.pageX;
                floaty = document.slide.pageY;
                floatwidth = document.slide.clip.width;
                floatheight = document.slide.clip.height;
                        
                        if(20 == 0) totalY = floatheight;
                        else totalY = 20;
                        if(0 == 0) totalX = floatwidth;
                        else totalX = 0;
                if( (x > floatx && x < (floatx+totalX)) && (y > floaty && y < (floaty+totalY))) return true;
                else return false;
        }
        
        function grabIt(e) {
                if(IE) {
                        whichIt = event.srcElement;
                        while (whichIt.id.indexOf("slide") == -1) {
                                whichIt = whichIt.parentElement;
                                if (whichIt == null) { return true; }
                    }
                        whichIt.style.pixelLeft = whichIt.offsetLeft;
                    whichIt.style.pixelTop = whichIt.offsetTop;
                        currentX = (event.clientX + document.body.scrollLeft);
                        currentY = (event.clientY + document.body.scrollTop);
                        
                        if(20 == 0) totalY = whichIt.style.pixelHeight;
                        else totalY = 20;
                        if(0 == 0) totalX = whichIt.style.pixelWidth;
                        else totalX = 0;
                        if(!(event.clientX > whichIt.offsetLeft && event.clientX < whichIt.offsetLeft + totalX) || 
                        !(currentY > whichIt.offsetTop && currentY < whichIt.offsetTop + totalY)) whichIt = null;
                } else { 
                window.captureEvents(Event.MOUSEMOVE);
                if(checkFocus (e.pageX,e.pageY)) { 
                        whichIt = document.slide;
                        FloatTouchedX = e.pageX-document.slide.pageX;
                        FloatTouchedY = e.pageY-document.slide.pageY;
                } 
                }
            return true;
        }
        
        function moveIt(e) {
                if (whichIt == null) { return false; }
                if(IE) {
                    newX = (event.clientX + document.body.scrollLeft);
                    newY = (event.clientY + document.body.scrollTop);
                    distanceX = (newX - currentX);    distanceY = (newY - currentY);
                    currentX = newX;    currentY = newY;
                    whichIt.style.pixelLeft += distanceX;
                    whichIt.style.pixelTop += distanceY;
                        if(whichIt.style.pixelTop < document.body.scrollTop) whichIt.style.pixelTop = document.body.scrollTop;
                        if(whichIt.style.pixelLeft < document.body.scrollLeft) whichIt.style.pixelLeft = document.body.scrollLeft;
                        if(whichIt.style.pixelLeft > document.body.offsetWidth - document.body.scrollLeft - whichIt.style.pixelWidth - 20) whichIt.style.pixelLeft = document.body.offsetWidth - whichIt.style.pixelWidth - 20;
                        if(whichIt.style.pixelTop > document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5) whichIt.style.pixelTop = document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5;
                        event.returnValue = false;
                } else { 
                        whichIt.moveTo(e.pageX-FloatTouchedX,e.pageY-FloatTouchedY);
                if(whichIt.left < 0+self.pageXOffset) whichIt.left = 0+self.pageXOffset;
                if(whichIt.top < 0+self.pageYOffset) whichIt.top = 0+self.pageYOffset;
                if( (whichIt.left + whichIt.clip.width) >= (window.innerWidth+self.pageXOffset-17)) whichIt.left = ((window.innerWidth+self.pageXOffset)-whichIt.clip.width)-17;
                if( (whichIt.top + whichIt.clip.height) >= (window.innerHeight+self.pageYOffset-17)) whichIt.top = ((window.innerHeight+self.pageYOffset)-whichIt.clip.height)-17;
                return false;
                }
            return false;
        }
        
        function dropIt() {
                whichIt = null;
            if(NS) window.releaseEvents (Event.MOUSEMOVE);
            return true;
        }

        
        if(NS) {
                window.captureEvents(Event.MOUSEUP|Event.MOUSEDOWN);
                window.onmousedown = grabIt;
                window.onmousemove = moveIt;
                window.onmouseup = dropIt;
        }
        if(IE) {
                document.onmousedown = grabIt;
                document.onmousemove = moveIt;
                document.onmouseup = dropIt;
        }
        
        
        if(NS || IE) action = window.setInterval("heartBeat()",1);

