1/*********************************************** 2* Contractible Headers script- © Dynamic Drive (www.dynamicdrive.com) 3* This notice must stay intact for legal use. Last updated Mar 23rd, 2004. 4* Visit http://www.dynamicdrive.com/ for full source code 5***********************************************/ 6 7var enablepersist="off" //Enable saving state of content structure using session cookies? (on/off) 8 9var collapseprevious="yes" //Collapse previously open content when opening present? (yes/no) 10 11if (document.getElementById){ 12document.write('<style type="text/css">') 13document.write('.switchcontent{display:none;}') 14document.write('</style>') 15} 16 17function getElementbyClass(classname){ 18ccollect=new Array() 19var inc=0 20var alltags=document.all? document.all : document.getElementsByTagName("*") 21for (i=0; i<alltags.length; i++){ 22if (alltags[i].className==classname) 23ccollect[inc++]=alltags[i] 24} 25} 26 27function contractcontent(omit){ 28var inc=0 29while (ccollect[inc]){ 30if (ccollect[inc].id!=omit) 31ccollect[inc].style.display="none" 32inc++ 33} 34} 35 36function expandcontent(cid){ 37if (typeof ccollect!="undefined"){ 38if (collapseprevious=="yes") 39contractcontent(cid) 40document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none" 41} 42} 43 44function revivecontent(){ 45contractcontent("omitnothing") 46selectedItem=getselectedItem() 47selectedComponents=selectedItem.split("|") 48for (i=0; i<selectedComponents.length-1; i++) 49document.getElementById(selectedComponents[i]).style.display="block" 50} 51 52function get_cookie(Name) { 53var search = Name + "=" 54var returnvalue = ""; 55if (document.cookie.length > 0) { 56offset = document.cookie.indexOf(search) 57if (offset != -1) { 58offset += search.length 59end = document.cookie.indexOf(";", offset); 60if (end == -1) end = document.cookie.length; 61returnvalue=unescape(document.cookie.substring(offset, end)) 62} 63} 64return returnvalue; 65} 66 67function getselectedItem(){ 68if (get_cookie(window.location.pathname) != ""){ 69selectedItem=get_cookie(window.location.pathname) 70return selectedItem 71} 72else 73return "" 74} 75 76function saveswitchstate(){ 77var inc=0, selectedItem="" 78while (ccollect[inc]){ 79if (ccollect[inc].style.display=="block") 80selectedItem+=ccollect[inc].id+"|" 81inc++ 82} 83 84document.cookie=window.location.pathname+"="+selectedItem 85} 86 87function do_onload(){ 88uniqueidn=window.location.pathname+"firsttimeload" 89getElementbyClass("switchcontent") 90if (enablepersist=="on" && typeof ccollect!="undefined"){ 91document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0" 92firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page load 93if (!firsttimeload) 94revivecontent() 95} 96} 97 98 99if (window.addEventListener) 100window.addEventListener("load", do_onload, false) 101else if (window.attachEvent) 102window.attachEvent("onload", do_onload) 103else if (document.getElementById) 104window.onload=do_onload 105 106if (enablepersist=="on" && document.getElementById) 107window.onunload=saveswitchstate
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.