
function wechsel_schieber_up (a,b,c,d,element,pos,lage) {
    swapImage(a,b,c,d);
    schieben (element,pos,lage);
}

function wechsel_schieber_down (element,pos,lage) {
    swapImgRestore();
    schieben (element,pos,lage);
}


function schieben (element,pos,lage) {
    var wert = pos + "px";
    var elem = "b" + element;

    document.getElementById(elem).style.zIndex = lage;
    //if (document.getElementById(elem).style.top < pos) {
    //    alert('Verweisziel noch nicht erreichbar');
    //    for (var i = document.getElementById(elem).style.top; i < pos ; i++) {
    //        window.setTimeout(document.getElementById(elem).style.top = i + "px", 1000);
    //    }
    //} else {
        //alert(pos);
        //alert("XX" + pos);
        //alert(document.getElementById(elem).style.top+" BBB");
        //for (var i = document.getElementById(elem).style.top; i < pos ; i++) {
          //  alert("Kaesekuchen!");
            //window.setTimeout((document.getElementById(elem).style.top = (i + "px")), 1000);
        //}
        //alert("YY" + document.getElementById(elem).style.top);
    //}

 document.getElementById(elem).style.top = wert;

}

// Bildwechsler per Mouseover
function swapImage() {
  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function swapImgRestore() {
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function preloadImages() {
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}

function 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=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


var hwndPopup_27b5;
function openpopup_27b5(url){
var popupWidth = 800;
var popupHeight = 960;
var popupTop = 300;
var popupLeft = 300;
var isFullScreen = false;
var isAutoCenter = false;
var popupTarget = "popupwin_27b5";
var popupParams = "toolbar=0, scrollbars=0, menubar=0, status=0, resizable=0";

if (isFullScreen) {
                popupParams += ", fullscreen=1";
} else if (isAutoCenter) {
                popupTop          = parseInt((window.screen.height - popupHeight)/2);
                popupLeft          = parseInt((window.screen.width - popupWidth)/2);
}

var ua = window.navigator.userAgent;
var isMac = (ua.indexOf("Mac") > -1);

//IE 5.1 PR on OSX 10.0.x does not support relative URLs in pop-ups the way they're handled below w/ document.writeln
if (isMac && url.indexOf("http") != 0) {
  url = location.href.substring(0,location.href.lastIndexOf('\/')) + "/" + url;
}

var isOpera = (ua.indexOf("Opera") > -1);
var operaVersion;
if (isOpera) {
                var i = ua.indexOf("Opera");
                operaVersion = parseFloat(ua.substring(i + 6, ua.indexOf(" ", i + 8)));
                if (operaVersion > 7.00) {
                               var isAccessible = false;
                               eval("try { isAccessible = ( (hwndPopup_27b5 != null) && !hwndPopup_27b5.closed ); } catch(exc) { } ");
                               if (!isAccessible) {
                                               hwndPopup_27b5 = null;
                               }
                }
}
if ( (hwndPopup_27b5 == null) || hwndPopup_27b5.closed ) {

                if (isOpera && (operaVersion < 7)) {
                               if (url.indexOf("http") != 0) {
                                               hwndPopup_27b5 = window.open(url,popupTarget,popupParams + ((!isFullScreen) ? ", width=" + popupWidth +", height=" + popupHeight : ""));
                                               if (!isFullScreen) {
                                                               hwndPopup_27b5.moveTo(popupLeft, popupTop);
                                               }
                                               hwndPopup_27b5.focus();
                                               return;
                               }
                }
                if (!(window.navigator.appName == "Netscape" && !document.getElementById)) {
                               //not ns4
                               popupParams += ", width=" + popupWidth +", height=" + popupHeight + ", left=" + popupLeft + ", top=" + popupTop;
                } else {
                               popupParams += ", left=" + popupLeft + ", top=" + popupTop;
                }
                //alert(popupParams);
                hwndPopup_27b5 = window.open("",popupTarget,popupParams);
                if (!isFullScreen) {
                               hwndPopup_27b5.resizeTo(popupWidth, popupHeight);
                               hwndPopup_27b5.moveTo(popupLeft, popupTop);
                }
                hwndPopup_27b5.focus();
                with (hwndPopup_27b5.document) {
                               open();
                                write("<ht"+"ml><he"+"ad><\/he"+"ad><bo"+"dy onLoad=\"window.location.href='" + url + "'\"><\/bo"+"dy><\/ht"+"ml>");
                               close();
                }
} else {
                if (isOpera && (operaVersion > 7.00)) {
                               eval("try { hwndPopup_27b5.focus();   hwndPopup_27b5.location.href = url; } catch(exc) { hwndPopup_27b5 = window.open(\""+ url +"\",\"" + popupTarget +"\",\""+ popupParams + ", width=" + popupWidth +", height=" + popupHeight +"\"); } ");
                } else {
                               hwndPopup_27b5.focus();
                               hwndPopup_27b5.location.href = url;
                }
}

}


function formularwert () {
	document.getElementsByName("suche")[0].submit();
}



