PageSourceSearch

https://www.justdata.com.au/apps/contractheads.js

js justdata.com.au collected 2026-10-08 00:24:27 UTC 3,073 bytes, 114 lines download raw bytes

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="on" //Enable saving state of content structure using session cookies? (on/off)
8var collapseprevious="no" //Collapse previously open content when opening present? (yes/no)
9
10if (document.getElementById){
11document.write('<style type="text/css">')
12document.write('.switchcontent{display:none;}')
13document.write('</style>')
14}
15
16function getElementbyClass(classname){
17ccollect=new Array()
18var inc=0
19var alltags=document.all? document.all : document.getElementsByTagName("*")
20for (i=0; i<alltags.length; i++){
21if (alltags[i].className==classname)
22ccollect[inc++]=alltags[i]
23}
24}
25
26function sweeptoggle(state){
27var inc=0
28while (ccollect[inc]){
29ccollect[inc].style.display=state=='contract'? "none" : "block"
30inc++
31}
32}
33
34function contractcontent(omit){
35var inc=0
36while (ccollect[inc]){
37if (ccollect[inc].id!=omit)
38ccollect[inc].style.display="none"
39inc++
40}
41}
42
43function expandcontent(cid){
44if (typeof ccollect!="undefined"){
45if (collapseprevious=="yes")
46contractcontent(cid)
47document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
48}
49}
50
51function revivecontent(){
52contractcontent("omitnothing")
53selectedItem=getselectedItem()
54selectedComponents=selectedItem.split("|")
55for (i=0; i<selectedComponents.length-1; i++)
56document.getElementById(selectedComponents[i]).style.display="block"
57}
58
59function get_cookie(Name) { 
60var search = Name + "="
61var returnvalue = "";
62if (document.cookie.length > 0) {
63offset = document.cookie.indexOf(search)
64if (offset != -1) { 
65offset += search.length
66end = document.cookie.indexOf(";", offset);
67if (end == -1) end = document.cookie.length;
68returnvalue=unescape(document.cookie.substring(offset, end))
69}
70}
71return returnvalue;
72}
73
74function getselectedItem(){
75if (get_cookie(window.location.pathname) != ""){
76selectedItem=get_cookie(window.location.pathname)
77return selectedItem
78}
79else
80return ""
81}
82
83function saveswitchstate(){
84var inc=0, selectedItem=""
85while (ccollect[inc]){
86if (ccollect[inc].style.display=="block")
87selectedItem+=ccollect[inc].id+"|"
88inc++
89}
90
91document.cookie=window.location.pathname+"="+selectedItem
92}
93
94function do_onload(){
95uniqueidn=window.location.pathname+"firsttimeload"
96getElementbyClass("switchcontent")
97if (enablepersist=="on" && typeof ccollect!="undefined"){
98document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0" 
99firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page load
100if (!firsttimeload)
101revivecontent()
102}
103}
104
105
106if (window.addEventListener)
107window.addEventListener("load", do_onload, false)
108else if (window.attachEvent)
109window.attachEvent("onload", do_onload)
110else if (document.getElementById)
111window.onload=do_onload
112
113if (enablepersist=="on" && document.getElementById)
114window.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.