// ------------------------------------------- // --- Definieren der JavaScript Funktionen // --- // --- Aufruf erfolgt von allen ASP-Seiten // --- Erstellt am: 04.01.2002 von SFW (SF) // ------------------------------------------- // --- Letzte Änderung am: // --- Letzte Änderung von: // --- Grund: // ------------------------------------------- // --- Bedingungen zur Ausführung // --- Keine // ------------------------------------------- // check browser and version. Used to determine if the // browser handles new access methods var brwNS4 = ( navigator.appName.indexOf( "Netscape" ) >= 0 && parseFloat( navigator.appVersion ) >= 4 ) ? 1 : 0; var brwNS6 = ( brwNS4 && document.getElementById ) ? 1 : 0; var brwIE4 = ( document.all ) ? 1 : 0; var brwIE5 = ( brwIE4 && navigator.appVersion.indexOf( "5." ) >= 0 ) ? 1 : 0; var brwIE6 = ( brwIE4 && navigator.appVersion.indexOf( "6." ) >= 0 ) ? 1 : 0; // set variable if the client use an newer browser if( brwNS6 || brwIE4 || brwIE5 || brwIE6 ) { var blnUseByElement = true; } else { var blnUseByElement = false; } var wndExplorer; // ---------------------------------------------------------------------------- function frmDeleteForm(frm_id, frm_key, frm_param) { // ------------------------------------------------------------------------ // --- Description: // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- strFormName : string : // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ var xDelete = confirm("Möchten Sie das Formular: " + frm_key + " (ID: " + frm_id + ") wirklich löschen?"); if(xDelete) { self.location.href = frm_param; } //alert(); } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- function frmDeleteEmail(email_id, email_address, email_param) { // ------------------------------------------------------------------------ // --- Description: // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- strFormName : string : // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ var xDelete = confirm("Möchten Sie die Emailadresse: " + email_address + " (ID: " + email_id + ") wirklich löschen?"); if(xDelete) { self.location.href = email_param; } //alert(); } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- function gbDeleteGuestbookEntry(gb_id, gb_name, gb_param) { // ------------------------------------------------------------------------ // --- Description: // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- strFormName : string : // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ var xDelete = confirm("Möchten Sie den Eintrag von: " + gb_name + " (ID: " + gb_id + ") wirklich löschen?"); if(xDelete) { self.location.href = gb_param; } } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- function nlDeleteNewsletter(nl_id, nl_name, nl_param) { // ------------------------------------------------------------------------ // --- Description: // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- strFormName : string : // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ var xDelete = confirm("Möchten Sie den Newsletter: " + nl_name + " (ID: " + nl_id + ") wirklich löschen?"); if(xDelete) { self.location.href = nl_param; } } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- function nlDeleteEnduser(eu_id, eu_name, eu_param) { // ------------------------------------------------------------------------ // --- Description: // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- strFormName : string : // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ var xDelete = confirm("Möchten Sie den Enduser: " + eu_name + " (ID: " + eu_id + ") wirklich löschen?"); if(xDelete) { self.location.href = eu_param; } //alert(); } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- function ntDeleteNewsticker(nt_id, nt_name, nt_param) { // ------------------------------------------------------------------------ // --- Description: // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- strFormName : string : // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ var xDelete = confirm("Möchten Sie den Newsticker: " + nt_name + " (ID: " + nt_id + ") wirklich löschen?"); if(xDelete) { self.location.href = nt_param; } } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- function newsDeleteNews(news_id, news_name, news_param) { // ------------------------------------------------------------------------ // --- Description: // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- strFormName : string : // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ var xDelete = confirm("Möchten Sie den Newseintrag: " + news_name + " (ID: " + news_id + ") wirklich löschen?"); if(xDelete) { self.location.href = news_param; } } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- function ttDeleteTroubleticket(tt_id, tt_name, tt_param) { // ------------------------------------------------------------------------ // --- Description: // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- strFormName : string : // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ var xDelete = confirm("Möchten Sie das Troubleticket: " + tt_name + " (ID: " + tt_id + ") wirklich löschen?"); if(xDelete) { self.location.href = tt_param; } } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- function maDeleteMandant(ma_id, ma_name, ma_param) { // ------------------------------------------------------------------------ // --- Description: // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- strFormName : string : // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ var xDelete = confirm("Möchten Sie den Mandanten: " + ma_name + " (ID: " + ma_id + ") wirklich löschen?"); if(xDelete) { self.location.href = ma_param; } } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- function pcDeletePostcardImage(pci_image, pci_param) { // ------------------------------------------------------------------------ // --- Description: // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- strFormName : string : // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ var xDelete = confirm("Möchten Sie das Bild: " + pci_image + " wirklich aus der Bilderserie entfernen?"); if(xDelete) { self.location.href = pci_param; } } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- function nlDeleteNewsletterCategory( nlc_id, nlc_name, nlc_param ) { // ------------------------------------------------------------------------ // --- Description: // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- strFormName : string : // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ var xDelete = confirm("Möchten Sie die Newsletterkategorie: " + nlc_name + " (ID: " + nlc_id + ") wirklich löschen?"); if(xDelete) { self.location.href = nlc_param; } } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- var datEnd = new Date(); var dblSecondsEnd = Math.round( datEnd.getTime() / 1000 ) + 5400; function showTime( strText, strEndText ) { // ------------------------------------------------------------------------ // --- Description: // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- strFormName : string : // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ var datNow = new Date(); var dblSecondsNow = Math.round( datNow.getTime() / 1000 ); var intSeconds = dblSecondsEnd - dblSecondsNow; var intMinutes = Math.floor( intSeconds / 60 ); var intSeconds = intSeconds % 60; if( intMinutes > 0 || intSeconds > 0 ) { var strMinutes = ( (intMinutes < 10 ) ? "0" + intMinutes : intMinutes ); var strSeconds = ( (intSeconds < 10 ) ? "0" + intSeconds : intSeconds ); var strTime = strText + ": " + strMinutes + ":" + strSeconds; } else { var strTime = strEndText; } if(DHTML) { if(NS) { setCont("id","divTime",null,"" + strTime + "<\/span>"); } else { setCont("id","divTime",null,strTime); } } else { return; } window.setTimeout("showTime('" + strText + "','" + strEndText + "')",1000); } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- function ShowSiMapWindow( MapImage, ZoomFactor, Width, Height ) // ------------------------------------------------------------------------ // --- Description: // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- Url : String : url to open // --- Width : Integer : window width // --- Height : Integer : window height // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ { var LeftPosition = (screen.width / 2) - (Width / 2); var TopPosition = (screen.height / 2) - (Height / 2); var PosX = document.getElementById( 'ObjectPosX' ).value; var PosY = document.getElementById( 'ObjectPosY' ).value; var WindowObject = window.open( 'Shared/SiMapWindow.asp?MapImage=' + MapImage + '&ZoomFactor=' + ZoomFactor + '&PosX=' + PosX + '&PosY=' + PosY,'','left=' + LeftPosition + ',top=' + TopPosition + ',width=' + Width + ',height=' + Height + ',channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,toolbar=0,status=0,scrollbars=yes,border=no'); } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- function ShowExplorerWindow( strFormName, strFieldName, intLanguage ) { // ------------------------------------------------------------------------ // --- Description: Show a popup with the file explorer // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- strFormName : string : Form name // --- strFieldName : string : Field name // --- intLanguage : integer : Language // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ // set variables for window opening var strWindowURL = "explorer/index.asp"; var intShowScrollbar = 0; //var intWindowWidth = 750; //var intWindowHeight = 550; var intWindowWidth = screen.width - 80; var intWindowHeight = screen.height - 150; var intPosLeft = ( screen.width / 2 ) - intWindowWidth / 2; var intPosTop = ( screen.height / 2 ) - intWindowHeight / 2 - 50; wndExplorer = window.open( strWindowURL + '?EIS=False&EFID=' + strFieldName + '&LG=' + intLanguage,"none",'resizeable=no,scrollbars=yes,width=' + intWindowWidth + ',height=' + intWindowHeight + ',titlebar=no,screenX=' + intPosLeft + ',screenY=' + intPosTop + ',left=' + intPosLeft + ',top=' + intPosTop ); } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- function ShowExplorerWindowEditor( strFormName, strFieldName, intLanguage ) { // ------------------------------------------------------------------------ // --- Description: Show a popup with the file explorer // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- strFormName : string : Form name // --- strFieldName : string : Field name // --- intLanguage : integer : Language // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ // set variables for window opening var strWindowURL = "../explorer/index.asp"; var intShowScrollbar = 0; //var intWindowWidth = 750; //var intWindowHeight = 550; var intWindowWidth = screen.width - 80; var intWindowHeight = screen.height - 150; var intPosLeft = ( screen.width / 2 ) - intWindowWidth / 2; var intPosTop = ( screen.height / 2 ) - intWindowHeight / 2 - 50; wndExplorer = window.open( strWindowURL + '?Editor=True&EFID=' + strFieldName + '&LG=' + intLanguage,"none",'resizeable=no,scrollbars=yes,width=' + intWindowWidth + ',height=' + intWindowHeight + ',titlebar=no,screenX=' + intPosLeft + ',screenY=' + intPosTop + ',left=' + intPosLeft + ',top=' + intPosTop ); } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- function ShowExplorerWindow2( strFormName, strFieldName, intLanguage, strURL ) { // ------------------------------------------------------------------------ // --- Description: Show a popup with the file explorer // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- strFormName : string : Form name // --- strFieldName : string : Field name // --- intLanguage : integer : Language // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ // set variables for window opening var strWindowURL = "explorer/index.asp"; if( strURL != "" && strURL != null ) { strWindowURL = strURL; } var intShowScrollbar = 0; //var intWindowWidth = 750; //var intWindowHeight = 550; var intWindowWidth = screen.width - 80; var intWindowHeight = screen.height - 150; var intPosLeft = ( screen.width / 2 ) - intWindowWidth / 2; var intPosTop = ( screen.height / 2 ) - intWindowHeight / 2 - 25; wndExplorer = window.open( strWindowURL + '?EFID=' + strFieldName + '&LG=' + intLanguage,"none",'resizeable=no,scrollbars=yes,width=' + intWindowWidth + ',height=' + intWindowHeight + ',titlebar=no,screenX=' + intPosLeft + ',screenY=' + intPosTop + ',left=' + intPosLeft + ',top=' + intPosTop ); } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- function ShowExplorerWindow3( strFieldName, intLanguage ) { // ------------------------------------------------------------------------ // --- Description: Show a popup with the file explorer // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- strFormName : string : Form name // --- strFieldName : string : Field name // --- intLanguage : integer : Language // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ // set variables for window opening var strWindowURL = "explorer/index.asp"; var intShowScrollbar = 0; //var intWindowWidth = 750; //var intWindowHeight = 550; var intWindowWidth = screen.width - 80; var intWindowHeight = screen.height - 150; var intPosLeft = ( screen.width / 2 ) - intWindowWidth / 2; var intPosTop = ( screen.height / 2 ) - intWindowHeight / 2 - 25; wndExplorer = window.open( strWindowURL + '?Editor=True&EFID=' + strFieldName + '&LG=' + intLanguage, '', 'resizeable=no,scrollbars=yes,width=' + intWindowWidth + ',height=' + intWindowHeight + ',titlebar=no,screenX=' + intPosLeft + ',screenY=' + intPosTop + ',left=' + intPosLeft + ',top=' + intPosTop ); } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- function SetFieldValue( strFieldId, strValue ) { // ------------------------------------------------------------------------ // --- Description: Set specified value from popup window // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- strFieldId : string : name of the form field // --- strValue : string : new field value // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ //alert( strFieldId ); //alert( strValue ); document.getElementById( strFieldId ).value = strValue; } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- function ShowImage( strImage ) { // ------------------------------------------------------------------------ // --- Description: Show a popup with the file explorer // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- strImage : string : Image Path // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ // set variables for window opening var strWindowURL = "image.asp"; var intShowScrollbar = 0; var intWindowWidth = 550; var intWindowHeight = 400; var intPosLeft = ( screen.width / 2 ) - intWindowWidth / 2; var intPosTop = ( screen.height / 2 ) - intWindowHeight / 2 - 25; var wndImage = window.open( strWindowURL + "?IMG=" + strImage,"none",'resizeable=no,scrollbars=yes,width=' + intWindowWidth + ',height=' + intWindowHeight + ',titlebar=no,screenX=' + intPosLeft + ',screenY=' + intPosTop + ',left=' + intPosLeft + ',top=' + intPosTop ); } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- function SetAllImportCheckboxes( StateBox ) { // ------------------------------------------------------------------------ // --- Description: Checks/unchecks all checkboxes // ------------------------------------------------------------------------ // --- Parametername : Datatype : Use // ------------------------------------------------------------------------ // --- StateBox : Checkbox : Checkbox object which indicates whether check or uncheck all other checkboxes // ------------------------------------------------------------------------ // --- Return : -nothing- // ------------------------------------------------------------------------ // check / uncheck all checkboxes var colCheckboxes = document.getElementsByName("chkFimex_import_reask"); var strNewState = StateBox.checked?"aktiviert":"deaktivert"; for (var i=0;i