var dom_loaded = false; var browser_window = false; var floatdiv; document.observe("dom:loaded", function() { if(dom_loaded) return; dom_loaded = true; if($('loginform') != null) { var updater = new Ajax.Updater('loginform','http://arachne.uni-koeln.de/template/loginbox.php?locale=en_US.utf8',{ method: 'get', parameters: { show_loginform: 'true', zz: Math.random() } }); if(!updater._complete) { $('loginform').update('Die Sicherheitseinstellungen Ihres Browsers verhindern, dass die Seite richtig angezeigt wird. Unter anderem wird unser Anmeldeformular blockiert. Sie können die Sicherheitseinstellungen entsprechend anpassen um sich einzuloggen, oder Arachne weiterhin als Gast benutzen.'); } } if($('loginbox') != null) { new Ajax.Updater('loginbox','http://arachne.uni-koeln.de/template/loginbox.php?locale=en_US.utf8'); } new Ajax.Request('http://arachne.uni-koeln.de/template/adminbar.php?locale=en_US.utf8'); if($('menu') != null) new Ajax.Updater('menu','http://arachne.uni-koeln.de/drupal/menu.php?locale=en_US.utf8'); }); function bodyOnLoad() { if($('floatdiv') != null) floatdiv = new FloatingDiv('floatdiv',$('head').getHeight()+10); // Google Analytics try { var pageTracker = _gat._getTracker("UA-3215318-1"); pageTracker._trackPageview(); } catch(err) {} } var top=0; function processSearch(url) { var u = url + "?view[layout]=search_result_overview"; u += "&view[category]=overview"; u += "&search[constraints]="+$F('searchField'); window.location.href = u; return false; } function processBookSearch(url) { var u = url + "?view[layout]=search_result_category"; u += "&view[category]=buchseite"; //alert("echo"); u += "&search[constraints]=%2B"+document.getElementById('seachBuchseitenForm').searchBuchseiten.value+"*"; window.location.href = u; return false; } function showLoginBox() { var loginform = $('loginform'); var loginlink = $('loginbox').childElements().first(); if(loginform.getStyle('display') == 'block') { loginform.setStyle({display: 'none'}); loginlink.setStyle({ padding: '8px 9px 0px 9px', border:'1px dashed lightGrey', borderBottom:'1px solid white' }); } else { loginlink.setStyle({ position: 'relative', zIndex: 4, border:'1px solid #666', borderBottom:'1px solid #eee' }); loginform.setStyle({display: 'block'}); if(top == 0) top = loginform.viewportOffset()['top']; loginform.setStyle({top: top-1+'px'}); new Ajax.Updater(loginform,'http://arachne.uni-koeln.de/template/loginbox.php?locale=en_US.utf8',{ method: 'get', parameters: { show_loginform: 'true' } }); } } function submitLogin() { new Ajax.Request('http://arachne.uni-koeln.de/arachne/index.php?', { method: 'post', parameters: 'view[layout]=session_check_login_ajax' +'&login[username]='+$F('login_username') +'&login[password]='+$F('login_password') }); $('loginform').update('Daten werden geprüft ...'); return false; } function openBrowser(url) { pathname = location.pathname; position = -1; position = pathname.indexOf("/drupal/"); if(position != -1) { frontPath = pathname.substr(0, position); frontPath += url; url = frontPath; }; browser_window = window.open(url,'browser_window','width=1000,height=700,scrollbars=no,resizable=yes,status=no'); browser_window.focus(); return false; } function hoverTeaser(id) { var i = 0; $('project_teaser_pics').childElements().each(function(pic) { if(i==id) { pic.setAttribute('class','active'); } else { pic.setAttribute('class', 'inactive'); } i++; }); } function switchTeaser(id) { var i = 0; var src = ''; $('project_teaser_pics').childElements().each(function(pic) { src = pic.getAttribute('src'); if(i == id) { pic.setAttribute('src',src.replace(/\/home_project_small_grey\//,"/home_project_small/")); } else if(src.match(/\/home_project_small\//)) { pic.setAttribute('src',src.replace(/\/home_project_small\//,"/home_project_small_grey/")); } i++; }); $('project_teaser_wrap').update($('project_teaser_hidden_'+id).innerHTML); }