//Kirchensoft Java Script Functions //Date created: 25-OCT-2008 //Scripter: Kirchensoft Winzeler Franz Winzeler //Kirchensoft Backend Scripts function Admin_StartCKEditor() { CKEDITOR.replace ( 'strInhalt', { filebrowserBrowseUrl : '../CKEditor/ckfinder/ckfinder.html', filebrowserWindowWidth : '1000', filebrowserWindowHeight : '700', customConfig : '../CKEditor/Winiva_config_Admin.js', height: 500, toolbar: 'Winiva' } ); } function Admin_StartCKEditor_Home() { CKEDITOR.replace ( 'strInhalt', { filebrowserBrowseUrl : '../CKEditor/ckfinder/ckfinder.html', filebrowserWindowWidth : '1000', filebrowserWindowHeight : '700', customConfig : '../CKEditor/Winiva_config_Admin.js', height: 500, toolbar: 'Winiva_Home' } ); } function StartCKEditor() { CKEDITOR.replace ( 'strInhalt', { filebrowserBrowseUrl : '../CKEditor/ckfinder/ckfinder.html', filebrowserWindowWidth : '1000', filebrowserWindowHeight : '700', customConfig : '../CKEditor/Winiva_config.js', height: 500, toolbar: 'Winiva' } ); } function StartCKEditor_Home() { CKEDITOR.replace ( 'strInhalt', { filebrowserBrowseUrl : '../CKEditor/ckfinder/ckfinder.html', filebrowserWindowWidth : '1000', filebrowserWindowHeight : '700', customConfig : '../CKEditor/Winiva_config.js', height: 500, toolbar: 'Winiva_Home' } ); } function VerifyPublishing(ReqPublish, msg) { if (confirm(msg)==true) { if (ReqPublish == "Publish") { document.getElementById("SelOption").value="ProcessBtn" document.getElementById("ProcessBtn").value="Publish" } else { document.getElementById("SelOption").value="ProcessBtn" document.getElementById("ProcessBtn").value="PublishAll" } document.getElementById("SteeringForm").submit() } else { document.getElementById("SelOption").value="ProcessBtn" document.getElementById("ProcessBtn").value="CancelPublish" document.getElementById("SteeringForm").submit() } } function TryToGoHome(bLogoutInd, msg) { var strSelOption var bConfirmMsg bConfirmMsg=confirm(msg) if (bConfirmMsg==true && bLogoutInd==true) { strSelOption="LogoutConfirm" } else if (bConfirmMsg==true && bLogoutInd==false) { strSelOption="HomeConfirm" } else if (bConfirmMsg==false && bLogoutInd==true) { strSelOption="LogoutCancel" } else { strSelOption="HomeCancel" } document.getElementById("ProcessBtn").value=strSelOption document.getElementById("SelOption").value="ProcessBtn" document.getElementById("SteeringForm").submit() } function formSubmitUpdMenuLinks(strButton, selList) { eleBtn = document.getElementById(strButton) document.getElementById("SelOption").value="SpecialAction" document.getElementById("ProcessBtn").value=eleBtn.id.substr(12) document.getElementById("SelList").value=selList document.getElementById("SteeringForm").submit() } function formSubmitUpdMenuVertikal(strButton, selList) { eleBtn = document.getElementById(strButton) document.getElementById("SelOption").value="SpecialAction" document.getElementById("ProcessBtn").value=eleBtn.id.substr(15) document.getElementById("SelList").value=selList document.getElementById("SteeringForm").submit() } function formSubmitDelSpecial(strButton, selList) { eleBtn = document.getElementById(strButton) nBtnId=eleBtn.id.substr(3) strPageId='tdPageDel'+nBtnId strPageName=document.getElementById(strPageId).innerText if (strPageName=='Home') { alert("Menueintrag fuer Aufruf Homepage kann im vertikalen Menu nicht geloescht werden") } else if (strPageName=='Login') { alert("Menueintrag fuer Aufruf Login kann im vertikalen Menu nicht geloescht werden") } else if (confirm("Soll dieser aktuell gewaehlte Datensatz wirklich geloescht werden, bestaetigen Sie bitte mit OK")==true) { document.getElementById("SelOption").value="Delete" document.getElementById("ProcessBtn").value=nBtnId document.getElementById("SelList").value=selList document.getElementById("SteeringForm").submit() } } function CallURL(url) { window.location=url } function CallURLNewWindow(url) { window.open(url) } function formSubmitProtected(strButton, selList) { eleBtn = document.getElementById(strButton) document.getElementById("SelOption").value="SpecialAction" document.getElementById("SelList").value=selList document.getElementById("SteeringForm").submit() } function HideElements(strname,profileind) { var eleBtn = document.getElementById(strname) if (eleBtn.checked == true) { eleNew=document.getElementById("strPassWort_Pruefen") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strPassWort") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("Passwort Pruefen Div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("Passwort Div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") if (profileind==false) { eleNew=document.getElementById("Kategorien") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strBenutzerName") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("Kategorien Div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("Benutzername Div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("Initialisieren") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("Berechtigungen") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") } } else { eleNew=document.getElementById("strPassWort_Pruefen") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("strPassWort") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("Passwort Pruefen Div") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("Passwort Div") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") if (profileind==false) { eleNew=document.getElementById("Kategorien") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("strBenutzerName") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("Kategorien Div") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("Benutzername Div") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("Initialisieren") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("Berechtigungen") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") } } } function ReplaceClassValue(cls, oldval, newval) { if (cls.indexOf(oldval)>= 0) { cls = cls.replace(oldval,newval) } else { if (cls.indexOf(newval)< 0) { cls = cls + newval } } return cls } function ResetRights() { selList=document.getElementById("Kategorien") selList.selectedIndex=3 document.getElementById("Berechtigungen").innerHTML="" document.getElementById("strBerechtigungen").value=document.getElementById("Berechtigungen").innerHTML } function AddRight() { selList=document.getElementById("Kategorien") var newValue=document.getElementById("Berechtigungen").innerHTML var selText=selList.options[selList.selectedIndex].text if (document.getElementById("Berechtigungen").innerHTML=="") { document.getElementById("Berechtigungen").innerHTML = document.getElementById("Berechtigungen").innerHTML + selList.options[selList.selectedIndex].text } else { if (newValue.search(selText)==-1 && (selText=='Administrator' || selText=='Redaktor' || selText=='Terminverwalter')) { document.getElementById("Berechtigungen").innerHTML = document.getElementById("Berechtigungen").innerHTML + ", " + selList.options[selList.selectedIndex].text } } document.getElementById("strBerechtigungen").value=document.getElementById("Berechtigungen").innerHTML } function InitialisierenMouseOver() { clsName = document.getElementById("Initialisieren").className document.getElementById("Initialisieren").className=ReplaceClassValue(clsName,"small","smallover") } function InitialisierenMouseOut() { clsName = document.getElementById("Initialisieren").className document.getElementById("Initialisieren").className=ReplaceClassValue(clsName,"smallover","small") } function InitMenu() { document.getElementById("strName_ME").value="" document.getElementById("strMenuText").value="" document.getElementById("SecondKey").value="" document.getElementById("strName_PG").value="" document.getElementById("strExternLink").value="" document.getElementById("strNummer").value="" document.getElementById("chkExternLinkFrameInd").checked=false eleNew=document.getElementById("strName_PG") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strName_PG_div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strExternLink") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("strExternLink_div") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("chkExternLinkFrameInd") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("chkExternLinkFrameInd_div") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") document.getElementById("ExternLink").checked=false } function InitMenuML() { document.getElementById("strName_ME").value="" document.getElementById("SecondKey").value="" document.getElementById("strName_PG").value="" document.getElementById("strExternLink").value="" document.getElementById("strNummer").value="" document.getElementById("strSubMenu").value="" document.getElementById("strItmWidth").value="" document.getElementById("strMenuText").value="" eleNew=document.getElementById("strName_PG") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strName_PG_div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strExternLink") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("strExternLink_div") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") document.getElementById("ExternLink").checked=false } function InitMenuLinks() { document.getElementById("strName_ME").value="" document.getElementById("strMenuText").value="" document.getElementById("SecondKey").value="" document.getElementById("strName_PG").value="" document.getElementById("strExternLink").value="" document.getElementById("strNummer").value="" document.getElementById("chkExternLinkFrameInd").checked=false document.getElementById("chkFoto").checked=false document.getElementById("chkTitel").checked=false document.getElementById("chkLinie").checked=false document.getElementById("strFoto").value="" document.getElementById("strMenuEintragTyp").value="" document.getElementById("strMLSubMenu").value="" eleNew=document.getElementById("strName_PG") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strName_PG_div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strExternLink") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("strExternLink_div") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("chkExternLinkFrameInd") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("chkExternLinkFrameInd_div") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("strFoto") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("strFoto_div") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") document.getElementById("ExternLink").checked=false //additionally for Picture Menu elePictureMenu=document.getElementById("strPaddingTop") if (elePictureMenu!=null) { document.getElementById("strPaddingTop").value="0" document.getElementById("strPaddingBottom").value="0" document.getElementById("strPaddingRight").value="0" document.getElementById("strPaddingLeft").value="0" document.getElementById("strSchriftGroessePixel").selectedIndex="0" document.getElementById("strBreiteInSpalten").selectedIndex="0" document.getElementById("strHoeheInZeilen").selectedIndex="0" } } function ExternalLink() { var eleBtn = document.getElementById("ExternLink") if (eleBtn.checked == true) { document.getElementById("strName_PG").value="" eleNew=document.getElementById("strName_PG") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("strName_PG_div") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("strExternLink") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strExternLink_div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("chkExternLinkFrameInd") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("chkExternLinkFrameInd_div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") } else { document.getElementById("strExternLink").value="" eleNew=document.getElementById("strName_PG") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strName_PG_div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strExternLink") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("strExternLink_div") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("chkExternLinkFrameInd") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("chkExternLinkFrameInd_div") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") } } function CheckBoxUpdMenu(strCheckBox) { //first set all possible values to invisible eleNew=document.getElementById("strName_PG") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("strName_PG_div") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("strExternLink") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("strExternLink_div") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("chkExternLinkFrameInd") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("chkExternLinkFrameInd_div") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("strFoto") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") eleNew=document.getElementById("strFoto_div") eleNew.className=ReplaceClassValue(eleNew.className,"Visible","Invisible") //set now all other checkboxes to correct values and init values not anymore valid for checkbox combination eleBtn = document.getElementById(strCheckBox) if (strCheckBox=='ExternLink' && eleBtn.checked == true) { //document.getElementById("chkFoto").checked=false document.getElementById("chkTitel").checked=false document.getElementById("chkLinie").checked=false document.getElementById("chkLeereLinie").checked=false document.getElementById("strName_PG").value="" //document.getElementById("strFoto").value="" eleNew=document.getElementById("strExternLink") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strExternLink_div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("chkExternLinkFrameInd") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("chkExternLinkFrameInd_div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") if (document.getElementById("chkFoto").checked==true) { eleNew=document.getElementById("strFoto") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strFoto_div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") } else { document.getElementById("strFoto").value="" } } else if (strCheckBox=='chkFoto' && eleBtn.checked == true) { //document.getElementById("ExternLink").checked=false document.getElementById("chkTitel").checked=false document.getElementById("chkLinie").checked=false document.getElementById("chkLeereLinie").checked=false //document.getElementById("strName_PG").value="" //document.getElementById("strExternLink").value="" //document.getElementById("chkExternLinkFrameInd").checked=false eleNew=document.getElementById("strFoto") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strFoto_div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") if (document.getElementById("ExternLink").checked==true) { document.getElementById("strName_PG").value="" eleNew=document.getElementById("strExternLink") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strExternLink_div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("chkExternLinkFrameInd") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("chkExternLinkFrameInd_div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") } else { document.getElementById("strExternLink").value="" document.getElementById("chkExternLinkFrameInd").checked=false eleNew=document.getElementById("strName_PG") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strName_PG_div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") } } else if (strCheckBox=='chkTitel' && eleBtn.checked == true) { document.getElementById("ExternLink").checked=false document.getElementById("chkFoto").checked=false document.getElementById("chkLinie").checked=false document.getElementById("chkLeereLinie").checked=false document.getElementById("strName_PG").value="" document.getElementById("strExternLink").value="" document.getElementById("chkExternLinkFrameInd").checked=false document.getElementById("strFoto").value="" } else if (strCheckBox=='chkLinie' && eleBtn.checked == true) { document.getElementById("ExternLink").checked=false document.getElementById("chkFoto").checked=false document.getElementById("chkTitel").checked=false document.getElementById("chkLeereLinie").checked=false document.getElementById("strName_PG").value="" document.getElementById("strExternLink").value="" document.getElementById("chkExternLinkFrameInd").checked=false document.getElementById("strFoto").value="" } else if (strCheckBox=='chkLeereLinie' && eleBtn.checked == true) { document.getElementById("ExternLink").checked=false document.getElementById("chkFoto").checked=false document.getElementById("chkTitel").checked=false document.getElementById("chkLinie").checked=false document.getElementById("strName_PG").value="" document.getElementById("strExternLink").value="" document.getElementById("chkExternLinkFrameInd").checked=false document.getElementById("strFoto").value="" } btnLink=document.getElementById("ExternLink") btnFoto=document.getElementById("chkFoto") btnTitel=document.getElementById("chkTitel") btnLinie=document.getElementById("chkLinie") btnLeereLinie=document.getElementById("chkLeereLinie") // no checkbox active, set standard combination if (btnLink.checked==false && btnFoto.checked==false && btnTitel.checked==false && btnLinie.checked==false && btnLeereLinie.checked==false) { //no checkbox active set standard values eleNew=document.getElementById("strName_PG") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strName_PG_div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") document.getElementById("strFoto").value="" document.getElementById("strExternLink").value="" document.getElementById("chkExternLinkFrameInd").checked=false } else if (btnLink.checked==true && btnFoto.checked==false && btnTitel.checked==false && btnLinie.checked==false && btnLeereLinie.checked==false) { eleNew=document.getElementById("strExternLink") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strExternLink_div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("chkExternLinkFrameInd") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("chkExternLinkFrameInd_div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") document.getElementById("strFoto").value="" document.getElementById("strName_PG").value="" } else if (btnLink.checked==false && btnFoto.checked==true && btnTitel.checked==false && btnLinie.checked==false && btnLeereLinie.checked==false) { eleNew=document.getElementById("strName_PG") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strName_PG_div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strFoto") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") eleNew=document.getElementById("strFoto_div") eleNew.className=ReplaceClassValue(eleNew.className,"Invisible","Visible") document.getElementById("strExternLink").value="" document.getElementById("chkExternLinkFrameInd").checked=false } } function formSubmitUpdItm(strButton, selList) { eleBtn = document.getElementById(strButton) document.getElementById("SelOption").value="Update" document.getElementById("ProcessBtn").value=eleBtn.id.substr(3) document.getElementById("SecondKey").value=eleBtn.id.substr(3) document.getElementById("SelList").value=selList document.getElementById("SteeringForm").submit() } function AddVerwalter() { selSelectVerwalter=document.getElementById("strName_PG") if (selSelectVerwalter.options[selSelectVerwalter.selectedIndex].text=="") { alert("Sie haben keinen Verwalter ausgewaehlt!") } else { document.getElementById("SelOption").value="SpecialAction" document.getElementById("ProcessBtn").value=selSelectVerwalter.options[selSelectVerwalter.selectedIndex].text document.getElementById("SelList").value="UpdLocation" document.getElementById("SteeringForm").submit() } } function NewGroupMember() { selPerson=document.getElementById("strPersonenwahl") testString=selPerson.options[selPerson.selectedIndex].text if (testString!="") { selPersonHidden=document.getElementById("strPersonenwahl_Hidden") selIndex=selPerson.selectedIndex document.getElementById("lblName").innerText=selPerson.options[selPerson.selectedIndex].text selPersonHidden.selectedIndex=selPerson.selectedIndex document.getElementById("PersonKey").value=selPersonHidden.options[selPersonHidden.selectedIndex].text document.getElementById("SecondKey").value=-1 document.getElementById("strKontaktPerson").checked=false document.getElementById("strKontaktFormular").checked=false document.getElementById("strEMailZeigen").checked=false document.getElementById("strSeitenwahl").selectedIndex=-1 document.getElementById("strFotowahl").selectedIndex=-1 document.getElementById("strBeschreibungPerson").value="" formSubmit("Save") } else { alert("Es wurde kein Name als neues Mitglied ausgewählt!") } } function PrevNext(strButton, selList, strAction) { eleBtn = document.getElementById(strButton) document.getElementById("SelOption").value=strAction document.getElementById("ProcessBtn").value=eleBtn.id.substr(4) document.getElementById("SelList").value=selList document.getElementById("SteeringForm").submit() } function formCheckRadioBtn(strRadName, selList) { document.getElementById("SelOption").value="Update" document.getElementById("ProcessBtn").value=strRadName document.getElementById("SelList").value=selList document.getElementById("SteeringForm").submit() } function formDelFotoFile(strButton, selList) { eleBtn = document.getElementById(strButton) document.getElementById("SelOption").value="Delete" document.getElementById("ProcessBtn").value=eleBtn.id.substr(3) document.getElementById("SelList").value=selList document.getElementById("SteeringForm").submit() } function formRemFotoFile(strButton, selList) { eleBtn = document.getElementById(strButton) document.getElementById("SelOption").value="Remove" document.getElementById("ProcessBtn").value=eleBtn.id.substr(3) document.getElementById("SelList").value=selList document.getElementById("SteeringForm").submit() } function formResetSystem() { document.getElementById("strHintergrundFarbe").value="#7A9DAB" document.getElementById("strSchriftFarbe").value="#194669" document.getElementById("strKontrastFarbeHell").value="#C37F21" document.getElementById("strKontrastFarbeDunkel").value="#C34B26" selList=document.getElementById("strSchriftFamilie") selList.options[selList.selectedIndex].text="Verdana, Arial, Helvetica, sans-serif" selList=document.getElementById("strLayoutTemplateName") selList.options[selList.selectedIndex].text="Kirchensoft Standard" } function formSubmitProcessMultiSelect(list1, list1Result, list2, list2Result, list3, list3Result, list4, list4Result, list5, list5Result, list6, list6Result, specialAction) { if (list1!="") { strList1=document.getElementById(list1) if (strList1!=null) { strCollectString="" nLoopCount=0 while (nLoopCount=0) { textdescriptionstart=textdescription.replace("ZUM VERGROESSERN EINMAL KLICKEN","ZUM SCHLIESSEN EINMAL KLICKEN") textdescriptionfull=textdescriptionstart } else if (textdescription.indexOf("ZUM VERGROESSERN EINMAL KLICKEN")>=0) { textdescriptionstart=textdescription.replace("ZUM VERGROESSERN EINMAL KLICKEN","ZUM SCHLIESSEN EINMAL KLICKEN") textdescriptionfull=textdescriptionstart } else { textdescriptionstart=textdescription.replace("ZUM VERGROESSERN EINS ODER ZWEI MAL KLICKEN","ZUM VERGROESSERN EINMAL KLICKEN") textdescriptionfull=textdescriptionstart.replace("ZUM VERGROESSERN EINMAL KLICKEN","ZUM SCHLIESSEN EINMAL KLICKEN") } //new oversteering commands to let appear image only once in full size Kirchensoft 08MAR2015 textdescriptionstart=textdescription.replace("ZUM VERGROESSERN EINS ODER ZWEI MAL KLICKEN","ZUM SCHLIESSEN EINMAL KLICKEN") textdescriptionstart=textdescriptionstart.replace("ZUM VERGROESSERN EINMAL KLICKEN","ZUM SCHLIESSEN EINMAL KLICKEN") textdescriptionstart=textdescriptionstart.replace("MIT MAUSKLICK VERGROESSERN","ZUM SCHLIESSEN EINMAL KLICKEN") textdescriptionstart=textdescriptionstart.replace("MOUSECLICK TO ENLARGE","CLICK ONCE TO CLOSE") textdescriptionfull=textdescriptionstart //end new oversteering commands to let appear image only once in full size Kirchensoft 08MAR2015 if (linkid.indexOf("a_t")>=0) { imgid=linkid.replace("a_t","img") } else if (linkid.indexOf("a_n")>=0) { imgid=linkid.replace("a_n","img") } else if (linkid.indexOf("a_p")>=0) { imgid=linkid.replace("a_p","img") } else { imgid=linkid.replace("a_st","img") } img=document.getElementById(imgid) imgpath=img.src if (linkid.indexOf("a_t")>=0) { imgpath=imgpath.replace("/thumb","") imgpath=imgpath.replace("thumb_","normal_") imgpathnormal=imgpath imgpathnormal="'"+imgpathnormal+"'" imgpathorig=img.src imgpathorig=imgpathorig.replace("/thumb","/orig") imgpathorig=imgpathorig.replace("thumb_","") imgpathorig="'"+imgpathorig+"'" } else if (linkid.indexOf("a_n")>=0) { imgpath=imgpath.replace("normal_","orig/") imgpathnormal=imgpath imgpathnormal="'"+imgpathnormal+"'" imgpathorig=img.src imgpathorig="'"+imgpathorig+"'" } else if (linkid.indexOf("a_p")>=0) { imgpathnormal=imgpath imgpathnormal="'"+imgpathnormal+"'" imgpathorig=img.src imgpathorig=imgpathorig.replace("normal_","orig/") imgpathorig=imgpathorig.replace("normal_","") imgpathorig="'"+imgpathorig+"'" } else { imgpath=imgpath.replace("/smallthumb","") imgpath=imgpath.replace("smallthumb_","normal_") imgpathnormal=imgpath imgpathnormal="'"+imgpathnormal+"'" imgpathorig=img.src imgpathorig=imgpathorig.replace("/smallthumb","/orig") imgpathorig=imgpathorig.replace("smallthumb_","") imgpathorig="'"+imgpathorig+"'" } //new oversteering commands to let appear image only once in full size Kirchensoft 08MAR2015 imgpathnormal=imgpathorig imgpath=imgpathnormal.replace(/'/g,"") //end new oversteering commands to let appear image only once in full size Kirchensoft 08MAR2015 popwidth=100 popheight=100 //define height and width for max window size //availWidth=(screen.availWidth-40) //availHeight=(screen.availHeight-100) //80% of possible width and height of screen for image availWidth=(screen.availWidth/100*80) availHeight=(screen.availHeight/100*80) resizeFactor=0 imgwidth=Number(imgwidth) imgheight=Number(imgheight) if (imgwidth==null) { resizeWidth=availWidth resizeHeight=availHeight } else { if (imgwidth>availWidth || imgheight>availHeight) { if (imgwidth>availWidth) { resizeFactor=availWidth/imgwidth resizeWidth=imgwidth*resizeFactor resizeHeight=imgheight*resizeFactor if (resizeHeight>availHeight) { resizeFactor=availHeight/resizeHeight resizeWidth=resizeWidth*resizeFactor resizeHeight=resizeHeight*resizeFactor } } else { resizeFactor=availHeight/imgheight resizeWidth=imgwidth*resizeFactor resizeHeight=imgheight*resizeFactor if (resizeWidth>availWidth) { resizeFactor=availWidth/resizeWidth resizeWidth=resizeWidth*resizeFactor resizeHeight=resizeHeight*resizeFactor } } } else { resizeWidth=imgwidth resizeHeight=imgheight } } //popwidth=resizeWidth/100*102 //popheight=resizeHeight/100*105 popwidth=resizeWidth/100*104 popheight=resizeHeight/100*113 //if (imgwidth==null) //{ // resizeWidth=availWidth // resizeHeight=availHeight //} //else //{ //if (imgwidth>imgheight) //{ //landscape //if (imgwidth>availWidth) //{ //resize available width and height //resizeFactor=availWidth/imgwidth //resizeWidth=imgwidth*resizeFactor //resizeHeight=imgheight*resizeFactor //if (resizeHeight>availHeight) //{ //resizeFactor=availHeight/resizeHeight //resizeWidth=resizeWidth*resizeFactor //resizeHeight=resizeHeight*resizeFactor //} //} //else //{ //resizeWidth=(imgwidth+40) //resizeHeight=(imgheight+40) //} //} //else //{ //portrait //if (imgheight>availHeight) //{ //resize available width and height //resizeFactor=availHeight/imgheight //resizeWidth=imgwidth*resizeFactor //resizeHeight=imgheight*resizeFactor //if (resizeWidth>availWidth) //{ //resizeFactor=availWidth/resizeWidth //resizeWidth=resizeWidth*resizeFactor //resizeHeight=resizeHeight*resizeFactor //} //} //else //{ //resizeWidth=(imgwidth+40) //resizeHeight=(imgheight+40) //} //} //} function getpos(){ //leftpos=(detectexist(window.screenLeft))? screenLeft+document.body.clientWidth/2-popwidth/2 : detectexist(window.screenX)? screenX+innerWidth/2-popwidth/2 : 0 //toppos=(detectexist(window.screenTop))? screenTop+document.body.clientHeight/2-popheight/2 : detectexist(window.screenY)? screenY+innerHeight/2-popheight/2 : 0 if (linkid.indexOf("a_n")>=0) { leftpos=10 toppos=10 } else if (textdescription.indexOf("ZUM VERGROESSERN EINMAL KLICKEN")>=0) { leftpos=10 toppos=10 } else { //leftpos=250 //toppos=120 leftpos=10 toppos=10 } //leftpos=(screen.availWidth-popwidth)/2 //toppos=(screen.availHeight-popheight)/2 leftpos=0 toppos=0 if (window.opera){ leftpos-=screenLeft toppos-=screenTop } } function ResizeScreen() { jkpopwin.resizeTo(popwidth, popheight) } getpos() startWidth=200 startHeight=200 //var winattributes='width='+popwidth+',height='+popheight+',resizable=yes,left='+leftpos+',top='+toppos+',titlebar=no, scrollbars=yes' //var winattributes='screen.height='+popheight+',screen.width='+popwidth+',resizable=yes,left='+leftpos+',top='+toppos+',titlebar=no, scrollbars=no, menubar=no, status=no, directories=no, location=no, channelmode=yes' //var winattributes='screen.availHeight='+popheight+',screen.availWidth='+popwidth+',resizable=yes,left='+leftpos+',top='+toppos+',titlebar=no, scrollbars=no, menubar=no, status=no, directories=no, location=no, channelmode=yes' //var winattributes='window.innerHeight ='+popheight+',window.innerWidth ='+popwidth+',resizable=yes,left='+leftpos+',top='+toppos+',titlebar=no, scrollbars=no, menubar=no, status=no, directories=no, location=no, channelmode=yes' var winattributes='width ='+startHeight+',height ='+startWidth+',resizable=yes,left='+leftpos+',top='+toppos+',titlebar=no, scrollbars=yes, menubar=no, status=no, directories=no, location=no, channelmode=no' //alert(popwidth) //alert(popheight) var windowname="Kirchensoft Foto" var bodyattribute=(popbackground.indexOf(".")!=-1)? 'background="'+popbackground+'"' : 'bgcolor="'+popbackground+'"' if (typeof jkpopwin=="undefined" || jkpopwin.closed) jkpopwin=window.open("","",winattributes) else{ //getpos() //uncomment these 2 lines if you wish subsequent popups to be centered too //jkpopwin.moveTo(leftpos, toppos) //jkpopwin.resizeTo(popwidth, popheight) } //setTimeout(ResizeScreen(),10) //jkpopwin.resizeTo(popwidth, popheight) jkpopwin.document.open() //docstring=''+windowtitle+'
'; //docstring=''+windowtitle+'
'; //docstring=''+windowtitle+'
'; docstring=''+windowtitle+'
'; jkpopwin.document.write(docstring) img=jkpopwin.document.getElementById(imgid) t=setTimeout("ClearTimeout(t,jkpopwin)",10) } // Key Handle functions function WebCalendarEditEntryShortcuts() { shortcut.add("Ctrl+S",function() { validate_and_submit(); }, { 'type':'keydown', 'propagate':false, 'disable_in_input':false, 'target':document }); } function WebCalendarNewDate() { shortcut.add("Ctrl+N",function() { DirectCallTerminWebCalendar(); }, { 'type':'keydown', 'propagate':false, 'disable_in_input':false, 'target':document }); } function WebCalendarGeneralShortcuts() { shortcut.add("Ctrl+Z",function() { CallBackToWiniva(); }, { 'type':'keydown', 'propagate':false, 'disable_in_input':false, 'target':document }); shortcut.add("Ctrl+H",function() { HomeFromWebcalendar(); }, { 'type':'keydown', 'propagate':false, 'disable_in_input':false, 'target':document }); } function CallBackToWiniva() { pathtocall=GetPathToCallRoot() pathtocall=pathtocall + "/phpfiles/Backend.php" window.location.assign(pathtocall) } function HomeFromWebcalendar() { pathtocall=GetPathToCallRoot() pathtocall=pathtocall + "/index.htm" window.location.assign(pathtocall) } function DirectCallTerminWebCalendar() { pathtocall=GetPathToCallRoot() pathtocall=pathtocall + "/phpfiles/DirectCallTerminWebCalendar.php" window.location.assign(pathtocall) } function GetPathToCallRoot() { href=window.location.href if (href.indexOf("Demo")!=-1 || href.indexOf("Testwil")!=-1 || href.indexOf("Probe")!=-1) { nStartDemoPos=href.indexOf(window.location.host)+ window.location.host.length+1 nEndDemoPos=href.indexOf("/",nStartDemoPos) strDemoName=href.substring(nStartDemoPos,nEndDemoPos) strRoot="http://" + window.location.host + "/" + strDemoName } else { strRoot="http://" + window.location.host } return strRoot } /** * http://www.openjs.com/scripts/events/keyboard_shortcuts/ * Version : 2.01.B * By Binny V A * License : BSD */ shortcut = { 'all_shortcuts':{},//All the shortcuts are stored in this array 'add': function(shortcut_combination,callback,opt) { //Provide a set of default options var default_options = { 'type':'keydown', 'propagate':false, 'disable_in_input':false, 'target':document, 'keycode':false } if(!opt) opt = default_options; else { for(var dfo in default_options) { if(typeof opt[dfo] == 'undefined') opt[dfo] = default_options[dfo]; } } var ele = opt.target; if(typeof opt.target == 'string') ele = document.getElementById(opt.target); var ths = this; shortcut_combination = shortcut_combination.toLowerCase(); //The function to be called at keypress var func = function(e) { e = e || window.event; if(opt['disable_in_input']) { //Don't enable shortcut keys in Input, Textarea fields var element; if(e.target) element=e.target; else if(e.srcElement) element=e.srcElement; if(element.nodeType==3) element=element.parentNode; if(element.tagName == 'INPUT' || element.tagName == 'TEXTAREA') return; } //Find Which key is pressed if (e.keyCode) code = e.keyCode; else if (e.which) code = e.which; var character = String.fromCharCode(code).toLowerCase(); if(code == 188) character=","; //If the user presses , when the type is onkeydown if(code == 190) character="."; //If the user presses , when the type is onkeydown var keys = shortcut_combination.split("+"); //Key Pressed - counts the number of valid keypresses - if it is same as the number of keys, the shortcut function is invoked var kp = 0; //Work around for stupid Shift key bug created by using lowercase - as a result the shift+num combination was broken var shift_nums = { "`":"~", "1":"!", "2":"@", "3":"#", "4":"$", "5":"%", "6":"^", "7":"&", "8":"*", "9":"(", "0":")", "-":"_", "=":"+", ";":":", "'":"\"", ",":"<", ".":">", "/":"?", "\\":"|" } //Special Keys - and their codes var special_keys = { 'esc':27, 'escape':27, 'tab':9, 'space':32, 'return':13, 'enter':13, 'backspace':8, 'scrolllock':145, 'scroll_lock':145, 'scroll':145, 'capslock':20, 'caps_lock':20, 'caps':20, 'numlock':144, 'num_lock':144, 'num':144, 'pause':19, 'break':19, 'insert':45, 'home':36, 'delete':46, 'end':35, 'pageup':33, 'page_up':33, 'pu':33, 'pagedown':34, 'page_down':34, 'pd':34, 'left':37, 'up':38, 'right':39, 'down':40, 'f1':112, 'f2':113, 'f3':114, 'f4':115, 'f5':116, 'f6':117, 'f7':118, 'f8':119, 'f9':120, 'f10':121, 'f11':122, 'f12':123 } var modifiers = { shift: { wanted:false, pressed:false}, ctrl : { wanted:false, pressed:false}, alt : { wanted:false, pressed:false}, meta : { wanted:false, pressed:false} //Meta is Mac specific }; if(e.ctrlKey) modifiers.ctrl.pressed = true; if(e.shiftKey) modifiers.shift.pressed = true; if(e.altKey) modifiers.alt.pressed = true; if(e.metaKey) modifiers.meta.pressed = true; for(var i=0; k=keys[i],i 1) { //If it is a special key if(special_keys[k] == code) kp++; } else if(opt['keycode']) { if(opt['keycode'] == code) kp++; } else { //The special keys did not match if(character == k) kp++; else { if(shift_nums[character] && e.shiftKey) { //Stupid Shift key bug created by using lowercase character = shift_nums[character]; if(character == k) kp++; } } } } if(kp == keys.length && modifiers.ctrl.pressed == modifiers.ctrl.wanted && modifiers.shift.pressed == modifiers.shift.wanted && modifiers.alt.pressed == modifiers.alt.wanted && modifiers.meta.pressed == modifiers.meta.wanted) { callback(e); if(!opt['propagate']) { //Stop the event //e.cancelBubble is supported by IE - this will kill the bubbling process. e.cancelBubble = true; e.returnValue = false; //e.stopPropagation works in Firefox. if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } return false; } } } this.all_shortcuts[shortcut_combination] = { 'callback':func, 'target':ele, 'event': opt['type'] }; //Attach the function with the event if(ele.addEventListener) ele.addEventListener(opt['type'], func, false); else if(ele.attachEvent) ele.attachEvent('on'+opt['type'], func); else ele['on'+opt['type']] = func; }, //Remove the shortcut - just specify the shortcut and I will remove the binding 'remove':function(shortcut_combination) { shortcut_combination = shortcut_combination.toLowerCase(); var binding = this.all_shortcuts[shortcut_combination]; delete(this.all_shortcuts[shortcut_combination]) if(!binding) return; var type = binding['event']; var ele = binding['target']; var callback = binding['callback']; if(ele.detachEvent) ele.detachEvent('on'+type, callback); else if(ele.removeEventListener) ele.removeEventListener(type, callback, false); else ele['on'+type] = false; } }