/* Scripte fuer C::Web-Anbindung */ /* AMMMa AG */ var wins = new Array(); var _validators = new Array(); if (!document.layers&&!document.all){ event=""; } /* Validiere generierte Metadatenformulare */ function validateMDForm(form) { for (var i = 0; i < _validators.length; i++) { if (!_validators[i](form)) return false; } return true; } /* Waehle alles aus einer Checkboxgruppe */ function checkAll(formElement,flagElement) { if (formElement.length){ var j; for (j = 0; j < formElement.length; j++){ formElement[j].checked = flagElement.checked; } } else { formElement.checked = flagElement.checked; } } /* Zeige Tooltip ueber Objekt */ /* Bsp: showToolTip(this,event,' tooltiptext ') */ function showToolTip(current,e,text){ if (document.all) { thetitle = text.split('
') if (thetitle.length>1) { thetitles = '' for (i = 0; i < thetitle.length; i++) { thetitles += thetitle[i]; } current.title = thetitles; } else { current.title = text; } } else { if (document.layers){ document.tooltip.document.write('' + text + ''); document.tooltip.document.close(); document.tooltip.left = current.pageX + 5; document.tooltip.top = current.pageY + 5; document.tooltip.visibility = "show"; } } } function closeToolTip(){ if (document.layers){ document.tooltip.visibility="hidden"; } } function openPopupWindow(script, args) { if (!script) { w = window.open(args,"CWebPopup", "width=500,height=500,scrollbars,resizable,menubar"); } else { w = window.open("popup.icom?" + args,"CWebPopup", "width=500,height=500,scrollbars,resizable,menubar"); } w.focus(); } function openSizedPopupWindow(id, args, props) { openWindow('popup.icom' + ((id || args) ? '?' + (id ? 'id='+id+(args ? '&' : '') : '') + (args ? args : '') : ''), "CWebPopup" + id, props); } /* * Anmelden */ function openUserEdit() { openWindow('useredit.html', "CWebSub", "width=600,height=600,scrollbars,resizable"); } function openRegistration(form) { params = ''; if (form){ val = ''; if (form.ATTR2[0].checked){ val="Print und Online"; } if (form.ATTR2[1].checked){ val="Nur Online"; } if (form.ATTR2[2].checked){ val="Nur Print"; } params += '?op=form&ATTR2='+val; } openWindow('register.html'+params, "CWebSub", "width=600,height=650,scrollbars,resizable,toolbar"); } function openReminder() { openWindow('reminder.html',"CWebSub","width=500,height=450,scrollbars,resizable"); } function openChat() { openWindow("../../cweb/cgi-bin/chat/login.php?arsc_chatversion=push_js&arsc_language=german", "CWebChat", "width=640,height=480,scrollbars,resizable"); } function openForum() { openWindow('../../cweb/cgi-bin/forum/', "CWebForum", ""); } function openSitemap(args) { openWindow('sitemap.cw' + (args?'?' + args:''), "CWebSitemap", "width=380,height=400,scrollbars,resizable"); } function openAwareness(args) { openWindow('awareness.html' + (args ? '?'+args : ''), "CWebAwareness", "width=800,height=600,scrollbars,resizable", true); } function openSearch(searchterms, args) { var openstr = 'search.html' + (searchterms ? ('?gl_mode=extended&gl_searchstring='+searchterms+(args ? '&'+args : '')) : (args ? '?'+args : '')); openWindow(openstr, "CWebSuche", "width=516,height=500,scrollbars,resizable"); } function openNewsletter(form) { for(var i = 0; i < form.length; i++) if(form[i].name == 'action' && form[i].checked) u = (form[i].value == 'abonnieren' ? '0' : '1'); openWindow('newsletter.cw?email=' + form.email.value + '&unreg=' + u, 'CWebSub', 'width=440,height=200,scrollbars,resizable'); } function openDownload(id) { openWindow('download.html' + (id ? '?id='+id : ''), "CWebSub", "width=750,height=450,resizable"); } function openMessages(args) { openWindow('nachrichten.html' + (args ? '?'+args : ''), "CWebNachrichten", "width=616,height=300,scrollbars,resizable"); } function openMessage(args) { openWindow('email.html' + (args ? '?'+args : ''), "CWebNachricht", "width=316,height=400,scrollbars,resizable"); } function notifyMessages() { var count = 0; if (count > 0 && confirm('Sie haben ' + count + ' neue Nachricht(en). Möchten Sie diese jetzt lesen?')) { openMessages(); } } function openWindow(url, name, props, focus) { if(wins[name]) wins[name].close(); wins[name] = window.open(url, name, props); if(focus != false) wins[name].focus(); } function loadDocWindow(url, name, props, focus) { if(wins[name]) { wins[name] = window.open(url, name); if(focus != false) wins[name].focus(); } else { openWindow(url, name, props, focus); } } function closeWindow(name) { if(wins[name]) wins[name].close(); }