var partner1 = '+partner+';
function yy(partner,exposeURL,nummer,mail,at) {
        var statusvar = 'width=520,height=470,toolbar=no,status=no,location=no,resizable=yes,scrollbars=no,screenX='+((screen.availWidth / 2) - (520/2))+',screenY='+((screen.availHeight / 2) - (500/2));
        popwindow=window.open('','Mailfenster',statusvar);

        if(nummer=="") {
           betreff = "";
           } else {
             betreff = "[NIB] Anfrage zu Objekt: ";
             }

        with (popwindow) {
window.document.writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">')
document.writeln('<html><head><title>E-mail senden an '+partner+'</title>')
document.writeln('<META http-equiv="content-type" content="text/html; charset=ISO-8859-1">')
document.writeln('<META http-equiv="content-type" content="Content-Type: text/plain; charset=UTF-8">')
document.writeln('<script type="text/javascript">')
document.writeln('function eingaben_ueberpruefen(){')
document.writeln(' var mail = document.anfrage.email.value;')
document.writeln(' if (document.anfrage.subject.value.length < 3){')
document.writeln('  alert("Bitte geben Sie einen Betreff ein")')
document.writeln('  document.anfrage.subject.focus();')
document.writeln('  return false;')
document.writeln(' }')
document.writeln(' if (document.anfrage.realname.value.length < 3){')
document.writeln('  alert("Bitte geben Sie Ihren Namen ein.")')
document.writeln('  document.anfrage.realname.focus();')
document.writeln('  return false;')
document.writeln(' }')
document.writeln(' else if (document.anfrage.PLZ.value.length < 3){')
document.writeln('  alert("Bitte geben Sie Ihre PLZ ein.");')
document.writeln('  document.anfrage.PLZ.focus();')
document.writeln('  return false;')
document.writeln(' }')
document.writeln(' else if (document.anfrage.Ort.value.length < 3){')
document.writeln('  alert("Bitte geben Sie Ihren Ort ein.");')
document.writeln('  document.anfrage.Ort.focus();')
document.writeln('  return false;')
document.writeln(' }')
document.writeln(' else if (document.anfrage.Strasse.value.length < 3){')
document.writeln('  alert("Bitte geben Sie Straße und Nr. ein!")')
document.writeln('  document.anfrage.Strasse.focus();')
document.writeln('  return false;')
document.writeln(' }')
document.writeln(' else if (document.anfrage.Telefon.value.length < 3){')
document.writeln('  alert("Bitte geben Sie Ihre Telefon-Nummer ein!")')
document.writeln('  document.anfrage.Telefon.focus();')
document.writeln('  return false;')
document.writeln(' }')
document.writeln(' else')
document.writeln(' return true;')
document.writeln('}')
document.writeln('</script>')
document.writeln('</head>')
document.writeln('<body bgcolor="#ECD533">')
document.writeln('<style type="text/css">')
document.writeln('.eingabetel {')
document.writeln('    border: 0px;')
document.writeln('    width: 98px;')
document.writeln('    border-bottom: solid 1px #000000;')
document.writeln('    background-color: transparent;')
document.writeln('    font-family: Comic Sans MS,Verdana, Arial;')
document.writeln('    font-size: 13px;')
document.writeln('    color: #0000A0;')
document.writeln('}')
document.writeln('.eingabefax {')
document.writeln('    border: 0px;')
document.writeln('    width: 98px;')
document.writeln('    border-bottom: solid 1px #000000;')
document.writeln('    background-color: transparent;')
document.writeln('    font-family: Comic Sans MS,Verdana, Arial;')
document.writeln('    font-size: 13px;')
document.writeln('    color: #0000A0;')
document.writeln('}')
document.writeln('.eingabeplz {')
document.writeln('    border: 0px;')
document.writeln('    width: 42px;')
document.writeln('    border-bottom: solid 1px #000000;')
document.writeln('    background-color: transparent;')
document.writeln('    font-family: Comic Sans MS,Verdana, Arial;')
document.writeln('    font-size: 13px;')
document.writeln('    color: #0000A0;')
document.writeln('}')
document.writeln('.eingabeort {')
document.writeln('    border: 0px;')
document.writeln('    width: 149px;')
document.writeln('    border-bottom: solid 1px #000000;')
document.writeln('    background-color: transparent;')
document.writeln('    font-family: Comic Sans MS,Verdana, Arial;')
document.writeln('    font-size: 13px;')
document.writeln('    color: #0000A0;')
document.writeln('}')
document.writeln('.eingabebetreff {')
document.writeln('    border: 0px;')
document.writeln('    width: 200px;')
document.writeln('    border-bottom: solid 1px #000000;')
document.writeln('    background-color: transparent;')
document.writeln('    font-family: Arial, Verdana;')
document.writeln('    font-size: 11px;')
document.writeln('    color: #0000A0;')
document.writeln('}')
document.writeln('.eingabe {')
document.writeln('    border: 0px;')
document.writeln('    width: 200px;')
document.writeln('    border-bottom: solid 1px #000000;')
document.writeln('    background-color: transparent;')
document.writeln('    font-family: Comic Sans MS,Verdana, Arial;')
document.writeln('    font-size: 13px;')
document.writeln('    color: #0000A0;')
document.writeln('}')
document.writeln('.eingabefeld {')
document.writeln('    width: 200px;')
document.writeln('    height: 55px;')
document.writeln('    overflow: auto;')
document.writeln('    border: solid 1px #000000;')
document.writeln('    background-color: transparent;')
document.writeln('    font-family: Comic Sans MS,Verdana, Arial;')
document.writeln('    font-size: 12px;')
document.writeln('    color: #0000A0;')
document.writeln('}')
document.writeln('.tabelle {')
document.writeln('    background-image: url(papier.jpg);')
document.writeln('    border: solid 1px #000000;')
document.writeln('}')
document.writeln('.format {')
document.writeln('    font-family: arial;')
document.writeln('    font-size: 16px;')
document.writeln('    color: #000000;')
document.writeln('}')
document.writeln('.button {')
document.writeln('    color: #FFFFFF;')
document.writeln('    text-decoration: none;')
document.writeln('    font-weight: bold;')
document.writeln('    background-color: #99CC00;')
document.writeln('    border: 0px;')
document.writeln('}')
document.writeln('.buttonl {')
document.writeln('    color: #FFFFFF;')
document.writeln('    text-decoration: none;')
document.writeln('    background-color: #FF5D5D;')
document.writeln('    border: 0px;')
document.writeln('}')
document.writeln('.vertikale_linie {')
document.writeln('    width: 1px;')
document.writeln('    height: 350px;')
document.writeln('    background-color: #797979;')
document.writeln('}')
document.writeln('.klein {')
document.writeln('    font-family: Tahoma,Arial;')
document.writeln('    font-size: 11px;')
document.writeln('    color: #4D4D4D;')
document.writeln('}')
document.writeln('</style>')
document.writeln('<form name="anfrage" action="formmail.php" method="post" onSubmit="return eingaben_ueberpruefen();" enctype="multipart/form-data" ACCEPT-CHARSET="iso-8859-1, UTF-8">')
document.writeln('<input type="hidden" name="recipient" value="'+mail+'">')
document.writeln('<input type="hidden" name="redirect" value="http://db.nib.de/danke.htm"> ')
document.writeln('<input type="hidden" name="sort" value="order:subject,ExposeURL,Anrede,realname,Firma,PLZ,Ort,Strasse,Telefon,Fax,email,Kommentar,Portal">')
document.writeln('<input type="hidden" name="required" value="subject,realname,PLZ,Ort,Strasse,Telefon">')
document.writeln('<input type="hidden" name="print_config" value="subject,realname,email">')
document.writeln('<input type="hidden" name="missing_fields_redirect" value="http://db.nib.de/fehler.htm">')
document.writeln('<input type="hidden" name="env_report" value="REMOTE_ADDR,HTTP_USER_AGENT">')
document.writeln('<input type="hidden" name="ExposeURL" value="http://db.nib.de/expose.php?id='+exposeURL+'">')
document.writeln('<input type="hidden" name="id" value="'+exposeURL+'">')
document.writeln('<input type="hidden" name="at" value="'+at+'">')
document.writeln('<input type="hidden" name="Portal" value="****** Diese Anfrage kommt von NIB NUERNBERGER IMMOBILIEN BOERSE ******">')
document.writeln('<input type="hidden" name="encoding-probe" value="Ä,Ö,Ü">')
document.writeln('<table width="500" cellPadding="8" border="0" cellSpacing="0" class="tabelle">')
document.writeln(' <td width="200">')
document.writeln('  <input type=text class="eingabebetreff" value="'+betreff+''+nummer+'" name="subject"><br>')
document.writeln('  <span class="klein">&nbsp;<br></span>')
document.writeln('  <input type=text class="eingabe" name="Anrede"><br>')
document.writeln('  <span class="klein">&nbsp;Anrede<br></span>')
document.writeln('  <input type=text class="eingabe" name="realname"><br>')
document.writeln('  <span class="klein">&nbsp;Vorname Name* &nbsp; bzw. Firma<br></span>')
document.writeln('  <input type=text class="eingabeplz" name="PLZ"><span class="klein">&nbsp;&nbsp;</span><input type=text class="eingabeort" name="Ort"><br>')
document.writeln('  <span class="klein">&nbsp;PLZ*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;Ort*<br></span>')
document.writeln('  <input type=text class="eingabe" name="Strasse"><br>')
document.writeln('  <span class="klein">&nbsp;Stra&szlig;e*<br></span>')
document.writeln('  <input type=text class="eingabetel" name="Telefon"><span class="klein">&nbsp;</span><input type=text class="eingabefax" name="Fax"><br>')
document.writeln('  <span class="klein">&nbsp;Telefon*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Telefax<br></span>')
document.writeln('  <input type=text class="eingabe" name="email"><br>')
document.writeln('  <span class="klein">&nbsp;E-Mail-Adresse<br></span>')
document.writeln('  <span class="klein">&nbsp;Ihre Mitteilung:<br></span>')
document.writeln('  <textarea name="Kommentar" class="eingabefeld"></textarea><span class="klein"><br>&nbsp; <strong>*</strong> Felder müssen ausgefüllt sein<br></span>')
document.writeln('  <span class="klein"><input type=checkbox name="Telefonkontakt" value="zugestimmt">')
document.writeln('   &nbsp;Ich willige ausdrücklich ein, dass Sie<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mich anrufen dürfen.<br><br>')
document.writeln('   &nbsp;&nbsp;<input type="submit" value="Absenden" class="button">')
document.writeln('   &nbsp;&nbsp;<input type="reset" value="Löschen" class="buttonl"></span>')
document.writeln('  </td>')
document.writeln('  <td width="1%"><div class="vertikale_linie"></div></td>')
document.writeln('  <td valign="top">')
document.writeln('   <div align="right">')
document.writeln('    <img src="porto.jpg" width="80" height="91">')
document.writeln('   </div>')
document.writeln('   <span class="format">')
document.writeln('    <br><br><br>')
document.writeln('    Der Versand Ihrer Anfrage erfolgt<br><br>')
document.writeln('    An')
document.writeln('   <br><br></span>')
document.writeln('   <table width="220" border="0" cellpadding=0 cellspacing=0>')
document.writeln('    <tr>')
document.writeln('     <td  style="border: solid 1px #000000;">')
document.writeln('   <span class="format"><div style="margin:5;">')
document.writeln('    <strong>'+partner+'</strong><br>')
document.writeln('   </div></span>')
document.writeln('     </td>')
document.writeln('    </tr>')
document.writeln('    <tr>')
document.writeln('     <td style="text-align: right;">')
document.writeln('      <img src="shadow.gif" border=0 width=160 height=15>')
document.writeln('     </td>')
document.writeln('    </tr>')
document.writeln('   </table>')
document.writeln('  </td>')
document.writeln(' </tr>')
document.writeln('</table>')
document.writeln('<center><span class="klein"><a href="javascript:window.close()">Fenster schlie&szlig;en</a></span><br></center>')
document.writeln('</form>')
document.writeln('</body>')
document.writeln('</html>')
document.close();
document.anfrage.Anrede.focus();
        }
}
