-
Notifications
You must be signed in to change notification settings - Fork 0
/
site23.html
107 lines (99 loc) · 3.71 KB
/
site23.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="style23.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var traffic = false;
var weather = true;
var rail = false;
var day = 0;
var weekday = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var month = new Array("Jan","Feb","Mar","Apr","May","June","July", "Aug", "Sept", "Oct", "Nov", "Dec");
function goTo(type){
var wc = document.getElementById('wc');
var tc = document.getElementById('tc');
var rc = document.getElementById('rc');
var s = document.getElementById('static');
switch (type){
case 'traffic':
if (!traffic){
wc.className = 'choice';
tc.className = 'choiceS';
rc.className = 'choice';
s.innerHTML = 'Traffic Data';
traffic = true;
rail = false;
weather = false;
}
break;
case 'weather':
var today = new Date();
today.setDate(today.getDate()+day);
var nav = '<a href="javascript:if (day >0){previousDay();}else{alert(\'No Past Data Available\');}" title="Show Weather for the Previous Day">Previous</a> | <a href="javascript:if(day < 9){nextDay();}else{alert(\'No More Data Available\');}" title="Show Weather for the Next Day">Next Day</a>';
nav +=' Weather for: '+weekday[today.getDay()]+' '+today.getDate()+' '+month[today.getMonth()]+' '+today.getFullYear();
if (!weather){
wc.className = 'choiceS';
tc.className = 'choice';
rc.className = 'choice';
s.innerHTML = nav;
weather = true;
rail = false;
traffic = false;
}
break;
case 'rail':
if (!rail){
wc.className = 'choice';
tc.className = 'choice';
rc.className = 'choiceS';
s.innerHTML = 'Rail Data';
rail = true;
weather = false;
traffic = false;
}
break;
}
}
function highlight(id, left){
var e = document.getElementById(id);
if (e.className != "choiceS"){
if (left)
e.className = 'choiceH';
else
e.className = 'choiceHR';
}
}
function unhighlight(id, left){
var e = document.getElementById(id);
if (e.className != "choiceS"){
if (left)
e.className = 'choice';
else
e.className = 'choiceR';
}
}
function openHelp(){
window.open('http://bbc.blueghost.co.uk/help.php','helpWindow','width=400,height=600');
}
function openAbout(){
window.open('http://bbc.blueghost.co.uk/about.html','aboutWindow');
}
</script>
</head>
<body>
<div id="selector">
<div id="wc" class="choiceS" onmouseover="javascript:highlight('wc', true);" onmouseout="unhighlight('wc', true);" onclick="javascript:goTo('weather');">Weather</div>
<div id="tc" class="choice" onmouseover="javascript:highlight('tc', true);" onmouseout="unhighlight('tc', true);" onclick="javascript:goTo('traffic');">Traffic</div>
<div id="rc" class="choice" onmouseover="javascript:highlight('rc', true);" onmouseout="unhighlight('rc', true);" onclick="javascript:goTo('rail');">Rail</div>
<div id="pc" class="choiceP" onclick="javascript:javascript:getPermalink();">Permalink</div>
<div id="hc" class="choiceR" onmouseover="javascript:highlight('hc', false);" onmouseout="unhighlight('hc', false);" onclick="javascript:openHelp();">Help</div>
<div id="ac" class="choiceR" onmouseover="javascript:highlight('ac', false);" onmouseout="unhighlight('ac', false);" onclick="javascript:openAbout();">About</div>
</div>
<div id="sub_selector">
<div id="static">Some Text</div>
<div id="loading">Loading ABC...</div>
</div>
</body>
</html>