]>
git.saurik.com Git - wxWidgets.git/blob - docs/doxygen/wxwidgets.js
2 function getCookie(c_name
)
4 if (document
.cookie
.length
>0)
6 c_start
=document
.cookie
.indexOf(c_name
+ "=");
9 c_start
=c_start
+ c_name
.length
+1;
10 c_end
=document
.cookie
.indexOf(";",c_start
);
11 if (c_end
==-1) c_end
=document
.cookie
.length
;
12 return unescape(document
.cookie
.substring(c_start
,c_end
));
18 function setCookie(c_name
,value
,expiredays
)
20 var exdate
=new Date();
21 exdate
.setDate(exdate
.getDate()+expiredays
);
22 document
.cookie
=c_name
+ '=' +escape(value
)+
23 ((expiredays
==null) ? '' : ';expires='+exdate
.toGMTString());
26 // Reimplementation of changeDisplayState
27 function mychangeDisplayState( e
)
29 var num
=this.id
.replace(/[^[0-9]/g,'');
30 var button
=this.firstChild
;
31 var sectionDiv
=document
.getElementById('dynsection'+num
);
32 if (sectionDiv
.style
.display
=='none'||sectionDiv
.style
.display
==''){
33 sectionDiv
.style
.display
='block';
34 button
.src
='open.gif';
36 sectionDiv
.style
.display
='none';
37 button
.src
='closed.gif';
40 setCookie( 'sectionDiv.style.display', sectionDiv
.style
.display
);
44 window
.onload
= function myinitDynSections()
46 var divs
=document
.getElementsByTagName('div');
48 for(var i
=0;i
<divs
.length
-1;i
++){
49 if(divs
[i
].className
=='dynheader'&&divs
[i
+1].className
=='dynsection'){
51 var section
=divs
[i
+1];
52 var button
=header
.firstChild
;
54 divs
[i
].insertBefore(document
.createTextNode(' '),divs
[i
].firstChild
);
55 button
=document
.createElement('img');
56 divs
[i
].insertBefore(button
,divs
[i
].firstChild
);
58 header
.style
.cursor
='pointer';
59 header
.onclick
=mychangeDisplayState
;
60 header
.id
='dynheader'+sectionCounter
;
61 button
.src
='closed.gif';
62 section
.id
='dynsection'+sectionCounter
;
64 var display
= getCookie( 'sectionDiv.style.display' );
66 section
.style
.display
='block'; // default
68 section
.style
.display
=display
;
70 setCookie( 'sectionDiv.style.display', section
.style
.display
);
72 section
.style
.marginLeft
='14px';