var Fenster = null;
function neuesFenster(meineSeite,meinName,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',noresize'
Fenster = window.open(meineSeite,meinName,settings)
}
 function mmLoadMenus() {
  if (window.mm_menu_0010105846_0) return;
  window.mm_menu_0010105846_0 = new Menu("root",163,17,"Verdana, Arial, Helvetica, sans-serif",11,"#ffffff","#DDE4EB","#8FA4BB","#92A3B7","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_0010105846_0.addMenuItem("Ansprechpartner","location='http://www.berglar.com/Ueber_uns/ansprechpartner.php'");
   mm_menu_0010105846_0.hideOnMouseOut=true;
   mm_menu_0010105846_0.menuBorder=0;
   mm_menu_0010105846_0.menuLiteBgColor='#000000';
   mm_menu_0010105846_0.menuBorderBgColor='#000000';
   mm_menu_0010105846_0.bgColor='#000000';
  window.mm_menu_0010110632_1 = new Menu("root",162,17,"Verdana, Arial, Helvetica, sans-serif",11,"#ffffff","#DDE4EB","#8FA4BB","#92A3B7","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_0010110632_1.addMenuItem("Neu-Gebrauchtwagen","location='http://www.berglar.com/Leistungsangebot/leistungsangebot.php'");
  mm_menu_0010110632_1.addMenuItem("Karosserie-Unfallreperatur","location='http://www.berglar.com/Leistungsangebot/karosserie_unfallreperatur.php'");
  mm_menu_0010110632_1.addMenuItem("Finanzierung","location='http://www.berglar.com/Leistungsangebot/finanzierung.php'");
  mm_menu_0010110632_1.addMenuItem("Kundendienst","location='http://www.berglar.com/Leistungsangebot/kundendienst.php'");
  mm_menu_0010110632_1.addMenuItem("Ersatzteile & Zubehör","location='http://www.berglar.com/Leistungsangebot/ersatzteile_zubehoer.php'");
  mm_menu_0010110632_1.addMenuItem("Mietwagen","location='http://www.berglar.com/Leistungsangebot/mietwagen.php'");
  mm_menu_0010110632_1.addMenuItem("Öffnungszeiten","location='http://www.berglar.com/Leistungsangebot/oeffnungszeiten.php'");
   mm_menu_0010110632_1.hideOnMouseOut=true;
   mm_menu_0010110632_1.menuBorder=0;
   mm_menu_0010110632_1.menuLiteBgColor='#000000';
   mm_menu_0010110632_1.menuBorderBgColor='#000000';
   mm_menu_0010110632_1.bgColor='#000000';

  mm_menu_0010110632_1.writeMenus();
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_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];}}
}

