window.onerror=null; /** * popup mit def. groesse, ohne statusbar oder navigation etc. **/ function openPopup(action,para1,para2,sizex,sizey) { var ratio = 20; sizex = sizex*1+ratio; sizey = sizey*1+ratio; var path = "popup.php?action="+action+"¶1="+para1+"¶2="+para2+"&sizex="+sizex+"&sizey="+sizey; name = window.open(path,action,"width=" + sizex + ",height=" + sizey + ",screenX=screen.width / 2 - sizex / 2,screenY=screen.height / 2 - sizey / 2,resizable=no,scrollbars"); } /** * neues fenster oeffnen **/ function openNewWin(full_path,identifier) { name = window.open(full_path,identifier,"dependend=yes"); } /** * farbaenderung von tabellenzeilen * strings: textfarbe, hintergrundfarbe, cursor-style **/ function hoverTD(obj, color, colorBg, cursor) { if (!(document.layers && !document.getElementById)) { if (colorBg != '') obj.style.backgroundColor = colorBg; if (cursor != '') obj.style.cursor = cursor; if (obj.children) obj.children[0].style.color = color; } } /** * Bestaetigung bei Loeschvorgang * strings: textfarbe, hintergrundfarbe, cursor-style **/ function confirm_delete(url) { boole = confirm("Wollen Sie das Element wirklich loeschen?"); if(boole) self.location.href = url; } /** * Schickt Formular ab, setzt einen Parameter und prueft zuvor ein Formularfeld. * * @param form_ Formularname * @param parameter_ Wert des Parameters * @param field_ Zu pruefendes Feld **/ function add_item(form_, parameter_, field_) { val = eval(form_ + '.' + field_ + '.value'); if(val == '') { alert("NULL value or empty string"); } else { document.forms[form_].aktion.value = parameter_; eval("document." + form_ + ".submit();"); } } /** * ueberpruefung, ob die nutzungsbed. akzeptiert wurden (checkbox angehakt) **/ function isChecked(obj) { if (obj.nutzung.checked) { return true; } else { alert("Sie haben unsere AGBs noch nicht akzeptiert."); return false; } } /** * ueberpruefung, ob bei Kampagne od. Regel Name und zum. eine Url angegeben sind **/ function checkCompFields() { if (document.formular.name.value == '' || (document.formular.new_url.value == '' && document.formular.url_cnt.value < 1)) { alert("Bitte füllen Sie folgendes Feld aus: Bezeichnung, URL"); return false; } else { return true; } } /** * laenderkennung und vorwahlen setzen * string: laenderkuerzel **/ function setCountryCode() { lkuerzel = document.formular.state_ID.value; switch(lkuerzel) { case '1': document.formular.laendercode.value = 'A'; document.formular.int_vorwahl1.value = '\+43'; document.formular.int_vorwahl2.value = '\+43'; document.formular.int_vorwahl3.value = '\+43'; break; case '2': document.formular.laendercode.value = 'D'; document.formular.int_vorwahl1.value = '\+49'; document.formular.int_vorwahl2.value = '\+49'; document.formular.int_vorwahl3.value = '\+49'; break; case '3': document.formular.laendercode.value = 'CH'; document.formular.int_vorwahl1.value = '\+41'; document.formular.int_vorwahl2.value = '\+41'; document.formular.int_vorwahl3.value = '\+41'; break; default: document.formular.laendercode.value = prompt("Geben Sie das Laenderkuerzel hier ein:","A"); document.formular.int_vorwahl1.value = prompt("Geben Sie die internationale Vorwahl hier ein:","+49"); document.formular.int_vorwahl2.value = document.formular.int_vorwahl1.value; document.formular.int_vorwahl3.value = document.formular.int_vorwahl1.value; break; } } // EOF