window.onerror=null;
function jumpurl (form) {
    location = form.URL.options[form.URL.selectedIndex].value;
    return true;
}
//if (window.location.host != "www.steinbach-braunfels.de") { 
//    window.location.href = "http://www.steinbach-braunfels.de"; 
//}

function reloadPage(init) {
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; }}
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}
reloadPage(true);

function clse() { 
    window.close(); 
}

var Fenster = null;
function pop(url,w,h,scroll){
pLeft = (screen.width) ? (screen.width-w)/2 : 0;
pTop = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+pTop+',left='+pLeft+',scrollbars='+scroll+',toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0'
Fenster = window.open(url,"",settings)
}

//var wnd = null;
function bild(img_url, img_title, img_width, img_height, win_w, win_h) {
  links = (screen.width) ? (screen.width-win_w)/2 : 0;
  oben = (screen.height) ? (screen.height-win_h)/2 : 0;
  wnd = window.open("","","width="+(win_w)+",height="+(win_h)+",innerWidth="+(img_width)+",innerHeight="+(img_height)+",toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,dependent=0,top="+oben+",left ="+links);
  var baseadr = location.href
  var lastsl  = location.href.lastIndexOf("\\")
  if(lastsl >= 0)
    baseadr = baseadr.substring(0, lastsl + 1)
  else {
    lastsl = location.href.lastIndexOf("/")
    if(lastsl >= 0)
      baseadr = baseadr.substring(0, lastsl + 1)
  }
  with(wnd.document) {
    open("text/html")
    writeln("<HTML>")
    writeln("<HEAD><TITLE>"+(img_title)+" &#9679;&#9679; Steinbach</TITLE>")
    writeln("<meta http-equiv=\"imagetoolbar\" content=\"no\">")
    writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"as_style.css\" media=\"all\"/>")
    writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"../print.css\" media=\"print\"/>")
    writeln("</HEAD>")
    writeln("<body scroll=\"auto\" style=\"margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;\" oncontextmenu=\"return false\" onselectstart=\"return false\" ondragstart=\"return false\" onmouseover=\"window.status='Cars & Pictures'; return true\">")
    writeln("<span style=\"position: absolute; z-index: 2; left: 15px; top: 10px;\"><a onfocus=\"this.blur()\" href=\"javascript:window.close();\">Fenster schließen</a></span>")
    writeln("<div align=\"center\" WIDTH=" + win_w + " HEIGHT=" + win_h + " style=\"margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;\"><IMG SRC=\"" + img_url + "\" WIDTH=" + img_width + " HEIGHT=" + img_height + " HSPACE=0 Border=0 VSPACE=0 ALT=\"" + img_title + "\"></div>")
    writeln("</BODY></HTML>")
    close()
  }
  wnd.focus()
}

function swapImgRe() {
  var i,x,a=document.AM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function preloadImg() {
  var d=document; if(d.images){ if(!d.AM_p) d.AM_p=new Array();
    var i,j=d.AM_p.length,a=preloadImg.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.AM_p[j]=new Image; d.AM_p[j++].src=a[i];}}
}

function AM_findObj(n, d) {
  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=AM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function swapImg() {
  var i,j=0,x,a=swapImg.arguments; document.AM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=AM_findObj(a[i]))!=null){document.AM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
