function setElementInnerHtml(elemId, wert) {
    document.getElementById(elemId).innerHTML=wert;
}

function setAbgabeDaten(station) {
    setElementInnerHtml("idAbgabeTermin", station.abgabe);
    setElementInnerHtml("idAbgabeStation", station.stationName);
    setElementInnerHtml("idAbgabeAdresse", station.adress);
    setElementInnerHtml("idAbgabeOeffnungszeiten", station.openingHours);
}

function fillStationsdaten(sippCode, stationscode) {
    for(var i = 0; i< stationsListe.length; i++) {
        if(stationsListe[i].stationCode == stationscode) {
            toStep.stationCodePickUp = stationscode;
            setElementInnerHtml("idUebernahmeTermin", stationsListe[i].uebernahme);
            setElementInnerHtml("idUebernahmeStation", stationsListe[i].stationName);
            setElementInnerHtml("idUebernahmeAdresse", stationsListe[i].adress);
            setElementInnerHtml("idUebernahmeOeffnungszeiten", stationsListe[i].openingHours);

            setAbgabeDaten(stationsListe[i].einwegMiete ? stationsListe[i+1] : stationsListe[i]);
        }

    }
}

function fillStationsdatenAbSchritt1() {

    for(var i = 0; i< stationsListe.length; i++) {
        setElementInnerHtml("idUebernahmeTermin", stationsListe[i].uebernahme);
        setElementInnerHtml("idUebernahmeStation", stationsListe[i].stationName);
        setElementInnerHtml("idUebernahmeAdresse", stationsListe[i].adress);
        setElementInnerHtml("idUebernahmeOeffnungszeiten", stationsListe[i].openingHours);

        setAbgabeDaten(stationsListe[i].einwegMiete ? stationsListe[i+1] : stationsListe[i]);
    }
}

function printAGB()
{
    var divToPrint = document.getElementById('printContent');
    var newWin = window.open('', '', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,WIDTH=640,HEIGHT=450');
    //newWin.document.write('<HTML><HEAD></HEAD><BODY><div><h2>AGB</h2></div>');
    newWin.document.write('<html><head><style type="text/css" media="all">body {font-family: Arial, Helvetica, sans-serif; font-size: 0.75em; color: #000;}.subcolumns {width:890px; display:block; clear:both; overflow:visible;}.MT2 {margin-top:16px !important;}#col1 {float: left; width:578px !important; margin-right:0; }.ftext {font-weight:bold;}ul li {list-style-type: disc;}p {line-height:1.5em; margin: 0.2em 0;}#abgbreite {width:563px; margin: -3px 0 0; padding: 10px 15px 10px 10px; background: #fff url("/view/images/boxes/verlaufgruen.jpg") repeat-x;}a {color: #4D87C7; background:transparent; text-decoration:none;}a:visited  {color:#036;} a:focus, a:hover, a:active {color:#182E7A; text-decoration:underline;}#pfeilback{background:url("/view/images/boxes/pfeil.gif") no-repeat 23px 10px;}.pfeilh2 {color:#FFFFFF;font-size:24px !important;font-weight:bold !important;padding:11px 0 0px 58px !important;}.c66l {width:588px; background: transparent url(/view/images/boxes/bg_col588.gif) no-repeat bottom left;}.mtop50 {margin-top:16px}.bgGreen1{background-color: #BAD642 !important;}.CWrap2 { margin:0; _padding:0px !important; width:100%; }.bgW {background-color: white !important;}li {margin-left: 0.8em; line-height: 1.5em;}</style><title>mietwagen.com - AGB</title></head><body><div class="subcolumns"><div><div><div id="printContent"><div><ul><div id="header"><img src="/view/images/header/logo.png" width="279" height="101" alt="mietwagen.com" /><img src="/view/images/header/tpg.png" width="78" height="101" alt="mietwagen.com mit Tiefpreisgarantie" /></div><div><h2>AGB</h2></div>');
    newWin.document.write(divToPrint.innerHTML);
    newWin.document.write('</ul></div></div></div></div></div></body></html>');
    newWin.location.reload();    
    newWin.print();
    newWin.setTimeout("close()",250);
}