~azzar1/unity/add-show-desktop-key

443 by dcoles
Added Forum application along with unmodifed version of phpBB3 "Olympus" 3.0.0
1
function fontsizeup()
2
{
3
	var active = getActiveStyleSheet();
4
5
	switch (active)
6
	{
7
		case 'A--':
8
			setActiveStyleSheet('A-');
9
		break;
10
11
		case 'A-':
12
			setActiveStyleSheet('A');
13
		break;
14
15
		case 'A':
16
			setActiveStyleSheet('A+');
17
		break;
18
19
		case 'A+':
20
			setActiveStyleSheet('A++');
21
		break;
22
23
		case 'A++':
24
			setActiveStyleSheet('A');
25
		break;
26
27
		default:
28
			setActiveStyleSheet('A');
29
		break;
30
	}
31
}
32
33
function fontsizedown()
34
{
35
	active = getActiveStyleSheet();
36
37
	switch (active)
38
	{
39
		case 'A++' : 
40
			setActiveStyleSheet('A+');
41
		break;
42
43
		case 'A+' : 
44
			setActiveStyleSheet('A');
45
		break;
46
47
		case 'A' : 
48
			setActiveStyleSheet('A-');
49
		break;
50
51
		case 'A-' : 
52
			setActiveStyleSheet('A--');
53
		break;
54
55
		case 'A--' : 
56
		break;
57
58
		default :
59
			setActiveStyleSheet('A--');
60
		break;
61
	}
62
}
63
64
function setActiveStyleSheet(title)
65
{
66
	var i, a, main;
67
68
	for (i = 0; (a = document.getElementsByTagName('link')[i]); i++)
69
	{
70
		if (a.getAttribute('rel').indexOf('style') != -1 && a.getAttribute('title'))
71
		{
72
			a.disabled = true;
73
			if (a.getAttribute('title') == title)
74
			{
75
				a.disabled = false;
76
			}
77
		}
78
	}
79
}
80
81
function getActiveStyleSheet()
82
{
83
	var i, a;
84
85
	for (i = 0; (a = document.getElementsByTagName('link')[i]); i++)
86
	{
87
		if (a.getAttribute('rel').indexOf('style') != -1 && a.getAttribute('title') && !a.disabled)
88
		{
89
			return a.getAttribute('title');
90
		}
91
	}
92
93
	return null;
94
}
95
96
function getPreferredStyleSheet()
97
{
98
	return ('A-');
99
}
100
101
function createCookie(name, value, days)
102
{
103
	if (days)
104
	{
105
		var date = new Date();
106
		date.setTime(date.getTime() + (days*24*60*60*1000));
107
		var expires = '; expires=' + date.toGMTString();
108
	}
109
	else
110
	{
111
		expires = '';
112
	}
113
114
	document.cookie = name + '=' + value + expires + '; path=/';
115
}
116
117
function readCookie(name)
118
{
119
	var nameEQ = name + '=';
120
	var ca = document.cookie.split(';');
121
122
	for (var i = 0; i < ca.length; i++)
123
	{
124
		var c = ca[i];
125
126
		while (c.charAt(0) == ' ')
127
		{
128
			c = c.substring(1, c.length);
129
		}
130
131
		if (c.indexOf(nameEQ) == 0)
132
		{
133
			return c.substring(nameEQ.length, c.length);
134
		}
135
	}
136
137
	return null;
138
}
139
140
function load_cookie()
141
{
142
	var cookie = readCookie('style_cookie');
143
	var title = cookie ? cookie : getPreferredStyleSheet();
144
	setActiveStyleSheet(title);
145
}
146
147
function unload_cookie()
148
{
149
	var title = getActiveStyleSheet();
150
	createCookie('style_cookie', title, 365);
151
}
152
153
onload_functions.push('load_cookie()');
154
onunload_functions.push('unload_cookie()');
155
156
/*
157
var cookie = readCookie("style");
158
var title = cookie ? cookie : getPreferredStyleSheet();
159
setActiveStyleSheet(title);
160
*/
161