]>
git.saurik.com Git - wxWidgets.git/blob - docs/doxygen/wxwidgets.js
1 /*****************************************************************************
3 ** Purpose: The wxWidgets documentation javascript
4 ** Author: Doxygen team
6 ** Licence: wxWindows license
7 *****************************************************************************/
10 function getCookie(c_name
)
12 if (document
.cookie
.length
>0)
14 c_start
=document
.cookie
.indexOf(c_name
+ "=");
17 c_start
=c_start
+ c_name
.length
+1;
18 c_end
=document
.cookie
.indexOf(";",c_start
);
19 if (c_end
==-1) c_end
=document
.cookie
.length
;
20 return unescape(document
.cookie
.substring(c_start
,c_end
));
26 function setCookie(c_name
,value
,expiredays
)
28 var exdate
=new Date();
29 exdate
.setDate(exdate
.getDate()+expiredays
);
30 document
.cookie
=c_name
+ '=' +escape(value
)+
31 ((expiredays
==null) ? '' : ';expires='+exdate
.toGMTString());
34 // Reimplementation of changeDisplayState
35 function mychangeDisplayState( e
)
37 var num
=this.id
.replace(/[^[0-9]/g,'');
38 var button
=this.firstChild
;
39 var sectionDiv
=document
.getElementById('dynsection'+num
);
40 if (sectionDiv
.style
.display
=='none'||sectionDiv
.style
.display
==''){
41 sectionDiv
.style
.display
='block';
42 button
.src
='open.gif';
44 sectionDiv
.style
.display
='none';
45 button
.src
='closed.gif';
48 setCookie( 'sectionDiv.style.display', sectionDiv
.style
.display
);
52 window
.onload
= function myinitDynSections()
54 var divs
=document
.getElementsByTagName('div');
56 for(var i
=0;i
<divs
.length
-1;i
++){
57 if(divs
[i
].className
=='dynheader'&&divs
[i
+1].className
=='dynsection'){
59 var section
=divs
[i
+1];
60 var button
=header
.firstChild
;
62 divs
[i
].insertBefore(document
.createTextNode(' '),divs
[i
].firstChild
);
63 button
=document
.createElement('img');
64 divs
[i
].insertBefore(button
,divs
[i
].firstChild
);
66 header
.style
.cursor
='pointer';
67 header
.onclick
=mychangeDisplayState
;
68 header
.id
='dynheader'+sectionCounter
;
69 section
.id
='dynsection'+sectionCounter
;
71 var display
= getCookie( 'sectionDiv.style.display' );
72 if ( display
== '' || display
== 'block' ){
73 section
.style
.display
='block'; // default
74 button
.src
='open.gif';
76 section
.style
.display
='none';
77 button
.src
='closed.gif';
79 setCookie( 'sectionDiv.style.display', section
.style
.display
);
81 section
.style
.marginLeft
='14px';