Mercurial > hg > digilib-old
annotate client/digitallibrary/dllib.js @ 354:7958035abec1
Servlet version 1.5.9d
- fixed a bug reading metadata
author | robcast |
---|---|
date | Wed, 12 Oct 2005 19:09:41 +0200 |
parents | d14782908c37 |
children | 3b710e39823b |
rev | line source |
---|---|
243
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
1 /* Copyright (C) 2003,2004 IT-Group MPIWG, WTWG Uni Bern and others |
237 | 2 |
3 This program is free software; you can redistribute it and/or | |
4 modify it under the terms of the GNU General Public License | |
5 as published by the Free Software Foundation; either version 2 | |
6 of the License, or (at your option) any later version. | |
7 | |
8 This program is distributed in the hope that it will be useful, | |
9 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 GNU General Public License for more details. | |
12 | |
13 You should have received a copy of the GNU General Public License | |
14 along with this program; if not, write to the Free Software | |
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | |
16 | |
243
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
17 Authors: |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
18 Christian Luginbuehl, 01.05.2003 (first version) |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
19 DW 24.03.2004 (Changed for digiLib in Zope) |
332
d14782908c37
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
317
diff
changeset
|
20 Robert Casties, 2.11.2004 |
237 | 21 |
243
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
22 ! Requires baselib.js ! |
237 | 23 |
24 */ | |
25 | |
317 | 26 |
27 function identify() { | |
28 // used for identifying a digilib instance | |
29 // Relato uses that function - lugi | |
30 return "Digilib 0.6"; | |
31 } | |
32 | |
237 | 33 |
34 /* | |
35 * more parameter handling | |
36 */ | |
37 | |
38 function parseArea() { | |
39 // returns area Rectangle from current parameters | |
40 return new Rectangle(getParameter("wx"), getParameter("wy"), getParameter("ww"), getParameter("wh")); | |
41 } | |
42 | |
43 function setParamFromArea(rect) { | |
44 // sets digilib wx etc. from rect | |
45 setParameter("wx", cropFloat(rect.x)); | |
46 setParameter("wy", cropFloat(rect.y)); | |
47 setParameter("ww", cropFloat(rect.width)); | |
48 setParameter("wh", cropFloat(rect.height)); | |
49 return true; | |
50 } | |
51 | |
52 function parseTrafo(elem) { | |
53 // returns Transform from current dlArea and picsize | |
54 var picsize = getElementRect(elem); | |
55 var trafo = new Transform(); | |
56 // subtract area offset and size | |
57 trafo.concat(getTranslation(new Position(-dlArea.x, -dlArea.y))); | |
58 trafo.concat(getScale(new Size(1/dlArea.width, 1/dlArea.height))); | |
59 // scale to screen size | |
60 trafo.concat(getScale(picsize)); | |
61 trafo.concat(getTranslation(picsize)); | |
62 // rotate | |
63 //trafo.concat(getRotation(- getParameter("rot"), new Position(0.5*picsize.width, 0.5*picsize.height))); | |
64 // mirror | |
65 //if (hasFlag("hmir")) { | |
66 //trafo.m00 = - trafo.m00; | |
67 //} | |
68 //if (hasFlag("vmir")) { | |
69 //trafo.m11 = - trafo.m11; | |
70 //} | |
71 return trafo; | |
72 } | |
73 | |
74 | |
75 function parseMarks() { | |
76 // returns marks array from current parameters | |
77 var marks = new Array(); | |
78 var ma; | |
79 var mk = getParameter("mk"); | |
80 if (mk.indexOf(";") >= 0) { | |
81 // old format with ";" | |
82 ma = mk.split(";"); | |
83 } else { | |
84 ma = mk.split(","); | |
85 } | |
86 for (var i = 0; i < ma.length ; i++) { | |
87 var pos = ma[i].split("/"); | |
88 if (pos.length > 1) { | |
89 marks.push(new Position(pos[0], pos[1])); | |
90 } | |
91 } | |
92 return marks; | |
93 } | |
94 | |
95 function getAllMarks() { | |
96 // returns a string with all marks in query format | |
97 var marks = new Array(); | |
98 for (var i = 0; i < dlMarks.length; i++) { | |
99 marks.push(cropFloat(dlMarks[i].x) + "/" + cropFloat(dlMarks[i].y)); | |
100 } | |
101 return marks.join(","); | |
102 } | |
103 | |
104 function addMark(pos) { | |
105 // add a mark | |
106 dlMarks.push(pos); | |
107 setParameter("mk", getAllMarks()); | |
108 return true; | |
109 } | |
110 | |
111 function deleteMark() { | |
112 // delete the last mark | |
113 dlMarks.pop(); | |
114 setParameter("mk", getAllMarks()); | |
115 return true; | |
116 } | |
117 | |
118 function hasFlag(mode) { | |
119 // returns if mode flag is set | |
120 return (dlFlags[mode]); | |
121 } | |
122 | |
123 function addFlag(mode) { | |
124 // add a mode flag | |
125 dlFlags[mode] = mode; | |
239 | 126 setParameter("mo", getAllFlags()); |
237 | 127 return true; |
128 } | |
129 | |
130 function removeFlag(mode) { | |
131 // remove a mode flag | |
132 if (dlFlags[mode]) { | |
133 delete dlFlags[mode]; | |
134 } | |
239 | 135 setParameter("mo", getAllFlags()); |
237 | 136 return true; |
137 } | |
138 | |
139 function toggleFlag(mode) { | |
140 // change a mode flag | |
141 if (dlFlags[mode]) { | |
142 delete dlFlags[mode]; | |
143 } else { | |
144 dlFlags[mode] = mode; | |
145 } | |
239 | 146 setParameter("mo", getAllFlags()); |
237 | 147 return true; |
148 } | |
149 | |
150 function getAllFlags() { | |
151 // returns a string with all flags in query format | |
152 var fa = new Array(); | |
153 for (var f in dlFlags) { | |
154 if ((f != "")&&(dlFlags[f] != null)) { | |
155 fa.push(f); | |
156 } | |
157 } | |
158 return fa.join(","); | |
159 } | |
160 | |
161 function parseFlags() { | |
162 // sets dlFlags from the current parameters | |
163 var flags = new Object(); | |
164 var fa = getParameter("mo").split(","); | |
165 for (var i = 0; i < fa.length ; i++) { | |
166 var f = fa[i]; | |
167 if (f != "") { | |
168 flags[f] = f; | |
169 } | |
170 } | |
171 return flags; | |
172 } | |
173 | |
174 | |
175 function bestPicSize(elem, inset) { | |
176 // returns a Size with the best image size for the given element | |
177 if (! defined(inset)) { | |
178 inset = 25; | |
179 } | |
180 var ws = getWinSize(); | |
181 var es = getElementPosition(elem); | |
182 if (es) { | |
183 ws.width = ws.width - es.x - inset; | |
184 ws.height = ws.height - es.y - inset; | |
185 } | |
186 return ws; | |
187 } | |
188 | |
189 | |
190 /* ********************************************** | |
191 * digilib specific routines | |
192 * ******************************************** */ | |
193 | |
238 | 194 |
195 function dl_param_init() { | |
196 // parameter initialisation before onload | |
332
d14782908c37
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
317
diff
changeset
|
197 if (!baseScriptVersion) { |
d14782908c37
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
317
diff
changeset
|
198 base_init(); |
d14782908c37
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
317
diff
changeset
|
199 } |
d14782908c37
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
317
diff
changeset
|
200 dlScriptVersion = "1.1b"; |
d14782908c37
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
317
diff
changeset
|
201 dlArea = new Rectangle(0.0, 0.0, 1.0, 1.0); |
d14782908c37
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
317
diff
changeset
|
202 dlMaxArea = new Rectangle(0.0, 0.0, 1.0, 1.0); |
d14782908c37
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
317
diff
changeset
|
203 dlTrafo = new Transform(); |
d14782908c37
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
317
diff
changeset
|
204 dlMarks = new Array(); |
d14782908c37
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
317
diff
changeset
|
205 dlFlags = new Object(); |
d14782908c37
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
317
diff
changeset
|
206 elemScaler = null; |
d14782908c37
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
317
diff
changeset
|
207 picElem = null; |
d14782908c37
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
317
diff
changeset
|
208 ZOOMFACTOR = Math.sqrt(2); |
238 | 209 |
210 // put the query parameters (sans "?") in the parameters array | |
211 parseParameters(location.search.slice(1)); | |
212 // treat special parameters | |
213 dlMarks = parseMarks(); | |
214 dlArea = parseArea(); | |
215 dlFlags = parseFlags(); | |
216 } | |
217 | |
218 | |
237 | 219 function dl_init() { |
238 | 220 // initalisation on load |
332
d14782908c37
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
317
diff
changeset
|
221 if (!dlScriptVersion) { |
d14782908c37
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
317
diff
changeset
|
222 dl_param_init(); |
d14782908c37
fixed problems with Netscape4 (silly error by me partly :-)
robcast
parents:
317
diff
changeset
|
223 } |
237 | 224 elemScaler = getElement("scaler", true); |
225 picElem = getElement("pic", true); | |
226 if (picElem == null && elemScaler) { | |
227 // in N4 pic is in the scaler layer | |
228 picElem = elemScaler.document.images[0]; | |
229 } | |
230 if ((!elemScaler)||(!picElem)) { | |
231 alert("Sorry, zogilib doesn't work here!"); | |
232 return false; | |
233 } | |
234 // give a name to the window containing digilib | |
235 if (defined(dlTarget)&&(dlTarget)) { | |
236 window.name = dlTarget; | |
237 } else { | |
238 window.name = "digilib"; | |
239 } | |
240 // put the query parameters (sans "?") in the parameters array | |
241 parseParameters(location.search.slice(1)); | |
242 // treat special parameters | |
243 dlMarks = parseMarks(); | |
244 dlArea = parseArea(); | |
245 dlFlags = parseFlags(); | |
246 // wait for image to load and display marks | |
247 renderMarks(); | |
248 // done | |
249 focus(); | |
250 return; | |
251 } | |
252 | |
253 | |
254 function display(detail) { | |
255 // redisplay the page | |
256 if (! detail) { | |
257 detail = 9; | |
258 } | |
259 var queryString = getAllParameters(detail); | |
260 location.href = location.protocol + "//" + location.host + location.pathname + "?" + queryString; | |
261 } | |
262 | |
263 | |
264 /* ********************************************** | |
265 * interactive digilib functions | |
266 * ******************************************** */ | |
267 | |
268 | |
269 function renderMarks() { | |
270 // put the visible marks on the image | |
271 var mark_count = dlMarks.length; | |
272 // make shure the image is loaded so we know its size | |
273 if (defined(picElem.complete) && picElem.complete == false && ! browserType.isN4 ) { | |
274 setTimeout("renderMarks()", 100); | |
275 } else { | |
276 dlTrafo = parseTrafo(picElem); | |
277 for (var i = 0; i < 8; i++) { | |
278 var me = getElement("dot"+i); | |
279 if (i < mark_count) { | |
280 if (dlArea.containsPosition(dlMarks[i])) { | |
281 var mpos = dlTrafo.transform(dlMarks[i]); | |
282 // suboptimal to place -5 pixels and not half size of mark-image | |
283 mpos.x = mpos.x -5; | |
284 mpos.y = mpos.y -5; | |
285 moveElement(me, mpos); | |
286 showElement(me, true); | |
287 } | |
288 } else { | |
289 // hide the other marks | |
290 showElement(me, false); | |
291 } | |
292 } | |
293 } | |
294 } | |
295 | |
296 | |
239 | 297 function setMark(reload) { |
237 | 298 // add a mark where clicked |
299 if ( dlMarks.length > 7 ) { | |
300 alert("Only 8 marks are possible at the moment!"); | |
301 return; | |
302 } | |
317 | 303 window.focus(); |
237 | 304 |
305 function markEvent(evt) { | |
306 // event handler adding a new mark | |
243
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
307 unregisterEvent("mousedown", elemScaler, markEvent); |
237 | 308 var p = dlTrafo.invtransform(evtPosition(evt)); |
309 addMark(p); | |
239 | 310 if (defined(reload)&&(!reload)) { |
311 // don't redisplay | |
312 renderMarks(); | |
313 return; | |
314 } | |
237 | 315 display(); |
316 } | |
317 | |
318 // starting event capture | |
243
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
319 registerEvent("mousedown", elemScaler, markEvent); |
237 | 320 } |
321 | |
322 | |
239 | 323 function removeMark(reload) { |
324 // remove the last mark | |
325 deleteMark(); | |
326 if (defined(reload)&&(!reload)) { | |
327 // don't redisplay | |
328 renderMarks(); | |
329 return; | |
330 } | |
331 display(); | |
332 } | |
333 | |
334 | |
237 | 335 function zoomArea() { |
336 var click = 1; | |
337 var pt1, pt2; | |
338 var eck1pos, eck2pos, eck3pos, eck4pos; | |
339 window.focus(); | |
340 var eck1 = getElement("eck1"); | |
341 var eck2 = getElement("eck2"); | |
342 var eck3 = getElement("eck3"); | |
343 var eck4 = getElement("eck4"); | |
344 | |
345 function zoomClick(evt) { | |
346 // mouse click handler | |
347 if (click == 1) { | |
348 // first click -- start moving | |
349 click = 2; | |
350 pt1 = evtPosition(evt); | |
351 pt2 = pt1; | |
352 eck1pos = pt1; | |
353 eck2pos = new Position(pt1.x - 12, pt1.y); | |
354 eck3pos = new Position(pt1.x, pt1.y - 12); | |
355 eck4pos = new Position(pt1.y - 12, pt1.y - 12); | |
356 moveElement(eck1, eck1pos); | |
357 moveElement(eck2, eck2pos); | |
358 moveElement(eck3, eck3pos); | |
359 moveElement(eck4, eck4pos); | |
360 showElement(eck1, true); | |
361 showElement(eck2, true); | |
362 showElement(eck3, true); | |
363 showElement(eck4, true); | |
243
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
364 // show moving |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
365 registerEvent("mousemove", elemScaler, zoomMove); |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
366 registerEvent("mousemove", eck4, zoomMove); |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
367 // enable drag-to-zoom |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
368 registerEvent("mouseup", elemScaler, zoomClick); |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
369 registerEvent("mouseup", eck4, zoomClick); |
237 | 370 } else { |
371 // second click -- end moving | |
372 pt2 = evtPosition(evt); | |
373 showElement(eck1, false); | |
374 showElement(eck2, false); | |
375 showElement(eck3, false); | |
376 showElement(eck4, false); | |
243
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
377 unregisterEvent("mousemove", elemScaler, zoomMove); |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
378 unregisterEvent("mousemove", eck4, zoomMove); |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
379 unregisterEvent("mousedown", elemScaler, zoomClick); |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
380 unregisterEvent("mousedown", eck4, zoomClick); |
237 | 381 var p1 = dlTrafo.invtransform(pt1); |
382 var p2 = dlTrafo.invtransform(pt2); | |
383 var ww = p2.x-p1.x; | |
384 var wh = p2.y-p1.y; | |
385 if ((ww > 0)&&(wh > 0)) { | |
386 setParameter("wx", cropFloat(p1.x)); | |
387 setParameter("wy", cropFloat(p1.y)); | |
388 setParameter("ww", cropFloat(ww)); | |
389 setParameter("wh", cropFloat(wh)); | |
390 parseArea(); | |
391 // zoomed is always fit | |
392 setParameter("ws", 1); | |
393 display(); | |
394 } | |
395 } | |
396 } | |
397 | |
398 function zoomMove(evt) { | |
399 // mouse move handler | |
400 pt2 = evtPosition(evt); | |
401 // restrict marks to move right and down | |
402 eck1pos = pt1; | |
403 eck2pos = new Position(Math.max(pt1.x, pt2.x)-12, pt1.y); | |
404 eck3pos = new Position(pt1.x, Math.max(pt1.y, pt2.y)-12); | |
405 eck4pos = new Position(Math.max(pt1.x, pt2.x)-12, Math.max(pt1.y, pt2.y)-12); | |
406 moveElement(eck1, eck1pos); | |
407 moveElement(eck2, eck2pos); | |
408 moveElement(eck3, eck3pos); | |
409 moveElement(eck4, eck4pos); | |
410 } | |
411 | |
412 // starting event capture | |
243
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
413 registerEvent("mousedown", elemScaler, zoomClick); |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
414 registerEvent("mousedown", eck4, zoomClick); |
237 | 415 } |
416 | |
417 function zoomBy(factor) { | |
418 // zooms by the given factor | |
239 | 419 var newarea = dlArea.copy(); |
237 | 420 newarea.width /= factor; |
421 newarea.height /= factor; | |
422 newarea.x -= 0.5 * (newarea.width - dlArea.width); | |
423 newarea.y -= 0.5 * (newarea.height - dlArea.height); | |
424 newarea = dlMaxArea.fit(newarea); | |
425 setParamFromArea(newarea); | |
426 display(); | |
427 } | |
428 | |
429 | |
430 function zoomFullpage() { | |
431 // zooms out to show the whole image | |
432 setParameter("wx", 0.0); | |
433 setParameter("wy", 0.0); | |
434 setParameter("ww", 1.0); | |
435 setParameter("wh", 1.0); | |
436 display(); | |
437 } | |
438 | |
439 | |
440 function moveCenter() { | |
441 // move visible area so that it's centered around the clicked point | |
442 if ( (dlArea.width == 1.0) && (dlArea.height == 1.0) ) { | |
443 // noting to do | |
444 return; | |
445 } | |
446 window.focus(); | |
447 | |
448 function moveCenterEvent(evt) { | |
449 // move to handler | |
243
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
450 unregisterEvent("mousedown", elemScaler, moveCenterEvent); |
237 | 451 var pt = dlTrafo.invtransform(evtPosition(evt)); |
452 var newarea = new Rectangle(pt.x-0.5*dlArea.width, pt.y-0.5*dlArea.height, dlArea.width, dlArea.height); | |
453 newarea = dlMaxArea.fit(newarea); | |
454 // set parameters | |
455 setParamFromArea(newarea); | |
456 parseArea(); | |
457 display(); | |
458 } | |
459 | |
460 // starting event capture | |
243
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
461 registerEvent("mousedown", elemScaler, moveCenterEvent); |
237 | 462 } |
463 | |
243
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
464 function moveBy(movx, movy) { |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
465 // move visible area by movx and movy (in units of dw, dh) |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
466 if ((dlArea.width == 1.0)&&(dlArea.height == 1.0)) { |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
467 // nothing to do |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
468 return; |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
469 } |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
470 var newarea = dlArea.copy(); |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
471 newarea.x += parseFloat(movx)*dlArea.width; |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
472 newarea.y += parseFloat(movy)*dlArea.height; |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
473 newarea = dlMaxArea.fit(newarea); |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
474 // set parameters |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
475 setParamFromArea(newarea); |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
476 parseArea(); |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
477 display(); |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
478 } |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
479 |
4dbff786ff50
new digimage with red triangles for moving the zoomed area
robcast
parents:
239
diff
changeset
|
480 |
237 | 481 |
482 | |
238 | 483 function getRef() { |
237 | 484 // returns a reference to the current digilib set |
485 if (! baseUrl) { | |
486 var baseUrl = location.protocol + "//" + location.host + location.pathname; | |
487 } | |
488 var hyperlinkRef = baseUrl; | |
489 var par = getAllParameters(9); | |
490 if (par.length > 0) { | |
491 hyperlinkRef += "?" + par; | |
492 } | |
493 return hyperlinkRef; | |
494 } | |
317 | 495 |
496 function getRefWin(type, msg) { | |
497 // shows an alert with a reference to the current digilib set | |
498 if (! msg) { | |
499 msg = "Link for HTML documents"; | |
500 } | |
501 prompt(msg, getRef()); | |
502 } |