// BROWSER-ERKENNUNG function em_get_browser(){ var ver = navigator.appVersion; var dom = document.getElementById ? 1 : 0; if(ver.match(/MSIE [5-9]/) && dom) return "ie_neu"; if(document.all && !dom) return "ie_alt"; if(dom && parseInt(ver) >= 5) return "ns_neu"; if(document.layers && !dom) return "ns_alt"; } var em_browser = em_get_browser(); // ABSENDEN function em_submit(maske){ var em_form = document.em_form; if(typeof maske != "undefined"){ em_form["em_maske"].value = maske; } em_form.action = "?"; em_form.target = "_self"; em_form.submit(); } // PARAMETER SETZEN function em_set(set_name,set_value){ var em_form = document.em_form; if(em_form["em_suche["+set_name+"]"]){ if(em_form["em_suche["+set_name+"]"].type == "checkbox"){ for(var i=0; i <= em_form["em_suche["+set_name+"]"].length; i++){ if(em_form["em_suche["+set_name+"]"][i]) em_form["em_suche["+set_name+"]"][i].checked = em_form["em_suche["+set_name+"]"][i].value == set_value ? true : false; } } else if(em_form["em_suche["+set_name+"]"].type == "hidden") em_form["em_suche["+set_name+"]"].value = set_value; else if(em_form["em_suche["+set_name+"]"][0] && em_form["em_suche["+set_name+"]"][0].type == "radio" ){ for(var i=0; i <= em_form["em_suche["+set_name+"]"].length; i++){ if(em_form["em_suche["+set_name+"]"][i] && em_form["em_suche["+set_name+"]"][i].value == set_value ) em_form["em_suche["+set_name+"]"][i].checked = true; } } }else if(em_form[set_name] && (typeof em_form[set_name].value == "string")){ em_form[set_name].value = set_value; } } function em_show_div(name,wert){ var em_form = document.em_form; var em_div_obj = 0; if(document.all && document.all[name]) em_div_obj = document.all[name]; if(document.getElementById && document.getElementById(name)) em_div_obj = document.getElementById(name); if(em_div_obj){ em_div_obj.style.display = (wert==1) ? "block" : "none"; } } /*____________________________________________________________________________________________________ PRÜFUNGEN ____________________________________________________________________________________________________*/ // MERKBOX PRÜFEN function em_save_box(){ objSaveBox = document.getElementById('em_member_opener'); if (objSaveBox) { return objSaveBox.style.display == 'none' ? 0 : 1; } else { return 0; } } // ENTER PRÜFEN function em_get_enter(e){ if(!e) e = window.event; if(e.keyCode != 13) return false; return true; } // ZAHLENFELDER PRÜFEN var allowedCodes = "8,9,17,18,27,39,37,46,49,50,51,52,53,54,55,56,57,96,97,98,99,100,101,102,103,104,105".split(/,/); function em_check_zahl(obj,e){ if(!e) e = window.event; if(e && e.keyCode){ var allowed = 0; for(var a in allowedCodes){ if(e.keyCode == allowedCodes[a]) allowed = 1; } if(!allowed) obj.value = obj.value.replace(/\D/g,""); if(e.keyCode == 16){ obj.select(); obj.focus(); } } return; } // EMAIL PRÜFEN function em_check_email(email){ if(!email) return true; if(window.RegExp){ var reg = new RegExp('^[\\w\\-\\.]+?@[\\w\\-\\.]+\\.[a-zA-Z]{2,4}$'); // 2010-03-09 mpausch Sonderzeichen in Email gültig "!#$%&'*+-/=?^_`{|}~" siehe RFC 2822! // Rückbau , da mit adresse thomas.lahn@evolver-behindertenfahrzeuge-muenst.de js-Fehler auftreten // regular expression too complex // var reg = new RegExp('^[A-Za-z0-9\!\#\$\%\&\'\*\+\/\=\?\^\_\`\{\|\}\~\-]+(\.[A-Za-z0-9\!\#\$\%\&\'\*\+\/\=\?\^\_\`\{\|\}\~\-]+)*@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$'); return(reg.test(email)); }else return (email.search('@') >= 1 && email.lastIndexOf('.') > email.search('@') && email.lastIndexOf('.') >= email.length-5); return false; } // TEXTFELD PRÜFEN function em_check_text_field(p_obj){ var em_form = document.em_form; if(p_obj && em_form[p_obj] && em_form[p_obj].value.length>=5){ if(em_form[p_obj].value.match(/