  //Seite kann nicht in einem Frame geladen werden!
  /*if(parent.frames.length > 0)
  {
    var Pfad = this.location;
    window.top.location.href=Pfad;
  };*/
<!--  
  function getPageSize() {
	        
	     var xScroll, yScroll;
		
		if (window.innerHeight && window.scrollMaxY) {	
			xScroll = window.innerWidth + window.scrollMaxX;
			yScroll = window.innerHeight + window.scrollMaxY;
		} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
			xScroll = document.body.scrollWidth;
			yScroll = document.body.scrollHeight;
		} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
			xScroll = document.body.offsetWidth;
			yScroll = document.body.offsetHeight;
		}
		
		var windowWidth, windowHeight;
		
		if (self.innerHeight) {	// all except Explorer
			if(document.documentElement.clientWidth){
				windowWidth = document.documentElement.clientWidth; 
			} else {
				windowWidth = self.innerWidth;
			}
			windowHeight = self.innerHeight;
		} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
			windowWidth = document.documentElement.clientWidth;
			windowHeight = document.documentElement.clientHeight;
		} else if (document.body) { // other Explorers
			windowWidth = document.body.clientWidth;
			windowHeight = document.body.clientHeight;
		}	

		// for small pages with total height less then height of the viewport
		if(yScroll < windowHeight){
			pageHeight = windowHeight;
		} else { 
			pageHeight = yScroll;
		}
	
		// for small pages with total width less then width of the viewport
		if(xScroll < windowWidth){	
			pageWidth = xScroll;		
		} else {
			pageWidth = windowWidth;
		}

		return [pageWidth,pageHeight];
	}
  
  function getWidth() {
    var de = document.documentElement;
    var myWidth = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
    return myWidth;
  }
  document.getWidth=getWidth;

  function getHeight() {
    var de = document.documentElement;
    var myHeight = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
    return myHeight;
  }
  document.getHeight=getHeight;

  function ausblenden(){
    var arrayPageSize = getPageSize();
    var ad = document.getElementById('ausblendung');
    ad.setStyle({ width: (arrayPageSize[0]-25) + 'px', height: arrayPageSize[1] + 'px' });
    new Effect.Appear('ausblendung', { duration: 0.5, from: 0.0, to: 0.8 });
  }

  function zeigetb(tnr){
    var arrayPageSize = getPageSize();
    var tdb = document.getElementById('trailerbox');
    var tdd = document.getElementById('trailerdiv');
    var tddw = tdd.getWidth();
    tdd.setStyle({ left: ((arrayPageSize[0] / 2)-(tddw / 2)) + 'px'});
    tdb.src = "/trailer/anz.php?tnr="+tnr;
    ausblenden();
    new Effect.Appear('trailerdiv', { duration: 1.0, from: 0.0, to: 1.0 });
  }
  function zeigegebrauchte(){
    var arrayPageSize = getPageSize();
    var tdb = document.getElementById('gebrauchtebox');
    var tdd = document.getElementById('gebrauchtediv');
    var tddw = tdd.getWidth();
    tdd.setStyle({ left: ((arrayPageSize[0] / 2)-(tddw / 2)) + 'px', height: (document.getHeight()-50) + 'px'});
    ausblenden();
    new Effect.Appear('gebrauchtediv', { duration: 1.0, from: 0.0, to: 1.0 });
  }
  
  function schliesse(){
    new Effect.Fade('sidiv', { duration: 1.0, from: 1.0});
    new Effect.Fade('galdiv', { duration: 1.0, from: 1.0});
    new Effect.Fade('pdfdiv', { duration: 1.0, from: 1.0});
    new Effect.Puff('subdiv', { duration: 0.5});
    new Effect.Puff('gebrauchtediv', { duration: 0.5});
    new Effect.Puff('trailerdiv', { duration: 0.5});
    new Effect.Puff('urkundenbox', { duration: 0.5});
    for(i=0;i<10000;i++){
      new Effect.Puff('tdbox'+i, { duration: 0.5});
    }
    new Effect.Fade('ausblendung', { duration: 1.0, from: 0.8});
    var tdb = document.getElementById('trailerbox');
    if(tdb){tdb.src = ""};
    var subb = document.getElementById('subbox');
    if(subb){subb.src = ""};
    var pdfb = document.getElementById('pdfbox');
    if(pdfb){pdfb.src = ""};
    var pdfb = document.getElementById('galbox');
    if(pdfb){pdfb.src = ""};
  }
  
  function zeigeurk(){
    var arrayPageSize = getPageSize();
    var tdb = document.getElementById('urkundenbox');
    var tdbw = tdb.getWidth();
    tdb.setStyle({ left: ((arrayPageSize[0] / 2)-(tdbw / 2)) + 'px'});
    ausblenden();
    new Effect.Appear('urkundenbox', { duration: 1.0, from: 0.0, to: 1.0 });
  }
  
  function zeigesub(datei,hoehe){
    var arrayPageSize = getPageSize();
    var subb = document.getElementById('subbox');
    var subd = document.getElementById('subdiv');
    var subdw = subd.getWidth();
    if((document.getHeight()-50)<hoehe){
      hoehe = document.getHeight()-50;
    }
    subd.setStyle({ left: ((arrayPageSize[0] / 2)-(subdw / 2)) + 'px', height: hoehe + 'px'});
    subb.src = "/"+datei;
    ausblenden();
    new Effect.Appear('subdiv', { duration: 1.0, from: 0.0, to: 1.0 });
  }
  
  function zeigepdf(datei){
    var arrayPageSize = getPageSize();
    var pdfb = document.getElementById('pdfbox');
    var pdfd = document.getElementById('pdfdiv');
    var pdfdw = pdfd.getWidth();
    hoehe = document.getHeight()-50;
    pdfd.setStyle({ left: ((arrayPageSize[0] / 2)-(pdfdw / 2)) + 'px', height: hoehe + 'px'});
    pdfb.src = datei;
    ausblenden();
    new Effect.Appear('pdfdiv', { duration: 1.0, from: 0.0, to: 1.0 });
  }
  
  function zeigegal(datei){
    var arrayPageSize = getPageSize();
    var pdfb = document.getElementById('galbox');
    var pdfd = document.getElementById('galdiv');
    var pdfdw = pdfd.getWidth();
    hoehe = document.getHeight()-50;
    pdfd.setStyle({ left: ((arrayPageSize[0] / 2)-(pdfdw / 2)) + 'px', height: hoehe + 'px'});
    pdfb.src = datei;
    ausblenden();
    new Effect.Appear('galdiv', { duration: 1.0, from: 0.0, to: 1.0 });
  }
  
  //fahrwerke!
  function dweg(aktuell){
    aktd=aktuell;
    for(i=1;i<=maxd;i++){
      if($('d'+i)){
        if(i==aktuell){
          new Effect.Appear('d'+i, { duration: 0.5, from: 0.0, to: 1.0 });
        }else{
          new Effect.BlindUp('d'+i, { duration: 0.5});
          var dd = document.getElementById('d'+i);
          if(dd){
            dd.setStyle({ display: 'none'});
          }
        }
      }
    }
  }
  function dblaettern(r){
    if(r==1){
      aktd=aktd+1;
    }else{
      aktd=aktd-1;
    }
    if(aktd>maxd){
      aktd=1;
    }
    if(aktd<1){
      aktd=maxd;
    }
    
    var sb = document.getElementById('pauswahl');
    for(var i = 0; i < sb.options.length; i++){
      if( i==aktd-1)
        sb.options[i].selected = true;
      else
        sb.options[i].selected = false;
    }
    dweg(aktd);
  
  }
  
  function zeigetd(nr){
    var arrayPageSize = getPageSize();
    ausblenden();
    var tdb = document.getElementById('tdbox'+nr);
    var tdbw = tdb.getWidth();
    var tdbh = document.getHeight();
    tdb.setStyle({ left: ((arrayPageSize[0] / 2)-(tdbw / 2)) + 'px', height: (tdbh-70) + 'px', top: (window.pageYOffset+60)+ 'px'});
    new Effect.Appear('ausblendung', { duration: 0.5, from: 0.0, to: 0.8 });
    
    new Effect.Appear('tdbox'+nr, { duration: 1.0, from: 0.0, to: 1.0 });
  }
  function schliessetd(nr){
    new Effect.Puff('tdbox'+nr, { duration: 0.5});
    new Effect.Fade('ausblendung', { duration: 1.0, from: 0.8});
   
  }
  
  function aemail(){
	  var string1 = "info";
	  var string2 = "@";
	  var string3 = "maniacmotors.de";
	  var string4 = "ed.srotomcainam";
    var string5 = "@ofni";
    return "<a title=\"eMail schicken\" href=" + "mail" + "to:" + string1 + string2 + string3 + "><span class=\"liam\">" + string4 + string5 + "</span></a>";
  }
//-->
  
  
