/********************************************************* Set of JavaScript functions used in GlobalWeb **********************************************************/ /*********************************************************** leaveDoc() Security-chek when user leaves a edited document ************************************************************/ function leaveDoc(){ msg = "WARNUNG\n\nDieses Dokument wurde noch nicht gespeichert.\nAlle von Ihnen vorgenommenen Änderungen werden verloren gehen!\n"; //inbuilt get-out: hold control key to bypass message; if (isDocBeingSubmitted == false && event.ctrlKey == false) event.returnValue = msg; } /*********************************************************** dosearch() start search from searchbox ************************************************************/ function dosearch () { query$ = document.searchform.tmp_query.value; if (query$ == '') return false; else { while(query$.search(/ /) > 0) query$ = query$.replace(/ /,"_"); while(query$.search(/_/) > 0) query$ = query$.replace(/_/," OR "); tmp_host = 'http://'+window.location.host; tmp_path = window.location.pathname; tmp_pos = tmp_path.indexOf(".nsf")+4; tmp_path = tmp_path.slice(0,tmp_pos); tmp_cgi = window.location.search; tmp_pos = tmp_cgi.indexOf("&Lang"); tmp_cgi = tmp_cgi.slice(tmp_pos); location = tmp_host+tmp_path+'/view_SearchPublished/?SearchView&Query='+query$+'&start=1&count=10'+tmp_cgi; } } /*********************************************************** dosearch_full() start search from searchform ************************************************************/ function dosearch_full () { free$ = document.forms[0].Search_Query.value; for(i=0;i 0) query$ = query$.replace(/ /,"_"); while(query$.search(/_/) > 0) query$ = query$.replace(/_/,operator$); if (query$ == '') alert('Bitte geben Sie einen Suchbegriff ein.'); else { tmp_host = 'http://'+window.location.host; tmp_path = window.location.pathname; tmp_pos = tmp_path.indexOf(".nsf")+4; tmp_path = tmp_path.slice(0,tmp_pos); tmp_cgi = window.location.search; tmp_pos = tmp_cgi.indexOf("&Lang"); tmp_cgi = tmp_cgi.slice(tmp_pos); location = tmp_host+tmp_path+'/view_SearchPublished/?SearchView&Query='+query$+'&start=1&count=10'+tmp_cgi; } } /*********************************************************** printout() open printer-optimized articlelayout in popup ************************************************************/ function printout (tmp_url) { var SizeX = '790'; var SizeY = '420'; var PosX = screen.width/2-SizeX/2; var PosY = screen.height/2-SizeY/2; window.open(tmp_url,'','screenx='+PosX+',screeny='+PosY+',toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,copyhistory=0,width='+SizeX+',height='+SizeY+''); } /*********************************************************** sendmail() open send-dialogue in popup ************************************************************/ function sendmail (tmp_url){ var SizeX = '790'; var SizeY = '420'; var PosX = screen.width/2-SizeX/2; var PosY = screen.height/2-SizeY/2; window.open(tmp_url,'','screenx='+PosX+',screeny='+PosY+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width='+SizeX+',height='+SizeY+''); } /*********************************************************** apply_styles() apply styles to tabbed tables 3 tabs: apply_styles(2,4,3,8,1) 4 tabs: apply_styles(2,5,3,10,2) 5 tabs: apply_styles(2,6,3,12,3) 6 tabs: apply_styles(2,7,3,14,4) 7 tabs: apply_styles(2,8,3,16,5) ************************************************************/ function apply_styles(table_start, table_end, cell_start, cell_end, text_end) { mac = (navigator.appVersion.indexOf("Mac") != -1); dom = (document.getElementById) ? true : false; if (mac == false && dom == true){ // Table for (i=table_start; i<=table_end; i++) { document.getElementsByTagName("TABLE")[i].className = "tab_table"; } // Table-Cells for (i=cell_start; i<=cell_end; i+=2) { document.getElementsByTagName("TD")[i].className = "tab_cell"; } // Tab-Text for (i=0; i<=text_end; i++) { if (document.getElementsByName("5.1.")[0] != null) { document.getElementsByName("5.1.")[i].className = "tab_text"; } if (document.getElementsByName("6.1.")[0] != null) { document.getElementsByName("6.1.")[i].className = "tab_text"; } } // active Tab-Text document.getElementsByTagName("B")[1].className = "tab_text_active"; } }