summaryrefslogtreecommitdiff
path: root/web/main.html
blob: c5a1baba98f83e15b35e2e473d2f4233bd118081 (plain)
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
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="sv" lang="sv">
  <head>
    <title>The Uncertain Future</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<link rel="stylesheet" type="text/css" href="style/main.css" /> 
<!--		<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> -->
		<script type="text/javascript" src="js/json2.js"></script>
		<script type="text/javascript">
var debug = 0;

// Print debug messages if debug > 0
function clog(str) {
	if (debug > 1)
		alert(str);
	else if (debug > 0 && console && console.log)
		console.log(str);
	}

// Load data for an exprt claim
function loadData(jsonObj) {
	clog("loadData:" + JSON.stringify(jsonObj));
	var json = JSON.stringify(jsonObj);
  	if (getBrowser() == "ie") {
    	alert("We're sorry, but this functionality isn't currently supported in Internet Explorer. Please consider using to Firefox or Opera.");
	} else {
		clog(top.document.applets[0]);
		top.document.applets[0].loadData(json); // This fails on IE
	}
}

function getOS() {
	var agent = navigator.userAgent;
	if (agent.indexOf("Linux") != -1)
		return "linux";
	else if (agent.indexOf("Mac OS X") != -1)
		return "mac";
	else if (agent.indexOf("Windows") != -1)
		return "windows";
}

function getBrowser() {
	clog("userAgent: " + navigator.userAgent + ", appName: " + navigator.appName);
	var agent = navigator.userAgent;
	if (agent.indexOf("Firefox") != -1)
		return "ff";
	else if (agent.indexOf("Safari") != -1)
		return "sf";
	else {
		var name = navigator.appName;
		if (name.indexOf("Internet Explorer") != -1)
			return "ie";
		else
			return "unknown";
	}
}

// Check browser and display warning if user has combination known to have issues
function checkBrowser() {
	var os = getOS();
	var browser = getBrowser();
	if (os == "mac" && browser == "ff") {
    	alert("We're sorry, but Firefox on Mac OS X does not support all features of this site. Please consider using Safari or Opera if you experience any problems.");
	} else if (browser == "ie") {
    	alert("We're sorry, but Internet Explorer does not support all features of this site. Please consider using Firefox or Opera if you experience any problems.");
	}	
}

    </script>
  </head>
  <body>
	<div id="wrap">
	<script type="text/javascript" src="http://java.com/js/deployJava.js"></script>
	<script type="text/javascript">
  var attributes = { code:'org.singinst.uf.view.UfApplet',
archive:'UfApplet.jar,commons-math-1.2.jar',  width:900, height:660, mayscript: true} ; 
  var parameters = {jnlp_href: 'UfApplet.jnlp'} ; 
    deployJava.runApplet(attributes, parameters, '1.5');
	checkBrowser();
	</script>
    <div id="sidebar-wrap">
			<hr style="margin: 0;"/>
			<iframe id="sidebar" name="ufHelp" src="ufHelp/Q1.html" frameborder="no"/>
    </div> <!-- #sidebar-wrap -->
	</div>
  </body>
</html>