function MM_findObj(n, d) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function MM_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function resizeWin(maxX,maxY,speed,delay,win){
	this.obj = "resizeWin" + (resizeWin.count++);
	eval(this.obj + "=this");
	if (!win)     this.win = self;    else this.win = eval(win);
	if (!maxX)    this.maxX = 454;    else this.maxX = maxX;
	if (!maxY)    this.maxY = 300;    else this.maxY = maxY;
	if (!speed)   this.speed = 1/10;   else this.speed = 1/speed;
	if (!delay)   this.delay = 0;    else this.delay = delay;
	this.doResize = (document.all || document.getElementById);
	this.stayCentered = false;
	
	this.initWin = 	function(){
		if (this.doResize){
			this.resizeMe();
			}
		else {
			this.win.resizeTo(this.maxX + 10, this.maxY - 20);
			}
		}

	this.resizeMe = function(){
		this.win.focus();
		this.updateMe();
		}
	
	this.resizeTo = function(x,y){
		this.maxX = x;
		this.maxY = y;
		this.resizeMe();
		}
		
	this.stayCentered = function(){
		this.stayCentered = true;
		}

	this.updateMe = function(){
		this.resizing = true;
		var x = Math.ceil((this.maxX - this.getX()) * this.speed);
		var y = Math.ceil((this.maxY - this.getY()) * this.speed);
		if (x == 0 && this.getX() != this.maxX) {
			if (this.getX() > this.maxX) x = -1;
			else  x = 1;
			}
		if (y == 0 && this.getY() != this.maxY){
			if (this.getY() > this.maxY) y = -1;
			else y = 1;
			}
		if (x == 0 && y == 0) {
			this.resizing = false;
    		}
		else {
			this.win.top.resizeBy(parseInt(x),parseInt(y));
			if (this.stayCentered == true) this.win.moveTo((screen.width - this.getX()) / 2,(screen.height - this.getY()) / 2);
			setTimeout(this.obj + '.updateMe()',this.delay)
			}
		}
		
	this.write =  function(text){
		if (document.all && this.win.document.all["coords"]) this.win.document.all["coords"].innerHTML = text;
		else if (document.getElementById && this.win.document.getElementById("coords")) this.win.document.getElementById("coords").innerHTML = text;
		}
		
	this.getX =  function(){
		if (document.all) return (this.win.top.document.body.clientWidth + 10)
		else if (document.getElementById)
			return this.win.top.outerWidth;
		else return this.win.top.outerWidth - 12;
	}
	
	this.getY = function(){
		if (document.all) return (this.win.top.document.body.clientHeight + 29)
		else if (document.getElementById)
			return this.win.top.outerHeight;
		else return this.win.top.outerHeight - 31; 
	}
	
	this.onResize =  function(){
		if (this.doResize){
			if (!this.resizing) this.resizeMe();
			}
		}

	return this;
}
resizeWin.count = 0;
window.onerror = null;
var topMargin = 120;
var slideTime = 600;
var ns6 = (!document.all && document.getElementById);
var ie4 = (document.all);
var ns4 = (document.layers);
function layerObject(id,left) {
if (ns6) {
this.obj = document.getElementById(id).style;
this.obj.left = left;
return this.obj;
}
else if(ie4) {
this.obj = document.all[id].style;
this.obj.left = left;
return this.obj;
}
else if(ns4) {
this.obj = document.layers[id];
this.obj.left = left;
return this.obj;
   }
}
function layerSetup() {
floatLyr = new layerObject('floatLayer', pageWidth * 0.0);
window.setInterval("main()", 10)
}
function floatObject() {
if (ns4 || ns6) {
findHt = window.innerHeight;
} else if(ie4) {
findHt = document.body.clientHeight;
   }
} 
function main() {
if (ns4) {
this.currentY = document.layers["floatLayer"].top;
this.scrollTop = window.pageYOffset;
mainTrigger();
}
else if(ns6) {
this.currentY = parseInt(document.getElementById('floatLayer').style.top);
this.scrollTop = scrollY;
mainTrigger();
} else if(ie4) {
this.currentY = floatLayer.style.pixelTop;
this.scrollTop = document.body.scrollTop;
mainTrigger();
   }
}
function mainTrigger() {
var newTargetY = this.scrollTop + this.topMargin;
if ( this.currentY != newTargetY ) {
if ( newTargetY != this.targetY ) {
this.targetY = newTargetY;
floatStart();
}
animator();
   }
}
function floatStart() {
var now = new Date();
this.A = this.targetY - this.currentY;
this.B = Math.PI / ( 2 * this.slideTime );
this.C = now.getTime();
if (Math.abs(this.A) > this.findHt) {
this.D = this.A > 0 ? this.targetY - this.findHt : this.targetY + this.findHt;
this.A = this.A > 0 ? this.findHt : -this.findHt;
}
else {
this.D = this.currentY;
   }
}
function animator() {
var now = new Date();
var newY = this.A * Math.sin( this.B * ( now.getTime() - this.C ) ) + this.D;
newY = Math.round(newY);
if (( this.A > 0 && newY > this.currentY ) || ( this.A < 0 && newY < this.currentY )) {
if ( ie4 )document.all.floatLayer.style.pixelTop = newY;
if ( ns4 )document.layers["floatLayer"].top = newY;
if ( ns6 )document.getElementById('floatLayer').style.top = newY + "px";
   }
}
function start() {
if(ns6||ns4) {
pageWidth = innerWidth;
pageHeight = innerHeight;
layerSetup();
floatObject();
}
else if(ie4) {
pageWidth = document.body.clientWidth;
pageHeight = document.body.clientHeight;
layerSetup();
floatObject();
   }
}
function settitle() {
var a = "Manage Your Web";
var b = "Pixelproductions Content Management System";
var c = "AUTOHAUS BERGLAR Savebereich";
 var t = new Date();
 s = t.getSeconds();
 if (s == 5) {
  document.title = a;}
 else if (s == 20) {
 document.title = b;}
 else if (s == 30) {
 document.title = c;}
 else if (s == 40) {
 document.title = a;}
 else if (s == 50) {
 document.title = b;}
 else if (s == 00) {
 document.title = c;}
 setTimeout("settitle()", 1000);
 }
function SelectAll() {
	for (var i = 0; i < document.form1.elements.length; i++) 
	 {
	  fldObj = document.form1.elements[i];
	  if (fldObj.type == 'checkbox')
		fldObj.checked = (fldObj.checked) ? false : true;
	 }
}