function popup_summary(e, title, text, img) { if (!document.getElementById('summary_popup')) { if (document.getElementById('gallery_par')) { //either enable this //document.getElementById('gallery_par').style.display = 'none'; //or enable this //document.getElementById('gallery_par').style.height = document.getElementById('gallery_par').offsetHeight; //document.getElementById('gallery_par').childNodes[0].style.display = 'none'; } if (document.getElementById('flash_movie')) { if (fadeout_movie) { //fadeout_movie(0); } } //setup: var popup_width = 375; var popup_margin = 20; //check to see if the cursor is on the right or left half of the screen var mouse_pos = get_mouse_pos(e, 'window'); var popup_dir = 'right'; if (mouse_pos[0] > get_window_width()/2) { popup_dir = 'left'; } mouse_pos = get_mouse_pos(e, 'document'); popup = document.createElement('div'); popup.id = 'summary_popup'; popup.style.width = popup_width+'px'; popup.style.position = "absolute"; popup.style.zIndex = '1000'; if (popup_dir == 'right') { popup.style.left = (mouse_pos[0] + popup_margin)+"px"; } else { popup.style.left = (mouse_pos[0] - popup_width - popup_margin)+"px"; } popup.style.border = '1px solid #cccccc'; popup.style.backgroundColor = '#ffffff'; popup.style.textAlign = 'left'; new_HTML = "
"+title+"
"+text+""; if (img.length > 0) { new_HTML += ""; } new_HTML += "
"; popup.innerHTML = new_HTML; document.body.appendChild(popup); //popup.style.top = "100px"; var t = (Math.min(get_document_height() - popup.offsetHeight - 20, mouse_pos[1] - popup.offsetHeight/2)); //homepage with flash movie if (document.getElementById('flash_movie')) { t = Math.max(t, 510); } //photo gallery page and multimedia if (window.location.href.indexOf("gallery.html") != -1 || window.location.href.indexOf("multimedia.html") != -1) { t = 450 - popup.offsetHeight; } popup.style.top = t+"px"; //popup.style.bottom = Math.max(20, (get_document_height() - mouse_pos[1] - popup.offsetHeight/2))+"px"; } } function remove_summary_popup() { if (!document.getElementById('summary_popup')) { return; } popup = document.getElementById('summary_popup'); popup.parentNode.removeChild(popup); if (document.getElementById('gallery_par')) { //either enable this //document.getElementById('gallery_par').style.display = 'block'; //or enable this //document.getElementById('gallery_par').style.height = ""; //document.getElementById('gallery_par').childNodes[0].style.display = 'block'; } } function set_google_values() { var q = ""; var region = document.getElementById('region_name_input').value; if (region != 'Any Region') { q = region+" "; } var keyword = document.getElementById('keyword_input').value; if (keyword.length > 0) { q += "\""+keyword+"\""; } document.getElementById('google_q').value = q; }