 function openWindow(item){var mywin = window.open(item.href, "mywin","status=0,toolbar=0,location=0,menubar=0,resizable=1,directories=0,width=600,height=450,scrollbars=1");if(mywin){return false;}else{return true;}}function focusSearch(){box = document.getElementById('q');if(box.value=='Search...'){box.value='';box.className = 'searchPromptFocused';}}function blurSearch(){box = document.getElementById('q');if(box.value==''){box.value='Search...';box.className = 'searchPrompt';}}function addEvent(obj, type, fn){if(obj.attachEvent){obj['e'+type+fn] = fn;obj[type+fn] = function(){obj['e'+type+fn](window.event);};obj.attachEvent('on'+type, obj[type+fn]);}else obj.addEventListener(type, fn, false);}function removeEvent(obj, type, fn){if(obj.detachEvent){obj.detachEvent('on'+type, obj[type+fn]);obj[type+fn] = null;}else obj.removeEventListener(type, fn, false);}function modscreen(e){if(typeof modscreendetails != 'undefined'){var keynum = 0;if(window.event){keynum = e.keyCode;}else if(e.which){keynum = e.which;}if(keynum == 27){switch(modscreendetails.modtype){case 1: window.setTimeout("modfullframe(modscreendetails.modurl)", 100);break;case 2: modfullwindow(modscreendetails.modurl);break;}}}}function modfullframe(url){if(!document.getElementById('modiframe')){var Iframe = document.createElement('iframe');Iframe.id = 'modiframe';Iframe.style.position = 'absolute';Iframe.style.top = 0;Iframe.style.left = 0;Iframe.style.height = '100%';Iframe.style.width = '100%';Iframe.style.border = '0px';document.body.appendChild(Iframe);Iframe.src = url;document.title = '-';addEvent(document.body, 'click', function(){document.body.removeChild(Iframe)});}}function modfullwindow(url){var wOpen;var sOptions;sOptions = 'status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes';sOptions = sOptions + ',width=' +(screen.availWidth - 10).toString();sOptions = sOptions + ',height=' +(screen.availHeight - 122).toString();sOptions = sOptions + ',screenX=0,screenY=0,left=0,top=0';wOpen = window.open(url, 'modwindow', sOptions);if(!wOpen){alert('Popup blocker. Oh no!');}else{wOpen.focus();wOpen.moveTo(0, 0);wOpen.resizeTo(screen.availWidth, screen.availHeight);}}addEvent(window.document, 'keydown', modscreen);