1/* 2Bitte beachten: Diese Datei (www-packed.js) enthält folgende Dateien. Diese wurden nur hineinkopiert 3Bei Ãnderungen müssen diese synchron gehalten werden! 4 5/js_css/system/edit/typecheck.js 6/js_css/system/edit/changecheck.js 7/js_css/system/dhtml.js 8/js_css/system/global.js 9/js_css/system/js_alertpopup.js 10/js_css/system/calendar_2/calender_show.js 11/js_css/system/edit/iframecode.js 12 * ACHTUNG: DIE ZIEL-DATEI MUSS MIT ISO-88... kodiert sein, da beim Minimieren die deutschen Umlaute wieder reingenommen werden 13 */ 14 15// Für den Web-Edit: 16function webDesignerStart(feld) { 17 var ua = navigator.userAgent; 18 var oldEditor = ua==null 19 || (ua.indexOf('MSIE')!=-1 && ua.indexOf('Windows NT 4.')!=-1) // kein IE unter NT 20 || ua.indexOf('MSIE 5.0')!=-1 // kein alter IE 21 || ua.indexOf('MSIE 4.')!=-1; 22 if (oldEditor) 23 WEB_EDIT = window.open("/html/system/web_edit.htm?fdNummer="+feld,"WebEdit","width=750,height=500,left=0,top=0,screenX=0,scre7enY=0,dependent=yes;menubar=no,location=no,scrollbars=no,toolbar=no,status=no,resizable=yes"); 24 else 25 WEB_EDIT = window.open("/js_css/system/htmlarea/htmlarea.htm?fdNummer="+feld,"WebEdit","width=750,height=500,left=0,top=0,screenX=0,screenY=0,dependent=yes;menubar=no,location=no,scrollbars=no,toolbar=no,status=no,resizable=yes"); 26 WEB_EDIT.focus(); 27} 28 29// überprüft die Form, bevor eine Konfigurator Anfrage abgesendet wird 30// unter anderem wird hier auch geprüft, ob das Captcha richtig ausgefüllt wurde 31function formConfirmation(/*Objekt*/form, /*String*/sInfoText, /*String*/sErrorText) { 32 33 var captchaFailure = document.getElementById("captchaFailure"); // Captcha Eingabefeld 34 35 if(captchaFailure==null || captchaFailure=="undefined ") { 36 } else { 37 // Bei Falscheingabe springe zu Captcha-Feld 38 window.scrollTo(0, captchaFailure.offsetTop); 39 } 40} 41 42// setzt in der Session ein neues Bild 43function reloadCaptcha() { 44 var sSrc = $('#img_captcha').attr('src')+"&"+new Date().getTime(); // neues Captcha Bild erzeugen 45 $('#img_captcha').attr('src',sSrc); // neue Url setzen 46} 47 48// Ãberprüft, ob Captcha richtig abgesendet wurde und gibt true oder false zurück 49function checkCaptcha() { 50 var moxMessage = new MoxMessage('org.auctores.captcha','validateCaptcha()'); 51 moxMessage.addData('fdCaptchaID' ,$('[name|="fdCaptchaID"]' ).val()); 52 moxMessage.addData('fdCaptchaCode',$('[name|="fdCaptchaCode"]').val()); 53 return MoxServer.executeMessage(moxMessage); 54} 55function registerCustomcheckFormular(sFormName, callback, msg) { 56 var objForm = getElem("id", sFormName, null); 57 if(objForm==null) objForm = document[sFormName]; 58 objForm.CUSTOM_BEFORESEND=callback; 59 if(typeof msg !='undefined' && msg!=null) { 60 objForm.CUSTOM_BEFORESEND_MSG=msg; 61 } 62} 63function checkFormular(objForm){ 64 var bFormValid = true; 65 66 // jedes input Feld welches benötigt wird auf Wert prüfen 67 for(sKeyName in objForm.LIST_ERROR) { 68 objElem = objForm[sKeyName]; 69 70 // Unregistered Felder beachten 71 if(objForm.LIST_ERROR[sKeyName]==null) { 72 if( typeof objElem !='undefined' && typeof(objElem.ET_setStyleOK) == "function") { 73 objElem.ET_setStyleOK(); 74 } 75 continue ; 76 } 77 78 if (typeof(objElem)!="undefined" && objElem!=null) { 79 if(typeof(objElem.length) != "undefined" && objElem.ET_TYPE != "ETSelect") { 80 objElem = objElem[0]; 81 } 82 83 if(typeof(objElem.proofField) == "function") { 84 if(!objElem.proofField()) 85 bFormValid = false; 86 } 87 } 88 } 89 90 // Neue Datepicker-Felder pruefen 91 if(hasjQuery()) { 92 // Alle Date-Objekte ermitteln 93 $(objForm).find("div.ac_datepicker").each(function() { 94 var dataNullable = $(this).attr('data-nullable'); 95 var dateValue = $(this).find("> input.span2").val(); 96 97 // Pruefen und ggfls. kennzeichnen 98 if(dataNullable==='false' && (dateValue==null || dateValue==undefined || dateValue==='')) { 99 $(this).addClass('formfield_style_error'); 100 bFormValid = false; 101 } else { 102 $(this).removeClass('formfield_style_error'); 103 } 104 }); 105 106 // Alle Date-Objekte ermitteln 107 $(objForm).find("div.ac_timedatepicker").each(function() { 108 var dataNullable = $(this).attr('data-nullable'); 109 var dateValue = $(this).find("> input").val(); 110 111 // Pruefen und ggfls. kennzeichnen 112 if(dataNullable==='false' && (dateValue==null || dateValue==undefined || dateValue==='')) { 113 $(this).addClass('formfield_style_error'); 114 bFormValid = false;
115 $(this).find("> input").css('background-color', '#FFD2D2'); 116 $(this).find("> input").css('color', '#000'); 117 } else { 118 $(this).removeClass('formfield_style_error'); 119 $(this).find("> input").removeAttr('style'); 120 } 121 }); 122 } 123 124 // Benutzerdefinierten Check starten, sofern vorhanden 125 if(bFormValid && typeof objForm.CUSTOM_BEFORESEND !='undefined' && typeof(objForm.CUSTOM_BEFORESEND) == "function") { 126 bFormValid = objForm.CUSTOM_BEFORESEND(); 127 } 128 129 // Das Element mit dem Captcha-Code im eigenen Form ermitteln 130 var inputCaptcha = objForm["fdCaptchaCode"]; 131 132 if( inputCaptcha != null) { 133 // Captcha ist vorhanden 134 135 if(inputCaptcha.value==null || inputCaptcha.value=="") { 136 bFormValid = false; 137 inputCaptcha.style.backgroundColor = "#FFD2D2"; 138 if(hasjQuery()) 139 $(inputCaptcha).addClass('formfield_style_error_captcha'); 140 } else { 141 inputCaptcha.style.backgroundColor = "#FFF"; 142 if(hasjQuery()) 143 $(inputCaptcha).removeClass('formfield_style_error_captcha'); 144 } 145 146 if(!bFormValid) { 147 if(typeof objForm.CUSTOM_BEFORESEND_MSG !='undefined') { 148 alertLng(objForm.CUSTOM_BEFORESEND_MSG); 149 return false; 150 } 151 alertLng({ "de_DE": "Das Formular wurde unvollst\u00e4ndig oder fehlerhaft ausgef\u00fcllt!\n\nBitte \u00fcberpr\u00fcfen Sie die ROT bzw. mit \"*\" markierten Felder!", 152 "cs_CZ": "Formulář chyba!\n\n ProsÃm vyplňte červeně označena pole z \"*\"!", 153 "en_GB": "Formular Error!\n\nPlease fill in the red fields and fields marked with \"*\"!", 154 "en_US": "Formular Error!\n\nPlease fill in the red fields and fields marked with \"*\"!", 155 "fr_FR": "Le formulaire rempli est incomplet ou erroné.\nMerci de remplir les champs en rouges ou indiqués d´une \"*\"!" 156 }); 157 return false; 158 } 159 } 160 161 // Ist Form nicht mit Daten gefüllt 162 if(!bFormValid) { 163 if(typeof objForm.CUSTOM_BEFORESEND_MSG !='undefined') { 164 alertLng(objForm.CUSTOM_BEFORESEND_MSG); 165 return false; 166 } 167 alertLng({ "de_DE": "Das Formular wurde unvollst\u00e4ndig oder fehlerhaft ausgef\u00fcllt!\n\nBitte \u00fcberpr\u00fcfen Sie die ROT bzw. mit \"*\" markierten Felder!", 168 "cs_CZ": "Formulář chyba!\n\n ProsÃm vyplňte červeně označena pole z \"*\"!", 169 "en_GB": "Formular Error!\n\nPlease fill in the red fields and fields marked with \"*\"!", 170 "en_US": "Formular Error!\n\nPlease fill in the red fields and fields marked with \"*\"!", 171 "fr_FR": "Le formulaire rempli est incomplet ou erroné.\nMerci de remplir les champs en rouges ou indiqués d´une \"*\"!" 172 }); 173 return false; 174 } 175 176 var bHasTracking = false; 177 178 // Google-Analytics 179 if(bFormValid && hasjQuery()) { 180 // Benoetigt installiertes und aktiviertes Google-Analytics 181 var ga = window[window['GoogleAnalyticsObject'] || 'ga']; 182 var gtag = window['gtag']; 183 if (typeof ga == 'function' || typeof gtag == 'function') { 184 // Formularfelder 185 var gacCategory = objForm["fdGaccategory"]; 186 187 if(gacCategory!==undefined&&gacCategory!==null) { 188 bHasTracking = true; 189 190 var gacLabel = objForm["fdGaclabel"]; 191 var gacValue = objForm["fdGacvalue"]; 192 var gacInteraction = objForm["fdGacinteraction"]; 193 var gacAction = objForm["fdGacaction"]; 194 195 // Daten 196 var sGacAction = null; 197 var sGacCategory = null; 198 var sGacLabel = null; 199 var sGacInteraction = null; 200 var sGacValue = null; 201 202 // Daten auslesen sofern vorhanden 203 if(gacCategory!=null) sGacCategory = $(gacCategory).attr('value'); 204 if(gacAction!=null) sGacAction = $(gacAction).attr('value'); 205 if(gacLabel!=null) sGacLabel = $(gacLabel).attr('value'); 206 if(gacValue!=null) sGacValue = $(gacValue).attr('value'); 207 208 if(gacInteraction!=null) 209 sGacInteraction = $(gacInteraction).attr('value') == 'true' ? true : false; 210 else sGacInteraction = false; 211 212 if (typeof ga == 'function') { 213 ga('send', { 214 'hitType': 'event', 215 'eventCategory': sGacCategory, 216 'eventAction': sGacAction, 217 'eventLabel': sGacLabel, 218 'hitCallback' : function () { 219 $(objForm).removeAttr('onsubmit'); 220 $(objForm).submit(); 221 } 222 }); 223 } 224 if (typeof gtag == 'function') { 225 gtag('event', sGacAction, { 226 'event_category' : sGacCategory, 227 'event_label' : sGacLabel, 228 'event_callback': function() { 229 $.when(eventFormOnSubmit(objForm)).then(submitForm(objForm)); 230 } 231 }); 232 } 233 } 234 } 235 } 236 237 if(!bHasTracking) { 238 return eventFormOnSubmit(objForm); 239 } 240 241 return false;
242} 243 244function submitForm(objForm) { 245 $(objForm).removeAttr('onsubmit'); 246 $(objForm).submit(); 247} 248 249// !!!! Helper ... sollte wieder raus !!!! 250function showFieldName() { 251 window.status = this.name; 252} 253 254 255function setStyleNotNullable(objElem) { 256 // #FFFBF7 257 if(objElem.ET_VIEW_OBJECT && objElem.ET_VIEW_OBJECT.style) { 258 objElem.ET_VIEW_OBJECT.style.border="1px #A5ACB2 solid"; 259 objElem.ET_VIEW_OBJECT.style.backgroundColor="#F2F6F9"; 260 } 261} 262 263 264function setStyleBaseFromCurrent(objElem) { 265 if(objElem.ET_VIEW_OBJECT && objElem.ET_VIEW_OBJECT.style) { 266 objElem.ET_BASE_BACKGROUNDCOLOR = objElem.ET_VIEW_OBJECT.style.backgroundColor; 267 objElem.ET_BASE_COLOR = objElem.ET_VIEW_OBJECT.style.color; 268 } 269} 270 271 272function registerEditElement(sFormName,sName,sType,isNullable,isEditable,sSize,sScale,sValid,sViewObjectName,isOnblursubmit){ 273 // Mapping new System 274 // WORKARROUND: Die JS-Datei sollte als eigenstädige version im webmox vorliegen 275 if(sType=="WMEDouble" ) sType="ETFloat"; 276 if(sType=="WMEText" ) sType="ETText"; 277 if(sType=="WMEBoolean") sType="ETCheckbox"; 278 if(sType=="WMEMemo" ) sType="ETMemo"; 279 // mapping wegen moxanos-schicht 280 if(sType=="ETDouble" ) sType="ETFloat"; 281 282 var objForm = getElem("id", sFormName, null); 283 if(objForm==null) objForm = document[sFormName]; 284 var objElem = objForm[sName]; 285 286 if(isNullable==false) { 287 // Wird nur entfernt, wenn JavaScript aktiviert ist. 288 try { objElem.removeAttribute("required"); } catch(e) {} 289 } 290 291 /******************************************************************************** 292 * Sonderbehandlung: BOOL-Feld 293 ********************************************************************************/ 294 if(sType=="ETBool") { 295 //objElem[0].onclick=function () { onChangeCheckSite(this); }; 296 //objElem[1].onclick=function () { onChangeCheckSite(this); }; 297 // Prüf-Handler einhängen 298 objElem[0].onclick = onEditElementClick; 299 objElem[1].onclick = onEditElementClick; 300 objElem[0].proofField = proofFieldBoolean; 301 objElem[1].proofField = proofFieldBoolean; 302 return; 303 } 304 /******************************************************************************** 305 * Sonderbehandlung: CHECKBOX-Feld 306 ********************************************************************************/ 307 if(sType=="ETCheckbox") { 308 var objElemC = getElem("id", sName + "_C"); 309 if(isNullable==false && objElemC) { 310 // Wird nur entfernt, wenn JavaScript aktiviert ist. 311 objElemC.removeAttribute("required"); 312 } 313 // Label verknuepfen wenn vorhanden 314 var objElemL = document.getElementById(sViewObjectName+"_label"); 315 if(objElemL) { 316 objElemL.ET_BASE_COLOR = objElemL.style.color; 317 objElemL.ET_setStyleOK = setStyleOK; 318 objElemL.ET_setStyleERR = setStyleERR; 319 objElemL.ET_VIEW_LABELOBJECT = objElemL; 320 objElem.ET_TEXTLABEL = objElemL; 321 } 322 } 323 /******************************************************************************** 324 * Sonderbehandlung: RADIO-Feld 325 ********************************************************************************/ 326 if(sType=="ETRadio") { 327 if (objForm.LIST_ERROR[sName]==null) { 328 329 // Object in Prüf/Fehler-Liste registrieren 330 objForm.LIST_ERROR[sName] = ""; 331 332 // Parameter für einzelne Radios setzten 333 for(i=0; i < objElem.length;i++){ 334 oneRadio = objElem[i]; 335 336 // DD-Parameter setzten 337 oneRadio.ET_FORMNAME = sFormName; 338 oneRadio.ET_NAME = sName; 339 oneRadio.ET_TYPE = sType; 340 oneRadio.ET_NULLABLE = isNullable; 341 oneRadio.ET_EDITABLE = isEditable; 342 oneRadio.ET_SIZE = sSize; 343 oneRadio.ET_SCALE = sScale; 344 oneRadio.ET_VALID = sValid; 345 346 // Methoden einhängen 347 oneRadio.onclick = onEditElementClick; 348 oneRadio.proofField = proofFieldRadio; 349 oneRadio.ET_setStyleOK = setStyleOK; 350 oneRadio.ET_setStyleERR = setStyleERR; 351 352 // Objekt für die Statusanzeige einhängen (default: das eigene Object) 353 oneRadio.ET_VIEW_OBJECT=oneRadio; // Default 354 if(sViewObjectName!=null && sViewObjectName!="") { 355 var objView = getElem("id", (sViewObjectName+i), null); 356 if(objView != null) { 357 oneRadio.ET_VIEW_OBJECT = objView; 358 objView.ET_MASTER_OBJECT = oneRadio; 359 } else { 360 objView = getElem("id", sViewObjectName, null); 361 if(objView != null) { 362 oneRadio.ET_VIEW_OBJECT = document[sFormName][sViewObjectName]; 363 document[sFormName][sViewObjectName].ET_MASTER_OBJECT = oneRadio; 364 } 365 } 366 } 367 368 // Styles setzen/merken 369 if(!oneRadio.ET_NULLABLE) { setStyleNotNullable(oneRadio); } // Style für Not-Nullable setzen 370 setStyleBaseFromCurrent(oneRadio); // Style merken 371 } 372 } 373 374 return; 375 } 376 377 /******************************************************************************** 378 * Standard-Feld (z.B Text-Feld) 379 ********************************************************************************/ 380 381 // DD-Parameter setzten 382 objElem.ET_FORMNAME = sFormName; 383 objElem.ET_NAME = sName; 384 objElem.ET_TYPE = sType; 385 objElem.ET_NULLABLE = isNullable; 386 objElem.ET_EDITABLE = isEditable; 387 objElem.ET_SIZE = sSize; 388 objElem.ET_SCALE = sScale; 389 objElem.ET_VALID = sValid; 390 objElem.ET_ONBLURSUBMIT = isOnblursubmit; 391 392 // Object in Prüf/Fehler-Liste registrieren 393 if(!objForm.LIST_ERROR) { 394 objForm.LIST_ERROR = new Object(); 395 } 396 objForm.LIST_ERROR[objElem.ET_NAME] = ""; 397 398 // Methoden einhängen 399 objElem.ET_setStyleOK = setStyleOK; // Set-StyleOK einhängen 400 objElem.ET_setStyleERR = setStyleERR; // Set-StyleERR einhängen 401 objElem.onkeyup = onEditElementKeyUp; // Prüf-Handler einhängen 402 objElem.onchange = onEditElementChange; // Prüf-Handler einhängen 403 objElem.proofField = proofField; // Prüf-Funktion einhängen 404 // ACHTUNG: der Event 'objElem.onmouseover' und 'objElem.onblur' wird bereits verwendet (HCS fragen) 405 //objElem.onmouseover = showFieldName; // Feld-Name im Window-Status anzeigen (Debug, kann wieder entfernt werden) 406 objElem.onblur = eventOnBlur; // hier wird der automatische onblur-event eingebunde 407 408 // Objekt für die Statusanzeige einhängen (default: das eigene Object) 409 objElem.ET_VIEW_OBJECT=objElem; // Default 410 if(sViewObjectName!=null && sViewObjectName!="") { 411 var objView = getElem("id", sViewObjectName, null); 412 if(objView != null) { 413 objElem.ET_VIEW_OBJECT = objView; 414 objView.ET_MASTER_OBJECT = objElem; 415 } 416 } 417 418 // Styles setzen/merken
419 if(!objElem.ET_NULLABLE) { setStyleNotNullable(objElem); } // Style für Not-Nullable setzen 420 setStyleBaseFromCurrent(objElem); // Style merken 421 422 if(window.afterRegisterEditElement!=null){ 423 afterRegisterEditElement(objElem); 424 } 425 426 /******************************************************************************** 427 * Extra-Behandlung: PASSWORT-Feld 428 ********************************************************************************/ 429 // zweites Passwort-Feld registrieren und mit erstem verknüpfen 430 if(sType == "ETPassword") { 431 var objElem2 = getElem("id", sName+"2", null); 432 if(objElem2==null) objElem2 = objForm[sName+"2"]; 433 434 // beide Passwort-Felder miteinander verknüpfen 435 objElem.ET_PASSWORD2 = objElem2; 436 437 if(objElem2!=null) { 438 objElem2.ET_PASSWORD1 = objElem; 439 440 // DD-Parameter setzten 441 objElem2.ET_FORMNAME = sFormName; 442 objElem2.ET_NAME = sName+"2"; 443 objElem2.ET_TYPE = sType+"2"; 444 objElem2.ET_NULLABLE = isNullable; 445 objElem2.ET_EDITABLE = isEditable; 446 objElem2.ET_SIZE = sSize; 447 objElem2.ET_SCALE = sScale; 448 objElem2.ET_VALID = sValid; 449 450 // Methoden einhängen 451 objElem2.ET_setStyleOK = setStyleOK; // Set-StyleOK einhängen 452 objElem2.ET_setStyleERR = setStyleERR; // Set-StyleERR einhängen 453 objElem2.onkeyup = onEditElementKeyUp;// Prüf-Handler einhängen 454 objElem2.onclick = onEditElementClick;// Prüf-Handler einhängen 455 objElem2.proofField = proofField; // Prüf-Funktion einhängen 456 objElem2.onmouseover = showFieldName; // Feld-Name im Window-Status anzeigen (Debug, kann wieder entfernt werden) 457 458 // Objekt für die Statusanzeige einhängen (default: das eigene Object) 459 objElem2.ET_VIEW_OBJECT = objElem2; // Default 460 if(sViewObjectName!=null && sViewObjectName!="") { 461 var objView = getElem("id", (sViewObjectName+"2"), null); 462 if(objView != null) { 463 objElem2.ET_VIEW_OBJECT = objView; 464 objView.ET_MASTER_OBJECT = objElem2; 465 } 466 } 467 468 // Styles setzen/merken 469 if(!objElem2.ET_NULLABLE){ setStyleNotNullable(objElem2); } // Style für Not-Nullable setzen 470 setStyleBaseFromCurrent(objElem2); // Style merken 471 } 472 } 473} 474 475function unregisterEditElement(sFormName,sName) { 476 var objForm = getElem("id", sFormName, null); 477 if(objForm==null) objForm = document[sFormName]; 478 var objElem = objForm[sName]; 479 objElem.proofField = null; 480 objForm.LIST_ERROR[objElem.ET_NAME] = null; 481 if (objForm.LIST_ERROR[sName]!=null) { 482 objForm.LIST_ERROR[sName]=null; 483 } 484} 485 486function onEditElementKeyUp() { 487 if(this.ET_TYPE=="ETMemo") { 488 tcSetMemoLength(this); 489 } 490 // prüfe ob der event noch von anderer stelle bearbeitet wird 491 var sName = this.form.name +"_"+this.name.replace('.','_')+"OnKeyUp"; 492 if(window[sName]) 493 window[sName](document[this.form.name][this.name]); 494 495 onChangeCheckSite(this); 496 return this.proofField(); 497} 498 499function onEditElementClick() { 500 onChangeCheckSite(this); 501 502 // prüfe ob der event noch von anderer stelle bearbeitet wird 503 var sName = this.form.name +"_"+this.name.replace('.','_')+"OnClick"; 504 if(window[sName]) 505 window[sName](document[this.form.name][this.name]); 506 507 return this.proofField(); 508} 509 510function onEditElementChange() { 511 if(this.ET_TYPE=="ETMemo") { 512 tcSetMemoLength(this); 513 } 514 515 // prüfe ob der event noch von anderer stelle bearbeitet wird 516 var sName = this.form.name +"_"+ this.name.replace('.','_').replace(/:/g,'_') +"OnChange"; 517 518 if(window[sName]) 519 window[sName](document[this.form.name][this.name]); 520 521 doOnBlurSubmit(this); 522 onChangeCheckSite(this); 523 return this.proofField(); 524} 525 526 527function doOnBlurSubmit(objElement) { 528 if(objElement.ET_ONBLURSUBMIT !== undefined && objElement.ET_ONBLURSUBMIT) { 529 objElement.form.submit(); 530 } 531} 532 533function setCheckBoxValueToHidden(objElement, sName, sValueOn, sValueOff){ 534 if(objElement.checked) 535 objElement.form[sName].value = sValueOn; 536 else 537 objElement.form[sName].value = sValueOff; 538 539 onChangeCheckSite(objElement.form[sName]); 540 541 // event weiterleite 542 var sNameFunction = objElement.form.name +"_"+sName.replace('.','_')+"OnClick"; 543 544 if(window[sNameFunction]) { 545 window[sNameFunction](document[objElement.form.name][sName]); 546 } 547 548 return objElement.form[sName].proofField(); 549} 550 551 552 553 554/** 555 * proofFieldRadio 556 */ 557function proofFieldBoolean(){ 558 return true; 559} 560 561/** 562 * proofFieldRadio 563 */ 564function proofFieldRadio(){ 565 var objElem = this; 566 var objParent = this.form[this.ET_NAME]; 567 var bValidOK = false;
568 var sMessage = "Eine der Optionen muss ausgewählt werden!"; 569 570 // nullable prüfen 571 if(this.ET_NULLABLE) 572 return true; 573 574 // Nullableoption 575 for(i=0; i < objParent.length;i++) 576 if(objParent[i].checked) 577 bValidOK = true 578 579 if(!bValidOK) { 580 this.form.LIST_ERROR[this.ET_NAME] = sMessage; // ERR in Liste eintragen 581 // ERR-Style setzen 582 for(i=0; i<objParent.length; i++) 583 oneRadio = objParent[i].ET_setStyleERR(); 584 } 585 else { 586 this.form.LIST_ERROR[this.ET_NAME] = ""; // OK in Liste eintragen 587 // OK-Style setzen 588 for(i=0; i<objParent.length; i++) 589 oneRadio = objParent[i].ET_setStyleOK(); 590 } 591 return bValidOK; 592} 593 594 595/** 596 * proofField 597 */ 598function proofField(){ 599 var sFieldValue = TrimString(this.value); 600 var bValidOK = true; 601 var bNullableOK = true; 602 var sMessage = ""; 603 var attrLang = $('html').attr('lang'); 604 var bEnglisch = typeof attrLang !== 'undefined' && attrLang !== false && attrLang == 'en-GB' ? true : false; 605 606 bNullableOK = bValidOK = tcCheckNullable(sFieldValue,this.ET_NULLABLE); 607 if(!bValidOK) sMessage="Dieses Feld muss ausgef\u00fcllt werden!"; 608 else { 609 if(this.ET_TYPE=="ETCheckbox" && !this.ET_NULLABLE){ 610 bNullableOK = bValidOK = (sFieldValue!="false" && tcCheckNullable(sFieldValue,this.ET_NULLABLE)); 611 612 if(!bValidOK){ 613 sMessage="Dieses Feld muss angeklickt werden!"; 614 if(this.ET_TEXTLABEL) { this.ET_TEXTLABEL.ET_setStyleERR(); } 615 } else { 616 if(this.ET_TEXTLABEL) { this.ET_TEXTLABEL.ET_setStyleOK(); } 617 } 618 } 619 if(this.ET_TYPE=="ETInt"){ 620 bValidOK = bValidOK && tcCheckScale(sFieldValue, 0, 0); 621 if(!bValidOK){ 622 if(bEnglisch) 623 sMessage="Please enter a valid integer!"; 624 else 625 sMessage="Bitte eine g\u00fcltige Ganzzahl eingeben!"; 626 } 627 } 628 if(this.ET_TYPE=="ETFloat"){ 629 // umwandlung von komma zu punkt 630 if(sFieldValue.indexOf(',')!=-1) { 631 sFieldValue = sFieldValue.replace(',', '.'); 632 this.value=sFieldValue; 633 } 634 bValidOK = bValidOK && tcCheckScale(sFieldValue, 0, this.ET_SCALE); 635 if(!bValidOK) sMessage="Bitte eine gültige Zahl mit maximal "+this.ET_SCALE+" Nachkommastellen eingeben!"; 636 } 637 638 if(this.ET_TYPE=="ETPassword"){ 639 if(!bNullableOK || sFieldValue!=""){ // PW-Bedingungen nur pr�fen wenn Inhalt vorhanden oder nicht nullable) 640 bValidOK = bValidOK && tcCheckMinSize(sFieldValue,8); 641 if(!bValidOK) sMessage="Bitte vergeben Sie ein mindestens 8-stelliges Passwort, das aus Gro\u00df- und Kleinbuchstaben, Ziffern und zumindest einem Sonderzeichen bestehen muss."; 642 else { 643 bValidOK = bValidOK && tcCheckPasswordSyntax(sFieldValue); 644 if(!bValidOK) sMessage="Bitte vergeben Sie ein mindestens 8-stelliges Passwort, das aus Gro\u00df- und Kleinbuchstaben, Ziffern und zumindest einem Sonderzeichen bestehen muss."; 645 } 646 if(this.ET_PASSWORD2!=null && this.ET_PASSWORD2!='undefined') 647 this.ET_PASSWORD2.proofField(); 648 } 649 } 650 // Nur ein Beispiel wie des Validation-Feld genutzt werden könnte 651 if(this.ET_VALID !=null && this.ET_VALID.indexOf("[EMAIL]") == 0) { 652 bValidOK = bValidOK && tcCheckEmailSyntax(sFieldValue); 653 if(!bValidOK) sMessage=this.ET_VALID.slice(this.ET_VALID.indexOf(":")+1); 654 } 655 } 656 657 // Prüfung des 2. Passwort-Feldes auch bei Nullable-Fehler 658 if(this.ET_TYPE=="ETPassword2"){ 659 bValidOK = true; // unterdr�cken des Nullable-Fehlers, damit auch bei leerem Feld die Wiederholungs-Fehlermeldung kommt 660 if(!bNullableOK || sFieldValue!=""){ // PW-Bedingungen nur pr�fen wenn Inhalt vorhanden oder nicht nullable) 661 bValidOK = bValidOK && tcCheckPasswordSyntax(sFieldValue); 662 if(!bValidOK) 663 sMessage="Bitte vergeben Sie ein mindestens 8-stelliges Passwort, das aus Buchstaben, Ziffern und zumindest einem Sonderzeichen bestehen muss."; 664 else { 665 bValidOK = bValidOK && sFieldValue == this.ET_PASSWORD1.value; 666 667 if(!bValidOK) sMessage="Bitte wiederholen Sie des Passwort exakt!"; 668 } 669 } 670 } 671 672 // Element, abhängig vom Fehlerstatus, in Fehler-Liste eintragen und Aussehen setzten 673 if(bValidOK) { 674 this.form.LIST_ERROR[this.ET_NAME] = ""; // OK in Liste eintragen 675 this.ET_setStyleOK(); // OK-Style setzen 676 this.title = ""; // Title löschen 677 return true; 678 } else { 679 // Nullable-Fehler unterdrücken den Submit nur im DIRECT-MODE 680 if(bNullableOK || typeof(this.form.IS_DIRECT)=="undefined" || this.form.IS_DIRECT) 681 this.form.LIST_ERROR[this.ET_NAME] = sMessage; // ERR in Liste eintragen 682 else 683 this.form.LIST_ERROR[this.ET_NAME] = ""; // OK in Liste eintragen 684 685 this.ET_setStyleERR(); // ERR-Style setzten 686 this.title = sMessage; // Title auf Fehlermeldung setzten 687 } 688 689 return false;
690} 691 692function setStyleOK() { 693 // Label-Farbe 694 if(this.ET_VIEW_LABELOBJECT) { 695 if(hasjQuery()) 696 $(this.ET_VIEW_LABELOBJECT).removeClass('formfield_style_error_label'); 697 this.ET_VIEW_LABELOBJECT.style.color = this.ET_BASE_COLOR; 698 return; 699 } 700 this.ET_VIEW_OBJECT.style.backgroundColor = this.ET_BASE_BACKGROUNDCOLOR; 701 this.ET_VIEW_OBJECT.style.color = this.ET_BASE_COLOR; 702 if(hasjQuery()) 703 $(this.ET_VIEW_OBJECT).removeClass('formfield_style_error'); 704} 705function setStyleERR() { 706 // Label-Farbe 707 if(this.ET_VIEW_LABELOBJECT) { 708 if(hasjQuery()) 709 $(this.ET_VIEW_LABELOBJECT).addClass('formfield_style_error_label'); 710 this.ET_VIEW_LABELOBJECT.style.color = "#FF0000"; 711 return; 712 } 713 this.ET_VIEW_OBJECT.style.color = "black"; 714 this.ET_VIEW_OBJECT.style.backgroundColor = "#FFD2D2"; 715 if(hasjQuery()) 716 $(this.ET_VIEW_OBJECT).addClass('formfield_style_error'); 717} 718 719 720///////////////////////////////////////////////////////////////////////////////////////////////////////////////// 721//////////////////////////////// EVENTS ////////////////////////////////////////////////////////////////////// 722///////////////////////////////////////////////////////////////////////////////////////////////////////////////// 723 724function eventOnBlur(){ 725 var sName = this.form.name +"_"+this.name.replace('.','_')+"FocusLost"; 726 if(window[sName]) 727 window[sName](document[this.form.name][this.name]); 728} 729 730function eventFormOnSubmit(objForm){ 731 var sName = objForm.name +"OnSubmit"; 732 if(window[sName]) { 733 return window[sName](document[objForm.name]); 734 } 735 else 736 return true; 737} 738// -------------------------------------------------------------------------------- 739// ----------- jQuery Pruefung ---------- 740// -------------------------------------------------------------------------------- 741function hasjQuery() { 742 if ( typeof jQuery !='undefined' && jQuery) { 743 return true; 744 } else { 745 return false; 746 } 747} 748 749// -------------------------------------------------------------------------------- 750// ----------- Type-Checker ---------- 751// -------------------------------------------------------------------------------- 752 753// prüft auf die Min-Laenge 754function tcCheckMinSize(sValue, nSize) { 755 if(sValue=="") return true; // Nullable-Check darf nicht von den Syntax-Checkern gemacht werden 756 return sValue.length>=nSize; 757} 758// prüft auf die Max-Laenge 759function tcCheckMaxSize(sValue, nSize) { 760 return sValue.length<=nSize; 761} 762// prüft auf Nullable 763function tcCheckNullable(sValue, isNullable) { 764 if(isNullable) return true; 765 else return sValue!=null && sValue.length!=0; 766} 767 768// prüft auf Nummer (signed/unsigned int/float) 769function tcCheckNumber(sValue) { 770 return !isNaN(sValue); 771} 772 773// prüft Nachkommastellen (wenn scaleMin=0 muss kein '.' vorhanden sein) 774function tcCheckScale(sValue, nScaleMin, nScaleMax) { 775 var regx = /[\.](\d*)$/; 776 if(tcCheckNumber(sValue)) { 777 if(regx.exec(sValue)) { 778 if(nScaleMax == 0) 779 return false; 780 if(RegExp.$1.length >= nScaleMin && RegExp.$1.length <= nScaleMax) 781 return true; 782 } else { 783 if(nScaleMin==0) 784 return true; 785 } 786 } 787 return false; 788} 789 790// prüft Min und Max Wert (wenn für nRangeMin/nRangeMax keine Prüfung erwünscht -> 'null'-Wert angeben) 791function tcCheckRange(sValue, nRangeMin, nRangeMax) { 792 if(!tcCheckNumber(sValue)) return false; 793 nValue = sValue-0; 794 if(nRangeMin != null && sValue < nRangeMin) return false; 795 if(nRangeMax != null && sValue > nRangeMax) return false; 796 return true; 797} 798 799//Emailcheck: gibt true oder false zurueck 800function tcCheckEmailSyntax(email) { 801 var proto = "(mailto:)?"; 802 var usr = "([a-zA-Z0-9_][a-zA-Z0-9+_.-]*|\"([^\\\\\x80-\xff\015\012\"]|\\\\[^\x80-\xff])+\")"; 803 804 var domain = "([a-zA-Z0-9äÃöÃüÃ][a-zA-Z0-9äÃöÃüÃ._-]*\\.)*[a-zA-Z0-9äÃöÃüÃ][a-zA-Z0-9äÃöÃüÃ._-]*\\.[a-zA-ZäÃöÃüÃ]{2,}"; 805 var regex = "^" + proto + "?" + usr + "\@" + domain + "$"; 806 var rgx = new RegExp(regex); 807 if(email==null || email=="") return true; 808 return rgx.exec(email); 809} 810 811// Passwort: Syntax-Check (prüft nur auf Zeichen, noch nicht auf Komplexität) 812function tcCheckPasswordSyntax(sValue) { 813 if(!sValue.match(/\d{1,}/) || !sValue.match(/[a-zäöü]{1,}/) || !sValue.match(/[A-ZÃÃÃ]{1,}/) || !sValue.match(/[^a-zA-Z0-9]/) || sValue.length <8) { 814 return false;
815 } 816 return true; 817} 818 819// Prüft die Länge 820function tcSetMemoLength(objMemo) { 821 var nLength = objMemo.ET_SIZE; 822 if(nLength!=0) 823 if(objMemo.value.length>nLength) 824 objMemo.value = objMemo.value.substring(0,nLength); 825} 826 827 828 829// -------------------------------------------------------------------------------- 830// ----------- Helper ---------- 831// -------------------------------------------------------------------------------- 832 833 834//--- Helper für Mehrsprachigkeit ------------------------------- 835 836// gibt sprachabhängigen Alert aus 837// Parameter: assoziatives Array (z.B.: var msg = {"de_DE": "deutscher Text", "en_EN": "english Text"} ) 838function alertLng(sMessages) { 839 initModalDialog(); 840 841 showModalAlert(getLngMessage(sMessages),300,100); 842 //alert(getLngMessage(sMessages)); 843} 844 845// gibt sprachabhängige Nachricht zurück 846// Parameter: assoziatives Array (z.B.: var msg = {"de_DE": "deutscher Text", "en_EN": "english Text"} ) 847function getLngMessage(sMessages) { 848 var locale = "en_EN"; // English als Default 849 850 // Globales Locale auslesen, falls vorhanden 851 if(typeof(AC_LOCALE) != "undefined") 852 locale = AC_LOCALE; 853 854 if(sMessages[locale]) 855 // gewünschte Sprache angegeben -> Message zurückgeben; 856 return sMessages[locale]; 857 858 // gewünschte Sprache nicht angegeben -> Fallback1: English(en_EN) 859 if(sMessages["en_EN"]) 860 return sMessages["en_EN"]; 861 862 // Fallback English(en_EN) nicht angegeben -> Fallback2: English(en_GB) 863 if(sMessages["en_GB"]) 864 return sMessages["en_GB"]; 865 866 // Fallback English(en_GB) nicht angegeben -> Fallback3: English(de_DE) 867 if(sMessages["de_DE"]) 868 return sMessages["de_DE"]; 869 870 // KEINE passende Sprache angegeben -> erste Sprache zurückgeben 871 // (Achtung: Browser-Abhängig! -> nicht alle Browser geben den als ersten eingetragenen Wert auch als erstes zurück) 872 for(var firstLocale in sMessages) 873 break; 874 875 return sMessages[firstLocale]; 876} 877 878 879//--- Helper für String-Verarbeitung ------------------------------- 880 881function TrimString(sInString) { 882 sInString = sInString.replace( /^\s+/g, "" );// strip leading 883 return sInString.replace( /\s+$/g, "" );// strip trailing 884} 885 886 887/* 888Bitte beachten: Diese Datei (www-raw.js) enthält folgende Dateien. Diese wurden nur hineinkopiert 889Bei Ãnderungen müssen diese synchron gehalten werden! 890DANACH (WICHTIG) muss eine komprimierte Version mittels https://javascript-minifier.com/ erstellt werden 891und als "www-packed.js" eingestellt werden 892/js_css/system/edit/typecheck.js 893/js_css/system/edit/changecheck.js 894/js_css/system/dhtml.js 895/js_css/system/global.js 896/js_css/system/js_alertpopup.js 897/js_css/system/calendar_2/calender_show.js 898/js_css/system/edit/iframecode.js 899 */ 900/** 901 * 902 */ 903var isChangeOnSite = false; 904var arrEvalFunktion = new Object(); 905var objLastChangeElement = null; 906 907/** Erm�glicht es einen Listener beim OnChangeEvent einzuh�ngen */ 908function registerOnChangeEventListener(sEvalFunktion) { 909 arrEvalFunktion[sEvalFunktion] = sEvalFunktion; 910} 911 912/** Erm�glicht es einen Listener beim OnChangeEvent einzuh�ngen */ 913function removeOnChangeEventListener(sEvalFunktion) { 914 arrEvalFunktion[sEvalFunktion] = null; 915 916} 917 918/** Registriert ein Element zur OnChage-�berwachung */ 919function registerEditElementChangeCheck(sName, sElementName) { 920 var objElem = getElem("id", sElementName, null); 921 if(objElem==null) objElem = document[sName][sElementName]; 922 objElem.onchange = function () { onChangeCheckSite(this); }; 923} 924 925/** Funktion die aufgerufen wird wen ein OnChange-Event ausgel�st wurde */ 926function onChangeCheckSite(objElement){ 927 objLastChangeElement = objElement; 928 // Flag setzen auf ChangeSite 929 isChangeOnSite=true; 930 // Listener noch auswerten 931 for(var sOneFunktion in arrEvalFunktion) { 932 if(arrEvalFunktion[sOneFunktion]!=null) 933 eval(sOneFunktion); 934 } 935} 936 937/** Gibt an ob sich auf der Seite etwas ge�ndert hat */
938function hasChangeOnSite() { 939 return isChangeOnSite; 940} 941 942/** gibt das letzte Eventobject zur�ck */ 943function getLastEventObject(){ 944 return objLastChangeElement; 945} 946 947/* 948Bitte beachten: Diese Datei (www-raw.js) enthält folgende Dateien. Diese wurden nur hineinkopiert 949Bei Ãnderungen müssen diese synchron gehalten werden! 950DANACH (WICHTIG) muss eine komprimierte Version mittels https://javascript-minifier.com/ erstellt werden 951und als "www-packed.js" eingestellt werden 952/js_css/system/edit/typecheck.js 953/js_css/system/edit/changecheck.js 954/js_css/system/dhtml.js 955/js_css/system/global.js 956/js_css/system/js_alertpopup.js 957/js_css/system/calendar_2/calender_show.js 958/js_css/system/edit/iframecode.js 959 */ 960 961/* DHTML-Bibliothek */ 962 963var DHTML = 0, DOM = 0, MS = 0, NS = 0, OP = 0; 964 965function DHTML_init() { 966 if(document.getElementById) { 967 DHTML = 1; 968 DOM = 1; 969 } 970 if(typeof document.all != "undefined" && !OP) { 971 DHTML = 1; 972 MS = 1; 973 } 974 if(typeof document.layers != "undefined" && !OP) { 975 DHTML = 1; 976 NS = 1; 977 } 978} 979 980function getElem(p1,p2,p3) { 981 var Elem; 982 if(DOM) { 983 if(p1.toLowerCase()=="id") { 984 if (typeof document.getElementById(p2) == "object") 985 Elem = document.getElementById(p2); 986 else Elem = void(0); 987 return(Elem); 988 } 989 else if(p1.toLowerCase()=="name") { 990 if (typeof document.getElementsByName(p2) == "object") 991 Elem = document.getElementsByName(p2)[p3]; 992 else Elem = void(0); 993 return(Elem); 994 } 995 else if(p1.toLowerCase()=="tagname") { 996 if (typeof document.getElementsByTagName(p2) == "object" || (OP && typeof document.getElementsByTagName(p2) == "function")) 997 Elem = document.getElementsByTagName(p2)[p3]; 998 else Elem = void(0); 999 return(Elem); 1000 } 1001 else return void(0); 1002 } 1003 else if(MS) { 1004 if(p1.toLowerCase()=="id") { 1005 if (typeof document.all[p2] == "object") 1006 Elem = document.all[p2]; 1007 else Elem = void(0); 1008 return(Elem); 1009 } 1010 else if(p1.toLowerCase()=="tagname") { 1011 if (typeof document.all.tags(p2) == "object") 1012 Elem = document.all.tags(p2)[p3]; 1013 else Elem = void(0); 1014 return(Elem); 1015 } 1016 else if(p1.toLowerCase()=="name") { 1017 if (typeof document[p2] == "object") 1018 Elem = document[p2]; 1019 else Elem = void(0); 1020 return(Elem); 1021 } 1022 else return void(0); 1023 } 1024 else if(NS) { 1025 if(p1.toLowerCase()=="id" || p1.toLowerCase()=="name") { 1026 if (typeof document[p2] == "object") 1027 Elem = document[p2]; 1028 else 1029 Elem = void(0); 1030 return(Elem); 1031 } 1032 else if(p1.toLowerCase()=="index") { 1033 if (typeof document.layers[p2] == "object") 1034 Elem = document.layers[p2]; 1035 else 1036 Elem = void(0); 1037 return(Elem); 1038 } 1039 else 1040 return void(0); 1041 } 1042 return void(0); 1043} 1044 1045function getCont(p1,p2,p3) { 1046 var Cont; 1047 if(DOM && getElem(p1,p2,p3) && getElem(p1,p2,p3).firstChild) { 1048 if(getElem(p1,p2,p3).firstChild.nodeType == 3) 1049 Cont = getElem(p1,p2,p3).firstChild.nodeValue; 1050 else 1051 Cont = ""; 1052 return(Cont); 1053 } 1054 else if(MS && getElem(p1,p2,p3)) { 1055 Cont = getElem(p1,p2,p3).innerText; 1056 return(Cont); 1057 } 1058 else return void(0); 1059} 1060 1061function getAttr(p1,p2,p3,p4) { 1062 var Attr; 1063 if((DOM || MS) && getElem(p1,p2,p3)) { 1064 Attr = getElem(p1,p2,p3).getAttribute(p4); 1065 return(Attr); 1066 } 1067 else if (NS && getElem(p1,p2)) { 1068 if (typeof getElem(p1,p2)[p3] == "object") 1069 Attr=getElem(p1,p2)[p3][p4] 1070 else 1071 Attr=getElem(p1,p2)[p4] 1072 return Attr; 1073 } 1074 else return void(0); 1075} 1076 1077function setCont(p1,p2,p3,p4) { 1078 if(DOM && getElem(p1,p2,p3) && getElem(p1,p2,p3).firstChild) 1079 getElem(p1,p2,p3).firstChild.nodeValue = p4; 1080 else if(MS && getElem(p1,p2,p3)) 1081 getElem(p1,p2,p3).innerText = p4; 1082 else if(NS && getElem(p1,p2,p3)) { 1083 getElem(p1,p2,p3).document.open(); 1084 getElem(p1,p2,p3).document.write(p4); 1085 getElem(p1,p2,p3).document.close(); 1086 } 1087} 1088 1089DHTML_init(); 1090 1091/* 1092Bitte beachten: Diese Datei (www-raw.js) enthält folgende Dateien. Diese wurden nur hineinkopiert 1093Bei Ãnderungen müssen diese synchron gehalten werden! 1094DANACH (WICHTIG) muss eine komprimierte Version mittels https://javascript-minifier.com/ erstellt werden 1095und als "www-packed.js" eingestellt werden 1096/js_css/system/edit/typecheck.js 1097/js_css/system/edit/changecheck.js 1098/js_css/system/dhtml.js 1099/js_css/system/global.js 1100/js_css/system/js_alertpopup.js 1101/js_css/system/calendar_2/calender_show.js 1102/js_css/system/edit/iframecode.js 1103 */ 1104
1105//////////////////////////////////////// 1106//////////////////////////////////////// 1107// WORKER 1108//////////////////////////////////////// 1109//////////////////////////////////////// 1110 1111//////////////////////////////////////// 1112// Contentgroesse 1113//////////////////////////////////////// 1114SCREEN_SIZE_WIDTH = screen.width; 1115SCREEN_SIZE_HEIGHT = screen.height; 1116 1117//////////////////////////////////////// 1118// MousePosition 1119//////////////////////////////////////// 1120//Aktuelle Mouseposition 1121var MOUSE_POS_X = 0; 1122var MOUSE_POS_Y = 0; 1123var MOUSE_PAGEPOS_X = 0; 1124var MOUSE_PAGEPOS_Y = 0; 1125 1126// Mouse-Position: 1127function handleMouseMove(Ereignis) { 1128 try { 1129 MOUSE_POS_X = (MS) ? window.event.clientX : Ereignis.pageX - window.pageXOffset; 1130 MOUSE_POS_Y = (MS) ? window.event.clientY : Ereignis.pageY - window.pageYOffset; 1131 MOUSE_PAGEPOS_X = MOUSE_POS_X + ((MS) ? document.body.scrollLeft : window.pageXOffset); 1132 MOUSE_PAGEPOS_Y = MOUSE_POS_Y + ((MS) ? document.body.scrollTop : window.pageYOffset); 1133 //alert( "Pos: " + MOUSE_POS_X + " / " + MOUSE_POS_Y); 1134 } catch (e) { 1135 //Fehler ignorieren 1136 } 1137 1138} 1139 1140document.onmousemove = handleMouseMove; 1141 1142 1143function getElementSize(el) { 1144 var r = { x: el.offsetLeft , y: el.offsetTop, w:el.offsetWidth, h:el.offsetHeight }; 1145 1146 while(el.offsetParent != null && el.offsetParent.tagName != "BODY") { 1147 el = el.offsetParent; 1148 r.x += el.offsetLeft; 1149 r.y += el.offsetTop; 1150 } 1151 1152 return r; 1153} 1154 1155 1156function getDim(obj) { 1157 var r = { x: obj.offsetLeft, y: obj.offsetTop, w:obj.offsetWidth, h:obj.offsetHeight }; 1158 while(obj.offsetParent != null && obj.offsetParent.tagName != "BODY") { 1159 obj = obj.offsetParent; 1160 r.x += obj.offsetLeft; 1161 r.y += obj.offsetTop; 1162 } 1163 return r; 1164} 1165 1166function getFormByName(name) { 1167 return document[name]; 1168} 1169 1170 1171//////////////////////////////////////// 1172// OnloadScripts 1173//////////////////////////////////////// 1174var onLoadScriptArray = null; 1175function registerOnLoadScript(sCode){ 1176 if(onLoadScriptArray==null) onLoadScriptArray = new Array(); 1177 onLoadScriptArray[onLoadScriptArray.length] = sCode; 1178} 1179function startOnLoadScripts(){ 1180 if(onLoadScriptArray!=null){ 1181 for(var i = 0; i<onLoadScriptArray.length;i++) eval(onLoadScriptArray[i]); 1182 } 1183} 1184 1185 1186// ------------------------------------------------- 1187// --- openImageWindow ----------------------------- 1188// ------------------------------------------------- 1189// Funktion zum Zoomen von bildern 1190function openImageWindow(nWidth, nHeight, sImgUrl) { 1191 var features = 'width='+(nWidth+25)+', height='+(nHeight+30); 1192 var win = window.open('','',features); 1193 win.document.open(); 1194 win.document.writeln("<html><head><title></title></head><body style='background-color:#fff;'>"); 1195 win.document.writeln("<table height='100%' border='0' cellspacing='0' cellpadding='0' align='center'><tr><td><a href=\"javascript:window.close()\"><img src=\""+sImgUrl+"\" border=\"0\" alt=\"\"></a></td></tr></table>"); 1196 win.document.writeln("</body></html>"); 1197 win.document.close(); 1198} 1199 1200function openWindowAfterBody(nWidth, nHeight, sText) { 1201 var features = 'width='+(nWidth+25)+', height='+(nHeight+30); 1202 var win = window.open('','',features); 1203 win.document.open(); 1204 win.document.writeln("<html><head><title></title></head><body>"); 1205 win.document.writeln(sText); 1206 win.document.writeln("</body></html>"); 1207 win.document.close(); 1208} 1209 1210function HTMLListe (Typ) { 1211 document.write("<" + Typ + "l>"); 1212 for (var i = 1; i < HTMLListe.arguments.length; i++) 1213 document.write("<li>" + HTMLListe.arguments[i] + "</li>"); 1214 document.write("</" + Typ + "l>"); 1215} 1216 1217 1218// ------------------------------------------------------ 1219// --- openImageDiv ------------------------------------- 1220// ------------------------------------------------------ 1221// Funktion zum Zoomen von Bildern mit DIV-Element 1222 1223function openImageDiv(sName, sIMGsrc, nLeft, nTop, nWidth, nHeight){ 1224 width = nWidth; 1225 height = nHeight; 1226 1227 if(!nWidth) nWidth = null; 1228 if(!nHeight) nHeight = null; 1229 1230 var newDIV = getDivElement(sName, nWidth, nHeight); 1231 newDIV.innerHTML = "<img src=\""+sIMGsrc+"\">"; 1232 newDIV.style.left = nLeft; 1233 newDIV.style.top = nTop; 1234 1235 return newDIV; 1236} 1237 1238function closeImageDiv(sName) { 1239 var newDIV = getDivElement(sName); 1240 newDIV.style.left = "-1000"; 1241 newDIV.style.top = "-1000"; 1242 return newDIV; 1243} 1244 1245function openTextDivMousePos(sName, sText){ 1246 var newDiv = openTextDiv(sName, sText, MOUSE_PAGEPOS_X, MOUSE_PAGEPOS_Y); 1247 return newDiv; 1248} 1249 1250function openTextDiv(sName, sText, nLeft, nTop){ 1251 1252 var newDIV = getDivElement(sName, null, null); 1253 newDIV.innerHTML = sText; 1254 newDIV.style.left = nLeft; 1255 newDIV.style.top = nTop; 1256 1257 return newDIV; 1258} 1259 1260function closeTextDiv(sName) { 1261 var newDIV = getDivElement(sName); 1262 newDIV.style.left = "-1000"; 1263 newDIV.style.top = "-1000"; 1264 return newDIV; 1265} 1266 1267// ------------------------------------------------- 1268// --- DIV ----------------------------------------- 1269// ------------------------------------------------- 1270function getDivElement(sName, nWidth, nHeight){ 1271 var objElement = getElem("id",sName,null); 1272 if(objElement!=null) return objElement; 1273 var newDIV = document.createElement("div"); 1274 newDIV.id = sName; 1275 newDIV.style.position="absolute"; 1276 if(nWidth) newDIV.style.width = nWidth; 1277 if(nHeight) newDIV.style.height = nHeight; 1278 newDIV.style.top="-1000"; 1279 newDIV.style.left="-1000"; 1280 document.getElementsByTagName("body")[0].appendChild(newDIV); 1281 return newDIV; 1282} 1283 1284// ------------------------------------------------- 1285// --- Start Editor -------------------------------- 1286// ------------------------------------------------- 1287 1288var objReturn = null; 1289function startEditor(objRet){ 1290 startEditor(true, objRet); 1291} 1292function startEditor(tiny4active, objRet){ 1293 objReturn = objRet; 1294 var url = "/ETMCE/editor.htm"; 1295 if(!tiny4active) url = "/js_css/system/editor/editor.html"; 1296 var win = showIFrameSizeableResize("Editor", url, 970,650); 1297 1298} 1299 1300// get the editor the edit-inputelement 1301function editorGetReturnObj(){ 1302 if(objReturn!=null) 1303 return objReturn; 1304 if(objReturnSimple!=null) 1305 return objReturnSimple; 1306 1307 return null; 1308} 1309 1310 1311 1312/////////////////////////////////////////////////////////////////////// 1313// StyleHelper
1314/////////////////////////////////////////////////////////////////////// 1315 1316function setStyle(name, attr, value) { 1317 var rule = getStyleSheet(name); 1318 if(!rule) return null; 1319 if(typeof value != 'undefined') rule.style[attr] = value; 1320 return rule.style[attr]; 1321} 1322 1323function getStyleSheet(name) { 1324 if(!name || !document.styleSheets) return null; 1325 var i = document.styleSheets.length; 1326 while(i--) { 1327 var rules = (typeof document.styleSheets[i].rules != 'undefined') ? 1328 document.styleSheets[i].rules : // IE 1329 document.styleSheets[i].cssRules; // MZ 1330 var j = rules.length; 1331 while(j--) if(rules[j].selectorText == name) return rules[j]; 1332 } 1333 return null; 1334} 1335 1336// ------------------------------------------------- 1337// --- COOKIE -------------------------------- 1338// ------------------------------------------------- 1339function setCookie(name,value,expires,path,domain,secure) { 1340 var today = new Date(); 1341 // default pr�fen 1342 if(expires==null) 1343 expires = new Date(today.getTime() + (365 * 86400000)); // 1 Jahr in Millis 1344 // cookie zusammenbauen 1345 var cookieString = name + "=" +escape(value) + 1346 ( (expires) ? ";expires=" + expires.toGMTString() : "") + 1347 ( (path) ? ";path=" + path : "") + 1348 ( (domain) ? ";domain=" + domain : "") + 1349 ( (secure) ? ";secure" : ""); 1350 // cookie setzen 1351 document.cookie = cookieString; 1352} 1353 1354function deleteCookie(name,path,domain) { 1355 alert(name); 1356 document.cookie = name+"='222'" + (path?";path="+path:"") + (domain?";domain="+domain:"") + ";expires=Thu, 01-Jan-1970 00:00:01 GMT"; 1357} 1358/* 1359Bitte beachten: Diese Datei (www-raw.js) enthält folgende Dateien. Diese wurden nur hineinkopiert 1360Bei Ãnderungen müssen diese synchron gehalten werden! 1361DANACH (WICHTIG) muss eine komprimierte Version mittels https://javascript-minifier.com/ erstellt werden 1362und als "www-packed.js" eingestellt werden 1363/js_css/system/edit/typecheck.js 1364/js_css/system/edit/changecheck.js 1365/js_css/system/dhtml.js 1366/js_css/system/global.js 1367/js_css/system/js_alertpopup.js 1368/js_css/system/calendar_2/calender_show.js 1369/js_css/system/edit/iframecode.js 1370 */ 1371 1372var initDialogDone = false; 1373function pageWidth() { 1374 return window.innerWidth != null ? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null; 1375} 1376 1377function pageHeight() { 1378 return window.innerHeight != null ? window.innerHeight : document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body != null ? document.body.clientHeight : null; 1379} 1380 1381function posLeft() { 1382 return typeof window.pageXOffset != 'undefined' ? window.pageXOffset : document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ? document.body.scrollLeft : 0; 1383} 1384 1385function posTop() { 1386 return typeof window.pageYOffset != 'undefined' ? window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ? document.body.scrollTop : 0; 1387} 1388 1389function scrollFix() { 1390 var divOverlayDialog = document.getElementById('overlayDialog'); 1391 divOverlayDialog.style.top = posTop() + 'px'; 1392 divOverlayDialog.style.left = posLeft() + 'px'; 1393} 1394 1395function sizeFix() { 1396 var divOverlayDialog = document.getElementById('overlayDialog'); 1397 divOverlayDialog.style.height = pageHeight() + 'px'; 1398 divOverlayDialog.style.width = pageWidth() + 'px'; 1399} 1400function scrollFixOwnLayout() { 1401 var divOverlayDialog = document.getElementById('overlayDialogOwnLayout'); 1402 divOverlayDialog.style.top = posTop() + 'px'; 1403 divOverlayDialog.style.left = posLeft() + 'px'; 1404} 1405 1406function sizeFixOwnLayout() { 1407 var divOverlayDialog = document.getElementById('overlayDialogOwnLayout'); 1408 divOverlayDialog.style.height = pageHeight() + 'px'; 1409 divOverlayDialog.style.width = pageWidth() + 'px'; 1410} 1411 1412function fixObjects(vis) { 1413 obj = document.getElementsByTagName('select'); 1414 for (i = 0; i < obj.length; i++) 1415 obj[i].style.visibility = vis; 1416 1417 obj = document.getElementsByTagName('iframe'); 1418 for (i = 0; i < obj.length; i++) 1419 obj[i].style.visibility = vis; 1420 1421 obj = document.getElementsByTagName('object'); 1422 for (i = 0; i < obj.length; i++) 1423 obj[i].style.visibility = vis; 1424} 1425 1426function showModalAlertByID(textID, wd, ht) { 1427 var text = document.getElementById(textID).innerHTML; 1428 showModalAlert(text, wd, ht); 1429} 1430function showModalAlert(spanDialogText, wd, ht) { 1431 var b = 'block'; 1432 var p = 'px'; 1433 1434 fixObjects('hidden'); 1435 var divOverlayDialog = document.getElementById('overlayDialog'); 1436 document.getElementById('dialogText').innerHTML = spanDialogText + '<br>'; 1437 divOverlayDialog.style.height = pageHeight() + p; 1438 divOverlayDialog.style.width = pageWidth() + p; 1439 divOverlayDialog.style.top = posTop() + p; 1440 divOverlayDialog.style.left = posLeft() + p; 1441 divOverlayDialog.style.display = b; 1442 1443 var tp = ((pageHeight() - ht) / 2) + posTop() - 12; 1444 var lt = ((pageWidth() - wd) / 2) + posLeft() - 12; 1445 1446 var divModalDialog = document.getElementById('modalDialog'); 1447 divModalDialog.style.top = (tp < 0 ? 0 : tp) + p; 1448 divModalDialog.style.left = (lt < 0 ? 0 : lt) + p; 1449 divModalDialog.style.width = wd + p; 1450 divModalDialog.style.height = ht + p; 1451 divModalDialog.style.display = b; 1452 1453 var divDialogContent = document.getElementById('dialogContent'); 1454 divDialogContent.style.width = (wd - 10) + p; 1455 divDialogContent.style.height = (ht - 20) + p; 1456 divDialogContent.style.overflow = 'auto'; 1457 1458 if (document.getElementById('btnDialogCancel') == null) { 1459 var btnOk = document.getElementById('btnDialogOK'); 1460 btnOk.style.left = ((wd / 2) - 20) + p; 1461 } 1462 1463 return false;
1464} 1465 1466function showModalAlertOwnLayout() { 1467 var b = 'block'; 1468 var p = 'px'; 1469 1470 fixObjects('hidden'); 1471 var divOverlayDialog = document.getElementById('overlayDialogOwnLayout'); 1472 divOverlayDialog.style.height = pageHeight() + p; 1473 divOverlayDialog.style.width = pageWidth() + p; 1474 divOverlayDialog.style.top = posTop() + p; 1475 divOverlayDialog.style.left = posLeft() + p; 1476 divOverlayDialog.style.display = b; 1477 1478 var tp = ((pageHeight()) / 2) + posTop() - 12; 1479 var lt = ((pageWidth()) / 2) + posLeft() - 12; 1480 1481 var divModalDialog = document.getElementById('modalDialogOwnLayout'); 1482 divModalDialog.style.top = (tp < 0 ? 0 : tp) + p; 1483 divModalDialog.style.left = (lt < 0 ? 0 : lt) + p; 1484 divModalDialog.style.display = b; 1485 1486 return false; 1487} 1488 1489function initModalDialog() { 1490 if (initDialogDone) 1491 return; 1492 1493 var ab = 'absolute'; 1494 var n = 'none'; 1495 var v = 'visible' 1496 1497 // div erzeugen und an Body hängen 1498 var obody = document.getElementsByTagName('body')[0]; 1499 var divOverlayDialog = document.createElement('div'); 1500 1501 divOverlayDialog.id = 'overlayDialog'; 1502 divOverlayDialog.style.display = n; 1503 divOverlayDialog.style.position = ab; 1504 divOverlayDialog.style.top = 0; 1505 divOverlayDialog.style.left = 0; 1506 divOverlayDialog.style.zIndex = 998; 1507 divOverlayDialog.style.width = '100%'; 1508 // Overlay an Body anhängen 1509 obody.appendChild(divOverlayDialog); 1510 1511 // Dialogfenster erzeugen - span für Text + "OK-Button" 1512 var divModalDialog = document.createElement('div'); 1513 divModalDialog.id = 'modalDialog'; 1514 divModalDialog.style.display = n; 1515 divModalDialog.style.position = ab; 1516 divModalDialog.style.zIndex = 999; 1517 1518 // Div für Text + Button 1519 var divDialogContent = document.createElement('div'); 1520 divDialogContent.id = 'dialogContent'; 1521 // Text 1522 var spanDialogText = document.createElement('span'); 1523 spanDialogText.id = 'dialogText'; 1524 divDialogContent.appendChild(spanDialogText); 1525 1526 // OK Button 1527 var btnOk = document.createElement('button'); 1528 btnOk.innerHTML = '<strong>OK</strong>'; 1529 btnOk.id = 'btnDialogOK'; 1530 btnOk.style.position = 'absolute'; 1531 btnOk.style.bottom = '10px'; 1532 btnOk.style.width = '50px'; 1533 btnOk.style.backgroundColor = '#666666'; 1534 btnOk.style.color = '#FFFFFF'; 1535 btnOk.style.border = '0 none'; 1536 btnOk.addEventListener("click", function () { 1537 hideDialog(this); 1538 }); 1539 1540 divDialogContent.appendChild(btnOk); 1541 divModalDialog.appendChild(divDialogContent); 1542 1543 // Dialog an Body anhängen 1544 obody.appendChild(divModalDialog); 1545 1546 window.onscroll = scrollFix; 1547 window.onresize = sizeFix; 1548 initDialogDone = true; 1549} 1550 1551function initModalDialogOwnLayout() { 1552 var ab = 'absolute'; 1553 var n = 'none'; 1554 1555 // div erzeugen und an Body hängen 1556 var obody = document.getElementsByTagName('body')[0]; 1557 var divOverlayDialog = document.createElement('div'); 1558 1559 divOverlayDialog.id = 'overlayDialogOwnLayout'; 1560 divOverlayDialog.style.display = n; 1561 divOverlayDialog.style.position = ab; 1562 divOverlayDialog.style.top = 0; 1563 divOverlayDialog.style.left = 0; 1564 divOverlayDialog.style.zIndex = 998; 1565 divOverlayDialog.style.width = '100%'; 1566 // Overlay an Body anhängen 1567 obody.appendChild(divOverlayDialog); 1568 1569 // Dialogfenster erzeugen 1570 var divModalDialog = document.createElement('div'); 1571 divModalDialog.id = 'modalDialogOwnLayout'; 1572 divModalDialog.style.display = n; 1573 divModalDialog.style.position = ab; 1574 divModalDialog.style.zIndex = 999; 1575 1576 // Dialog an Body anhängen 1577 obody.appendChild(divModalDialog); 1578 1579 window.onscroll = scrollFixOwnLayout; 1580 window.onresize = sizeFixOwnLayout; 1581} 1582 1583function hideDialog(el) { 1584 fixObjects('visible'); 1585 document.getElementById('overlayDialog').style.display = 'none'; 1586 el.parentNode.parentNode.style.display = 'none'; 1587} 1588 1589function hideDialogOwnLayout() { 1590 fixObjects('visible'); 1591 document.getElementById('modalDialogOwnLayout').style.display = 'none'; 1592 document.getElementById('overlayDialogOwnLayout').style.display = 'none'; 1593} 1594 1595/** 1596 * fügt einen Abbruch Button hinzu und modifiziert den onclick Handler des Ok Buttons 1597 * bei hinzufügen eines Cancel Buttons, wird die Breite des Dialoges automatisch gesetzt 1598 * 1599 * @param options btnCancel.onclick eigene Funktion, welche als Callback übergeben werden kann 1600 **/ 1601function addDialogCancelButton(options) { 1602 if (document.getElementById('btnDialogCancel') == null) { 1603 var divModalDialog = document.getElementById('modalDialog'); 1604 divModalDialog.style.width = "370px"; // setzen der Breite wegen Optischer Erscheinung der Buttons 1605 1606 var divDialogContent = document.getElementById('dialogContent'); 1607 divModalDialog.style.width = "360px"; // setzen der Breite wegen Optischer Erscheinung der Buttons 1608 1609 // hinzufügen des Cancel Buttons 1610 var btnCancel = document.createElement('button'); 1611 btnCancel.innerHTML = '<strong>Abbrechen</strong>'; 1612 btnCancel.id = 'btnDialogCancel';
1613 btnCancel.style.position = 'absolute'; 1614 btnCancel.style.bottom = '10px'; 1615 btnCancel.style.right = '10px'; 1616 btnCancel.style.width = '100px'; 1617 btnCancel.style.backgroundColor = '#666666'; 1618 btnCancel.style.color = '#FFFFFF'; 1619 btnCancel.style.border = '0 none'; 1620 btnCancel.addEventListener("click", function () { 1621 hideDialog(this); 1622 }); 1623 divDialogContent.appendChild(btnCancel); 1624 1625 1626 // modifizieren des vorhandenen Ok Buttons 1627 var btnOk = document.getElementById('btnDialogOK'); 1628 btnOk.innerHTML = '<strong>Anfrage jetzt absenden</strong>'; 1629 btnOk.style.left = '10px'; 1630 btnOk.style.width = '250px'; 1631 btnOk.addEventListener("click", function() { 1632 hideDialog(this); 1633 if (options.btnOk != undefined && options.btnOk != null && options.btnOk.onclick) { 1634 options.btnOk.onclick(); 1635 } 1636 }); 1637 } 1638} 1639 1640/* 1641Bitte beachten: Diese Datei (www-raw.js) enthält folgende Dateien. Diese wurden nur hineinkopiert 1642Bei Ãnderungen müssen diese synchron gehalten werden! 1643DANACH (WICHTIG) muss eine komprimierte Version mittels https://javascript-minifier.com/ erstellt werden 1644und als "www-packed.js" eingestellt werden 1645/js_css/system/edit/typecheck.js 1646/js_css/system/edit/changecheck.js 1647/js_css/system/dhtml.js 1648/js_css/system/global.js 1649/js_css/system/js_alertpopup.js 1650/js_css/system/calendar_2/calender_show.js 1651/js_css/system/edit/iframecode.js 1652 */ 1653var winCalender = null; 1654var objInputCalender = null; 1655var sTypeCal = null; 1656var Locale = ""; 1657 1658function showCalendarDateTime(objInput2) { showCalendar (objInput2, 'datetime'); } 1659function showCalendarDate (objInput2, sLocale) { showCalendar (objInput2, 'date', sLocale ); } 1660function showCalendarTime (objInput2) { showCalendar (objInput2, 'time' ); } 1661 1662function showCalendar (objInput2, sTypeTemp, sLocale){ 1663 1664 if (objInput2.ET_EDITABLE == false) 1665 return null; 1666 1667 sTypeCal = sTypeTemp; 1668 objInputCalender = objInput2; 1669 winCalender = showIFrameSizeable('Kalender_Fenster','/js_css/system/calendar_2/Calendar.html',408,260, sLocale); 1670} 1671 1672 1673function onLoadCalenderWindow(sLocale){ 1674 winCalender.tsPicker.setInputField(objInputCalender); 1675 winCalender.tsPicker.show(sTypeCal, sLocale); 1676} 1677 1678function setCalenderReturnValue(sCalValue){ 1679 if(objInputCalender!=null) { 1680 objInputCalender.value = sCalValue; 1681 onChangeCheckSite(objInputCalender); 1682 } 1683} 1684 1685/* 1686Bitte beachten: Diese Datei (www-raw.js) enthält folgende Dateien. Diese wurden nur hineinkopiert 1687Bei Ãnderungen müssen diese synchron gehalten werden! 1688DANACH (WICHTIG) muss eine komprimierte Version mittels https://javascript-minifier.com/ erstellt werden 1689und als "www-packed.js" eingestellt werden 1690/js_css/system/edit/typecheck.js 1691/js_css/system/edit/changecheck.js 1692/js_css/system/dhtml.js 1693/js_css/system/global.js 1694/js_css/system/js_alertpopup.js 1695/js_css/system/calendar_2/calender_show.js 1696/js_css/system/edit/iframecode.js 1697 */ 1698 1699var morWin; 1700var objInterval; 1701var isWindowLock=false; 1702var Locale = ""; 1703 1704function isWindowOnLock(){ 1705 return isWindowLock; 1706} 1707 1708function eventOnFocus(){ 1709 if(isWindowLock) onLockWindowClick(); 1710} 1711 1712function showFrameSizeableNotLocked(sName,sLocation,nWidth,nHeight){ 1713 var posX = (screen.width/2)-(nWidth/2); 1714 var posY = (screen.height/2)-(nHeight/2); 1715 morWin = window.open(sLocation,sName,'screenX='+posX+',screenY='+posY+',top='+posY+',left='+posX+',width='+nWidth+',height='+nHeight+',menubar=no,status=yes,resizable=yes,scrollbars=yes'); 1716 morWin.focus(); 1717 return morWin; 1718} 1719 1720function showIFrameSizeableNotLocked(sName,sLocation,nWidth,nHeight){ 1721 var posX = (screen.width/2)-(nWidth/2); 1722 var posY = (screen.height/2)-(nHeight/2); 1723 morWin = window.open(sLocation,sName,'screenX='+posX+',screenY='+posY+',top='+posY+',left='+posX+',width='+nWidth+',height='+nHeight+',resizable=no,scrollbars=no,menubar=no,status=yes'); 1724 morWin.focus(); 1725 return morWin; 1726} 1727 1728function showIFrameSizeableResize(sName,sLocation,nWidth,nHeight){ 1729 var posX = (screen.width/2)-(nWidth/2); 1730 var posY = (screen.height/2)-(nHeight/2); 1731 morWin = window.open(sLocation,sName,'screenX='+posX+',screenY='+posY+',top='+posY+',left='+posX+',width='+nWidth+',height='+nHeight+',resizable=yes,scrollbars=no,menubar=no,status=yes'); 1732 morWin.focus(); 1733 lockWindow(); 1734 objInterval = window.setInterval('checkWin()',400); 1735 return morWin; 1736} 1737 1738 1739function showIFrameSizeable(sName,sLocation,nWidth,nHeight,sLocale){ 1740 if (sLocale==null) 1741 sLocale="de_DE"; 1742 Locale = sLocale; 1743 var posX = (screen.width/2)-(nWidth/2); 1744 var posY = (screen.height/2)-(nHeight/2); 1745 morWin = window.open(sLocation,sName,'screenX='+posX+',screenY='+posY+',top='+posY+',left='+posX+',width='+nWidth+',height='+nHeight+',resizable=no,scrollbars=no,menubar=no,status=yes'); 1746 morWin.focus(); 1747 lockWindow(); 1748 objInterval = window.setInterval('checkWin()',400); 1749 return morWin; 1750} 1751 1752function showIFrame(sName,sLocation){ 1753 var posX = (screen.width/2)-(610/2); 1754 var posY = (screen.height/2)-(630/2); 1755 morWin = window.open(sLocation,sName,'screenX='+posX+',screenY='+posY+',top='+posY+',left='+posX+',width=610,height=630,resizable=no,scrollbars=no,menubar=no,status=yes'); 1756 morWin.focus(); 1757 lockWindow(); 1758 objInterval = window.setInterval('checkWin()',400); 1759 return morWin; 1760} 1761 1762function showIFrameScrollbar(sName,sLocation){ 1763 var posX = (screen.width/2)-(860/2); 1764 var posY = (screen.height/2)-(670/2); 1765 morWin = window.open(sLocation,sName,'screenX='+posX+',screenY='+posY+',top='+posY+',left='+posX+',width=860,height=670,resizable=yes,scrollbars=yes,menubar=no,status=yes'); 1766 morWin.focus(); 1767 lockWindow(); 1768 objInterval = window.setInterval('checkWin()',400); 1769 return morWin; 1770} 1771 1772function showIFrameConfirmDialog(sName,sLocation){ 1773 var posX = (screen.width/2)-(350/2); 1774 var posY = (screen.height/2)-(160/2); 1775 morWin = window.open(sLocation,sName,'screenX='+posX+',screenY='+posY+',top='+posY+',left='+posX+',width=350,height=130,resizable=no,scrollbars=no,menubar=no,status=yes'); 1776 morWin.focus(); 1777 lockWindow(); 1778 objInterval = window.setInterval('checkWin()',400); 1779} 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789function lockAndCheckWindow(win){ 1790 morWin = win; 1791 lockWindow(); 1792 objInterval = window.setInterval('checkWin()',400); 1793} 1794 1795 1796function checkWin(){ 1797 try { 1798 if(morWin.closed){ 1799 closeIFrame(); 1800 window.clearInterval(objInterval); 1801 window.focus(); 1802 if(window.reloadWindow) 1803 reloadWindow(); 1804 isWindowLock=false; 1805 } 1806 } catch (E) {} 1807} 1808 1809 1810 1811/*function checkWinDialog(){ 1812 if(morWin.closed){ 1813 closeIFrame(); 1814 window.clearInterval(objInterval); 1815 alert("OK"); 1816 1817 window.focus(); 1818 isWindowLock=false; 1819 } 1820} 1821*/ 1822 1823function morphingIFrameToMessageBox(){ 1824 setIFrameSize( 500, 300); 1825} 1826
1827////////////////////////////////////////////////// 1828// Style Setzen 1829////////////////////////////////////////////////// 1830function setIFrameSize( nWidth, nHeight){ 1831 setStyleSize("IFrameHeader", nWidth+12, 30 ); 1832 setStyleSize("IFrameFooter", nWidth+12, 6 ); 1833 setStyleSize("IFrameLeft" , 6 , nHeight ); 1834 setStyleSize("IFrameRight" , 6 , nHeight ); 1835 setStyleSize("IFrameContent" , nWidth , nHeight ); 1836} 1837 1838function setStyleSize(sName, nWidth, nHeight){ 1839 var objElement = getElem('id',sName,0); 1840 objElement.style.width = nWidth +"px"; 1841 objElement.style.height = nHeight+"px"; 1842} 1843 1844function lockWindow(){ 1845 var elemObj = showDiv("iFrameAC"); 1846 document.onmouseover= returnFalse; 1847 document.onmouseout = returnFalse; 1848 //document.onclick = onLockWindowClick; 1849 elemObj.innerHTML = '<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%" onClick="onLockWindowClick()" onContextmenu="onLockWindowClick();"><tr><td> </td></tr></table>'; 1850 isWindowLock=true; 1851} 1852 1853function unlockWindow(){ 1854 isWindowLock=false; 1855 removeObject("iFrameAC"); 1856} 1857 1858 1859/////////////////////////////////////////////////////////////////////////////////////////////// 1860// Eventhelper 1861function returnFalse(){ return false; } 1862function returnTrue (){ return true; } 1863 1864function onLockWindowClick(){ 1865 try { 1866 if(!morWin.closed) { 1867 morWin.focus(); 1868 if(morWin.isWindowLock) morWin.onLockWindowClick(); 1869 } 1870 return false; 1871 } catch (E) {} 1872 1873} 1874 1875/////////////////////////////////////////////////////////////////////////////////////////////// 1876// IFrame schliessen 1877function closeIFrame(){ 1878 //document.onclick = returnTrue; 1879 document.onmouseover = returnTrue; 1880 document.onmouseout = returnTrue; 1881 removeObject("iFrameAC"); 1882} 1883 1884function showDiv(sName){ 1885 var objElement = geIFrameWindowElement(sName); 1886 return objElement; 1887} 1888 1889function removeObject(sName){ 1890 var objElement = getElem("id",sName,null); 1891 if(objElement==null) return; 1892 objElement.style.top="-10000px"; 1893 document.getElementsByTagName("body")[0].removeChild(objElement); 1894 1895} 1896 1897function geIFrameWindowElement(sName){ 1898 try { 1899 var objElement = getElem("id",sName,null); 1900 if(objElement==null) { 1901 createDiv(sName); 1902 objElement = getElem("id",sName,null); 1903 } 1904 return objElement; 1905 } catch(E){} 1906} 1907 1908function createDiv(sName){ 1909 var newDIV = document.createElement("div"); 1910 newDIV.id = sName; 1911 newDIV.style.position="absolute"; 1912 newDIV.style.zIndex="50000"; 1913 newDIV.style.border="0px #000000 solid"; 1914 newDIV.style.width ="100%"; 1915 newDIV.style.height="100%"; 1916 newDIV.style.top ="0px"; 1917 newDIV.style.left="0px"; 1918 newDIV.align="center"; 1919 newDIV.valign="middle"; 1920 document.getElementsByTagName("body")[0].appendChild(newDIV); 1921}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.