comparison client/digitallibrary/dlImage.jsp @ 33:054ebc851059

first update of new client-version
author luginbue
date Thu, 21 Feb 2002 02:27:06 +0100
parents
children 44f653ae5df5
comparison
equal deleted inserted replaced
32:c5ca5f72fb65 33:054ebc851059
1 <%
2 // checking if the height and width of this client is already known
3 if ((request.getParameter("dw") == null) || (request.getParameter("dh") == null)) {
4 %>
5
6 <html>
7 <head>
8 <script language="Javascript">
9
10 function redirect() {
11
12 if (navigator.appName.toLowerCase() == "netscape") { // mozilla-browsers (netscape 4.xx, netscape 6.xx, etc.)
13 client = "&dw=" + (innerWidth-30) + "&dh=" + (innerHeight-30);
14 } else { // ie
15 client = "&dw=" + (document.body.clientWidth-30) + "&dh=" + (document.body.clientHeight-30);
16 }
17
18 location.replace("dlImage.jsp?<%= request.getQueryString() %>" + client);
19 }
20
21 </script>
22 </head>
23 <body bgcolor="#666666" onload="redirect()">
24 </body>
25 </html>
26
27 <%
28 } else {
29
30 // default values for parameters
31 String fn = "/"; // url of the page/document
32 String pn = "1"; // page number
33 String ws = "1"; // scale factor
34 String mo = ""; // special options like 'fit' for gifs
35 String mk = "0/0"; // marks
36 String wx = "0"; // left edge of image (float from 0 to 1)
37 String wy = "0"; // top edge in image (float from 0 to 1)
38 String ww = "1"; // width of image (float from 0 to 1)
39 String wh = "1"; // height of image (float from 0 to 1)
40 String dw = ""; // width of client in pixels
41 String dh = ""; // height of client in pixels
42
43 String pt = ""; // (module pagesTotal.js) total number of pages
44
45 // overrriding default parameters with provided parameters from query-string
46 if (request.getParameter("fn") != null) fn = request.getParameter("fn");
47 if (request.getParameter("pn") != null) pn = request.getParameter("pn");
48 if (request.getParameter("ws") != null) ws = request.getParameter("ws");
49 if (request.getParameter("mo") != null) mo = request.getParameter("mo");
50 if (request.getParameter("mk") != null) mk = request.getParameter("mk");
51 if (request.getParameter("wx") != null) wx = request.getParameter("wx");
52 if (request.getParameter("wy") != null) wy = request.getParameter("wy");
53 if (request.getParameter("ww") != null) ww = request.getParameter("ww");
54 if (request.getParameter("wh") != null) wh = request.getParameter("wh");
55 if (request.getParameter("dw") != null) dw = request.getParameter("dw");
56 if (request.getParameter("dh") != null) dh = request.getParameter("dh");
57 if (request.getParameter("pt") != null) pt = request.getParameter("pt");
58
59 String imageLocation = "http://" + request.getServerName() + "/docuserver/digitallibrary/servlet/Scaler/" + fn + "?pn=" + pn + "&ws=" + ws + "&mo=" + mo + "&wx=" + wx + "&wy=" + wy + "&ww=" + ww + "&wh=" + wh + "&dw=" + dw + "&dh=" + dh;
60
61 %>
62
63 <html>
64 <head>
65 <script language="JavaScript">
66
67 // browser version test to include the corresponding navigation-file
68 if ((navigator.appName.toLowerCase() == "netscape") && (parseFloat(navigator.appVersion) < 5.0)) {
69 document.write('<script src="navigation_n4.js"><\/script>');
70 } else if (navigator.appName.toLowerCase() == "netscape") {
71 document.write('<script src="navigation_n6.js"><\/script>');
72 } else if ((navigator.appName.toLowerCase() == "microsoft internet explorer") && (parseFloat(navigator.appVersion) >= 4.0)) {
73 document.write('<script src="navigation_ie.js"><\/script>');
74 } else {
75 // alert('Your browser is not directly supported by this client right now.\n\nLoading now the optimised version for Netscape 6, that sticks the most to the w3c specifications.');
76 document.write('<script src="navigation_n6.js"><\/script>');
77 }
78
79 // add module to show the total number of pages (not browser dependant!)
80 document.write('<script src="modules\/pagesTotal.js"><\/script>');
81 document.write('<script src="modules\/pdfMaker.js"><\/script>');
82
83 </script>
84 </head>
85 <body bgcolor="#666666" onload='init_pagesTotal("<%= fn %>", "<%= pn %>", "<%= ws %>", "<%= mo %>", "<%= mk %>", "<%= wx %>", "<%= wy %>", "<%= ww %>", "<%= wh %>", "<%= pt %>")'>
86
87 <div id="lay1" style="position: absolute; left: 10px; top: 10px; visibility: visible"><img name="pic" src="<%= imageLocation %>" border="0"></div>
88
89 <div id="dot0" style="position: absolute; left: -20; top: 100; visibility: hidden"><img src="mark1.gif" border="0"></div>
90 <div id="dot1" style="position: absolute; left: -20; top: 100; visibility: hidden"><img src="mark2.gif" border="0"></div>
91 <div id="dot2" style="position: absolute; left: -20; top: 100; visibility: hidden"><img src="mark3.gif" border="0"></div>
92 <div id="dot3" style="position: absolute; left: -20; top: 100; visibility: hidden"><img src="mark4.gif" border="0"></div>
93 <div id="dot4" style="position: absolute; left: -20; top: 100; visibility: hidden"><img src="mark5.gif" border="0"></div>
94 <div id="dot5" style="position: absolute; left: -20; top: 100; visibility: hidden"><img src="mark6.gif" border="0"></div>
95 <div id="dot6" style="position: absolute; left: -20; top: 100; visibility: hidden"><img src="mark7.gif" border="0"></div>
96 <div id="dot7" style="position: absolute; left: -20; top: 100; visibility: hidden"><img src="mark8.gif" border="0"></div>
97 <div id="eck1" style="position: absolute; left: -20; top: 100; visibility: hidden"><img src="olinks.gif" border="0"></div>
98 <div id="eck2" style="position: absolute; left: -20; top: 100; visibility: hidden"><img src="orechts.gif" border="0"></div>
99 <div id="eck3" style="position: absolute; left: -20; top: 100; visibility: hidden"><img src="ulinks.gif" border="0"></div>
100 <div id="eck4" style="position: absolute; left: -20; top: 100; visibility: hidden"><img src="urechts.gif" border="0"></div>
101 </body>
102 </html>
103 <%
104 }
105 %>