/* FILE ARCHIVED ON 12:33:24 May 6, 2009 AND RETRIEVED FROM THE AN OPENWAYBACK INSTANCE ON 15:57:52 Sep 11, 2024. JAVASCRIPT APPENDED BY OPENWAYBACK, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { oldonload(); func(); }; } } function setShellBG() { var shellEl = ""; if ( document.getElementById("shell") != null ) { shellEl = document.getElementById("shell"); shellEl.style.background = '#000'; } } // addLoadEvent(setShellBG); /* begin common cookie functions. see https://webarchive.library.unt.edu/eot2008/20090506123324/http://techweb/javascript_commons/docs/cookies.html for documentation. */ /* Set cookie value */ function setCookie(name, value, escapeValue, expires, path, domain, secure) { var cookieToken = name + '=' + ((escapeValue) ? escape(value) : value) + ((expires) ? '; expires=' + expires.toGMTString() : '') + ((path) ? '; path=' + path : '') + ((domain) ? '; domain=' + domain : '') + ((secure) ? '; secure' : ''); document.cookie = cookieToken; } /* Get cookie value */ function getCookie(name) { var allCookies = document.cookie; var cookieName = name + "="; var start = allCookies.indexOf("; " + cookieName); if (start == -1) { start = allCookies.indexOf(cookieName); if (start != 0) return null; } else start += 2; var end = document.cookie.indexOf(";", start); if (end == -1) end = allCookies.length; return unescape(allCookies.substring(start + cookieName.length, end)); } /* Delete a cookie */ function deleteCookie(name, path, domain) { var value = getCookie(name); if (value != null) document.cookie = name + '=' + ((path) ? '; path=' + path : '') + ((domain) ? '; domain=' + domain : '') + '; expires=Thu, 01-Jan-70 00:00:01 GMT'; return value; } /* Test for cookie support */ function verifyCookieSafe() { setCookie('pingCookies', 'hello'); if (getCookie('pingCookies')) return true; else return false; } /* end common cookie functions. */ // ---------------------------------------------- // StyleSwitcher functions written by Paul Sowden // https://webarchive.library.unt.edu/eot2008/20090506123324/http://www.idontsmoke.co.uk/ss/ // - - - - - - - - - - - - - - - - - - - - - - - // For the details, visit ALA: // https://webarchive.library.unt.edu/eot2008/20090506123324/http://www.alistapart.com/stories/alternate/ // // nifty StyleSwitcher scripts modified by Aaron Jones 10/10/2002 // ---------------------------------------------- function setActiveStyleSheet(title, reset) { var i, a, main; for(i=0; (a = document.getElementsByTagName("link")[i]); i++) { if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) { a.disabled = true; if(a.getAttribute("title") == title) a.disabled = false; } } if (reset == 1) { setCookie("wstyle", title, 365); } } function setStyle() { var style = readCookie("wstyle"); if (style != null) { setActiveStyleSheet(style, 0); } } function footerSubOffers() { var offersEl = ""; var offersUL = ""; var offersYcoord = ""; var offersListHeight = ""; var dropDown = new Boolean(false); var screenHeight = document.body.clientHeight; if ( document.getElementById("suboffers") != null ) { offersEl = document.getElementById("suboffers"); offersYcoord = findPosY(offersEl); if ( document.getElementById("suboffers_list") != null ) { offersUL = document.getElementById("suboffers_list"); offersListHeight = offersUL.offsetHeight; if ( ( offersYcoord + 413 ) < screenHeight) { dropDown = true; } offersEl.onclick = function() { offersEl.style.backgroundPosition = "0 -16px"; if (dropDown == false) { offersUL.style.top = "-413px"; } offersUL.style.display = "block"; offersUL.onmouseover = function() { offersEl.style.backgroundPosition = "0 -16px"; offersUL.style.display = "block"; } } offersEl.onmouseout = function() { offersEl.style.backgroundPosition = "0 0"; offersUL.style.display = "none"; } } } } function findPosY(obj) { var curtop = 0; if (obj.offsetParent) { while (obj.offsetParent) { curtop += obj.offsetTop; obj = obj.offsetParent; } } else if (obj.y) curtop += obj.y; return curtop; } addLoadEvent(footerSubOffers); function footerSubOffers2() { var offersEl = ""; var offersUL = ""; var offersYcoord = ""; var offersListHeight = ""; var dropDown = new Boolean(false); var screenHeight = document.body.clientHeight; if ( document.getElementById("suboffers2") != null ) { offersEl = document.getElementById("suboffers2"); offersYcoord = findPosY2(offersEl); if ( document.getElementById("suboffers_list2") != null ) { offersUL = document.getElementById("suboffers_list2"); offersListHeight = offersUL.offsetHeight; if ( ( offersYcoord + 262 ) < screenHeight) { dropDown = true; } offersEl.onclick = function() { offersEl.style.backgroundPosition = "0 -16px"; if (dropDown == false) { offersUL.style.top = "-262px"; } offersUL.style.display = "block"; offersUL.onmouseover = function() { offersEl.style.backgroundPosition = "0 -16px"; offersUL.style.display = "block"; } } offersEl.onmouseout = function() { offersEl.style.backgroundPosition = "0 0"; offersUL.style.display = "none"; } } } } function findPosY2(obj) { var curtop = 0; if (obj.offsetParent) { while (obj.offsetParent) { curtop += obj.offsetTop; obj = obj.offsetParent; } } else if (obj.y) curtop += obj.y; return curtop; } addLoadEvent(footerSubOffers2); //Google Search validation: Don't submit if no search query function validateSearch(formName) { if(formName.elements["query"].value == "") { return false; } else { if(document.getElementById('ns_filter').value == 'bc_video') { location.href = "https://webarchive.library.unt.edu/eot2008/20090506123324/http://www.wired.com/video/search/" + formName.elements["query"].value; return false; } return true; } } /* cache css bg images for IE6 */ if ( document.all ) { try { document.execCommand("BackgroundImageCache", false, true); } catch(err) {} } // IE hover and Z-index fix for main navigation startList = function() { if (document.all&&document.getElementById) { zCount = 100; navRoot = document.getElementById("nav"); for (i=0; i= 1 && directories[0] != "") setProp6 = directories[0]; if (directories.length >= 2) setProp7 = setProp6 + '/' + directories[1]; if (directories.length >= 3) setProp8 = setProp7 + '/' + directories[2]; if (directories.length >= 4) setProp9 = setProp8 + '/' + directories[3]; function setProps() { setProp6 = ""; setProp7 = ""; setProp8 = ""; setProp9 = ""; if (paths.length >= 1 && paths[0] != "") setProp6 = paths[0]; if (paths.length >= 2) setProp7 = setProp6 + '/' + paths[1]; if (paths.length >= 3) setProp8 = setProp7 + '/' + paths[2]; if (paths.length >= 4) setProp9 = setProp8 + '/' + paths[3]; } function trackData(evnt) { s.linkTrackVars="events"; s.linkTrackEvents=evnt; s.events=evnt; s.tl(this,'o','AjaxCall'); }