// Variablen der Funktionen; var aktiv = 0; var immo_aktiv = 0; var immo_open = 0; function menueR(name,cname){ document.getElementById(name).className=cname; document.getElementById(name+'Bg').className=cname+'Bg'; } function encode_utf8( s ) { return unescape( encodeURIComponent( s ) );} function decode_utf8( s ) { return decodeURIComponent( escape( s ) );} if(document.getElementById('td_immo_suche')){document.getElementById('td_immo_suche').innerHTML=""}; function EMailPruefen(s) { var a = false; var res = false; if(typeof(RegExp) == 'function') { var b = new RegExp('abc'); if(b.test('abc') == true){a = true;} } if(a == true) { reg = new RegExp('^([a-zA-Z0-9\\-\\.\\_]+)'+ '(\\@)([a-zA-Z0-9\\-\\.]+)'+ '(\\.)([a-zA-Z]{2,4})$'); res = (reg.test(s)); } else { res = (s.search('@') >= 1 && s.lastIndexOf('.') > s.search('@') && s.lastIndexOf('.') >= s.length-5) } return(res); } //------------------------------ function bildersetzen() { //('standorte','images/standorte_off.gif','moff', parent.parent.menue_top,0); var a=bildersetzen.arguments; d=a[3]; if ((variable!=a[0] && a[4]!=1) || (variable==a[0] && a[4]==1)) { d.document.images[a[0]].src = a[1]; if(a[2] && a[2] != "") { d.document.getElementById("TD" + a[0]).className = a[2]; } } } function classErsetzen() { var a=classErsetzen.arguments; d=a[2]; if ((classVariable!=a[0] && a[3]!=1) || (classVariable==a[0] && a[3]==1)) { if(a[1] != "") { if(d.document.getElementById(a[0])) { d.document.getElementById(a[0]).className = a[1]; } } } } function EmailFormular(email) { var Fenster = window.open('../formulare/email_formular.asp?email=' + email,'','toolbar=0,location=no,directories=no,status=0,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=600,height=290,screenX=10,screenY=10,top=5,left=5'); } function MietangeboteFormular(email) { var Fenster = window.open('../formulare/mietangebote_formular.asp?email=' + email,'','toolbar=0,location=no,directories=no,status=0,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=600,height=570,screenX=10,screenY=10,top=5,left=5'); } function bild_anzeigen(link, width, height) { window.open('bild_vorschau.asp?link=' + link + '&width=' + width + '&height=' + height,'bild_vorschau','toolbar=no,status=no,scrollbars=yes,width=' + (parseInt(width) + 36) + ',height=' + (parseInt(height) + 36)) } function InputDezimal(objekt,laenge) { var conInput, Felder, inpFeld, Formular, Feld, i; posLaenge = laenge + 1; Felder = objekt; inpFeld = Felder.value /* Trennzeichen in Punkte wandeln */ if(inpFeld != "") { for(i = 0; i <= inpFeld.length; i++) { conInput = inpFeld.replace(/,/,"."); inpFeld = conInput; } objekt.value = inpFeld; /* Wenn DM Angabe dann Umwandlung in €uro */ if(inpFeld.substring(inpFeld.length -3, inpFeld.length) == " DM") { Teil = inpFeld.split(" "); Felder.value = (parseInt(100 * (Teil[0] / 1.95583) + 0.5)) / 100; } /* Auf numerische Eingabe überprüfen */ if(isNaN(Felder.value)) { window.alert("Es sind keine Buchstaben und Sonderzeichen erlaubt!"); Felder.focus(); return false; } else { var pos = inpFeld.indexOf("."); if(pos != -1) { var newNumber = inpFeld.substr(0,pos+posLaenge); if(newNumber != inpFeld) { inpFeld = newNumber; objekt.value = inpFeld; if(laenge==1) Nachkommastelle = " Nachkommastelle "; else Nachkommastelle = " Nachkommastellen "; window.alert("Die Zahl wurde auf " + laenge + Nachkommastelle + "gekürzt!"); } } } } } function InputInteger(objekt) { var Felder, inpFeld, Felder_Neu; Felder = objekt; inpFeld = Felder.value if(inpFeld != "") { /* Auf numerische Eingabe überprüfen */ for(i = 0; i <= inpFeld.length; i++) { conInput = inpFeld.replace(/,/,"."); inpFeld = conInput; } objekt.value = inpFeld; if (isNaN(Felder.value)) { window.alert("Es ist nur eine Ganzzahl erlaubt!"); Felder.focus(); } else { Felder.value = parseInt(inpFeld); if ((Felder.value != inpFeld)) { window.alert("Es ist nur eine Ganzzahl erlaubt!\nIhre Eingabe wurde angepasst!"); } } } } function kaufMiete(){ if(document.form5.ang_kauf.value==0){ document.form5.action='http://www.altundkelber.de/immobilienangebote/immobiliensuche.asp?'; } else{ document.form5.action='http://www.altundkelber.de/immobilienangebote/immobiliensuche_kauf.asp?'; } document.form5.submit(); }