Ticket #9322: Welcome

File Welcome, 2.0 KB (added by dsjonny, 12 years ago)
Line 
1<?xml version="1.0" encoding="UTF-8" ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
5<head>
6 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7 <meta name="robots" content="all" />
8 <title>Welcome to Haiku!</title>
9 <link rel="stylesheet" type="text/css" href="../Haiku-doc.css" />
10 <script type="text/javascript">
11 document.write("<h2 style='text-align: center; color: #0c3762; line-height: 1.5; font-size: 14px;'>Try to load page, please wait...</h2>");
12
13 var l = window.navigator.userLanguage || window.navigator.language;
14 l = l.replace("-", "_");
15 var n=l.split("_");
16 if (l.indexOf("_") == 2)
17 {
18 if (n[0] == n[1].toLowerCase()) l = n[0];
19 }
20
21 var offLine = 'file:///boot/system/documentation/welcome/welcome_' + l + '.html';
22 var onLine = 'http://cgit.haiku-os.org/haiku/plain/docs/welcome/welcome_' + l + '.html';
23 var offLine_en = 'file:///boot/system/documentation/welcome/welcome_en.html';
24 var onLine_en = 'http://cgit.haiku-os.org/haiku/plain/docs/welcome/welcome_en.html';
25
26 var xmlhttp = new XMLHttpRequest();
27 xmlhttp.open("HEAD", offLine, false);
28 xmlhttp.send();
29 switch (xmlhttp.responseText)
30 {
31 case "":
32 xmlhttp.open("HEAD", offLine_en, false);
33 xmlhttp.send();
34 switch(xmlhttp.responseText)
35 {
36 case "":
37 xmlhttp.open("HEAD", onLine, false);
38 xmlhttp.send();
39 switch(xmlhttp.status)
40 {
41 case 200:
42 window.location = onLine;
43 break;
44 default:
45 window.location = onLine_en;
46 break;
47 }
48 break;
49 default:
50 window.location = offLine_en;
51 break;
52 }
53 break;
54 default:
55 window.location = offLine;
56 break;
57 }
58 </script>
59</head>
60<body onload="redirect()">
61 <h2 style='text-align: center; color: #0c3762; line-height: 1.5; font-size: 14px;'>Sorry, but no page found. :(</h2>
62</body>
63</html>