changeset 20:d407cb901df4

Initial revision
author robcast
date Thu, 17 Jan 2002 15:29:55 +0100
parents 0ff3ede32060
children 37eae12d4148
files client/digitallibrary/WEB-INF/digilib-auth.xml client/digitallibrary/WEB-INF/digilib-config.xml client/digitallibrary/WEB-INF/lib/DigilibServlet.jar client/digitallibrary/WEB-INF/lib/jai_codec.jar client/digitallibrary/WEB-INF/lib/jai_core.jar client/digitallibrary/WEB-INF/lib/mlibwrapper_jai.jar client/digitallibrary/WEB-INF/lib/xerces.jar client/digitallibrary/WEB-INF/web.xml client/digitallibrary/buttons/back0.gif client/digitallibrary/buttons/back1.gif client/digitallibrary/buttons/background0.gif client/digitallibrary/buttons/background1.gif client/digitallibrary/buttons/description0.gif client/digitallibrary/buttons/description1.gif client/digitallibrary/buttons/digicat0.gif client/digitallibrary/buttons/digicat1.gif client/digitallibrary/buttons/fw_menu.js client/digitallibrary/buttons/glossar0.gif client/digitallibrary/buttons/help0.gif client/digitallibrary/buttons/home0.gif client/digitallibrary/buttons/home1.gif client/digitallibrary/buttons/makepdf0.gif client/digitallibrary/buttons/makepdf1.gif client/digitallibrary/buttons/mark.gif client/digitallibrary/buttons/mark0.gif client/digitallibrary/buttons/mark1.gif client/digitallibrary/buttons/matrix0.gif client/digitallibrary/buttons/matrix1.gif client/digitallibrary/buttons/menu.js client/digitallibrary/buttons/moveto0.gif client/digitallibrary/buttons/moveto1.gif client/digitallibrary/buttons/newwindow0.gif client/digitallibrary/buttons/newwindow1.gif client/digitallibrary/buttons/next0.gif client/digitallibrary/buttons/next1.gif client/digitallibrary/buttons/nomark.gif client/digitallibrary/buttons/page0.gif client/digitallibrary/buttons/page1.gif client/digitallibrary/buttons/questionmark0.gif client/digitallibrary/buttons/questionmark1.gif client/digitallibrary/buttons/reference0.gif client/digitallibrary/buttons/reference1.gif client/digitallibrary/buttons/refresh0.gif client/digitallibrary/buttons/refresh1.gif client/digitallibrary/buttons/relation0.gif client/digitallibrary/buttons/relation1.gif client/digitallibrary/buttons/scale0.gif client/digitallibrary/buttons/scale1.gif client/digitallibrary/buttons/spacer.gif client/digitallibrary/buttons/type0.gif client/digitallibrary/buttons/type1.gif client/digitallibrary/buttons/work0.gif client/digitallibrary/buttons/work1.gif client/digitallibrary/buttons/zoomarea0.gif client/digitallibrary/buttons/zoomarea1.gif client/digitallibrary/buttons/zoomout0.gif client/digitallibrary/buttons/zoomout1.gif client/digitallibrary/buttons/zoompoint0.gif client/digitallibrary/buttons/zoompoint1.gif client/digitallibrary/digicat.html client/digitallibrary/digicat.jsp client/digitallibrary/digilib-fail.html client/digitallibrary/digilib-login.html client/digitallibrary/digilib.html client/digitallibrary/digilib.jsp client/digitallibrary/empty.html client/digitallibrary/mark1.gif client/digitallibrary/mark2.gif client/digitallibrary/mark3.gif client/digitallibrary/mark4.gif client/digitallibrary/mark5.gif client/digitallibrary/mark6.gif client/digitallibrary/mark7.gif client/digitallibrary/mark8.gif client/digitallibrary/navcat.html client/digitallibrary/navcat_ie.js client/digitallibrary/navcat_n4.js client/digitallibrary/navcat_n6.js client/digitallibrary/navigation.html client/digitallibrary/navigation_ie.js client/digitallibrary/navigation_n4.js client/digitallibrary/navigation_n6.js client/digitallibrary/olinks.gif client/digitallibrary/orechts.gif client/digitallibrary/page.js client/digitallibrary/ulinks.gif client/digitallibrary/urechts.gif client/doc/dokumentation_digilib.html client/doc/dokumentation_digilib.txt
diffstat 89 files changed, 3738 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/WEB-INF/digilib-auth.xml	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,27 @@
+<!--
+-->
+<auth-config>
+
+  <digilib-paths>
+    <!-- 
+      A user must supply one of the roles under "role"
+      to access the directory "name".
+      Roles under "role" must be separated by comma only (no spaces).  
+    -->
+    <path name="histast/eastwood-collection" role="eastwood-coll" />
+    <path name="ptolemaios_geo" role="ptolemaios-geo" />
+  </digilib-paths>
+
+  <digilib-addresses>
+    <!-- 
+      A computer with an ip address that matches "ip"
+      is automatically granted all roles under "role".
+      The ip address is matched from the left (in full quads).
+      Roles under "role" must be separated by comma only (no spaces). 
+    -->
+    <address ip="127" role="local" />
+    <address ip="130.92.68" role="eastwood-coll,ptolemaios-geo" />
+    <address ip="130.92.151" role="ALL" />
+  </digilib-addresses>
+
+</auth-config>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/WEB-INF/digilib-config.xml	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,28 @@
+<!-- Digilib servlet config file -->
+
+<digilib-config>
+  <parameter name="debug-level" value="0" />
+
+  <!--  Image to be sent to indicate general failure. -->
+  <parameter name="error-image" value="/docuserver/images/icons/broken.gif" />
+
+  <!--  Image to be sent to indicate authorization failure. -->
+  <parameter name="denied-image" value="/docuserver/images/icons/alert.red.gif" />
+
+  <!-- List of directories where images are searched.
+       Directories with low-resolution images are first in list. -->
+  <parameter name="basedir-list" value="/docuserver/scaled/small:/docuserver/images:/docuserver/scans/quellen" />
+
+  <!-- Restrict access to authorized users.
+       User authentication and roles are provided by the servlet container 
+       (see tomcat-users.xml).
+       Authorization for resources (directories) is evaluated by the servlet 
+       (see auth-file). -->
+  <parameter name="use-authorization" value="true" />
+
+  <!-- 	  URL location of XML file with authorization requirements. -->
+  <parameter name="auth-file" value="/docuserver/www/digitallibrary/WEB-INF/digilib-auth.xml" />
+
+  <!-- Part of URL to indicate authenticated access to Tomcat. -->
+  <parameter name="auth-url-path" value="authenticated/" />
+</digilib-config>
Binary file client/digitallibrary/WEB-INF/lib/DigilibServlet.jar has changed
Binary file client/digitallibrary/WEB-INF/lib/jai_codec.jar has changed
Binary file client/digitallibrary/WEB-INF/lib/jai_core.jar has changed
Binary file client/digitallibrary/WEB-INF/lib/mlibwrapper_jai.jar has changed
Binary file client/digitallibrary/WEB-INF/lib/xerces.jar has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/WEB-INF/web.xml	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,83 @@
+<!DOCTYPE web-app 
+    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" 
+    "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+
+
+    <!-- General description of your web application -->
+
+    <display-name>Docuserver</display-name>
+    <description>
+      This is the web frontend of Docuserver.
+    </description>
+
+
+    <servlet>
+      <servlet-name>Scaler</servlet-name>
+      <description>
+	The servlet to scale the digilib images.
+      </description>
+      <servlet-class>digilib.servlet.Scaler</servlet-class>
+      <!-- parameters to the servlet -->
+      <init-param>
+        <param-name>config-file</param-name>
+	<param-value>
+	  /docuserver/www/digitallibrary/WEB-INF/digilib-config.xml
+	</param-value>
+      </init-param>
+      <!-- Load this servlet at server startup time -->
+      <load-on-startup>5</load-on-startup>
+    </servlet>
+
+  <!-- We want to finger around with the default JSP servlet... -->
+  <servlet>
+    <servlet-name>doc-jsp</servlet-name>
+    <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
+    <init-param>
+      <param-name>logVerbosityLevel</param-name>
+      <param-value>WARNING</param-value>
+    </init-param>
+      <!-- parameters to the servlet -->
+      <init-param>
+        <param-name>config-file</param-name>
+	<param-value>
+	  /docuserver/www/digitallibrary/WEB-INF/digilib-config.xml
+	</param-value>
+      </init-param>
+    <load-on-startup>3</load-on-startup>
+  </servlet>
+
+
+  <!-- The mapping for the JSP servlet -->
+  <servlet-mapping>
+    <servlet-name>doc-jsp</servlet-name>
+    <url-pattern>*.jsp</url-pattern>
+  </servlet-mapping>
+
+
+  <!-- region for authenticated access -->
+    <security-constraint>
+      <web-resource-collection>
+        <web-resource-name>Authenticated Digilib</web-resource-name>
+	<url-pattern>/authenticated/*</url-pattern>
+      </web-resource-collection>
+      <auth-constraint>
+        <role-name>user</role-name>
+      </auth-constraint>
+   </security-constraint>
+
+    <login-config>
+<!--
+      <auth-method>BASIC</auth-method>
+      <realm-name>digilib</realm-name> 
+-->
+      <auth-method>FORM</auth-method>
+      <form-login-config>
+        <form-login-page>/digilib-login.html</form-login-page>
+	<form-error-page>/digilib-fail.html</form-error-page>
+      </form-login-config>
+
+    </login-config>
+
+</web-app>
Binary file client/digitallibrary/buttons/back0.gif has changed
Binary file client/digitallibrary/buttons/back1.gif has changed
Binary file client/digitallibrary/buttons/background0.gif has changed
Binary file client/digitallibrary/buttons/background1.gif has changed
Binary file client/digitallibrary/buttons/description0.gif has changed
Binary file client/digitallibrary/buttons/description1.gif has changed
Binary file client/digitallibrary/buttons/digicat0.gif has changed
Binary file client/digitallibrary/buttons/digicat1.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/buttons/fw_menu.js	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,744 @@
+/* fw_menu -- JS library for digilib buttons
+
+  Digital Image Library servlet components
+
+  Copyright (C) 2001, 2002 Christian Luginbuehl (luginbuehl@student.unibe.ch)
+
+  This program is free software; you can redistribute  it and/or modify it
+  under  the terms of  the GNU General  Public License as published by the
+  Free Software Foundation;  either version 2 of the  License, or (at your
+  option) any later version.
+   
+  Please read license.txt for the full details. A copy of the GPL
+  may be found at http://www.gnu.org/copyleft/lgpl.html
+
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+function Menu(label, mw, mh, fnt, fs, fclr, fhclr, bg, bgh) {
+	this.version = "990702 [Menu; menu.js]";
+	this.type = "Menu";
+	this.menuWidth = mw;
+	this.menuItemHeight = mh;
+	this.fontSize = fs||12;
+	this.fontWeight = "plain";
+	this.fontFamily = fnt||"arial,helvetica,verdana,sans-serif";
+	this.fontColor = fclr||"#000000";
+	this.fontColorHilite = fhclr||"#ffffff";
+	this.bgColor = "#555555";
+	this.menuBorder = 1;
+	this.menuItemBorder = 1;
+	this.menuItemBgColor = bg||"#cccccc";
+	this.menuLiteBgColor = "#ffffff";
+	this.menuBorderBgColor = "#777777";
+	this.menuHiliteBgColor = bgh||"#000084";
+	this.menuContainerBgColor = "#cccccc";
+	this.childMenuIcon = "arrows.gif";
+	this.items = new Array();
+	this.actions = new Array();
+	this.childMenus = new Array();
+
+	this.hideOnMouseOut = true;
+
+	this.addMenuItem = addMenuItem;
+	this.addMenuSeparator = addMenuSeparator;
+	this.writeMenus = writeMenus;
+	this.FW_showMenu = FW_showMenu;
+	this.onMenuItemOver = onMenuItemOver;
+	this.onMenuItemAction = onMenuItemAction;
+	this.hideMenu = hideMenu;
+	this.hideChildMenu = hideChildMenu;
+
+	if (!window.menus) window.menus = new Array();
+	this.label = label || "menuLabel" + window.menus.length;
+	window.menus[this.label] = this;
+	window.menus[window.menus.length] = this;
+	if (!window.activeMenus) window.activeMenus = new Array();
+}
+
+function addMenuItem(label, action) {
+	this.items[this.items.length] = label;
+	this.actions[this.actions.length] = action;
+}
+
+function addMenuSeparator() {
+	this.items[this.items.length] = "separator";
+	this.actions[this.actions.length] = "";
+	this.menuItemBorder = 0;
+}
+
+// For NS6. 
+function FIND(item) {
+	if (document.all) return(document.all[item]);
+	if (document.getElementById) return(document.getElementById(item));
+	return(false);
+}
+
+function writeMenus(container) {
+	if (window.triedToWriteMenus) return;
+
+	if (!container && document.layers) {
+		window.delayWriteMenus = this.writeMenus;
+		var timer = setTimeout('delayWriteMenus()', 250);
+		container = new Layer(100);
+		clearTimeout(timer);
+	} else if (document.all || document.hasChildNodes) {
+		document.writeln('<SPAN ID="menuContainer"></SPAN>');
+		container = FIND("menuContainer");
+	}
+
+	window.fwHideMenuTimer = null;
+	if (!container) return;	
+	window.triedToWriteMenus = true; 
+	container.isContainer = true;
+	container.menus = new Array();
+	for (var i=0; i<window.menus.length; i++) 
+		container.menus[i] = window.menus[i];
+	window.menus.length = 0;
+	var countMenus = 0;
+	var countItems = 0;
+	var top = 0;
+	var content = '';
+	var lrs = false;
+	var theStat = "";
+	var tsc = 0;
+	if (document.layers) lrs = true;
+	for (var i=0; i<container.menus.length; i++, countMenus++) {
+		var menu = container.menus[i];
+		if (menu.bgImageUp) {
+			menu.menuBorder = 0;
+			menu.menuItemBorder = 0;
+		}
+		if (lrs) {
+			var menuLayer = new Layer(100, container);
+			var lite = new Layer(100, menuLayer);
+			lite.top = menu.menuBorder;
+			lite.left = menu.menuBorder;
+			var body = new Layer(100, lite);
+			body.top = menu.menuBorder;
+			body.left = menu.menuBorder;
+		} else {
+			content += ''+
+			'<DIV ID="menuLayer'+ countMenus +'" STYLE="position:absolute;z-index:1;left:10;top:'+ (i * 100) +';visibility:hidden;">\n'+
+			'  <DIV ID="menuLite'+ countMenus +'" STYLE="position:absolute;z-index:1;left:'+ menu.menuBorder +';top:'+ menu.menuBorder +';visibility:hide;" onMouseOut="mouseoutMenu();">\n'+
+			'	 <DIV ID="menuFg'+ countMenus +'" STYLE="position:absolute;left:'+ menu.menuBorder +';top:'+ menu.menuBorder +';visibility:hide;">\n'+
+			'';
+		}
+		var x=i;
+		for (var i=0; i<menu.items.length; i++) {
+			var item = menu.items[i];
+			var childMenu = false;
+			var defaultHeight = menu.fontSize+6;
+			var defaultIndent = menu.fontSize;
+			if (item.label) {
+				item = item.label;
+				childMenu = true;
+			}
+			menu.menuItemHeight = menu.menuItemHeight || defaultHeight;
+			menu.menuItemIndent = menu.menuItemIndent || defaultIndent;
+			var itemProps = 'font-family:' + menu.fontFamily +';font-weight:' + menu.fontWeight + ';fontSize:' + menu.fontSize + ';';
+			if (menu.fontStyle) itemProps += 'font-style:' + menu.fontStyle + ';';
+			if (document.all) 
+				itemProps += 'font-size:' + menu.fontSize + ';" onMouseOver="onMenuItemOver(null,this);" onClick="onMenuItemAction(null,this);';
+			else if (!document.layers) {
+				itemProps += 'font-size:' + menu.fontSize + 'px;'; // zilla wants 12px.
+			}
+			var l;
+			if (lrs) {
+				l = new Layer(800,body);
+			}
+			var dTag	= '<DIV ID="menuItem'+ countItems +'" STYLE="position:absolute;left:0;top:'+ (i * menu.menuItemHeight) +';'+ itemProps +'">';
+			var dClose = '</DIV>'
+			if (menu.bgImageUp) {
+				menu.menuBorder = 0;
+				menu.menuItemBorder = 0;
+				dTag	= '<DIV ID="menuItem'+ countItems +'" STYLE="background:url('+menu.bgImageUp+');position:absolute;left:0;top:'+ (i * menu.menuItemHeight) +';'+ itemProps +'">';
+				if (document.layers) {
+					dTag = '<LAYER BACKGROUND="'+menu.bgImageUp+'" ID="menuItem'+ countItems +'" TOP="'+ (i * menu.menuItemHeight) +'" style="' + itemProps +'">';
+					dClose = '</LAYER>';
+				}
+			}
+			var textProps = 'position:absolute;left:' + menu.menuItemIndent + ';top:1;';
+			if (lrs) {
+				textProps +=itemProps;
+				dTag = "";
+				dClose = "";
+			}
+
+			var dText	= '<DIV ID="menuItemText'+ countItems +'" STYLE="' + textProps + 'color:'+ menu.fontColor +';">'+ item +'&nbsp</DIV>\n<DIV ID="menuItemHilite'+ countItems +'" STYLE="' + textProps + 'top:1;color:'+ menu.fontColorHilite +';visibility:hidden;">'+ item +'&nbsp</DIV>';
+			if (item == "separator") {
+				content += ( dTag + '<DIV ID="menuSeparator'+ countItems +'" STYLE="position:absolute;left:1;top:2;"></DIV>\n<DIV ID="menuSeparatorLite'+ countItems +'" STYLE="position:absolute;left:1;top:2;"></DIV>\n' + dClose);
+			} else if (childMenu) {
+				content += ( dTag + dText + '<DIV ID="childMenu'+ countItems +'" STYLE="position:absolute;left:0;top:3;"><IMG SRC="'+ menu.childMenuIcon +'"></DIV>\n' + dClose);
+			} else {
+				content += ( dTag + dText + dClose);
+			}
+			if (lrs) {
+				l.document.open("text/html");
+				l.document.writeln(content);
+				l.document.close();	
+				content = '';
+				theStat += "-";
+				tsc++;
+				if (tsc > 50) {
+					tsc = 0;
+					theStat = "";
+				}
+				status = theStat;
+			}
+			countItems++;  
+		}
+		if (lrs) {
+			// focus layer
+			var focusItem = new Layer(100, body);
+			focusItem.visiblity="hidden";
+			focusItem.document.open("text/html");
+			focusItem.document.writeln("&nbsp;");
+			focusItem.document.close();	
+		} else {
+		  content += '	  <DIV ID="focusItem'+ countMenus +'" STYLE="position:absolute;left:0;top:0;visibility:hide;" onClick="onMenuItemAction(null,this);">&nbsp;</DIV>\n';
+		  content += '   </DIV>\n  </DIV>\n</DIV>\n';
+		}
+		i=x;
+	}
+	if (document.layers) {		
+		container.clip.width = window.innerWidth;
+		container.clip.height = window.innerHeight;
+		container.onmouseout = mouseoutMenu;
+		container.menuContainerBgColor = this.menuContainerBgColor;
+		for (var i=0; i<container.document.layers.length; i++) {
+			proto = container.menus[i];
+			var menu = container.document.layers[i];
+			container.menus[i].menuLayer = menu;
+			container.menus[i].menuLayer.Menu = container.menus[i];
+			container.menus[i].menuLayer.Menu.container = container;
+			var body = menu.document.layers[0].document.layers[0];
+			body.clip.width = proto.menuWidth || body.clip.width;
+			body.clip.height = proto.menuHeight || body.clip.height;
+			for (var n=0; n<body.document.layers.length-1; n++) {
+				var l = body.document.layers[n];
+				l.Menu = container.menus[i];
+				l.menuHiliteBgColor = proto.menuHiliteBgColor;
+				l.document.bgColor = proto.menuItemBgColor;
+				l.saveColor = proto.menuItemBgColor;
+				l.onmouseover = proto.onMenuItemOver;
+				l.onclick = proto.onMenuItemAction;
+				l.action = container.menus[i].actions[n];
+				l.focusItem = body.document.layers[body.document.layers.length-1];
+				l.clip.width = proto.menuWidth || body.clip.width + proto.menuItemIndent;
+				l.clip.height = proto.menuItemHeight || l.clip.height;
+				if (n>0) l.top = body.document.layers[n-1].top + body.document.layers[n-1].clip.height + proto.menuItemBorder;
+				l.hilite = l.document.layers[1];
+				if (proto.bgImageUp) l.background.src = proto.bgImageUp;
+				l.document.layers[1].isHilite = true;
+				if (l.document.layers[0].id.indexOf("menuSeparator") != -1) {
+					l.hilite = null;
+					l.clip.height -= l.clip.height / 2;
+					l.document.layers[0].document.bgColor = proto.bgColor;
+					l.document.layers[0].clip.width = l.clip.width -2;
+					l.document.layers[0].clip.height = 1;
+					l.document.layers[1].document.bgColor = proto.menuLiteBgColor;
+					l.document.layers[1].clip.width = l.clip.width -2;
+					l.document.layers[1].clip.height = 1;
+					l.document.layers[1].top = l.document.layers[0].top + 1;
+				} else if (l.document.layers.length > 2) {
+					l.childMenu = container.menus[i].items[n].menuLayer;
+					l.document.layers[2].left = l.clip.width -13;
+					l.document.layers[2].top = (l.clip.height / 2) -4;
+					l.document.layers[2].clip.left += 3;
+					l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;
+				}
+			}
+			body.document.bgColor = proto.bgColor;
+			body.clip.width  = l.clip.width +proto.menuBorder;
+			body.clip.height = l.top + l.clip.height +proto.menuBorder;
+			var focusItem = body.document.layers[n];
+			focusItem.clip.width = body.clip.width;
+			focusItem.Menu = l.Menu;
+			focusItem.top = -30;
+            focusItem.captureEvents(Event.MOUSEDOWN);
+            focusItem.onmousedown = onMenuItemDown;
+			menu.document.bgColor = proto.menuBorderBgColor;
+			var lite = menu.document.layers[0];
+			lite.document.bgColor = proto.menuLiteBgColor;
+			lite.clip.width = body.clip.width +1;
+			lite.clip.height = body.clip.height +1;
+			menu.clip.width = body.clip.width + (proto.menuBorder * 3) ;
+			menu.clip.height = body.clip.height + (proto.menuBorder * 3);
+		}
+	} else {
+		if ((!document.all) && (container.hasChildNodes)) {
+			container.innerHTML=content;
+		} else {
+			container.document.open("text/html");
+			container.document.writeln(content);
+			container.document.close();	
+		}
+		if (!FIND("menuLayer0")) return;
+		var menuCount = 0;
+		for (var x=0; x<container.menus.length; x++) {
+			var menuLayer = FIND("menuLayer" + x);
+			container.menus[x].menuLayer = "menuLayer" + x;
+			menuLayer.Menu = container.menus[x];
+			menuLayer.Menu.container = "menuLayer" + x;
+			menuLayer.style.zIndex = 1;
+		    var s = menuLayer.style;
+			s.top = s.pixelTop = -300;
+			s.left = s.pixelLeft = -300;
+
+			var menu = container.menus[x];
+			menu.menuItemWidth = menu.menuWidth || menu.menuIEWidth || 140;
+			menuLayer.style.backgroundColor = menu.menuBorderBgColor;
+			var top = 0;
+			for (var i=0; i<container.menus[x].items.length; i++) {
+				var l = FIND("menuItem" + menuCount);
+				l.Menu = container.menus[x];
+				if (l.addEventListener) { // ns6
+					l.style.width = menu.menuItemWidth;	
+					l.style.height = menu.menuItemHeight;
+					l.style.top = top;
+					l.addEventListener("mouseover", onMenuItemOver, false);
+					l.addEventListener("click", onMenuItemAction, false);
+					l.addEventListener("mouseout", mouseoutMenu, false);
+				} else { //ie
+					l.style.pixelWidth = menu.menuItemWidth;	
+					l.style.pixelHeight = menu.menuItemHeight;
+					l.style.pixelTop = top;
+				}
+				top = top + menu.menuItemHeight+menu.menuItemBorder;
+				l.style.fontSize = menu.fontSize;
+				l.style.backgroundColor = menu.menuItemBgColor;
+				l.style.visibility = "inherit";
+				l.saveColor = menu.menuItemBgColor;
+				l.menuHiliteBgColor = menu.menuHiliteBgColor;
+				l.action = container.menus[x].actions[i];
+				l.hilite = FIND("menuItemHilite" + menuCount);
+				l.focusItem = FIND("focusItem" + x);
+				l.focusItem.style.pixelTop = l.focusItem.style.top = -30;
+				var childItem = FIND("childMenu" + menuCount);
+				if (childItem) {
+					l.childMenu = container.menus[x].items[i].menuLayer;
+					childItem.style.pixelLeft = childItem.style.left = menu.menuItemWidth -11;
+					childItem.style.pixelTop = childItem.style.top =(menu.menuItemHeight /2) -4;
+					//childItem.style.pixelWidth = 30 || 7;
+					//childItem.style.clip = "rect(0 7 7 3)";
+					l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;
+				}
+				var sep = FIND("menuSeparator" + menuCount);
+				if (sep) {
+					sep.style.clip = "rect(0 " + (menu.menuItemWidth - 3) + " 1 0)";
+					sep.style.width = sep.style.pixelWidth = menu.menuItemWidth;	
+					sep.style.backgroundColor = menu.bgColor;
+					sep = FIND("menuSeparatorLite" + menuCount);
+					sep.style.clip = "rect(1 " + (menu.menuItemWidth - 3) + " 2 0)";
+					sep.style.width = sep.style.pixelWidth = menu.menuItemWidth;	
+					sep.style.backgroundColor = menu.menuLiteBgColor;
+					l.style.height = l.style.pixelHeight = menu.menuItemHeight/2;
+					l.isSeparator = true
+					top -= (menu.menuItemHeight - l.style.pixelHeight)
+				} else {
+					l.style.cursor = "hand"
+				}
+				menuCount++;
+			}
+			menu.menuHeight = top-1;
+			var lite = FIND("menuLite" + x);
+			var s = lite.style;
+			s.height = s.pixelHeight = menu.menuHeight +(menu.menuBorder * 2);
+			s.width = s.pixelWidth = menu.menuItemWidth + (menu.menuBorder * 2);
+			s.backgroundColor = menu.menuLiteBgColor;
+
+			var body = FIND("menuFg" + x);
+			s = body.style;
+			s.height = s.pixelHeight = menu.menuHeight + menu.menuBorder;
+			s.width = s.pixelWidth = menu.menuItemWidth + menu.menuBorder;
+			s.backgroundColor = menu.bgColor;
+
+			s = menuLayer.style;
+			s.width = s.pixelWidth  = menu.menuItemWidth + (menu.menuBorder * 4);
+			s.height = s.pixelHeight  = menu.menuHeight+(menu.menuBorder*4);
+		}
+	}
+	if (document.captureEvents) {	
+		document.captureEvents(Event.MOUSEUP);
+	}
+	if (document.addEventListener) {	
+		document.addEventListener("mouseup", onMenuItemOver, false);
+	}
+	if (document.layers && window.innerWidth) {
+		window.onresize = NS4resize;
+		window.NS4sIW = window.innerWidth;
+		window.NS4sIH = window.innerHeight;
+	}
+	document.onmouseup = mouseupMenu;
+	window.fwWroteMenu = true;
+	status = "";
+}
+
+function NS4resize() {
+	if (NS4sIW < window.innerWidth || 
+		NS4sIW > window.innerWidth || 
+		NS4sIH > window.innerHeight || 
+		NS4sIH < window.innerHeight ) 
+	{
+		window.location.reload();
+	}
+}
+
+function onMenuItemOver(e, l) {
+	FW_clearTimeout();
+	l = l || this;
+	a = window.ActiveMenuItem;
+	if (document.layers) {
+		if (a) {
+			a.document.bgColor = a.saveColor;
+			if (a.hilite) a.hilite.visibility = "hidden";
+			if (a.Menu.bgImageOver) {
+				a.background.src = a.Menu.bgImageUp;
+			}
+			a.focusItem.top = -100;
+			a.clicked = false;
+		}
+		if (l.hilite) {
+			l.document.bgColor = l.menuHiliteBgColor;
+			l.zIndex = 1;
+			l.hilite.visibility = "inherit";
+			l.hilite.zIndex = 2;
+			l.document.layers[1].zIndex = 1;
+			l.focusItem.zIndex = this.zIndex +2;
+		}
+		if (l.Menu.bgImageOver) {
+			l.background.src = l.Menu.bgImageOver;
+		}
+		l.focusItem.top = this.top;
+		l.Menu.hideChildMenu(l);
+	} else if (l.style && l.Menu) {
+		if (a) {
+			a.style.backgroundColor = a.saveColor;
+			if (a.hilite) a.hilite.style.visibility = "hidden";
+			if (a.Menu.bgImageUp) {
+				a.style.background = "url(" + a.Menu.bgImageUp +")";;
+			}
+		} 
+		if (l.isSeparator) return;
+		l.style.backgroundColor = l.menuHiliteBgColor;
+		l.zIndex = 1;  // magic IE 4.5 mac happy doohicky.	jba
+		if (l.Menu.bgImageOver) {
+			l.style.background = "url(" + l.Menu.bgImageOver +")";
+		}
+		if (l.hilite) {
+			l.style.backgroundColor = l.menuHiliteBgColor;
+			l.hilite.style.visibility = "inherit";
+		}
+		l.focusItem.style.top = l.focusItem.style.pixelTop = l.style.pixelTop;
+		l.focusItem.style.zIndex = l.zIndex +1;
+		l.Menu.hideChildMenu(l);
+	} else {
+		return; // not a menu - magic IE 4.5 mac happy doohicky.  jba
+	}
+	window.ActiveMenuItem = l;
+}
+
+function onMenuItemAction(e, l) {
+	l = window.ActiveMenuItem;
+		                                  // hier wird die action bei menuclick gemacht
+	if (!l) return;
+	hideActiveMenus();
+	if (l.action) {
+		eval("" + l.action);
+	}
+	window.ActiveMenuItem = 0;
+}
+
+function FW_clearTimeout()
+{
+	if (fwHideMenuTimer) clearTimeout(fwHideMenuTimer);
+	fwHideMenuTimer = null;
+	fwDHFlag = false;
+}
+function FW_startTimeout()
+{
+	fwStart = new Date();
+	fwDHFlag = true;
+	fwHideMenuTimer = setTimeout("FW_doHide()", 1000);
+}
+
+function FW_doHide()
+{
+	if (!fwDHFlag) return;
+	var elapsed = new Date() - fwStart;
+	if (elapsed < 1000) {
+		fwHideMenuTimer = setTimeout("FW_doHide()", 1100-elapsed);
+		return;
+	}
+	fwDHFlag = false;
+	hideActiveMenus();
+	window.ActiveMenuItem = 0;
+}
+
+function FW_showMenu(menu, x, y, child) {
+	if (!window.fwWroteMenu) return;
+	FW_clearTimeout();
+	if (document.layers) {
+		if (menu) {
+			var l = menu.menuLayer || menu;
+			l.left = 1;
+			l.top = 1;
+			hideActiveMenus();
+			if (this.visibility) l = this;
+			window.ActiveMenu = l;
+		} else {
+			var l = child;
+		}
+		if (!l) return;
+		for (var i=0; i<l.layers.length; i++) { 			   
+			if (!l.layers[i].isHilite) 
+				l.layers[i].visibility = "inherit";
+			if (l.layers[i].document.layers.length > 0) 
+				FW_showMenu(null, "relative", "relative", l.layers[i]);
+		}
+		if (l.parentLayer) {
+			if (x != "relative") 
+				l.parentLayer.left = x || window.pageX || 0;
+			if (l.parentLayer.left + l.clip.width > window.innerWidth) 
+				l.parentLayer.left -= (l.parentLayer.left + l.clip.width - window.innerWidth);
+			if (y != "relative") 
+				l.parentLayer.top = y || window.pageY || 0;
+			if (l.parentLayer.isContainer) {
+				l.Menu.xOffset = window.pageXOffset;
+				l.Menu.yOffset = window.pageYOffset;
+				l.parentLayer.clip.width = window.ActiveMenu.clip.width +2;
+				l.parentLayer.clip.height = window.ActiveMenu.clip.height +2;
+				if (l.parentLayer.menuContainerBgColor) l.parentLayer.document.bgColor = l.parentLayer.menuContainerBgColor;
+			}
+		}
+		l.visibility = "inherit";
+		if (l.Menu) l.Menu.container.visibility = "inherit";
+	} else if (FIND("menuItem0")) {
+		var l = menu.menuLayer || menu;	
+		hideActiveMenus();
+		if (typeof(l) == "string") {
+			l = FIND(l);
+		}
+		window.ActiveMenu = l;
+		var s = l.style;
+		s.visibility = "inherit";
+		if (x != "relative") 
+			s.left = s.pixelLeft = x || (window.pageX + document.body.scrollLeft) || 0;
+		if (y != "relative") 
+			s.top = s.pixelTop = y || (window.pageY + document.body.scrollTop) || 0;
+		l.Menu.xOffset = document.body.scrollLeft;
+		l.Menu.yOffset = document.body.scrollTop;
+	}
+	if (menu) {
+		window.activeMenus[window.activeMenus.length] = l;
+	}
+}
+
+function onMenuItemDown(e, l) {
+	var a = window.ActiveMenuItem;
+	if (document.layers) {
+		if (a) {
+			a.eX = e.pageX;
+			a.eY = e.pageY;
+			a.clicked = true;
+		}
+    }
+}
+
+function mouseupMenu(e)
+{
+	hideMenu(true, e);
+	hideActiveMenus();
+	return true;
+}
+
+function mouseoutMenu()
+{
+	hideMenu(false, false);
+	return true;
+}
+
+
+function hideMenu(mouseup, e) {
+	var a = window.ActiveMenuItem;
+	if (a && document.layers) {
+		a.document.bgColor = a.saveColor;
+		a.focusItem.top = -30;
+		if (a.hilite) a.hilite.visibility = "hidden";
+		if (mouseup && a.action && a.clicked && window.ActiveMenu) {
+ 			if (a.eX <= e.pageX+15 && a.eX >= e.pageX-15 && a.eY <= e.pageY+10 && a.eY >= e.pageY-10) {
+				setTimeout('window.ActiveMenu.Menu.onMenuItemAction();', 2);
+			}
+		}
+		a.clicked = false;
+		if (a.Menu.bgImageOver) {
+			a.background.src = a.Menu.bgImageUp;
+		}
+	} else if (window.ActiveMenu && FIND("menuItem0")) {
+		if (a) {
+			a.style.backgroundColor = a.saveColor;
+			if (a.hilite) a.hilite.style.visibility = "hidden";
+			if (a.Menu.bgImageUp) {
+				a.style.background = "url(" + a.Menu.bgImageUp +")";;
+			}
+		}
+	}
+	if (!mouseup && window.ActiveMenu) {
+		if (window.ActiveMenu.Menu) {
+			if (window.ActiveMenu.Menu.hideOnMouseOut) {
+				FW_startTimeout();
+			}
+			return(true);
+		}
+	}
+	return(true);
+}
+
+function PxToNum(pxStr)
+{ // pxStr == 27px, we want 27.
+	if (pxStr.length > 2) {
+		n = Number(pxStr.substr(0, pxStr.length-2));
+		return(n);
+	}
+	return(0);
+}
+
+function hideChildMenu(hcmLayer) {
+	FW_clearTimeout();
+	var l = hcmLayer;
+	for (var i=0; i < l.Menu.childMenus.length; i++) {
+		var theLayer = l.Menu.childMenus[i];
+		if (document.layers) {
+			theLayer.visibility = "hidden";
+		} else {
+			theLayer = FIND(theLayer);
+			theLayer.style.visibility = "hidden";
+		}
+		theLayer.Menu.hideChildMenu(theLayer);
+	}
+
+	if (l.childMenu) {
+		var childMenu = l.childMenu;
+		if (document.layers) {
+			l.Menu.FW_showMenu(null,null,null,childMenu.layers[0]);
+			childMenu.zIndex = l.parentLayer.zIndex +1;
+			childMenu.top = l.top + l.parentLayer.top + l.Menu.menuLayer.top + l.Menu.menuItemHeight/3;
+			if (childMenu.left + childMenu.clip.width > window.innerWidth) {
+				childMenu.left = l.parentLayer.left - childMenu.clip.width + l.Menu.menuLayer.left + 15;
+				l.Menu.container.clip.left -= childMenu.clip.width;
+			} else {
+				childMenu.left = l.parentLayer.left + l.parentLayer.clip.width  + l.Menu.menuLayer.left -5;
+			}
+			var w = childMenu.clip.width+childMenu.left-l.Menu.container.clip.left;
+			if (w > l.Menu.container.clip.width)  
+				l.Menu.container.clip.width = w;
+			var h = childMenu.clip.height+childMenu.top-l.Menu.container.clip.top;
+			if (h > l.Menu.container.clip.height) l.Menu.container.clip.height = h;
+			l.document.layers[1].zIndex = 0;
+			childMenu.visibility = "inherit";
+		} else if (FIND("menuItem0")) {
+			childMenu = FIND(l.childMenu);
+			var menuLayer = FIND(l.Menu.menuLayer);
+			var s = childMenu.style;
+			s.zIndex = menuLayer.style.zIndex+1;
+			if (document.all) { // ie case.
+				s.pixelTop = l.style.pixelTop + menuLayer.style.pixelTop + l.Menu.menuItemHeight/3;
+				s.left = s.pixelLeft = (menuLayer.style.pixelWidth) + menuLayer.style.pixelLeft -5;
+			} else { // zilla case
+				var top = PxToNum(l.style.top) + PxToNum(menuLayer.style.top) + l.Menu.menuItemHeight/3;
+				var left = (PxToNum(menuLayer.style.width)) + PxToNum(menuLayer.style.left) -5;
+				s.top = top;
+				s.left = left;
+			}
+			childMenu.style.visibility = "inherit";
+		} else {
+		return;
+		}
+		window.activeMenus[window.activeMenus.length] = childMenu;
+	}
+}
+
+function hideActiveMenus() {
+	if (!window.activeMenus) return;
+	for (var i=0; i < window.activeMenus.length; i++) {
+		if (!activeMenus[i]) continue;
+		if (activeMenus[i].visibility && activeMenus[i].Menu) {
+			activeMenus[i].visibility = "hidden";
+			activeMenus[i].Menu.container.visibility = "hidden";
+			activeMenus[i].Menu.container.clip.left = 0;
+		} else if (activeMenus[i].style) {
+			var s = activeMenus[i].style;
+			s.visibility = "hidden";
+			s.left = -200;
+			s.top = -200;
+		}
+	}
+	if (window.ActiveMenuItem) {
+		hideMenu(false, false);
+	}
+	window.activeMenus.length = 0;
+}
+
+function MM_findObj(n, d) { //v3.0
+  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
+    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
+  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
+  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
+}
+function MM_swapImage() { //v3.0
+  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
+   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
+}
+function MM_swapImgRestore() { //v3.0
+  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
+}
+
+function MM_preloadImages() { //v3.0
+ var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
+   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
+   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
+}
+
+
+// additional help for the different buttens. makes a floating window with content given by helpText
+
+// just to be sure, that no buffer overflow can arrive
+var semaphor = true;
+
+function contextHelp(helpText, relX, relY) {
+
+	if (showHelp && semaphor) {
+		semaphor = false;	
+		var help = helpText.split("|");
+
+		var helpWindowWidth = 270;
+		var helpWindowHeight = 130;
+
+		var xScreen = relX*(screen.width-helpWindowWidth);
+		var yScreen = relY*(screen.height-helpWindowHeight);
+
+		var helpWindow = window.open("", "ContextHelp", "width=" + helpWindowWidth + ",height=" + helpWindowHeight + ",screenX=" + xScreen + ",screenY=" + yScreen + ",left=" + xScreen + ",top=" + yScreen);
+
+		helpWindow.focus();
+		helpWindow.document.open();
+		helpWindow.document.write('<html><head><title>Context Help</title>');
+		helpWindow.document.write('<style type="text/css">');
+		helpWindow.document.write('.title {font-family: Verdana, sans-serif, Arial; font-size: 12px; font-weight: bold; color: #FFFFFF}');
+		helpWindow.document.write('.text {font-family: Verdana, sans-serif, Arial; font-size: 10px; color: #000000}');
+		helpWindow.document.write('</style></head><body bgcolor="#CCCCCC" leftmargin="7" topmargin="7" marginwidth="7" marginheight="7" onLoad="opener.semaphor = true;">');
+		helpWindow.document.write('<table width="' + (helpWindowWidth-8) + '" border="0" cellspacing="0" cellpadding="3"><tr><td bgcolor="#666666" class="title">');
+		helpWindow.document.write(help[0] + '</tr><tr><td class="text">');
+		helpWindow.document.write(help[1] + '</tr></td></table></body></html>');
+		helpWindow.document.close();	
+	}
+	
+	// stupid workaround because of netscape 6, that doesen't know the opener property
+	// this workaround is still ok cause netscape 6 has eventbuffer check (no overflow)
+    if ((navigator.appName.toLowerCase() == "netscape") && (parseFloat(navigator.appVersion) >= 5.0)) {
+        semaphor = true;
+	}
+}
Binary file client/digitallibrary/buttons/glossar0.gif has changed
Binary file client/digitallibrary/buttons/help0.gif has changed
Binary file client/digitallibrary/buttons/home0.gif has changed
Binary file client/digitallibrary/buttons/home1.gif has changed
Binary file client/digitallibrary/buttons/makepdf0.gif has changed
Binary file client/digitallibrary/buttons/makepdf1.gif has changed
Binary file client/digitallibrary/buttons/mark.gif has changed
Binary file client/digitallibrary/buttons/mark0.gif has changed
Binary file client/digitallibrary/buttons/mark1.gif has changed
Binary file client/digitallibrary/buttons/matrix0.gif has changed
Binary file client/digitallibrary/buttons/matrix1.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/buttons/menu.js	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,228 @@
+function checkBrowser(){
+	this.ver = navigator.appVersion;
+	this.dom = document.getElementById ? 1 : 0;
+	this.ie5 = (this.ver.indexOf("MSIE 5")>-1 && this.dom) ? 1 : 0;
+	this.ie4 = (document.all && !this.dom) ? 1 : 0;
+	this.ns5 = (this.dom && parseInt(this.ver) >= 5) ? 1 : 0;
+	this.ns4 = (document.layers && !this.dom) ? 1 : 0;
+	this.ie = (this.ie4 || this.ie5);
+	return this;
+}
+
+browser = new checkBrowser();
+
+function changeBc(obj, color){
+	var div;
+
+	if (color == '' && browser.ns4) color = null;
+
+	if (browser.ns4) div = document.layers[obj];
+	else if (browser.dom) div = document.getElementById(obj).style;
+	else if (browser.ie) div = document.all[obj].style;
+
+	if (browser.dom || browser.ie) div.backgroundColor = color;
+	if (browser.ns4) div.bgColor = color;
+}
+
+function makeArray(n){
+	this.length = n;
+	for (var i = 0; i < n; i++) {
+		this[i] = new Image();
+	}
+	
+	return this;
+}
+
+function preloadImages() {
+	over = new makeArray(document.images.length);
+	away = new makeArray(document.images.length);
+
+	for (i = 0; i < document.images.length; i++) {
+		currName = document.images[i].src.slice(0, document.images[i].src.lastIndexOf('.')-1);
+		away[i].src = currName + "0.gif";
+		over[i].src = currName + "1.gif";
+	}
+}
+
+function overButton(n) {
+	currButton = document.images[n];
+
+	currButton.src = over[n].src;
+	if (showHelp) contextHelp(n);
+}
+
+function awayButton(n) {
+	currButton = document.images[n];
+
+	currButton.src = away[n].src;
+}
+
+function overItem(obj) {
+	changeBc("menu" + obj, '#770000');
+	clearTimeout(timeID);
+}
+
+function awayItem(obj) {
+	changeBc("menu" + obj, '');
+	timeID = setTimeout("hideMenu()", 700);
+}
+
+var timeID = null;
+
+function changeMark(obj) {
+	var object;
+	
+	if (browser.ns4) object = document.layers["menu" + obj].document.images[0];
+	else if (browser.dom) object = document.getElementById("mark" + obj);
+	else if (browser.ie) object = document.all["mark" + obj];
+	
+	var path = object.src.slice(0, object.src.lastIndexOf('/')+1);
+	
+	object.src = (object.src.indexOf("nomark") > -1) ? path + "mark.gif" : path + "nomark.gif";
+}
+
+function showMenu(obj) {
+	menu(obj, true);
+}
+
+function menu(obj, show) {
+	var currObj = "menu" + obj;
+	var idx = 0;
+	while(true) {
+		if (browser.ns4 && document.layers[currObj]) document.layers[currObj].visibility = (show) ? "show" : "hide";
+		else if (browser.dom && document.getElementById(currObj)) document.getElementById(currObj).style.visibility = (show) ? "visible" : "hidden";
+		else if (browser.ie && document.all[currObj]) document.all[currObj].style.visibility = (show) ? "visible" : "hidden";
+		else break;
+		
+		currObj = "menu" + obj + (++idx);
+	}
+	if (!show) activeMenu = '';
+	else activeMenu = obj;
+
+	timeID = setTimeout("hideMenu()", 2000);
+}
+
+function hideMenu() {
+	if (activeMenu != '') menu(activeMenu, false);
+	clearTimeout(timeID);
+}
+
+var activeMenu = '';
+
+
+// just to be sure, that no buffer overflow can arrive
+var semaphor = true;
+
+function contextHelp(n) {
+
+	if (helpWindow.closed) {
+		changeMark(31);
+		changeHelp();
+		return;
+	}
+
+	if ((navigator.appVersion.indexOf("Macintosh") < 0) && semaphor) {
+		semaphor = false;	
+		var help = helpText[n].split("|");
+	
+		helpWindow.focus();
+		helpWindow.document.open();
+		helpWindow.document.write('<html><head><title>Context Help</title>');
+		helpWindow.document.write('<style type="text/css">');
+		helpWindow.document.write('.title {font-family: Verdana, sans-serif, Arial; font-size: 12px; font-weight: bold; color: #FFFFFF}');
+		helpWindow.document.write('.text {font-family: Verdana, sans-serif, Arial; font-size: 10px; color: #000000}');
+		helpWindow.document.write('</style></head><body bgcolor="#CCCCCC" leftmargin="7" topmargin="7" marginwidth="7" marginheight="7" onload="opener.semaphor = true;">');
+		helpWindow.document.write('<table width="99%" border="0" cellspacing="0" cellpadding="3"><tr><td bgcolor="#666666" class="title">');
+		helpWindow.document.write(help[0] + '</tr><tr><td class="text">');
+		helpWindow.document.write(help[1] + '</tr></td></table></body></html>');
+		helpWindow.document.close();	
+
+		// stupid workaround because of netscape 6, that doesen't know the opener property
+		// this workaround is still ok cause netscape 6 has eventbuffer checks so no overflow
+    	if (browser.ns5) {
+        	semaphor = true;
+		}
+	}
+	
+}
+
+function openContextHelp() {
+	if (navigator.appVersion.indexOf("Macintosh") > -1) {
+		openContextHelpMac();
+		return;
+	}
+
+	semaphor = false;
+	
+	var winWidth = 270;
+	var winHeight = 130;
+
+	var xScreen = 0.9*(screen.width-winWidth);
+	var yScreen = 0.8*(screen.height-winHeight);
+
+	helpWindow = window.open("", "ContextHelp", "width=" + winWidth + ",height=" + winHeight + ",screenX=" + xScreen + ",screenY=" + yScreen + ",left=" + xScreen + ",top=" + yScreen);
+
+	helpWindow.focus();
+	helpWindow.document.open();
+	helpWindow.document.write('<html><head><title>Context Help</title>');
+	helpWindow.document.write('<style type="text/css">');
+	helpWindow.document.write('.title {font-family: Verdana, sans-serif, Arial; font-size: 12px; font-weight: bold; color: #FFFFFF}');
+	helpWindow.document.write('.text {font-family: Verdana, sans-serif, Arial; font-size: 10px; color: #000000}');
+	helpWindow.document.write('</style></head><body bgcolor="#CCCCCC" leftmargin="7" topmargin="7" marginwidth="7" marginheight="7">');
+	helpWindow.document.write('<table width="99%" border="0" cellspacing="0" cellpadding="3"><tr><td bgcolor="#666666" class="title">');
+	helpWindow.document.write('Context Help</tr><tr><td class="text">');
+	helpWindow.document.write('Move over any button to get some more information about its function</tr></td></table></body></html>');
+	helpWindow.document.close();
+	
+	// for some safety reason help-requests have to be blocked while opening the window
+	setTimeout("semaphor = true;", 200);
+}
+
+// because macs have a strange window focus behaviour we have to go a special
+// way for them - just opening a window that contains all button-descriptions
+function openContextHelpMac() {
+
+	var winWidth = 270;
+	var winHeight = 600;
+
+	var xScreen = 0.9*(screen.width-winWidth);
+	var yScreen = 0.8*(screen.height-winHeight);
+
+	helpWindow = window.open("", "ContextHelp", "width=" + winWidth + ",height=" + winHeight + ",screenX=" + xScreen + ",screenY=" + yScreen + ",left=" + xScreen + ",top=" + yScreen + ",scrollbars");
+
+	helpWindow.focus();
+	helpWindow.document.open();
+	helpWindow.document.write('<html><head><title>Context Help Macintosh</title>');
+	helpWindow.document.write('<style type="text/css">');
+	helpWindow.document.write('.title {font-family: Verdana, sans-serif, Arial; font-size: 12px; font-weight: bold; color: #FFFFFF}');
+	helpWindow.document.write('.text {font-family: Verdana, sans-serif, Arial; font-size: 10px; color: #000000}');
+	helpWindow.document.write('</style></head><body bgcolor="#CCCCCC" leftmargin="7" topmargin="7" marginwidth="7" marginheight="7">');
+	helpWindow.document.write('<table width="99%" border="0" cellspacing="0" cellpadding="3">');
+
+	for (n = 0; n < helpText.length; n++) {
+
+		help = helpText[n].split("|");
+		helpWindow.document.write('<tr><td bgcolor="#666666" class="title">');
+		helpWindow.document.write(help[0] + '</tr><tr><td class="text">');
+		helpWindow.document.write('<p>' + help[1] + '<br>&nbsp;</p></tr></td>');
+	}
+	helpWindow.document.write('</table></body></html>');
+	helpWindow.document.close();	
+}
+
+
+function closeContextHelp() {
+	if (helpWindow != '' && !helpWindow.closed) {
+		helpWindow.close();
+	}
+	helpWindow = '';
+}
+
+function changeHelp() {
+	showHelp = !showHelp;
+	showHelp ? openContextHelp() : closeContextHelp();
+}
+
+
+// variable containing the contextwindow
+var helpWindow = '';
\ No newline at end of file
Binary file client/digitallibrary/buttons/moveto0.gif has changed
Binary file client/digitallibrary/buttons/moveto1.gif has changed
Binary file client/digitallibrary/buttons/newwindow0.gif has changed
Binary file client/digitallibrary/buttons/newwindow1.gif has changed
Binary file client/digitallibrary/buttons/next0.gif has changed
Binary file client/digitallibrary/buttons/next1.gif has changed
Binary file client/digitallibrary/buttons/nomark.gif has changed
Binary file client/digitallibrary/buttons/page0.gif has changed
Binary file client/digitallibrary/buttons/page1.gif has changed
Binary file client/digitallibrary/buttons/questionmark0.gif has changed
Binary file client/digitallibrary/buttons/questionmark1.gif has changed
Binary file client/digitallibrary/buttons/reference0.gif has changed
Binary file client/digitallibrary/buttons/reference1.gif has changed
Binary file client/digitallibrary/buttons/refresh0.gif has changed
Binary file client/digitallibrary/buttons/refresh1.gif has changed
Binary file client/digitallibrary/buttons/relation0.gif has changed
Binary file client/digitallibrary/buttons/relation1.gif has changed
Binary file client/digitallibrary/buttons/scale0.gif has changed
Binary file client/digitallibrary/buttons/scale1.gif has changed
Binary file client/digitallibrary/buttons/spacer.gif has changed
Binary file client/digitallibrary/buttons/type0.gif has changed
Binary file client/digitallibrary/buttons/type1.gif has changed
Binary file client/digitallibrary/buttons/work0.gif has changed
Binary file client/digitallibrary/buttons/work1.gif has changed
Binary file client/digitallibrary/buttons/zoomarea0.gif has changed
Binary file client/digitallibrary/buttons/zoomarea1.gif has changed
Binary file client/digitallibrary/buttons/zoomout0.gif has changed
Binary file client/digitallibrary/buttons/zoomout1.gif has changed
Binary file client/digitallibrary/buttons/zoompoint0.gif has changed
Binary file client/digitallibrary/buttons/zoompoint1.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/digicat.html	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<html>
+<head>
+<title>Digital Library Redirect</title>
+</head>
+
+<script LANGUAGE="JavaScript">
+
+<!-- Beginning of JavaScript --------
+
+this.location = "http://"+location.host+"/docuserver/digitallibrary/digicat.jsp"+location.search;
+
+// -- End of JavaScript code -------------- -->
+
+</SCRIPT>
+
+<body>
+<h1>Digital Library Redirect</h1>
+
+<p>You should automatically be redirected to the Digital Library page.</p>
+
+<p>If this doesn't happen please <a href="digicat.jsp">click here</a>.</p>
+
+<hr>
+<address>robert.casties@philo.unibe.ch</address>
+</body> </html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/digicat.jsp	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,48 @@
+<html>
+<head>
+
+<jsp:useBean id="DB" scope="page" class="digilib.servlet.DocumentBean" />
+
+<%
+// set servlet init-parameter
+DB.setConfig(getServletConfig());
+// check if authentication is needed and redirect if necessary
+DB.doAuthentication(request, response);
+%>
+
+<script language="JavaScript">
+
+// DEBUG
+//alert('DIR: <%= DB.getDocuPath(request) %> PAGES: <%= DB.getNumPages(request) %>');
+
+// the document's query string (minus "?")
+var query = location.search.substring(1);
+
+// first page number
+var firstPage = <%= DB.getFirstPage(request) %>;
+
+// number of pages of the document
+var numPages = <%= DB.getNumPages(request) %>;
+
+    // browser version test to include the corresponding navigation-file
+    if ((navigator.appName.toLowerCase() == "netscape") && (parseFloat(navigator.appVersion) < 5.0)) {
+        top.document.write('<script src="navcat_n4.js"><\/script>');
+    } else if (navigator.appName.toLowerCase() == "netscape") {
+        top.document.write('<script src="navcat_n6.js"><\/script>');
+    } else if ((navigator.appName.toLowerCase() == "microsoft internet explorer") && (parseFloat(navigator.appVersion) >= 4.0)) {
+    	top.document.write('<script src="navcat_ie.js"><\/script>');
+    } else {
+        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.');
+        top.document.write('<script src="navcat_n6.js"><\/script>');
+    }   
+
+</script>
+
+</head>
+
+<frameset cols="*,90" boder="no" border="0" onLoad="whichFrame = parent.mainFrame; initPicture(query); loadThumbTable(); initScripts();">
+  <frame name="mainFrame" src="about:blank">
+  <frame name="rightFrame" src="navcat.html" scrolling="no" noresize>
+</frameset>
+
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/digilib-fail.html	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<html> <head>
+<title>Login to digilib</title>
+</head>
+
+<body>
+<h1>Login to digilib failed</h1>
+
+<p>The name and password are incorrect!</p>
+
+<p>You can use the browser's &quot;Back&quot; button and try again.</p>
+
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/digilib-login.html	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<html> <head>
+<title>Login to digilib</title>
+</head>
+
+<body>
+
+<h2>This document requires authentication</h2>
+
+<p>Please enter the name and the password to access this document.<p>
+
+<form method=POST action=j_security_check>
+<table>
+  <tr>
+    <td>Name:</td>
+    <td><input type="text" name="j_username"></td>
+  </tr>
+  <tr>
+    <td>Password:</td>
+    <td><input type="password" name="j_password"></td>
+  </tr>
+  <tr>
+    <td></td>
+    <td><input type="SUBMIT" value="  OK  "></td>
+  </tr>
+  </table>
+</form>
+
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/digilib.html	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<html>
+<head>
+<title>Digital Library Redirect</title>
+</head>
+
+<script LANGUAGE="JavaScript">
+
+<!-- Beginning of JavaScript --------
+
+this.location = "http://"+location.host+"/docuserver/digitallibrary/digilib.jsp"+location.search;
+
+// -- End of JavaScript code -------------- -->
+
+</SCRIPT>
+<body>
+<h1>Digital Library Redirect</h1>
+
+<p>You should automatically be redirected to the Digital Library page.</p>
+
+<p>If this doesn't happen please <a href="digilib.jsp">click here</a>.</p>
+
+<hr>
+<address>robert.casties@philo.unibe.ch</address>
+</body> </html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/digilib.jsp	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,49 @@
+<html>
+<title>Digital Document Library</title>
+<head>
+<jsp:useBean id="DB" scope="page" class="digilib.servlet.DocumentBean" />
+
+<%
+// set servlet init-parameter
+DB.setConfig(getServletConfig());
+// check if authentication is needed and redirect if necessary
+DB.doAuthentication(request, response);
+%>
+
+<script language="JavaScript">
+
+// the document's query string (minus "?")
+var query = location.search.substring(1);
+
+// feel free to uncomment - i have never seen a problem so...
+// // DEBUG 
+// alert('DIR: <%= DB.getDocuPath(request) %> PAGES: <%= DB.getNumPages(request) %>');
+
+// number of pages of the document
+var numPages = <%= DB.getNumPages(request) %>;
+
+// browser version test to include the corresponding navigation-file
+if ((navigator.appName.toLowerCase() == "netscape") && (parseFloat(navigator.appVersion) < 5.0)) {
+	top.document.write('<script src="navigation_n4.js"><\/script>');
+} else if (navigator.appName.toLowerCase() == "netscape") {
+	top.document.write('<script src="navigation_n6.js"><\/script>');
+} else if ((navigator.appName.toLowerCase() == "microsoft internet explorer") && (parseFloat(navigator.appVersion) >= 4.0)) {
+	top.document.write('<script src="navigation11_ie.js"><\/script>');
+} else {
+	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.');
+	top.document.write('<script src="navigation_n6.js"><\/script>');
+}
+
+</script>
+
+</head>
+
+<frameset cols="*,90" border="0" onLoad="whichFrame = parent.mainFrame; initPicture(query); loadPicture(2); initScripts();">
+  <frame name="mainFrame" src="about:blank" scrolling="auto">
+  <frameset rows="20,*" border="0">
+    <frame name="pageFrame" src="about:blank" scrolling="no" noresize>
+    <frame name="rightFrame" src="navigation.html" scrolling="no" noresize>
+  </frameset>
+</frameset>
+
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/empty.html	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<html>
+<head>
+</head>
+
+<body>
+</body>
+</html>
Binary file client/digitallibrary/mark1.gif has changed
Binary file client/digitallibrary/mark2.gif has changed
Binary file client/digitallibrary/mark3.gif has changed
Binary file client/digitallibrary/mark4.gif has changed
Binary file client/digitallibrary/mark5.gif has changed
Binary file client/digitallibrary/mark6.gif has changed
Binary file client/digitallibrary/mark7.gif has changed
Binary file client/digitallibrary/mark8.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/navcat.html	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,50 @@
+<html>
+<head>
+<style type="text/css">
+.menu1 {position:absolute; top:122; left:41; width:44; height:138; clip:rect(0,44,138,0); visibility:hidden}
+.item1 {position:absolute; left:43; width:40; height:14; clip:rect(0,40,14,0); visibility:hidden}
+
+.text {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #FFFFFF; text-decoration: none}
+</style>
+<script language="JavaScript" src="buttons/menu.js"></script>
+<script language="JavaScript">
+// because on a netscape 4.xx bug (messing up with layers on resize) we cache the window
+// resize event and redisplay the navigation frame
+if (document.layers && !document.getElementById) {
+	window.onresize = function() {parent.rightFrame.location.reload();}
+}
+
+function reloadTable(row, col) {
+	parent.att[2] = row;
+	parent.att[3] = col;
+	parent.loadThumbTable();
+}
+
+// turn off the contexthelp
+var showHelp = false;
+</script>
+</head>
+
+<body bgcolor="#CCCCCC" leftmargin="8" marginwidth="8" topmargin="20" marginheight="20" onload="preloadImages();">
+<a href="#" onClick="parent.Backpage(); return false;" onmouseover="overButton(0)" onmouseout="awayButton(0)"><img src="buttons/back0.gif" width="73" height="30" border="0"></a><br>
+<a href="#" onClick="parent.Nextpage(); return false;" onmouseover="overButton(1)" onmouseout="awayButton(1)"><img src="buttons/next0.gif" width="73" height="30" border="0"></a><br><br>
+<a href="#" onclick="hideMenu(); showMenu(1); return false;" onmouseover="overButton(2)" onmouseout="awayButton(2)"><img src="buttons/matrix0.gif" width="73" height="30" border="0"></a><br>
+
+<div id="menu1" class="menu1"></div>
+ <div id="menu11" class="item1" style="top:124"><center><a href="#" class="text" onClick="hideMenu(); reloadTable(1, 2); return false;" onmouseover="overItem(11)" onmouseout="awayItem(11)">1x2</a></center></div>
+ <div id="menu12" class="item1" style="top:139"><center><a href="#" class="text" onClick="hideMenu(); reloadTable(2, 3); return false;" onmouseover="overItem(12)" onmouseout="awayItem(12)">2x3</a></center></div>
+ <div id="menu13" class="item1" style="top:154"><center><a href="#" class="text" onClick="hideMenu(); reloadTable(2, 4); return false;" onmouseover="overItem(13)" onmouseout="awayItem(13)">2x4</a></center></div>
+ <div id="menu14" class="item1" style="top:169"><center><a href="#" class="text" onClick="hideMenu(); reloadTable(3, 2); return false;" onmouseover="overItem(14)" onmouseout="awayItem(14)">3x2</a></center></div>
+ <div id="menu15" class="item1" style="top:184"><center><a href="#" class="text" onClick="hideMenu(); reloadTable(3, 3); return false;" onmouseover="overItem(15)" onmouseout="awayItem(15)">3x3</a></center></div>
+ <div id="menu16" class="item1" style="top:199"><center><a href="#" class="text" onClick="hideMenu(); reloadTable(3, 4); return false;" onmouseover="overItem(16)" onmouseout="awayItem(16)">3x4</a></center></div>
+ <div id="menu17" class="item1" style="top:214"><center><a href="#" class="text" onClick="hideMenu(); reloadTable(3, 5); return false;" onmouseover="overItem(17)" onmouseout="awayItem(17)">3x5</a></center></div>
+ <div id="menu18" class="item1" style="top:229"><center><a href="#" class="text" onClick="hideMenu(); reloadTable(4, 5); return false;" onmouseover="overItem(18)" onmouseout="awayItem(18)">4x5</a></center></div>
+ <div id="menu19" class="item1" style="top:244"><center><a href="#" class="text" onClick="hideMenu(); reloadTable(4, 6); return false;" onmouseover="overItem(19)" onmouseout="awayItem(19)">4x6</a></center></div>
+
+<script language="Javascript">
+// initial background color of the menues (has to be done like this, 
+// otherwise menues in ns4 you will have wrong dimensions)
+changeBc("menu1", "#666666");
+</script>
+</body>
+</html>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/navcat_ie.js	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,142 @@
+/* navcat_ie -- JS library for digilib (IE version)
+
+  Digital Image Library servlet components
+
+  Copyright (C) 2001, 2002 Christian Luginbuehl (luginbuehl@student.unibe.ch)
+
+  This program is free software; you can redistribute  it and/or modify it
+  under  the terms of  the GNU General  Public License as published by the
+  Free Software Foundation;  either version 2 of the  License, or (at your
+  option) any later version.
+   
+  Please read license.txt for the full details. A copy of the GPL
+  may be found at http://www.gnu.org/copyleft/lgpl.html
+
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// these two global variables have to be initialised before the frist use of the functions below
+// to fill in the attributes you can use the function initPicture provided below
+// - array with all attributes
+var att = new Array();
+
+// - variable to store the path to the frame, in which the pictures should be created
+var whichFrame = parent.mainFrame;
+
+// give a name to the window containing digicat - this way one can test if there is already a
+// digicat-window open and replace the contents of it (ex. digilib)
+window.name = "digicat";
+
+function loadThumbTable() {
+	tableWidth = whichFrame.document.body.offsetWidth-30;
+	tableHeight = whichFrame.document.body.offsetHeight-30;
+
+	cellWidth = Math.floor(tableWidth/att[3])-9;
+	cellHeight = Math.floor(tableHeight/att[2])-6;
+	
+//	alert(tableWidth + "   " + tableHeight + "\n" + cellWidth + "   " +cellHeight);
+
+	whichFrame.document.open();
+	whichFrame.document.write('<html><head>');
+	whichFrame.document.write('<style type="text/css">.myFont {font-family: sans-serif, Arial; font-size: 11px; color: #FFFFFF}</style>');
+	whichFrame.document.write('<script language="Javascript">');
+	whichFrame.document.write('function loadDigilib(idx) {');
+	whichFrame.document.write('linkRef = "http://' + location.host + '/docuserver/digitallibrary/digilib.html?' + parent.att[0] + '+" + idx;');
+	whichFrame.document.write('win = window.open(linkRef, "digilib");');
+	whichFrame.document.write('win.focus();');	
+	whichFrame.document.write('}');	
+	whichFrame.document.write('</script>');	
+
+
+	whichFrame.document.write('</head><body bgcolor="#666666">');
+	whichFrame.document.write('<table border="1" width="' + tableWidth + '" height="' + tableHeight + '">');
+	for (i = 0; i < att[2]; i++) {
+		whichFrame.document.write('<tr>');
+		for (j = 0; j < att[3]; j++) {
+			indexNr = parseInt(att[1])+i*parseInt(att[3])+j;
+			thumb  = "http://" + location.host + "/docuserver/digitallibrary/servlet/Scaler/"
+			thumb += att[0] + "?" + "pn=" + indexNr + "&ws=1.0&mo=fit&dw=" + cellWidth + "&dh=" + (cellHeight-25);
+			whichFrame.document.write('<td align="center" valign="middle" width="' + cellWidth + '" height="' + cellHeight + '" class="myFont">');
+			whichFrame.document.write('<a href="javascript:loadDigilib(' + indexNr + ')">');
+			whichFrame.document.write('<img src="' + thumb + '" border="0">');
+			whichFrame.document.write('</a><br>');
+			whichFrame.document.write(indexNr + '</td>');
+		}
+		whichFrame.document.write('</tr>');
+	}
+	whichFrame.document.write('</table></body></html>');
+	whichFrame.document.close();
+
+	initScripts();
+}
+
+
+function Backpage() {
+
+	if (att[1] <= 1) {
+		att[1] = 1;
+        alert("You are already on the first page!");
+	}
+	
+    att[1] = parseInt(att[1])-parseInt(att[2]*att[3]);
+
+    if (att[1] < 1) {
+    	att[1] = 1;
+    }
+	loadThumbTable();
+}
+
+
+
+function Nextpage() {
+
+    att[1] = parseInt(att[1])+parseInt(att[2]*att[3]);
+	loadThumbTable();
+}
+
+
+// capturing keypresses for next and previous page
+function parseKeypress() {
+	e = whichFrame.event;
+
+	if (e.keyCode == 110) {
+		Nextpage();
+	}
+	if (e.keyCode == 98) {
+		Backpage();
+	}
+	whichFrame.document.cancleBubble = true;
+}
+
+
+
+// initialize browser specific things (keypress caputring)
+function initScripts() {
+	whichFrame.document.onkeypress = parseKeypress;
+	whichFrame.focus();
+}
+
+
+// fill in the values of the "att"-array
+function initPicture(picURL) {
+	att = picURL.split("+");
+
+	if (att[0].lastIndexOf("/") == att[0].length-1) {
+		att[0] = att[0].substring(0, att[0].length-1);
+	}
+	
+	if (att.length < 2 || att[1] == "") {
+		att[1] = 1;
+	}
+
+	if (att.length < 3 || att[2] == "") {
+		att[2] = 3;
+	}
+
+	if (att.length < 4) {
+		att[3] = 4;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/navcat_n4.js	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,135 @@
+/* navcat_n4 -- JS library for digilib (Netscape4 version)
+
+  Digital Image Library servlet components
+
+  Copyright (C) 2001, 2002 Christian Luginbuehl (luginbuehl@student.unibe.ch)
+
+  This program is free software; you can redistribute  it and/or modify it
+  under  the terms of  the GNU General  Public License as published by the
+  Free Software Foundation;  either version 2 of the  License, or (at your
+  option) any later version.
+   
+  Please read license.txt for the full details. A copy of the GPL
+  may be found at http://www.gnu.org/copyleft/lgpl.html
+
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// these two global variables have to be initialised before the frist use of the functions below
+// to fill in the attributes you can use the function initPicture provided below
+// - array with all attributes
+var att = new Array();
+
+// - variable to store the path to the frame, in which the pictures should be created
+var whichFrame = parent.mainFrame;
+
+// give a name to the window containing digicat - this way one can test if there is already a
+// digicat-window open and replace the contents of it (ex. digilib)
+window.name = "digicat";
+
+function loadThumbTable() {
+	tableWidth = whichFrame.innerWidth-30;
+	tableHeight = whichFrame.innerHeight-30;
+
+	cellWidth = Math.floor(tableWidth/att[3])-6;
+	cellHeight = Math.floor(tableHeight/att[2])-4;
+	
+//	alert(tableWidth + "   " + tableHeight + "\n" + cellWidth + "   " +cellHeight);
+
+	whichFrame.document.open();
+	whichFrame.document.write('<html><head>');
+	whichFrame.document.write('<style type="text/css">.myFont {font-family: sans-serif, Arial; font-size: 11px; color: #FFFFFF}</style>');
+	whichFrame.document.write('<script language="Javascript">');
+	whichFrame.document.write('function loadDigilib(idx) {');
+	whichFrame.document.write('linkRef = "http://' + location.host + '/docuserver/digitallibrary/digilib.html?' + parent.att[0] + '+" + idx;');
+	whichFrame.document.write('win = window.open(linkRef, "digilib");');
+	whichFrame.document.write('win.focus();');	
+	whichFrame.document.write('}');	
+	whichFrame.document.write('</script>');	
+
+
+	whichFrame.document.write('</head><body bgcolor="#666666">');
+	whichFrame.document.write('<table border="1" width="' + tableWidth + '" height="' + tableHeight + '">');
+	for (i = 0; i < att[2]; i++) {
+		whichFrame.document.write('<tr>');
+		for (j = 0; j < att[3]; j++) {
+			indexNr = parseInt(att[1])+i*parseInt(att[3])+j;
+			thumb  = "http://" + location.host + "/docuserver/digitallibrary/servlet/Scaler/"
+			thumb += att[0] + "?" + "pn=" + indexNr + "&ws=1.0&mo=fit&dw=" + cellWidth + "&dh=" + (cellHeight-25);
+			whichFrame.document.write('<td align="center" valign="middle" width="' + cellWidth + '" height="' + cellHeight + '" class="myFont">');
+			whichFrame.document.write('<a href="javascript:loadDigilib(' + indexNr + ')">');
+			whichFrame.document.write('<img src="' + thumb + '" border="0">');
+			whichFrame.document.write('</a><br>');
+			whichFrame.document.write(indexNr + '</td>');
+		}
+		whichFrame.document.write('</tr>');
+	}
+	whichFrame.document.write('</table></body></html>');
+	whichFrame.document.close();
+}
+
+
+function Backpage() {
+
+	if (att[1] <= 1) {
+		att[1] = 1;
+        alert("You are already on the first page!");
+	}
+	
+    att[1] = parseInt(att[1])-parseInt(att[2]*att[3]);
+
+    if (att[1] < 1) {
+    	att[1] = 1;
+    }
+	loadThumbTable();
+}
+
+
+function Nextpage() {
+
+    att[1] = parseInt(att[1])+parseInt(att[2]*att[3]);
+	loadThumbTable();
+}
+
+
+// capturing keypresses for next and previous page
+function parseKeypress(event) {
+	var whichCode = (window.Event) ? event.which : event.keyCode;
+	if (String.fromCharCode(whichCode) == "n") {
+		Nextpage();
+	}
+	if (String.fromCharCode(whichCode) == "b") {
+		Backpage();
+	}
+}
+
+
+// initialize browser specific things (keypress caputring)
+function initScripts() {
+	window.captureEvents(Event.KEYDOWN);
+	window.onkeydown = parseKeypress;
+}
+
+
+// fill in the values of the "att"-array
+function initPicture(picURL) {
+	att = picURL.split("+");
+
+	if (att[0].lastIndexOf("/") == att[0].length-1) {
+		att[0] = att[0].substring(0, att[0].length-1);
+	}
+	
+	if (att.length < 2 || att[1] == "") {
+		att[1] = 1;
+	}
+	if (att.length < 3 || att[2] == "") {
+		att[2] = 3;
+	}
+
+	if (att.length < 4) {
+		att[3] = 4;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/navcat_n6.js	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,141 @@
+/* navcat_n6 -- JS library for digilib (Mozilla version)
+
+  Digital Image Library servlet components
+
+  Copyright (C) 2001, 2002 Christian Luginbuehl (luginbuehl@student.unibe.ch)
+
+  This program is free software; you can redistribute  it and/or modify it
+  under  the terms of  the GNU General  Public License as published by the
+  Free Software Foundation;  either version 2 of the  License, or (at your
+  option) any later version.
+   
+  Please read license.txt for the full details. A copy of the GPL
+  may be found at http://www.gnu.org/copyleft/lgpl.html
+
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// these two global variables have to be initialised before the frist use of the functions below
+// to fill in the attributes you can use the function initPicture provided below
+// - array with all attributes
+var att = new Array();
+
+// - variable to store the path to the frame, in which the pictures should be created
+var whichFrame = parent.mainFrame;
+
+// give a name to the window containing digicat - this way one can test if there is already a
+// digicat-window open and replace the contents of it (ex. digilib)
+window.name = "digicat";
+
+function loadThumbTable() {
+	tableWidth = whichFrame.innerWidth-30;
+	tableHeight = whichFrame.innerHeight-30;
+
+	cellWidth = Math.floor(tableWidth/att[3])-6;
+	cellHeight = Math.floor(tableHeight/att[2])-4;
+	
+//	alert(tableWidth + "   " + tableHeight + "\n" + cellWidth + "   " +cellHeight);
+
+	whichFrame.document.open();
+	whichFrame.document.write('<html><head>');
+	whichFrame.document.write('<style type="text/css">.myFont {font-family: sans-serif, Arial; font-size: 11px; color: #FFFFFF}</style>');
+	whichFrame.document.write('<script language="Javascript">');
+	whichFrame.document.write('function loadDigilib(idx) {');
+	whichFrame.document.write('linkRef = "http://' + location.host + '/docuserver/digitallibrary/digilib.html?' + parent.att[0] + '+" + idx;');
+	whichFrame.document.write('win = window.open(linkRef, "digilib");');
+	whichFrame.document.write('win.focus();');	
+	whichFrame.document.write('}');	
+	whichFrame.document.write('</script>');	
+
+
+	whichFrame.document.write('</head><body bgcolor="#666666">');
+	whichFrame.document.write('<table border="1" width="' + tableWidth + '" height="' + tableHeight + '">');
+	for (i = 0; i < att[2]; i++) {
+		whichFrame.document.write('<tr>');
+		for (j = 0; j < att[3]; j++) {
+			indexNr = parseInt(att[1])+i*parseInt(att[3])+j;
+			thumb  = "http://" + location.host + "/docuserver/digitallibrary/servlet/Scaler/"
+			thumb += att[0] + "?" + "pn=" + indexNr + "&ws=1.0&mo=fit&dw=" + cellWidth + "&dh=" + (cellHeight-25);
+			whichFrame.document.write('<td align="center" valign="middle" width="' + cellWidth + '" height="' + cellHeight + '" class="myFont">');
+			whichFrame.document.write('<a href="javascript:loadDigilib(' + indexNr + ')">');
+			whichFrame.document.write('<img src="' + thumb + '" border="0">');
+			whichFrame.document.write('</a><br>');
+			whichFrame.document.write(indexNr + '</td>');
+		}
+		whichFrame.document.write('</tr>');
+	}
+	whichFrame.document.write('</table></body></html>');
+	whichFrame.document.close();
+
+	initScripts();
+}
+
+
+function Backpage() {
+
+	if (att[1] <= 1) {
+		att[1] = 1;
+        alert("You are already on the first page!");
+	}
+	
+    att[1] = parseInt(att[1])-parseInt(att[2]*att[3]);
+
+    if (att[1] < 1) {
+    	att[1] = 1;
+    }
+	loadThumbTable();
+}
+
+
+
+function Nextpage() {
+
+    att[1] = parseInt(att[1])+parseInt(att[2]*att[3]);
+	loadThumbTable();
+}
+
+
+// capturing keypresses for next and previous page
+// ascii-values of n = 110, b = 98
+function parseKeypress (event) {
+	if (event.charCode == 110) {
+		Nextpage();
+	}
+	if (event.charCode == 98) {
+		Backpage();
+	}
+}
+
+
+// initialize browser specific things (keypress caputring)
+function initScripts() {
+	for (var f = 0; f < frames.length; f++) {
+		frames[f].document.addEventListener('keypress', parseKeypress, true);
+	}
+	whichFrame.focus();
+}
+
+
+// fill in the values of the "att"-array
+function initPicture(picURL) {
+	att = picURL.split("+");
+
+	if (att[0].lastIndexOf("/") == att[0].length-1) {
+		att[0] = att[0].substring(0, att[0].length-1);
+	}
+	
+	if (att.length < 2 || att[1] == "") {
+		att[1] = 1;
+	}
+
+	if (att.length < 3 || att[2] == "") {
+		att[2] = 3;
+	}
+
+	if (att.length < 4) {
+		att[3] = 4;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/navigation.html	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,105 @@
+<html>
+<head>
+<style type="text/css">
+.menu {position:absolute; visibility:hidden}
+
+.item1 {position:absolute; left:33; width:50; height:14; clip:rect(0,50,14,0); visibility:hidden}
+.item2 {position:absolute; left:43; width:40; height:14; clip:rect(0,40,14,0); visibility:hidden}
+.item3 {position:absolute; left:3; width:80; height:14; clip:rect(0,80,14,0); visibility:hidden}
+
+.text {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #FFFFFF; text-decoration: none}
+</style>
+<script language="JavaScript" src="buttons/menu.js"></script>
+<script language="JavaScript" src="page.js"></script>
+<script language="JavaScript">
+// because on a netscape 4.xx bug (messing up with layers on resize) we cache the window
+// resize event and redisplay the navigation frame
+if (document.layers && !document.getElementById) {
+	window.onresize = function() {parent.rightFrame.location.reload();}
+}
+
+
+// variable that store the texts for contexthelp
+var helpText = new Array();
+
+helpText[0]  = "'back'-button|Click on this button to load the previous image (usually the next page from a manuscript).";
+helpText[1]  = "'next'-button|Click on this button to load the next image (usually the next page from a manuscript).";
+helpText[2]  = "'page'-button|After clicking 'page' you will be prompted for a specific page you want to see.<br>Note that the page number refers to the same serie you are in now.";
+helpText[3]  = "'digicat'-button|Click here to open a new window containing thumbnails of the current series pages to navigate.";
+helpText[4]  = "'mark'-button|You can set marks into the picture. After hitting 'mark' you have to click on the desired picures location, a numbered mark appears.<br>Check out 'reference' to make these marks (up to 8) visible for others.";
+helpText[5]  = "'reference'-button|Choose LaTeX or HTML mode to get a link for the actual (zoomed) picture with all set marks.<br>This link can easily be included in a TeX- or HTML-formatted document/page.";
+helpText[6]  = "'zoom area'-button|With 'zoom area' you can zoom into any rectangular field for the current picture.<br>After clicking on the button click on the image to set any corner (ex. topleft), release the mousebutton and move the mouse until you have the desired size, then click again.";
+helpText[7]  = "'zoom point'-button|Click on 'zoom point' then click into a point of the picture. This gives you a zoomed picture centered around your clicked point.";
+helpText[8]  = "'zoom out'-button|To gain the original unzoomed picture, click on 'zoom out'.<br>Note that any set marks are still saved at their positions.";
+helpText[9]  = "'move to'-button|This button allows you change the center of a zoomed picture, while not changing the current zoom-factor.<br>Use: Click on the point in the picture you want to be the new center of the image.";
+helpText[10] = "'scale'-button|By clicking on one of the menu entries you can select the factor the currently displayed picture will be scaled.<br>Note: a scale factor of '1.0' means that the picture fits right into the working area, while '2.0' means that it will be twice as high and large.";
+helpText[11] = "'?'-button|In its menu you are able change options like the visibility of this contextsensitive help, with 'Keep area' the program keeps its current area when changing to another page or with 'Fit GIFs' you can force to program to adjust the size of GIF-images to the working area.";
+
+
+// boolean variable to eighter show or not show the additional help
+// change in the menuitem its original mark
+var showHelp = false;
+
+// variable to tell if while changing to another page it should keep the area
+// change in the menuitem its original mark
+var keepArea = true;
+
+// changes to the correct mark of menu33 (fit GIFs)
+// I know it is not very nice to do it this way
+function checkAtt3() {
+	if (parent.att) {
+		if (parent.att.length >= 3) {
+			if (parent.att[3].indexOf('f') > -1) changeMark(33);
+		} else {
+			setTimeout("checkAtt3()", 100);
+		}
+	}
+}
+
+</script>
+</head>
+
+<body bgcolor="#CCCCCC" leftmargin="8" marginwidth="8" topmargin="5" marginheight="5" onload="preloadImages();" onunload="closeContextHelp()">
+<a href="#" onClick="parent.Backpage(keepArea); return false;" onmouseover="overButton(0)" onmouseout="awayButton(0)"><img src="buttons/back0.gif" width="73" height="30" border="0"></a><br>
+<a href="#" onClick="parent.Nextpage(keepArea); return false;" onmouseover="overButton(1)" onmouseout="awayButton(1)"><img src="buttons/next0.gif" width="73" height="30" border="0"></a><br>
+<a href="#" onClick="parent.Page(keepArea); return false;" onmouseover="overButton(2)" onmouseout="awayButton(2)"><img src="buttons/page0.gif" width="73" height="30" border="0"></a><br>
+<a href="#" onClick="parent.Digicat(); return false;" onmouseover="overButton(3)" onmouseout="awayButton(3)"><img src="buttons/digicat0.gif" width="73" height="30" border="0"></a><br><br>
+<a href="#" onClick="parent.Mark(); return false;" onmouseover="overButton(4)" onmouseout="awayButton(4)"><img src="buttons/mark0.gif" width="73" height="30" border="0"></a><br>
+<a href="#" onclick="hideMenu(); showMenu(1); return false;" onmouseover="overButton(5)" onmouseout="awayButton(5)"><img src="buttons/reference0.gif" width="73" height="30" border="0"></a><br><br>
+<a href="#" onClick="parent.Zoomrect(); return false;" onmouseover="overButton(6)" onmouseout="awayButton(6)"><img src="buttons/zoomarea0.gif" width="73" height="30" border="0"></a><br>
+<a href="#" onClick="parent.Zoomin(); return false;" onmouseover="overButton(7)" onmouseout="awayButton(7)"><img src="buttons/zoompoint0.gif" width="73" height="30" border="0"></a><br>
+<a href="#" onClick="parent.Zoomout(); return false;" onmouseover="overButton(8)" onmouseout="awayButton(8)"><img src="buttons/zoomout0.gif" width="73" height="30" border="0"></a><br>
+<a href="#" onClick="parent.Moveto(); return false;" onmouseover="overButton(9)" onmouseout="awayButton(9)"><img src="buttons/moveto0.gif" width="73" height="30" border="0"></a><br><br>
+<a href="#" onclick="hideMenu(); showMenu(2); return false;" onmouseover="overButton(10)" onmouseout="awayButton(10)"><img src="buttons/scale0.gif" width="73" height="30" border="0"></a><br><br>
+<a href="#" onclick="hideMenu(); showMenu(3); return false;" onmouseover="overButton(11)" onmouseout="awayButton(11)"><img src="buttons/questionmark0.gif" width="73" height="30" border="0"></a>
+
+<div id="menu1" class="menu" style="top:211; left:31; width:54; height:33; clip:rect(0,54,33,0)"></div>
+ <div id="menu11" class="item1" style="top:213"><center><a href="#" class="text" onClick="hideMenu(); parent.Ref(0); return false;" onmouseover="overItem(11)" onmouseout="awayItem(11)">LaTeX</a></center></div>
+ <div id="menu12" class="item1" style="top:228"><center><a href="#" class="text" onClick="hideMenu(); parent.Ref(1); return false;" onmouseover="overItem(12)" onmouseout="awayItem(12)">HTML</a></center></div>
+
+<div id="menu2" class="menu" style="top:399; left:41; width:44; height:93; clip:rect(0,44,93,0)"></div>
+ <div id="menu21" class="item2" style="top:401"><center><a href="#" class="text" onClick="hideMenu(); parent.Scaledef(0.7); return false;" onmouseover="overItem(21)" onmouseout="awayItem(21)">0.7</a></center></div>
+ <div id="menu22" class="item2" style="top:416"><center><a href="#" class="text" onClick="hideMenu(); parent.Scaledef(1.0); return false;" onmouseover="overItem(22)" onmouseout="awayItem(22)">1.0</a></center></div>
+ <div id="menu23" class="item2" style="top:431"><center><a href="#" class="text" onClick="hideMenu(); parent.Scaledef(1.5); return false;" onmouseover="overItem(23)" onmouseout="awayItem(23)">1.5</a></center></div>
+ <div id="menu24" class="item2" style="top:446"><center><a href="#" class="text" onClick="hideMenu(); parent.Scaledef(2.0); return false;" onmouseover="overItem(24)" onmouseout="awayItem(24)">2.0</a></center></div>
+ <div id="menu25" class="item2" style="top:461"><center><a href="#" class="text" onClick="hideMenu(); parent.Scaledef(2.5); return false;" onmouseover="overItem(25)" onmouseout="awayItem(25)">2.5</a></center></div>
+ <div id="menu26" class="item2" style="top:476"><center><a href="#" class="text" onClick="hideMenu(); parent.Scaledef(3.0); return false;" onmouseover="overItem(26)" onmouseout="awayItem(26)">3.0</a></center></div>
+
+<div id="menu3" class="menu" style="top:448; left:1; width:84; height:48; clip:rect(0,84,48,0)"></div>
+ <div id="menu31" class="item3" style="top:450"><center><a href="#" class="text" onclick="changeMark(31); hideMenu(); changeHelp(); return false;" onmouseover="overItem(31)" onmouseout="awayItem(31)"><img id="mark31" src="buttons/nomark.gif" border="0">Contexthelp</a></center></div>
+ <div id="menu32" class="item3" style="top:465"><center><a href="#" class="text" onclick="changeMark(32); keepArea = !keepArea; return false;" onmouseover="overItem(32)" onmouseout="awayItem(32)"><img id="mark32" src="buttons/mark.gif" border="0">Keep&nbsp;area</a></center></div>
+ <div id="menu33" class="item3" style="top:480"><center><a href="#" class="text" onclick="changeMark(33); (parent.att[3].indexOf('f') > -1) ? parent.att[3] = '' : parent.att[3] = 'fit'; parent.loadPicture(2, keepArea); return false;" onmouseover="overItem(33)" onmouseout="awayItem(33)"><img id="mark33" src="buttons/nomark.gif" border="0">Fit&nbsp;GIFs</a></center></div>
+
+
+<script language="Javascript">
+// initial background color of the menues (has to be done like this, 
+// otherwise menues in ns4 you will have wrong dimensions)
+changeBc("menu1", "#666666");
+changeBc("menu2", "#666666");
+changeBc("menu3", "#666666");
+
+// launch the initial check of att[3] (fit gifs) and change to the correct mark
+checkAtt3();
+</script>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/navigation_ie.js	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,472 @@
+/* navigation_ie -- JS library for digilib (IE version)
+
+  Digital Image Library servlet components
+
+  Copyright (C) 2001, 2002 Christian Luginbuehl (luginbuehl@student.unibe.ch)
+
+  This program is free software; you can redistribute  it and/or modify it
+  under  the terms of  the GNU General  Public License as published by the
+  Free Software Foundation;  either version 2 of the  License, or (at your
+  option) any later version.
+   
+  Please read license.txt for the full details. A copy of the GPL
+  may be found at http://www.gnu.org/copyleft/lgpl.html
+
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// these two global variables have to be initialised before the frist use of the functions below
+// to fill in the attributes you can use the function initPicture provided below
+// - array with all attributes
+var att = new Array();
+
+// - variable to store the path to the frame, in which the pictures should be created
+var whichFrame = parent.mainFrame;
+
+// give a name to the window containing digilib - this way one can test if there is already a
+// digilib-window open and replace the contents of it (ex. digicat)
+window.name = "digilib";
+
+// function that launches the ScaleServlet
+// the different detailGrades:
+// 		0 -> back, next, page
+//		1 -> zoomout
+//		2 -> zoomarea, zoompoint, moveto, scaledef
+
+function loadPicture(detailGrade, keepArea) {
+
+//	alert("wx: " + att[5] + "\tww: " + att[7] + "\nwy: " + att[6] + "\twh: " + att[8]);
+
+	// sorry about that, but IE needs to have a document body to calc the frames width and height
+	whichFrame.document.open();
+	whichFrame.document.write('<html><head></head><body bgcolor="#666666" topmargin="10" leftmargin="10" marginwidth="10" magrinheight="10">');
+
+	var newPicture  = "http://" + location.host + "/docuserver/digitallibrary/servlet/Scaler/"
+	newPicture += att[0] + "?" + "pn=" + att[1] + "&ws=" + att[2];
+	newPicture += "&dw=" + (whichFrame.document.body.clientWidth-30) + "&dh=" + (whichFrame.document.body.clientHeight-30);
+	newPicture += "&mo=" + att[3];
+
+	if (detailGrade == 0) {
+		att[4] = "0/0";
+	}
+
+	if ((detailGrade == 1) || (detailGrade == 0 && !keepArea)) {
+		att[5] = 0;
+		att[6] = 0;
+		att[7] = 1;
+		att[8] = 1;
+	}
+	newPicture += "&wx=" + att[5] + "&wy=" + att[6] + "&ww=" + att[7] + "&wh=" + att[8];
+
+	whichFrame.document.write('<div ID="lay1" style="position:absolute; left:10;  top:10;  visibility:visible"><img name="pic" src="' + newPicture + '"></div>');
+	whichFrame.document.write('<div ID="dot0" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark1.gif"></div>');
+	whichFrame.document.write('<div ID="dot1" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark2.gif"></div>');
+	whichFrame.document.write('<div ID="dot2" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark3.gif"></div>');
+	whichFrame.document.write('<div ID="dot3" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark4.gif"></div>');
+	whichFrame.document.write('<div ID="dot4" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark5.gif"></div>');
+	whichFrame.document.write('<div ID="dot5" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark6.gif"></div>');
+	whichFrame.document.write('<div ID="dot6" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark7.gif"></div>');
+	whichFrame.document.write('<div ID="dot7" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark8.gif"></div>');
+	whichFrame.document.write('<div ID="eck1" style="position:absolute; left:-20; top:120; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/olinks.gif"></div>');
+	whichFrame.document.write('<div ID="eck2" style="position:absolute; left:-20; top:140; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/orechts.gif"></div>');
+	whichFrame.document.write('<div ID="eck3" style="position:absolute; left:-20; top:160; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/ulinks.gif"></div>');
+	whichFrame.document.write('<div ID="eck4" style="position:absolute; left:-20; top:180; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/urechts.gif"></div>');
+
+	whichFrame.document.write('</body></html>');
+	
+	whichFrame.document.close();
+
+	initScripts();
+	
+	pageInfo();
+
+	setmark();
+}
+
+
+function Backpage(keepArea) {
+
+    att[1] = parseInt(att[1]) - 1;
+
+    if (att[1] > 0) {
+        loadPicture(0, keepArea);
+    } else {
+	    att[1] = parseInt(att[1]) + 1;
+        alert("You are already on the first page!");
+    }
+}
+
+
+function Nextpage(keepArea) {
+
+    att[1] = parseInt(att[1]) + 1;
+
+    if (att[1] <= parent.numPages) {
+        loadPicture(0, keepArea);
+    } else {
+	    att[1] = parseInt(att[1]) - 1;
+        alert("You are already on the last page!");
+    }
+}
+
+
+function Page(keepArea) {
+
+	do {
+    	page = prompt("Goto Page (1 - " + parent.numPages + "):", 1);
+	} while ((page != null) && ((page < 1) || (page > parent.numPages)));
+
+   	if (page != null && page != att[1]) {
+		att[1] = page;
+		loadPicture(0, keepArea);
+	}
+}
+
+
+function Digicat() {
+	var url = "http://" + location.host + "/docuserver/digitallibrary/digicat.html?" + att[0] + "+" + att[1];
+	win = window.open(url, "digicat");
+	win.focus();
+}
+
+
+function Ref(refselect) {
+
+	var hyperlinkRef = "http://" + location.host + "/docuserver/digitallibrary/digilib.jsp?";
+	hyperlinkRef += att[0] + "+" + att[1] + "+" + att[2] + "+" + att[3] + "+" + att[4];
+	
+	if ((att[5] != 0) || (att[6] != 0) || (att[7] != 1) || (att[8] != 1)) {
+		hyperlinkRef += "+" + att[5] + "+" + att[6] + "+" + att[7] + "+" + att[8];
+	}
+
+    if (refselect == 1) {
+        prompt("Link for HTML--documents", hyperlinkRef);
+    } else {
+        prompt("Link for LaTeX--documents", "\\href{" + hyperlinkRef + "}{TEXT}");
+    }
+}
+
+
+function Mark(refselect) {
+
+	if (att[4].split(";").length > 7) {
+		alert("Only 8 marks are possible at the moment!");
+		return;
+	}
+
+    whichFrame.document.all.lay1.onmousedown = function() {
+		e = whichFrame.event;
+
+        if ((att[4] != "") && (att[4] != "0/0")) {
+            att[4] += ";";
+        } else {
+            att[4] = "";
+        }
+
+		markX = cropFloat(att[5]+att[7]*(whichFrame.document.body.scrollLeft+e.x-parseInt(whichFrame.document.all.lay1.style.left))/whichFrame.document.all.lay1.offsetWidth);
+		markY = cropFloat(att[6]+att[8]*(whichFrame.document.body.scrollTop+e.y-parseInt(whichFrame.document.all.lay1.style.top))/whichFrame.document.all.lay1.offsetHeight);
+
+        att[4] += markX + "/" + markY;
+
+        whichFrame.document.all.lay1.cancleBubble = true;
+        
+        setmark();
+    }
+}
+
+
+function Zoomrect() {
+    var state = 0;
+    var x1, y1, x2, y2;
+        
+    function Click() {
+		e = whichFrame.event;
+
+        if (state == 0) {
+            state = 1;
+            
+            x1 = whichFrame.document.body.scrollLeft+e.x;
+            y1 = whichFrame.document.body.scrollTop+e.y;           
+            x2 = x1;
+            y2 = y1;
+
+			whichFrame.document.all.eck1.style.left = x1;
+			whichFrame.document.all.eck1.style.top = y1;
+			whichFrame.document.all.eck2.style.left = x2-12;
+			whichFrame.document.all.eck2.style.top = y1;
+			whichFrame.document.all.eck3.style.left = x1;
+			whichFrame.document.all.eck3.style.top = y2-12;
+			whichFrame.document.all.eck4.style.left = x2-12;
+			whichFrame.document.all.eck4.style.top = y2-12;
+
+			whichFrame.document.all.eck1.style.visibility="visible";
+			whichFrame.document.all.eck2.style.visibility="visible";
+			whichFrame.document.all.eck3.style.visibility="visible";
+			whichFrame.document.all.eck4.style.visibility="visible";
+            
+            whichFrame.document.all.lay1.onmousemove = Move;
+            whichFrame.document.all.eck4.onmousemove = Move;
+            
+        } else {
+
+			x1 -= parseInt(whichFrame.document.all.lay1.style.left);
+			y1 -= parseInt(whichFrame.document.all.lay1.style.top);			
+
+            x2 = whichFrame.document.body.scrollLeft+e.x-parseInt(whichFrame.document.all.lay1.style.left);
+            y2 = whichFrame.document.body.scrollTop+e.y-parseInt(whichFrame.document.all.lay1.style.left);         
+
+            whichFrame.document.all.eck1.visibility="hidden";
+            whichFrame.document.all.eck2.visibility="hidden";
+            whichFrame.document.all.eck3.visibility="hidden";
+            whichFrame.document.all.eck4.visibility="hidden";
+
+			whichFrame.document.all.lay1.cancleBubble = true;
+			whichFrame.document.all.eck4.cancleBubble = true;
+
+            att[5] = cropFloat(att[5]+att[7]*((x1 < x2) ? x1 : x2)/whichFrame.document.all.lay1.offsetWidth);
+            att[6] = cropFloat(att[6]+att[8]*((y1 < y2) ? y1 : y2)/whichFrame.document.all.lay1.offsetHeight);
+
+            att[7] = cropFloat(att[7]*Math.abs(x1-x2)/whichFrame.document.all.lay1.offsetWidth);
+            att[8] = cropFloat(att[8]*Math.abs(y1-y2)/whichFrame.document.all.lay1.offsetHeight);
+                        
+            if (att[7] != 0 && att[8] != 0) {
+              loadPicture(2);
+            }
+        }
+    }
+
+    function Move() {
+		e = whichFrame.event;
+
+        x2 = whichFrame.document.body.scrollLeft+e.x;
+        y2 = whichFrame.document.body.scrollTop+e.y;           
+
+		whichFrame.document.all.eck1.style.left = ((x1 < x2) ? x1 : x2);
+		whichFrame.document.all.eck1.style.top = ((y1 < y2) ? y1 : y2);
+		whichFrame.document.all.eck2.style.left = ((x1 < x2) ? x2 : x1)-12;
+		whichFrame.document.all.eck2.style.top = ((y1 < y2) ? y1 : y2);
+		whichFrame.document.all.eck3.style.left = ((x1 < x2) ? x1 : x2);
+		whichFrame.document.all.eck3.style.top = ((y1 < y2) ? y2 : y1)-12;
+		whichFrame.document.all.eck4.style.left = ((x1 < x2) ? x2 : x1)-12;
+		whichFrame.document.all.eck4.style.top = ((y1 < y2) ? y2 : y1)-12;
+    }
+
+    whichFrame.document.all.lay1.onmousedown = Click;
+    whichFrame.document.all.eck4.onmousedown = Click;
+}
+
+
+function Zoomin() {
+
+    whichFrame.document.all.lay1.onmousedown = function() {
+		e = whichFrame.event;
+
+		att[5] = cropFloat(att[5]+att[7]*(whichFrame.document.body.scrollLeft+e.x-parseInt(whichFrame.document.all.lay1.style.left))/whichFrame.document.all.lay1.offsetWidth-0.5*att[7]*0.7);
+		att[6] = cropFloat(att[6]+att[8]*(whichFrame.document.body.scrollTop+e.y-parseInt(whichFrame.document.all.lay1.style.top))/whichFrame.document.all.lay1.offsetHeight-0.5*att[8]*0.7);
+
+		att[7] = cropFloat(att[7]*0.7);
+		att[8] = cropFloat(att[8]*0.7);
+
+		if (att[5] < 0) {
+			att[5] = 0;
+		}
+		if (att[6] < 0) {
+			att[6] = 0;
+		}
+		if (att[5]+att[7] > 1) {
+			att[5] = 1-att[7];
+		}
+		if (att[6]+att[8] > 1) {
+			att[6] = 1-att[8];
+		}
+
+	    whichFrame.document.all.lay1.cancleBubble = true;
+
+		loadPicture(2);
+	}
+}
+
+
+function Zoomout() {
+    loadPicture(1);
+}
+
+
+function Moveto() {
+
+    whichFrame.document.all.lay1.onmousedown = function() {
+		e = whichFrame.event;
+
+		att[5] = cropFloat(att[5]+att[7]*(whichFrame.document.body.scrollLeft+e.x-parseInt(whichFrame.document.all.lay1.style.left))/whichFrame.document.all.lay1.offsetWidth-0.5*att[7]);
+		att[6] = cropFloat(att[6]+att[8]*(whichFrame.document.body.scrollTop+e.y-parseInt(whichFrame.document.all.lay1.style.top))/whichFrame.document.all.lay1.offsetHeight-0.5*att[8]);
+
+		if (att[5] < 0) {
+			att[5] = 0;
+		}
+		if (att[6] < 0) {
+			att[6] = 0;
+		}
+		if (att[5]+att[7] > 1) {
+			att[5] = 1-att[7];
+		}
+		if (att[6]+att[8] > 1) {
+			att[6] = 1-att[8];
+		}
+
+	    whichFrame.document.all.lay1.cancleBubble = true;
+
+        loadPicture(2);
+	}
+}
+
+
+function Scaledef(scaledef) {
+
+    att[2] = scaledef;
+    loadPicture(2);
+}
+
+
+function setmark() {
+	if ((att[4] != "") && (att[4] != "0/0")) {
+		var mark = att[4].split(";");
+
+		var countMarks = mark.length;
+		
+		// maximum of marks is 8
+		// we do not report this error because this is already done in func. "Mark"
+		if (countMarks > 8) countMarks = 8;
+
+		var picWidth  = whichFrame.document.all.lay1.offsetWidth;
+		var picHeight = whichFrame.document.all.lay1.offsetHeight;
+
+		// catch the cases where the picture had not been loaded already and
+		// make a timeout so that the coordinates are calculated with the real dimensions
+		if (picWidth > 30) {
+
+			var xoffset = parseInt(whichFrame.document.all.lay1.style.left);
+			var yoffset = parseInt(whichFrame.document.all.lay1.style.top);
+
+			for (var i = 0; i < countMarks; i++) {
+				mark[i] = mark[i].split("/");
+
+				if ((mark[i][0] > att[5]) && (mark[i][1] > att[6]) && (mark[i][0] < (att[5]+att[7])) && (mark[i][1] < (att[6]+att[8]))) {
+
+					mark[i][0] = parseInt(xoffset+picWidth*(mark[i][0]-att[5])/att[7]);
+					mark[i][1] = parseInt(yoffset+picHeight*(mark[i][1]-att[6])/att[8]);
+
+					whichFrame.document.getElementById("dot" + i).style.left = mark[i][0]-5;
+					whichFrame.document.getElementById("dot" + i).style.top = mark[i][1]-5;
+					whichFrame.document.getElementById("dot" + i).style.visibility = "visible";
+				}
+			}
+		} else {
+			setTimeout("setmark()", 100);
+		}
+	}
+}
+
+
+// capturing keypresses for next and previous page
+function parseKeypress() {
+	e = whichFrame.event;
+
+	if (e.keyCode == 110) {
+		Nextpage();
+	}
+	if (e.keyCode == 98) {
+		Backpage();
+	}
+	whichFrame.document.cancleBubble = true;
+}
+
+
+// auxiliary function to crop senseless precicsion
+function cropFloat(tmp) {
+	return parseInt(10000*tmp)/10000;
+}
+
+
+// initialize browser specific things (keypress caputring)
+function initScripts() {
+	whichFrame.document.onkeypress = parseKeypress;
+	whichFrame.focus();
+}
+
+
+// fill in the values of the "att"-array
+function initPicture(picURL) {
+	att = picURL.split("+");
+
+	if (att[0].lastIndexOf("/") == att[0].length-1) {
+		att[0] = att[0].substring(0, att[0].length-1);
+	}
+	
+	if (att.length < 2 || att[1] == "") {
+		att[1] = 1;
+	}
+	if (att.length < 3 || att[2] == "") {
+		att[2] = "1.0";
+	}
+
+	if (att.length < 4) {
+		att[3] = "";
+	}
+
+	if (att[3].indexOf("f") > -1) {
+		att[3] = "fit";
+	}
+
+	if (att.length < 5 || att[4] == "") {
+		att[4] = "0/0";
+	}
+
+	// converts the old mark format (0-1000) to new format(0.0 - 1.0)
+	if (att[4] != "0/0") {
+		var tmp = att[4].split(";");
+		
+		att[4] = "";
+		
+		for (i = 0; i < tmp.length; i++) {
+			tmp[i] = tmp[i].split("/");
+
+			if (tmp[i][0] > 1 && tmp[i][1] > 1) {
+				tmp[i][0] /= 1000;
+				tmp[i][1] /= 1000;
+			}
+			
+			att[4] += tmp[i][0] + "/" + tmp[i][1] + ";";
+		}
+		att[4] = att[4].slice(0, -1);
+	}
+	
+	if (att.length < 7) {
+		att[5] = 0;
+		att[6] = 0;
+		att[7] = 1;
+		att[8] = 1;
+	} else {
+		att[5] = parseFloat(att[5]);
+		att[6] = parseFloat(att[6]);
+		att[7] = parseFloat(att[7]);
+		att[8] = parseFloat(att[8]);
+	}
+}
+
+
+function pageInfo() {
+	
+	// bug in netscape 4.xx (confunding px and pt)
+	var fontsize = document.layers ? "11pt" : "11px";
+
+	if (window.pageFrame) {
+		pageFrame.document.open();
+		pageFrame.document.write('<html><head></head><body bgcolor="#CCCCCC" topmargin="5" marginheight="5">');
+		pageFrame.document.write('<p style="font-family: Verdana, Arial, Helvetica, sans-serif; text-align: center; color: #CC3333; font-size: ' + fontsize + '">');
+		pageFrame.document.write(att[1] + '<b> of </b>' + numPages + '</p></body></html>');
+		pageFrame.document.close();
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/navigation_n4.js	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,450 @@
+/* navigation_ie -- JS library for digilib (Netscape4 version)
+
+  Digital Image Library servlet components
+
+  Copyright (C) 2001, 2002 Christian Luginbuehl (luginbuehl@student.unibe.ch)
+
+  This program is free software; you can redistribute  it and/or modify it
+  under  the terms of  the GNU General  Public License as published by the
+  Free Software Foundation;  either version 2 of the  License, or (at your
+  option) any later version.
+   
+  Please read license.txt for the full details. A copy of the GPL
+  may be found at http://www.gnu.org/copyleft/lgpl.html
+
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// these two global variables have to be initialised before the frist use of the functions below
+// to fill in the attributes you can use the function initPicture provided below
+// - array with all attributes
+var att = new Array();
+
+// - variable to store the path to the frame, in which the pictures should be created
+var whichFrame = parent.mainFrame;
+
+// give a name to the window containing digilib - this way one can test if there is already a
+// digilib-window open and replace the contents of it (ex. digicat)
+window.name = "digilib";
+
+// function that launches the ScaleServlet
+// the different detailGrades:
+// 		0 -> back, next, page
+//		1 -> zoomout
+//		2 -> zoomarea, zoompoint, moveto, scaledef
+
+function loadPicture(detailGrade, keepArea) {
+
+//	alert("wx: " + att[5] + "\tww: " + att[7] + "\nwy: " + att[6] + "\twh: " + att[8]);
+
+	var newPicture  = "http://" + location.host + "/docuserver/digitallibrary/servlet/Scaler/"
+	newPicture += att[0] + "?" + "pn=" + att[1] + "&ws=" + att[2];
+	newPicture += "&dw=" + (whichFrame.innerWidth-30) + "&dh=" + (whichFrame.innerHeight-30);
+	newPicture += "&mo=" + att[3];
+
+	if (detailGrade == 0) {
+		att[4] = "0/0";
+	}
+
+	if ((detailGrade == 1) || (detailGrade == 0 && !keepArea)) {
+		att[5] = 0;
+		att[6] = 0;
+		att[7] = 1;
+		att[8] = 1;
+	}
+	newPicture += "&wx=" + att[5] + "&wy=" + att[6] + "&ww=" + att[7] + "&wh=" + att[8];
+
+	whichFrame.document.open();
+	
+	whichFrame.document.write('<html><head></head><body bgcolor="#666666">');
+	whichFrame.document.write('<div ID="lay1" style="position:absolute; left:10;  top:10;  visibility:visible"><img src="' + newPicture + '"></div>');
+	whichFrame.document.write('<div ID="dot0" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark1.gif"></div>');
+	whichFrame.document.write('<div ID="dot1" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark2.gif"></div>');
+	whichFrame.document.write('<div ID="dot2" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark3.gif"></div>');
+	whichFrame.document.write('<div ID="dot3" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark4.gif"></div>');
+	whichFrame.document.write('<div ID="dot4" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark5.gif"></div>');
+	whichFrame.document.write('<div ID="dot5" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark6.gif"></div>');
+	whichFrame.document.write('<div ID="dot6" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark7.gif"></div>');
+	whichFrame.document.write('<div ID="dot7" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark8.gif"></div>');
+	whichFrame.document.write('<div ID="eck1" style="position:absolute; left:-20; top:120; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/olinks.gif"></div>');
+	whichFrame.document.write('<div ID="eck2" style="position:absolute; left:-20; top:140; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/orechts.gif"></div>');
+	whichFrame.document.write('<div ID="eck3" style="position:absolute; left:-20; top:160; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/ulinks.gif"></div>');
+	whichFrame.document.write('<div ID="eck4" style="position:absolute; left:-20; top:180; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/urechts.gif"></div>');
+	whichFrame.document.write('</body></html>');
+	
+	whichFrame.document.close();
+	
+	pageInfo();
+
+	setmark();
+}
+
+
+function Backpage(keepArea) {
+
+    att[1] = parseInt(att[1]) - 1;
+
+    if (att[1] > 0) {
+        loadPicture(0, keepArea);
+    } else {
+	    att[1] = parseInt(att[1]) + 1;
+        alert("You are already on the first page!");
+    }
+}
+
+
+function Nextpage(keepArea) {
+
+    att[1] = parseInt(att[1]) + 1;
+
+    if (att[1] <= parent.numPages) {
+        loadPicture(0, keepArea);
+    } else {
+	    att[1] = parseInt(att[1]) - 1;
+        alert("You are already on the last page!");
+    }
+}
+
+
+function Page(keepArea) {
+
+	do {
+    	page = prompt("Goto Page (1 - " + parent.numPages + "):", 1);
+	} while ((page != null) && ((page < 1) || (page > parent.numPages)));
+
+   	if (page != null && page != att[1]) {
+		att[1] = page;
+		loadPicture(0, keepArea);
+	}
+}
+
+
+function Digicat() {
+	var url = "http://" + location.host + "/docuserver/digitallibrary/digicat.html?" + att[0] + "+" + att[1];
+	win = window.open(url, "digicat");
+	win.focus();
+}
+
+
+function Ref(refselect) {
+
+	var hyperlinkRef = "http://" + location.host + "/docuserver/digitallibrary/digilib.jsp?";
+	hyperlinkRef += att[0] + "+" + att[1] + "+" + att[2] + "+" + att[3] + "+" + att[4];
+	
+	if ((att[5] != 0) || (att[6] != 0) || (att[7] != 1) || (att[8] != 1)) {
+		hyperlinkRef += "+" + att[5] + "+" + att[6] + "+" + att[7] + "+" + att[8];
+	}
+
+    if (refselect == 1) {
+        prompt("Link for HTML--documents", hyperlinkRef);
+    } else {
+        prompt("Link for LaTeX--documents", "\\href{" + hyperlinkRef + "}{TEXT}");
+    }
+}
+
+
+function Mark(refselect) {
+
+	if (att[4].split(";").length > 7) {
+		alert("Only 8 marks are possible at the moment!");
+		return;
+	}
+
+    whichFrame.document.lay1.captureEvents(Event.MOUSEDOWN);
+    whichFrame.document.lay1.onmousedown = function(event) {
+
+        if ((att[4] != "") && (att[4] != "0/0")) {
+            att[4] += ";";
+        } else {
+            att[4] = "";
+        }
+
+		var markX = cropFloat(att[5]+(att[7]*event.x/whichFrame.document.lay1.clip.width));
+		var markY = cropFloat(att[6]+(att[8]*event.y/whichFrame.document.lay1.clip.height));
+		
+        att[4] += markX + "/" + markY;
+
+        whichFrame.document.lay1.releaseEvents(Event.MOUSEDOWN);
+        setmark();
+    }
+}
+
+
+function Zoomrect() {
+    var state = 0;
+    var x1, y1, x2, y2;
+        
+    function Click(event) {
+
+        if (state == 0) {
+            state = 1;
+            
+            x1 = event.pageX;
+            y1 = event.pageY;           
+            x2 = x1;
+            y2 = y1;
+
+            whichFrame.document.eck1.moveTo(((x1 < x2) ? x1 : x2), ((y1 < y2) ? y1 : y2));
+            whichFrame.document.eck2.moveTo(((x1 < x2) ? x2 : x1)-12, ((y1 < y2) ? y1 : y2));
+            whichFrame.document.eck3.moveTo(((x1 < x2) ? x1 : x2), ((y1 < y2) ? y2 : y1)-12);
+            whichFrame.document.eck4.moveTo(((x1 < x2) ? x2 : x1)-12, ((y1 < y2) ? y2 : y1)-12);
+
+            whichFrame.document.eck1.visibility="show";
+            whichFrame.document.eck2.visibility="show";
+            whichFrame.document.eck3.visibility="show";
+            whichFrame.document.eck4.visibility="show";
+            
+            whichFrame.document.lay1.captureEvents(Event.MOUSEMOVE);
+            whichFrame.document.eck4.captureEvents(Event.MOUSEMOVE);
+
+            whichFrame.document.lay1.onmousemove = Move;
+            whichFrame.document.eck4.onmousemove = Move;
+            
+        } else {
+
+            x1 -= whichFrame.document.lay1.x;
+            y1 -= whichFrame.document.lay1.y;            
+
+            x2 = event.pageX-whichFrame.document.lay1.x;
+            y2 = event.pageY-whichFrame.document.lay1.y;         
+
+            whichFrame.document.lay1.releaseEvents(Event.MOUSEDOWN | Event.MOUSEMOVE);
+            whichFrame.document.eck4.releaseEvents(Event.MOUSEDOWN | Event.MOUSEMOVE);
+
+            whichFrame.document.eck1.visibility="hide";
+            whichFrame.document.eck2.visibility="hide";
+            whichFrame.document.eck3.visibility="hide";
+            whichFrame.document.eck4.visibility="hide";
+
+            att[5] = cropFloat(att[5]+att[7]*((x1 < x2) ? x1 : x2)/whichFrame.document.lay1.clip.width);
+            att[6] = cropFloat(att[6]+att[8]*((y1 < y2) ? y1 : y2)/whichFrame.document.lay1.clip.height);
+
+            att[7] = cropFloat(att[7]*Math.abs(x1-x2)/whichFrame.document.lay1.clip.width);
+            att[8] = cropFloat(att[8]*Math.abs(y1-y2)/whichFrame.document.lay1.clip.height);
+                        
+            if (att[7] != 0 && att[8] != 0) {
+              loadPicture(2);
+            }
+        }
+    }
+
+    function Move(event) {
+
+        x2 = event.pageX;
+        y2 = event.pageY;           
+
+        whichFrame.document.eck1.moveTo(((x1 < x2) ? x1 : x2), ((y1 < y2) ? y1 : y2));
+        whichFrame.document.eck2.moveTo(((x1 < x2) ? x2 : x1)-12, ((y1 < y2) ? y1 : y2));
+        whichFrame.document.eck3.moveTo(((x1 < x2) ? x1 : x2), ((y1 < y2) ? y2 : y1)-12);
+        whichFrame.document.eck4.moveTo(((x1 < x2) ? x2 : x1)-12, ((y1 < y2) ? y2 : y1)-12);
+    }
+
+    whichFrame.document.lay1.captureEvents(Event.MOUSEDOWN);
+    whichFrame.document.eck4.captureEvents(Event.MOUSEDOWN);
+
+    whichFrame.document.lay1.onmousedown = Click;
+    whichFrame.document.eck4.onmousedown = Click;
+}
+
+
+function Zoomin() {
+
+    whichFrame.document.lay1.captureEvents(Event.MOUSEDOWN);
+    whichFrame.document.lay1.onmousedown = function(event) {
+
+		att[5] = cropFloat(att[5]+(att[7]*event.x/whichFrame.document.lay1.clip.width-0.5*att[7]*0.7));
+		att[6] = cropFloat(att[6]+(att[8]*event.y/whichFrame.document.lay1.clip.height-0.5*att[8]*0.7));
+
+        att[7] = cropFloat(att[7]*0.7);
+        att[8] = cropFloat(att[8]*0.7);
+
+		if (att[5] < 0) {
+			att[5] = 0;
+		}
+		if (att[6] < 0) {
+			att[6] = 0;
+		}
+		if (att[5]+att[7] > 1) {
+			att[5] = 1-att[7];
+		}
+		if (att[6]+att[8] > 1) {
+			att[6] = 1-att[8];
+		}
+
+        releaseEvents(Event.MOUSEDOWN);
+
+        loadPicture(2);
+    }
+}
+
+
+function Zoomout() {
+    loadPicture(1);
+}
+
+
+function Moveto() {
+
+    whichFrame.document.lay1.captureEvents(Event.MOUSEDOWN);
+    whichFrame.document.lay1.onmousedown = function(event) {
+
+		att[5] = cropFloat(att[5]+(att[7]*event.x/whichFrame.document.lay1.clip.width-0.5*att[7]));
+		att[6] = cropFloat(att[6]+(att[8]*event.y/whichFrame.document.lay1.clip.height-0.5*att[8]));
+
+		if (att[5] < 0) {
+			att[5] = 0;
+		}
+		if (att[6] < 0) {
+			att[6] = 0;
+		}
+		if (att[5]+att[7] > 1) {
+			att[5] = 1-att[7];
+		}
+		if (att[6]+att[8] > 1) {
+			att[6] = 1-att[8];
+		}
+
+        releaseEvents(Event.MOUSEDOWN);
+
+        loadPicture(2);
+	}
+}
+
+
+function Scaledef(scaledef) {
+
+    att[2] = scaledef;
+    loadPicture(2);
+}
+
+
+function setmark() {
+	if ((att[4] != "") && (att[4] != "0/0")) {
+		var mark = att[4].split(";");
+
+		var countMarks = mark.length;
+		
+		// maximum of marks is 8
+		// we do not report this error because this is already done in func. "Mark"
+		if (countMarks > 8) countMarks = 8;
+
+		var picWidth  = whichFrame.document.lay1.clip.width;
+		var picHeight = whichFrame.document.lay1.clip.height;
+
+		for (var i = 0; i < countMarks; i++) {
+			mark[i] = mark[i].split("/");
+
+			if ((mark[i][0] > att[5]) && (mark[i][1] > att[6]) && (mark[i][0] < (att[5]+att[7])) && (mark[i][1] < (att[6]+att[8]))) {
+
+				mark[i][0] = parseInt(whichFrame.document.lay1.x + (picWidth*(mark[i][0]-att[5]))/att[7]);
+				mark[i][1] = parseInt(whichFrame.document.lay1.y + (picHeight*(mark[i][1]-att[6]))/att[8]);
+
+				whichFrame.document.layers[i+1].moveTo(mark[i][0]-5, mark[i][1]-5);
+				whichFrame.document.layers[i+1].visibility = "show";
+			}
+		}
+	}
+}
+
+
+// capturing keypresses for next and previous page
+function parseKeypress(event) {
+	var whichCode = (window.Event) ? event.which : event.keyCode;
+	if (String.fromCharCode(whichCode) == "n") {
+		Nextpage();
+	}
+	if (String.fromCharCode(whichCode) == "b") {
+		Backpage();
+	}
+}
+
+
+// auxiliary function to crop senseless precicsion
+function cropFloat(tmp) {
+	return parseInt(10000*tmp)/10000;
+}
+
+
+// initialize browser specific things (keypress caputring)
+function initScripts() {
+	window.captureEvents(Event.KEYDOWN);
+	window.onkeydown = parseKeypress;
+}
+
+
+// fill in the values of the "att"-array
+function initPicture(picURL) {
+	att = picURL.split("+");
+
+	if (att[0].lastIndexOf("/") == att[0].length-1) {
+		att[0] = att[0].substring(0, att[0].length-1);
+	}
+	
+	if (att.length < 2 || att[1] == "") {
+		att[1] = 1;
+	}
+	if (att.length < 3 || att[2] == "") {
+		att[2] = "1.0";
+	}
+
+	if (att.length < 4) {
+		att[3] = "";
+	}
+
+	if (att[3].indexOf("f") > -1) {
+		att[3] = "fit";
+	}
+
+	if (att.length < 5 || att[4] == "") {
+		att[4] = "0/0";
+	}
+
+	// converts the old mark format (0-1000) to new format(0.0 - 1.0)
+	if (att[4] != "0/0") {
+		var tmp = att[4].split(";");
+		
+		att[4] = "";
+		
+		for (i = 0; i < tmp.length; i++) {
+			tmp[i] = tmp[i].split("/");
+
+			if (tmp[i][0] > 1 && tmp[i][1] > 1) {
+				tmp[i][0] /= 1000;
+				tmp[i][1] /= 1000;
+			}
+			
+			att[4] += tmp[i][0] + "/" + tmp[i][1] + ";";
+		}
+		att[4] = att[4].slice(0, -1);
+	}
+	
+	if (att.length < 7) {
+		att[5] = 0;
+		att[6] = 0;
+		att[7] = 1;
+		att[8] = 1;
+	} else {
+		att[5] = parseFloat(att[5]);
+		att[6] = parseFloat(att[6]);
+		att[7] = parseFloat(att[7]);
+		att[8] = parseFloat(att[8]);
+	}
+}
+
+function pageInfo() {
+	
+	// bug in netscape 4.xx (confunding px and pt)
+	var fontsize = document.layers ? "11pt" : "11px";
+
+	if (window.pageFrame) {
+		pageFrame.document.open();
+		pageFrame.document.write('<html><head></head><body bgcolor="#CCCCCC" topmargin="5" marginheight="5">');
+		pageFrame.document.write('<p style="font-family: Verdana, Arial, Helvetica, sans-serif; text-align: center; color: #CC3333; font-size: ' + fontsize + '">');
+		pageFrame.document.write(att[1] + '<b> of </b>' + numPages + '</p></body></html>');
+		pageFrame.document.close();
+	}
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/navigation_n6.js	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,479 @@
+/* navigation_ie -- JS library for digilib (Mozilla version)
+
+  Digital Image Library servlet components
+
+  Copyright (C) 2001, 2002 Christian Luginbuehl (luginbuehl@student.unibe.ch)
+
+  This program is free software; you can redistribute  it and/or modify it
+  under  the terms of  the GNU General  Public License as published by the
+  Free Software Foundation;  either version 2 of the  License, or (at your
+  option) any later version.
+   
+  Please read license.txt for the full details. A copy of the GPL
+  may be found at http://www.gnu.org/copyleft/lgpl.html
+
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// these two global variables have to be initialised before the frist use of the functions below
+// to fill in the attributes you can use the function initPicture provided below
+// - array with all attributes
+var att = new Array();
+
+// - variable to store the path to the frame, in which the pictures should be created
+var whichFrame = parent.mainFrame;
+
+// give a name to the window containing digilib - this way one can test if there is already a
+// digilib-window open and replace the contents of it (ex. digicat)
+window.name = "digilib";
+
+// function that launches the ScaleServlet
+// the different detailGrades:
+// 		0 -> back, next, page
+//		1 -> zoomout
+//		2 -> zoomarea, zoompoint, moveto, scaledef
+
+function loadPicture(detailGrade, keepArea) {
+
+//	alert("wx: " + att[5] + "\tww: " + att[7] + "\nwy: " + att[6] + "\twh: " + att[8]);
+
+	// sorry about that, but Mozilla needs to have a document body to calc the frames width and height
+	whichFrame.document.open();
+	whichFrame.document.write('<html><head></head><body bgcolor="#666666" topmargin="10" leftmargin="10" marginwidth="10" magrinheight="10">');
+
+//	alert(whichFrame.innerWidth);
+
+	var newPicture  = "http://" + location.host + "/docuserver/digitallibrary/servlet/Scaler/"
+	newPicture += att[0] + "?" + "pn=" + att[1] + "&ws=" + att[2];
+	newPicture += "&dw=" + (whichFrame.innerWidth-30) + "&dh=" + (whichFrame.innerHeight-30);
+	newPicture += "&mo=" + att[3];
+
+	if (detailGrade == 0) {
+		att[4] = "0/0";
+	}
+
+	if ((detailGrade == 1) || (detailGrade == 0 && !keepArea)) {
+		att[5] = 0;
+		att[6] = 0;
+		att[7] = 1;
+		att[8] = 1;
+	}
+	newPicture += "&wx=" + att[5] + "&wy=" + att[6] + "&ww=" + att[7] + "&wh=" + att[8];
+	
+	whichFrame.document.write('<div ID="lay1" style="position:absolute; left:10;  top:10;  visibility:visible"><img name="pic" src="' + newPicture + '"></div>');
+	whichFrame.document.write('<div ID="dot0" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark1.gif"></div>');
+	whichFrame.document.write('<div ID="dot1" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark2.gif"></div>');
+	whichFrame.document.write('<div ID="dot2" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark3.gif"></div>');
+	whichFrame.document.write('<div ID="dot3" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark4.gif"></div>');
+	whichFrame.document.write('<div ID="dot4" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark5.gif"></div>');
+	whichFrame.document.write('<div ID="dot5" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark6.gif"></div>');
+	whichFrame.document.write('<div ID="dot6" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark7.gif"></div>');
+	whichFrame.document.write('<div ID="dot7" style="position:absolute; left:-20; top:100; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/mark8.gif"></div>');
+	whichFrame.document.write('<div ID="eck1" style="position:absolute; left:-20; top:120; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/olinks.gif"></div>');
+	whichFrame.document.write('<div ID="eck2" style="position:absolute; left:-20; top:140; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/orechts.gif"></div>');
+	whichFrame.document.write('<div ID="eck3" style="position:absolute; left:-20; top:160; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/ulinks.gif"></div>');
+	whichFrame.document.write('<div ID="eck4" style="position:absolute; left:-20; top:180; visibility:hidden"><img src="http://' + location.host + '/docuserver/digitallibrary/urechts.gif"></div>');
+
+	whichFrame.document.write('</body></html>');
+
+	whichFrame.document.close();
+
+	initScripts();
+	
+	pageInfo();
+
+	setmark();
+}
+
+
+function Backpage(keepArea) {
+
+    att[1] = parseInt(att[1]) - 1;
+
+    if (att[1] > 0) {
+        loadPicture(0, keepArea);
+    } else {
+	    att[1] = parseInt(att[1]) + 1;
+        alert("You are already on the first page!");
+    }
+}
+
+
+function Nextpage(keepArea) {
+
+    att[1] = parseInt(att[1]) + 1;
+
+    if (att[1] <= parent.numPages) {
+        loadPicture(0, keepArea);
+    } else {
+	    att[1] = parseInt(att[1]) - 1;
+        alert("You are already on the last page!");
+    }
+}
+
+
+function Page(keepArea) {
+
+	do {
+    	page = prompt("Goto Page (1 - " + parent.numPages + "):", 1);
+	} while ((page != null) && ((page < 1) || (page > parent.numPages)));
+
+   	if (page != null && page != att[1]) {
+		att[1] = page;
+		loadPicture(0, keepArea);
+	}
+}
+
+
+function Digicat() {
+	var url = "http://" + location.host + "/docuserver/digitallibrary/digicat.html?" + att[0] + "+" + att[1];
+	win = window.open(url, "digicat");
+	win.focus();
+}
+
+
+function Ref(refselect) {
+
+	var hyperlinkRef = "http://" + location.host + "/docuserver/digitallibrary/digilib.jsp?";
+	hyperlinkRef += att[0] + "+" + att[1] + "+" + att[2] + "+" + att[3] + "+" + att[4];
+	
+	if ((att[5] != 0) || (att[6] != 0) || (att[7] != 1) || (att[8] != 1)) {
+		hyperlinkRef += "+" + att[5] + "+" + att[6] + "+" + att[7] + "+" + att[8];
+	}
+
+	if (refselect == 1) {
+		prompt("Link for HTML--documents", hyperlinkRef);
+	} else {
+		prompt("Link for LaTeX--documents", "\\href{" + hyperlinkRef + "}{TEXT}");
+	}
+}
+
+
+function Mark() {
+
+	if (att[4].split(";").length > 7) {
+		alert("Only 8 marks are possible at the moment!");
+		return;
+	}
+
+	function MarkEvent(event) {
+
+		if ((att[4] != "") && (att[4] != "0/0")) {
+			att[4] += ";";
+		} else {
+			att[4] = "";
+		}
+
+		var markX = cropFloat(att[5]+att[7]*(event.pageX-parseInt(whichFrame.document.getElementById("lay1").style.left))/whichFrame.document.pic.offsetWidth);
+		var markY = cropFloat(att[6]+att[8]*(event.pageY-parseInt(whichFrame.document.getElementById("lay1").style.top))/whichFrame.document.pic.offsetHeight);
+
+		att[4] += markX + "/" + markY;
+
+		whichFrame.document.getElementById("lay1").removeEventListener("mousedown", MarkEvent, true);		
+		setmark();
+	}
+
+	whichFrame.document.getElementById("lay1").addEventListener("mousedown", MarkEvent, true);		
+}
+
+
+function Zoomrect() {
+	var state = 0;
+	var x1, y1, x2, y2;
+
+	function Click(event) {
+
+		if (state == 0) {
+			state = 1;
+			
+			x1 = event.pageX;
+			y1 = event.pageY;			
+			x2 = x1;
+			y2 = y1;
+			
+			whichFrame.document.getElementById("eck1").style.left = x1;
+			whichFrame.document.getElementById("eck1").style.top = y1;
+			whichFrame.document.getElementById("eck2").style.left = x2-12;
+			whichFrame.document.getElementById("eck2").style.top = y1;
+			whichFrame.document.getElementById("eck3").style.left = x1;
+			whichFrame.document.getElementById("eck3").style.top = y2-12;
+			whichFrame.document.getElementById("eck4").style.left = x2-12;
+			whichFrame.document.getElementById("eck4").style.top = y2-12;
+
+			whichFrame.document.getElementById("eck1").style.visibility="visible";
+			whichFrame.document.getElementById("eck2").style.visibility="visible";
+			whichFrame.document.getElementById("eck3").style.visibility="visible";
+			whichFrame.document.getElementById("eck4").style.visibility="visible";
+			
+			whichFrame.document.getElementById("lay1").addEventListener("mousemove", Move, true);		
+			whichFrame.document.getElementById("eck4").addEventListener("mousemove", Move, true);		
+
+		} else {
+
+			x1 -= parseInt(whichFrame.document.getElementById("lay1").style.left);
+			y1 -= parseInt(whichFrame.document.getElementById("lay1").style.top);			
+
+			x2 = event.pageX-parseInt(whichFrame.document.getElementById("lay1").style.left);
+			y2 = event.pageY-parseInt(whichFrame.document.getElementById("lay1").style.top);			
+
+			whichFrame.document.getElementById("lay1").removeEventListener("mousedown", Click, true);		
+			whichFrame.document.getElementById("eck4").removeEventListener("mousedown", Click, true);		
+			
+			whichFrame.document.getElementById("lay1").removeEventListener("mousemove", Move, true);		
+			whichFrame.document.getElementById("eck4").removeEventListener("mousemove", Move, true);		
+
+			whichFrame.document.getElementById("eck1").style.visibility="hidden";
+			whichFrame.document.getElementById("eck2").style.visibility="hidden";
+			whichFrame.document.getElementById("eck3").style.visibility="hidden";
+			whichFrame.document.getElementById("eck4").style.visibility="hidden";
+
+			att[5] = cropFloat(att[5]+att[7]*((x1 < x2) ? x1 : x2)/whichFrame.document.pic.offsetWidth);
+			att[6] = cropFloat(att[6]+att[8]*((y1 < y2) ? y1 : y2)/whichFrame.document.pic.offsetHeight);
+
+			att[7] = cropFloat(att[7]*Math.abs(x1-x2)/whichFrame.document.pic.offsetWidth);
+			att[8] = cropFloat(att[8]*Math.abs(y1-y2)/whichFrame.document.pic.offsetHeight);
+
+			if (att[7] != 0 && att[8] != 0) {
+				loadPicture(2);
+			}
+		}
+	}
+
+	function Move(event) {
+
+		x2 = event.pageX;
+		y2 = event.pageY;
+
+		whichFrame.document.getElementById("eck1").style.left = ((x1 < x2) ? x1 : x2);
+		whichFrame.document.getElementById("eck1").style.top = ((y1 < y2) ? y1 : y2);
+		whichFrame.document.getElementById("eck2").style.left = ((x1 < x2) ? x2 : x1)-12;
+		whichFrame.document.getElementById("eck2").style.top = ((y1 < y2) ? y1 : y2);
+		whichFrame.document.getElementById("eck3").style.left = ((x1 < x2) ? x1 : x2);
+		whichFrame.document.getElementById("eck3").style.top = ((y1 < y2) ? y2 : y1)-12;
+		whichFrame.document.getElementById("eck4").style.left = ((x1 < x2) ? x2 : x1)-12;
+		whichFrame.document.getElementById("eck4").style.top = ((y1 < y2) ? y2 : y1)-12;
+	}
+
+	whichFrame.document.getElementById("lay1").addEventListener("mousedown", Click, true);		
+	whichFrame.document.getElementById("eck4").addEventListener("mousedown", Click, true);		
+}
+
+
+function Zoomin() {
+
+	function ZoominEvent(event) {
+
+		att[5] = cropFloat(att[5]+att[7]*(event.pageX-parseInt(whichFrame.document.getElementById("lay1").style.left))/whichFrame.document.pic.offsetWidth-0.5*att[7]*0.7);
+		att[6] = cropFloat(att[6]+att[8]*(event.pageY-parseInt(whichFrame.document.getElementById("lay1").style.top))/whichFrame.document.pic.offsetHeight-0.5*att[8]*0.7);
+
+		att[7] = cropFloat(att[7]*0.7);
+		att[8] = cropFloat(att[8]*0.7);
+
+		if (att[5] < 0) {
+			att[5] = 0;
+		}
+		if (att[6] < 0) {
+			att[6] = 0;
+		}
+		if (att[5]+att[7] > 1) {
+			att[5] = 1-att[7];
+		}
+		if (att[6]+att[8] > 1) {
+			att[6] = 1-att[8];
+		}
+
+		whichFrame.document.getElementById("lay1").removeEventListener("mousedown", ZoominEvent, true);
+		
+		loadPicture(2);
+	}
+
+	whichFrame.document.getElementById("lay1").addEventListener("mousedown", ZoominEvent, true);
+}
+
+
+function Zoomout() {
+
+	loadPicture(1);
+}
+
+
+function Moveto() {
+
+	function MovetoEvent(event) {
+
+		att[5] = cropFloat(att[5]+att[7]*(event.pageX-parseInt(whichFrame.document.getElementById("lay1").style.left))/whichFrame.document.pic.offsetWidth-0.5*att[7]);
+		att[6] = cropFloat(att[6]+att[8]*(event.pageY-parseInt(whichFrame.document.getElementById("lay1").style.top))/whichFrame.document.pic.offsetHeight-0.5*att[8]);
+
+		if (att[5] < 0) {
+			att[5] = 0;
+		}
+		if (att[6] < 0) {
+			att[6] = 0;
+		}
+		if (att[5]+att[7] > 1) {
+			att[5] = 1-att[7];
+		}
+		if (att[6]+att[8] > 1) {
+			att[6] = 1-att[8];
+		}
+
+		whichFrame.document.getElementById("lay1").removeEventListener("mousedown", MovetoEvent, true);		
+		
+		loadPicture(2);
+	}
+
+	whichFrame.document.getElementById("lay1").addEventListener("mousedown", MovetoEvent, true);
+}
+
+
+function Scaledef(scaledef) {
+
+	att[2] = scaledef;
+	loadPicture(2);
+}
+
+
+function setmark() {
+
+	if (att[4] != "" && att[4] != "0/0") {
+		var mark = att[4].split(";");
+
+		var countMarks = mark.length;
+		
+		// maximum of marks is 8
+		// we do not report this error because this is already done in func. "Mark"
+		if (countMarks > 8) countMarks = 8;
+
+		var picWidth = whichFrame.document.pic.offsetWidth;
+		var picHeight = whichFrame.document.pic.offsetHeight;
+
+		// catch the cases where the picture had not been loaded already and
+		// make a timeout so that the coordinates are calculated with the real dimensions
+		if (whichFrame.document.pic.complete) {
+			var xoffset = parseInt(whichFrame.document.getElementById("lay1").style.left);
+			var yoffset = parseInt(whichFrame.document.getElementById("lay1").style.top);
+
+			for (var i = 0; i < countMarks; i++) {
+				mark[i] = mark[i].split("/");
+
+				if ((mark[i][0] > att[5]) && (mark[i][1] > att[6]) && (mark[i][0] < (att[5]+att[7])) && (mark[i][1] < (att[6]+att[8]))) {
+
+					mark[i][0] = parseInt(xoffset+picWidth*(mark[i][0]-att[5])/att[7]);
+					mark[i][1] = parseInt(yoffset+picHeight*(mark[i][1]-att[6])/att[8]);
+
+
+					whichFrame.document.getElementById("dot" + i).style.left = mark[i][0]-5;
+					whichFrame.document.getElementById("dot" + i).style.top = mark[i][1]-5;
+					whichFrame.document.getElementById("dot" + i).style.visibility = "visible";
+				}
+			}
+		} else {
+			setTimeout("setmark()", 100);
+		}
+	}
+}
+
+// capturing keypresses for next and previous page
+// ascii-values of n = 110, b = 98
+function parseKeypress (event) {
+	if (event.charCode == 110) {
+		Nextpage();
+	}
+	if (event.charCode == 98) {
+		Backpage();
+	}
+}
+
+
+// auxiliary function to crop senseless precicsion
+function cropFloat(tmp) {
+	return parseInt(10000*tmp)/10000;
+}
+
+
+// initialize browser specific things (keypress caputring)
+function initScripts() {
+//	for (var f = 0; f < window.frames.length; f++) {
+//		window.frames[f].document.addEventListener('keypress', parseKeypress, true);
+//	}
+	whichFrame.document.addEventListener('keypress', parseKeypress, true);
+	whichFrame.focus();
+}
+
+
+// fill in the values of the "att"-array
+function initPicture(picURL) {
+	att = picURL.split("+");
+
+	if (att[0].lastIndexOf("/") == att[0].length-1) {
+		att[0] = att[0].substring(0, att[0].length-1);
+	}
+	
+	if (att.length < 2 || att[1] == "") {
+		att[1] = 1;
+	}
+	if (att.length < 3 || att[2] == "") {
+		att[2] = "1.0";
+	}
+
+	if (att.length < 4) {
+		att[3] = "";
+	}
+
+	if (att[3].indexOf("f") > -1) {
+		att[3] = "fit";
+	}
+
+	if (att.length < 5 || att[4] == "") {
+		att[4] = "0/0";
+	}
+
+	// converts the old mark format (0-1000) to new format(0.0 - 1.0)
+	if (att[4] != "0/0") {
+		var tmp = att[4].split(";");
+		
+		att[4] = "";
+		
+		for (i = 0; i < tmp.length; i++) {
+			tmp[i] = tmp[i].split("/");
+
+			if (tmp[i][0] > 1 && tmp[i][1] > 1) {
+				tmp[i][0] /= 1000;
+				tmp[i][1] /= 1000;
+			}
+			
+			att[4] += tmp[i][0] + "/" + tmp[i][1] + ";";
+		}
+		att[4] = att[4].slice(0, -1);
+	}
+	
+	if (att.length < 7) {
+		att[5] = 0;
+		att[6] = 0;
+		att[7] = 1;
+		att[8] = 1;
+	} else {
+		att[5] = parseFloat(att[5]);
+		att[6] = parseFloat(att[6]);
+		att[7] = parseFloat(att[7]);
+		att[8] = parseFloat(att[8]);
+	}
+}
+
+
+function pageInfo() {
+	
+	// bug in netscape 4.xx (confunding px and pt)
+	var fontsize = document.layers ? "11pt" : "11px";
+
+	if (window.pageFrame) {
+		pageFrame.document.open();
+		pageFrame.document.write('<html><head></head><body bgcolor="#CCCCCC" topmargin="5" marginheight="5">');
+		pageFrame.document.write('<p style="font-family: Verdana, Arial, Helvetica, sans-serif; text-align: center; color: #CC3333; font-size: ' + fontsize + '">');
+		pageFrame.document.write(att[1] + '<b> of </b>' + numPages + '</p></body></html>');
+		pageFrame.document.close();
+	}
+}
Binary file client/digitallibrary/olinks.gif has changed
Binary file client/digitallibrary/orechts.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/page.js	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,13 @@
+function pageInfo() {
+	
+	// bug in netscape 4.xx (confunding px and pt)
+	var fontsize = document.layers ? "11pt" : "11px";
+
+	if (pageFrame) {
+		pageFrame.document.open();
+		pageFrame.document.write('<html><head></head><body bgcolor="#CCCCCC" topmargin="5" marginheight="5">');
+		pageFrame.document.write('<p style="font-family: Verdana, Arial, Helvetica, sans-serif; text-align: center; color: #CC3333; font-size: ' + fontsize + '">');
+		pageFrame.document.write(att[1] + '<b> of </b>' + numPages + '</p></body></html>');
+		pageFrame.document.close();
+	}
+}
Binary file client/digitallibrary/ulinks.gif has changed
Binary file client/digitallibrary/urechts.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/doc/dokumentation_digilib.html	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,153 @@
+<html>
+<head>
+<title>Untitled Document</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF" text="#000000">
+<h1>Digital Document Library</h1>
+<h4>&nbsp; </h4>
+<table border="0" cellspacing="3" width="573">
+  <tr> 
+    <td> 
+      <h4>Stand:</h4>
+    </td>
+    <td> 
+      <h4>27. M&auml;rz 2001</h4>
+    </td>
+  </tr>
+  <tr> 
+    <td> 
+      <h4>&nbsp;</h4>
+    </td>
+    <td> 
+      <h4>&nbsp;</h4>
+    </td>
+  </tr>
+  <tr> 
+    <td> 
+      <h4>Leitung:</h4>
+    </td>
+    <td> 
+      <h4>Gerd Grasshoff (<a href="mailto:gerd.grasshoff@philo.unibe.ch">gerd.grasshoff@philo.unibe.ch</a>)</h4>
+    </td>
+  </tr>
+  <tr> 
+    <td> 
+      <h4>Autor:</h4>
+    </td>
+    <td> 
+      <h4>Christian Luginb&uuml;hl (<a href="mailto:luginbuehl@student.unibe.ch">luginbuehl@student.unibe.ch</a>)</h4>
+    </td>
+  </tr>
+</table>
+<h3>Inhalt</h3>
+<ol>
+  <li>Einf&uuml;hrung</li>
+  <li>Filestruktur</li>
+  <li>Files</li>
+</ol>
+<h3>1. Einf&uuml;hrung</h3>
+<p>Das Projekt Digital Document Library hat zum Ziel, &quot;Dokumente&quot;mit 
+  Heilfe eines Web-Browsers anschauen zu k&ouml;nnen. Diese Dokumente sind hochaufgel&ouml;ste 
+  Bilddateien, die auf einem Server gespeichert sind. Um der Benutzerin, dem Benutzer 
+  die M&ouml;glichkeit einer raschen Konsultation der Daten liefern zu k&ouml;nnen, 
+  m&uuml;ssen diese Bilddaten auf eine vern&uuml;nftige Gr&ouml;sse verkleinert 
+  und an die Anfragenden geschickt werden. Weiter sollen den Usern Hilfsmittel 
+  zur Verf&uuml;gung stehen um in diesen Seiten zu navigieren. Diese Hilfsmittel 
+  bestehen aus Funktionen um zwischen verschiedenen Seiten hin und her zu wechseln, 
+  Ausschnitte aus einem Bild zu zoomen und der M&ouml;glichkeit Markierungen zu 
+  setzen. Ein weiter wichtiges Feature dieses Programms ist es, Referenzen von 
+  Seiten (inkl. Ausschnitte und Markierungen) verf&uuml;gbar zu machen, die dann 
+  in beliebiegen anderen Dokumenten eingebaut werden k&ouml;nnen. Sofern die Lesenden 
+  dieser Dokumente dann &uuml;ber einen Anschluss ins Internet verf&uuml;gen, 
+  k&ouml;nnen diese Referenzen direkt konsultiert werden und so die Digital Document 
+  Library als grosse Quelltextsammlung gebraucht werden.</p>
+<h3>2. Filestruktur</h3>
+<p>Die Digital Document Library ist als Client/Server-Modell aufgebaut, wobei 
+  an dieser Stelle haupts&auml;chlich die Clientseite beschrieben wird. Zu einem 
+  besseren Verst&auml;ndnis ist nun folgend eine Skizze mit den verschiedenen 
+  Files und Verzeichnissen anf&uuml;gt.</p>
+<p align="left"><img src="Digilib.gif" width="691" height="603" border="0" vspace="20" hspace="20"></p>
+<p align="left">Da JavaScript auf den verschiedenen verf&uuml;gbaren Browsern 
+  nicht genau gleich implementiert wurde und Digilib auf dieser Scriptsprache 
+  aufsetzt, ist es wichtig in digilib.html eine geeignete Version von navigation_XX.js 
+  zu finden. Das XX wird als Variable f&uuml;r unterschiedliche Anpassungen an 
+  die Browser. Momentan sind Netscape 4 (navigation_n4.js) und Netscape 6 (navigation_n6.js) 
+  unterst&uuml;tzt.<br>
+  Beim Erstellen der Struktur wurde darauf geachtet, dass das Layout und die tats&auml;chliche 
+  Funktionalit&auml;t voneinander getrennt sind. Dies erm&ouml;glicht eine besstm&ouml;gliche 
+  Portabilit&auml;t des Codes, so dass es m&ouml;glich ist, Digilib f&uuml;r spezielle 
+  Anwendungen anzupassen (vgl. Compago, Universit&auml;t Bern).</p>
+<h3 align="left">3. Files</h3>
+<h4>3.1 digilib.html</h4>
+<p>Dies ist die Schnittstelle zwischen Layout und Funktion von Digilib. Die Aufgaben 
+  dieser Datei sind, das Laden der richtigen navigation_XX.js-Datei und das Anpassen 
+  des Layouts. Hauptaufgabe jedoch ist das Lesen der Parameter aus der URL. digilib.html 
+  ist so aufgebaut, dass ein Bild (inkl. Ausschnitte und Markierungen) vollst&auml;ndig 
+  &uuml;ber Parameter in der URL angegeben werden kann. Nun folgend ist eine Liste 
+  mit allen m&ouml;glichen Parametern, wobei nur gerade der erste gegeben sein 
+  muss - alle andern haben Defaultwerte, die in Klammern angegeben sind:</p>
+<pre>http://penelope.uni.../digitallibrary/digilib.html?att0+[att1]+[att2]+...+[att8]</pre>
+<ul>
+  <li><b>att0</b> gibt das Verzeichnis an, in dem das Bild gespeichert ist.</li>
+  <li><b>att1</b> (1) gibt die Seitenzahl des Bildes an. Diese Zahl bezieht sich 
+    nicht auf die Buchseite, sondern zeigt auf die x-te Datei im unter att0 angegebenen 
+    Verzeichnis.</li>
+  <li><b>att2</b> (1) ist der Skalierungsfaktor. Ein Faktor von 1 zoomt das Bild 
+    auf Framegr&ouml;sse, 2 macht das Bild doppelt so hoch und breit.</li>
+  <li><b>att3</b> (&quot;&quot;) ist f&uuml;r zus&auml;tzliche Kommandos an das 
+    Servlet gedacht und per default leer. Einziges unterst&uuml;tztes Argument 
+    ist hier &quot;f&quot; um das Servlet anzuweisen auch gif-Images zu zoomen.</li>
+  <li><b>att4</b> (0/0) enth&auml;lt die Informationen f&uuml;r Markierungspunkte. 
+    Die x- und y-Koordinate verden mit &quot;/&quot; getrennt, verschiedene Markierungen 
+    mit &quot;;&quot; (es sind bis zu 8 m&ouml;glich). Die Makrierungen werden 
+    relativ zur Bildbreite und -h&ouml;he von 0 bis 1 angegeben (0/0 wird nicht 
+    gezeichnet).</li>
+  <li><b>att5, att6</b> (0, 0) geben die linke ober Ecke des gew&uuml;nschten 
+    Ausschnitts an (ebenfalls relativ - vgl. att4).</li>
+  <li><b>att7, att8</b> (1, 1) geben die relative Breite bzw. H&ouml;he des Ausschnitts 
+    an. (Standardm&auml;ssig sind die Parameter so gesetzt, dass das ganze Bild 
+    angezeigt wird).</li>
+</ul>
+<p>Diese Parameter werden von digilib.html als ein Block gelesen und an navigation_XX 
+  weitergeleitet, wo dieser Block dann auseinander genommen und im richitgen Format 
+  gespeichert wird.</p>
+<h4>3.2 navigation.html</h4>
+<p>Diese Datei l&auml;dt fw_menu.js, mit Funktionen f&uuml;r Events bei den Kn&ouml;pfen 
+  und Menus. Weiter ist hier das Layout der Navigationsleiste festgelegt und die 
+  Texte f&uuml;r die Kontexthilfe sind hier gespeichert.</p>
+<h4>3.3 fw_menu.js</h4>
+<p>In dieser von Fireworks generierten JavaScript-Datei werden die Events abgearbeitet, 
+  die bei Mausbewegungen und -klicks &uuml;ber den Kn&ouml;pfen gesendet werden. 
+  In dieser Datei ist auch eine Funktion f&uuml;r die kantextsensitive Hilfe der 
+  einzelnen Kn&ouml;pfe gespeichert. Wenn sie eingeschaltet ist, dann wird beim 
+  &Uuml;berfahren der Kn&ouml;pfe ein kleines Fenster ge&ouml;ffnet, in dem kurz 
+  die Funktion und der Gebrauch dieses Knopfes erl&auml;utert.<br>
+</p>
+<h4>3.4 navigation_XX.js</h4>
+<p>Diese Datei bildet das Kernst&uuml;ck des Digilib-Clients. Hier werden die 
+  Funktionen angeboten um Seiten zu wechseln, Makierungen zu setzen, Referenzen 
+  zu erzeugen und Ausschnitte zu zoomen. Weiter werden hier die Parameter aus 
+  digilib.html &uuml;berpr&uuml;ft und gespeichert, die Anfrage ans Servlet gemacht, 
+  wenn ein neuer Ausschnitt bzw ein neues Bild gew&uuml;nscht wird und dieses 
+  wird dann ebenfalls von dieser Datei aus im Browser ausgegeben.<br>
+  Es gibt zwei wichtige globale Variablen in dieser Datei:</p>
+<ul>
+  <li><b>whichFrame:</b> Diese Variable gibt an, in welchem Frame die erhaltenen 
+    Bilder dargestellt werden sollen. Man hat so die M&ouml;glichkeit von aussen 
+    auf diese Variable zuzugreiffen und so Anpassungen machen, wenn man ein anderes 
+    Layout will (Bsp. Vergleichsbildschirm von Compago, Universit&auml;t Bern). 
+    Das Format ist nach passendem DOM (Document Object Model - vgl. <a href="http://www.w3c.org">www.w3c.org</a>) 
+    als relativer Pfad von der Stelle anzugeben, wo navigation_XX.js geladen wurde.</li>
+  <li><b>att-Array: </b>In diesem Array sind die einzelnen Parameter gespeichert 
+    wie sie in Kapitel 3.1 aufgef&uuml;hrt wurden. Der Grund weshalb diese Variable 
+    global gehalten wurde, ist der, dass ein modifizierter Client Informationen 
+    &uuml;ber eine Seite speichern und weiterverarbeiten kann (auch hier sei auf 
+    den &quot;Vergleichsbildschirm&quot; des Projektes Compago der Universit&auml;t 
+    Bern hingewiesen).</li>
+</ul>
+<p>&nbsp;</p>
+<p>Christian Luginb&uuml;hl</p>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/doc/dokumentation_digilib.txt	Thu Jan 17 15:29:55 2002 +0100
@@ -0,0 +1,288 @@
+DIGITAL DOCUMENT LIBRARY
+------------------------
+
+Stand   : 21. Januar 2001
+
+
+Leitung : Gerd Grasshoff (gerd.grasshoff@philo.unibe.ch)
+
+Autor   : Christian Luginbühl (luginbuehl@student.unibe.ch)
+
+
+
+Inhalt
+------
+
+1. Einführung
+
+2. digilib3.jsp
+
+3. navigation3XXX.js
+
+4. ScaleServlet.java
+
+
+
+1. Einführung
+-------------
+
+Das Projekt Digital Document Library  hat zum Ziel, "Dokumente" mit  Hilfe eines
+Browsers anschauen zu können.  Diese Dokumente sind hochaufgelöste  Bilddateien,
+die  auf einem  Server gespeichert  sind. Um  der Benutzerin,  dem Benutzer  die
+Möglichkeit einer raschen Konsultation der Daten liefern zu können, müssen diese
+Bilddaten auf eine vernünftige Grösse verkleinert und in dieser Form dann an die
+Anfragenden  geschickt werden.  Weiten sollen  den Benutzenden  Hilfsmittel zur
+Verfügung stehen um in diesen  Seiten zu navigieren. Diese Hilfsmittel  bestehen
+aus  Funktionen  um  zwischen  verschieden  Seiten  hin  und  her  zu  wechseln,
+Ausschnitte aus einem Bild zu zoomen und der Möglichkeit Markierungen zu setzen.
+Ein  weiteres  wichtiges  Feature  dieses  Programms  ist  es,  Referenzen  ganz
+bestimmter Seiten (inkl. Ausschnitte  und Markierungen) auszugeben, die  dann in
+beliebigen  anderen  Dokumenten  eingebaut werden  können.  Sofern  die Lesenden
+dieser Dokumente dann über einen  Anschluss ins Internet verfügen, können  diese
+Referenzen direkt  angeschaut werden  und so  die Digital  Document Library  als
+grosse Quelltextsammlung gebraucht werden.
+
+Das Programm  nun ist  ein Client/Server-Modell.  Einerseits haben  wir das User
+-Interface (also den  Client), wo die  Darstellung und die  Navigation aufgebaut
+und berechnet werden. Dieser Teil des Programms umfasst im Prinzip zwei Dateien.
+Mit der Frage des Layouts beschäftigt  sich digilib3.jsp. Es ist die Datei,  die
+im Browser aufgerufen wird (mit  den verschiedenen Parametern, die in  Kapitel 2
+erläutert werden) und die nötigen Aufrufe macht für die Skalierung der Bilddaten
+und der  entsprechenden Navigationselemente.  Die zweite  Datei des  Clients ist
+eine dynamisch ausgerufene JavaScript-Datei namens navigation3XXX.js, wobei  die
+XXX  für  die  verschidenen   Borwservarianten  stehen.  Da  die   Scriptsprache
+JavaScript in den  verschiedenen Browsern nicht  ganz gleich implementiert  ist,
+ist es nötig  diese Datei an  die verschidenen Umgebungen  anzupassen. Das Laden
+dieser Dateien übernimmt  digilib3.jsp, indem es  erst abfragt, welchen  Browser
+von Client gebraucht wird und dann die entsprechende navigation-Datei vom Server
+verlangt. Auf der Serverseite ist ein Programm namens ScaleServlet sehr wichtig.
+Dieses Servlet  handelt die  Anfragen der  Clients und  macht die  verschiedenen
+Skalierungen an dem Bildern und  schickt, dann den entsprechenden Ausschnitt  an
+den Client.
+
+In  den  nächsten  Kapitel  sind  die  einzelnen  Files  mit  ihren verschidenen
+Parametern der Aufrufe erläutert.
+
+
+2. digilib3.jsp
+---------------
+
+Bei einem Request von digilib3.jsp werden auf der Serverseite die  verschiedenen
+Parameter des Aufrufs in die zurückgesendete Datei eingefüllt und dann vor allem
+für  den  von  'digilib' ausgehenden  Aufruf  des  ScaleServlets verwendet.  Die
+verschiedenen  Parameter  beim   Request  sind  durch   Pluszeichen  voneinander
+getrennt. Beispiel:
+
+http://pene ... /digilib3.jsp?histast/eastwood-collection/AF+3+s1.2+r:3852+12/30
+                              ------------------------------ - ---- ------ -----
+                              Parameter 1                    2 3    4      5
+
+Die verschiedenen Parameter werden in digilib3.jsp in ein Array mit 11 Elementen
+(1 - 11) aufgenommen. Folgend ist nun eine Auflistung aller Parameter und  ihrer
+Bedeutung. Es  ist absolut  zwingend, dass  diese in  der richtigen  Reihenfolge
+aufgerufen werden.
+
+- att[1] = '<%= docuurl %>'
+
+Dieser  Parameter  gibt  den  Pfad  ohne  Hostnamen  zum  Verzeichnis  mit   dem
+gewünschten Werk an.  Wichtig zu verstehen  ist, dass hier  nicht ein bestimmtes
+Bild angesprochen wird, sondern nur ein Verzeichnis.
+
+- att[2] = '<%= startPage %>'
+
+Dies ist die Nummer des Bildes  im von Parameter 1 gewählten Verzeichnis.  Falls
+dieser Parameter leer ist, wird er automatisch auf '1' gesetzt.
+
+- att[3] = '<%= scalefact %>'
+
+Scalefact  gibt den  Vergrösserungsfaktor der  Bildes an,  im Vergleich  zur in
+ScaleServlet angegebenen Standardgrösse. Die Syntax diese Parameters ist 'sx.x',
+wobei x.x für die Werte 0.6, 0.8,  1.0, 1.2, 1.4, 1.6, 2.0, 2.5 oder  3.0 stehen
+kann. Standardwert ist 's1.0'.
+
+(Anm: Serverseitig wird an diesem Teil noch gearbeitet, damit die Standardgrösse
+auf verschidenen Bildschirmen auch verschieden gross ist)
+
+- att[4] = '<%= commandostring %>'
+
+Gebraucht  wird  dieser  Parameter  dafür,   dass  die  Bilder  nicht  aus   dem
+Browsercache genommen werden, sondern auf dem Server dann neu berechnet  werden.
+Bei  einem "Zoom  Out" wird  hier eine  Zufallszahl generiert.  Die Syntax  ist
+'r:xxxx', wobei x irgend eine höchstens vierstellige Zahl. Standardwert ist r:1.
+
+- att[5] = '<%= remarkcoord %>'
+
+In diesem Parameter werden  die Koordinaten der Markierungspunkte  festgehalten.
+Syntax ist 'xxx/yyy;zzz/ttt; ... aaa/bbb'. Die Koordinatenpaare um "/" geben an,
+wo eine  Markierung gesetzt  werden soll,  wobei Werte  von 0  bis zur aktuellen
+Bildgrösse erlaubt sind.  Durch ";" werden  die einzelnen Markierungen  getrennt
+(maximal 5 sind  möglich). Standardwerte sind  hier '' (leer)  oder '0/0' (keine
+Markierung wird gesetzt).
+
+- att[6] = '<%= windowwidth %>' / att[7]   = '<%= windowheight %>'
+
+Windowwidth gibt an,  wie breit/hoch das  Bild auf dem  Bildschirm ist. Standard
+ist '' (leer).
+
+- att[8] = '<%= xoffset %>' / att[9] = '<%= yoffset %>'
+
+Diese Attribute  haben zwei  Bedeutungen. Falls  att[10] und  att[11] leer sind,
+gibt xoffset  bzw. yoffset  an, um  welchen Punkt  im Bild  gezoomt werden soll.
+Falls att[10],  att[11] nicht  leer sind,  geben sie  die Koordinaten  der linke
+oberen  Ecke des  zu vergrössernden  Bildausschnitts an.  Standard ist  hier ''
+(leer).
+
+- att[10] = '<%= width %>' / att[11] = '<%= height %>'
+
+Falls diese Attribute verschieden von '' (leer) sind, geben sie die  Breite/Höhe
+des Bildaussschnittes an, der gezoom werden soll.
+
+
+Die weiteren Funktionen von digilib3.jsp sind:
+
+- Laden des navigation3XXX.js-Files für den entsprechenden Browser.
+- Erstellen eines Framesets (kleiner Frame mit den Navigationsbuttons und
+  Frame mit dem Bild).
+- Erstellen der Navigationsbuttons.
+- Zusammenstellen der korrekten Parameterliste für den Aufruf von ScaleServlet.
+- Erstellen der verschiedenen Layers mit dem Bild (Aufruf), den Markierungen und
+  den Zeichen für die Eckpunkte beim Vergrössern.
+- Aufruf an navigation3XXX.js für Intialbefehle wie Setzen der Markierungspunkte.
+
+
+3. navigation3XXX.js
+--------------------
+
+Navigation3XXX.js ist eine Sammlung von Funktionen zur Navigation in der Digital
+Document Library. Die verschidenen Funktionen werden zum Beispiel durch  klicken
+auf   einen   in  digilib3.jsp   erstellten   Navigationsknopf  aufgerufen.   Um
+verschiedene Browser zu unterstützen (die Implementierung von Javascript und das
+Document  Object Model  sind unterschiedlich),  gibt es  angepasste navigation3
+-files,  die  von  digilib3.jsp entsprechend  des  verwendeten  Browsers geladen
+werden. Momentan sind Versionen für Netscape Communicator 4.xx  (navigation3.js)
+und Netscape 6 (navigation3_n6.js) verfügbar. Bei der Programmierung des Clients
+wurde darauf geschaut,  dass digilib3.jsp für  möglichst alle Browser  das selbe
+ist und somit nur navigation3XXX.js angepasst werden muss. Voraussetzung  hierzu
+ist, dass ein Brwoser mit Layern (<div>-Tags) umgehen kann. Nachstehend ist ganz
+kurz erläutert, welche Funktionen in navigation3XXX.js welche Aufgaben erfüllen:
+
+- genString(detail)
+
+Anhand von 'detail' generiert diese Funktion die Parameterliste für einen Aufruf
+eines   neuen   Bildes,   eines  Ausschnittes   oder   des   Strings  für   eine
+Referenzabfrage. 'detail' wird  gebraucht, um die  Anzahl der nötigen  Parameter
+für das  Ausführen der  aufrufenden Funktion  zu bestimmen.  Diese Funktion wird
+immer indirekt, d.h. in  anderen Funktionen von navigation3XXX.js  aufgrufen und
+liefert eine Stringrückgabe.
+
+- Backpage(), Nextpage(), Page()
+
+Diese Funktionen handeln die  Navigation durch die Seiten  eines Verzeichnisses.
+Diese Funktionen werden  mit einem Klick  auf die Navigationsbuttons  aufgerufen
+und Laden eine neue Seite.
+
+- Ref(refselect)
+
+Hier wird ein PopUp-Fenster erzeugt, das die komplette URL der momentanen  Seite
+zurückgibt. Mit 'refselect'  wird bestimmt, ob  die Formatierung der  Ausgabe in
+HTML-  oder  LaTeX-Form sein  soll.  Diese Funktion  wird  mit dem  "Ref"-Button
+aufgerufen.
+
+- Mark()
+
+Diese Funktion plaziert eine Markierung auf  dem Bild, wobei sie zuerst nur  die
+Maus-koordinaten bei  einem Klick  auf das  Bild abfängt  und dann  die Funktion
+'setmark()' aufruft.  Es können  bis zu  fünf Markierungen  auf ein Bild gesetzt
+werden. Auch diese Funktion wird direkt über die Navbuttons aufgerufen.
+
+- Zoomrect(), Zoomin(), Zoomout()
+
+Direkt aufgerufene  Funktionen die  sich mit  dem Zoomen  innerhalb eines Bildes
+beschäftigen. Die Rückgabe ist bei allen drei Funktionen ein Aufruf eines  neuen
+Bildes.
+
+- Moveto()
+
+Diese  Funktion  verändert  das  Zentrum bei  einem  schon  gezoomten  Bild. Die
+geklickten Koordinaten entsprechen dann dem Zenrum des neuen Bildes bei gleicher
+Vergrösserung.  Dieses  Feature  wird  in  Zeichnungsprogrammen  oft  mit  'Pan'
+betitelt. Direkter Aufruf und  Aufruf des neuen Bildes  sind gleich wie bei  den
+Zoom-Funktionen.
+
+- Scaledef(scaledef)
+
+Mit  Scaledef  wird  die   Bildgrösse  im  Vegleich  zur   in  ScaleServlet.java
+angegebenen  Standardgrösse  verändert.  Der  Parameter  'scaledef'  gibt diesen
+Faktor an. Eine Liste der möglichen  Werte ist weiter oben angegeben. Auch  hier
+wird di Funktion direkt über die Auswahlliste im Navigationsframe aufgerufen und
+auch hier wird ein neues Bild geladen.
+
+- setmark()
+
+Setmark wird indirekt von Mark() oder initScripts() aufgerufen und zeichnet sich
+für die Positionierung der Markierungen verantwortlich. Die Funktion  extrahiert
+aus att[5] die einzelnen Koordinaten  und setzt die Punkte. Wenn  eine bestimmte
+Reihenfolge bei den Punkten eingehalten werden soll, dann müssen sie auch  immer
+gleich in der Parameterliste aufgerufen werden. Die Funktion setmark gibt nichts
+zurück.
+
+- parseKeypress()
+
+Diese Funktion dient dem Abfangen von Tastatureingaben, wobei die Tasten "n" für
+nächste Seite und "b" für vordere Seite abgefragt werden. parseKeypress wird von
+initScripts aufgerufen und hat keinen Rückgabewert.
+
+- initScripts()
+
+In dieser Funktion werden Vorkehrungen getroffen, die beim Anzeigen einer  neuen
+Seite  getroffen werden  müssen. Deshalb  wird diese  Funktion automatisch  beim
+Laden   von   digilib3.jsp   aufgerufen.   Insbesondere   ruft   diese  Funktion
+parseKeypress und setmark  auf, wobei bei  verschiedenen Browsertypen auch  noch
+andere  Sachen  hinzukommen  (bei  Netscape   6  wird  zum  Beispiel  auch   die
+Clientgrösse berechnet und geschaut ob Scrollbalken gemacht werden müssen).
+
+
+4. ScaleServlet.java
+--------------------
+
+Der Aufruf von ScaleServlet.java erfolgt grundsätzlich von digilib3.jsp und  die
+Parameterliste hat  auch die  selben Attribute  (ausgenommen ist  att[5] mit den
+Koordinaten der Markierungspunkte. Bei Fragen über die einzelnen Bedeutungen der
+Attribute sie hier also auf Kapitel 2 verwiesen. An dieser Stelle sei aber  noch
+etwas  gesagt, über  die Zusammensetzung  der Parameterliste.  ScaleServlet.java
+kennt drei verschiden lange Parameterlisten,  mit denen es arbeiten kann,  wobei
+die korrekte Zusammenstellung der Parameterliste in digilib3.jsp erfolgt.
+
+- Kurz (att[1] - att[4])
+
+Diese vier Parameter geben dem ScaleServlet die Aufgabe, ein Bild (bestimmt  mit
+att[1] und  att[2]) auf  die Standardgrösse  zu skalieren  und an  den Client zu
+senden. Att[3] gibt  zusätzlich den Skalierungsfaktor  an und att[4]  verhindert
+mit einer Zufallszahl, dass das Bild aus dem Browsercache geholt wird.
+
+- Mittel (att[1] - att[4] + att[6] - att[9])
+
+Diese Möglichkeit  des Aufrufs  wird gebraucht,  um bezüglich  des in att[8] und
+att[9] bestimmten Mittelpunktes einen Ausschnitt zu vergrossen. Um den genannten
+Punkt  einzuordnen, wird  die grösse  des momentan  angezeigten Bildes  mit den
+Parametern 6 und 7 mitgegeben.
+
+- Lang (att[1] - att[4] + att[6]- att[11])
+
+Ein Aufruf in dieser Form gibt  dem Servlet an, einen Ausschnitt aus  einem Bild
+zu vergrössern und zurückzusenden. Folgt ein Aufruf in dieser Form, bekommen die
+Parameter att[8] und  att[9] die Werte  der linken oberen  Ecke und att[10]/[11]
+die Breite/Höhe des Ausschnitts.
+
+
+Aufgrund eines  eingebauten Session-Managements  im Servlet  ist es  möglich mit
+digilib auch mehrfach in ein Bild hinein zu zoomen.
+
+(Anm: Auch wenn dieses Session-Management seinen Zweck beim Anschauen der Bilder
+sehr  gut  erfüllt, ist  es  dem ScaleServlet  nicht  möglich den  Referenz-URLs
+anzusehen,  ob zuerst  mehrfach hineingezoomt  wurde und  gibt unter  Umständen 
+- eben wenn mehrfach hieingezoomt wurde vor der Generierung der Referenz - einen
+falschen Ausschnitt zurück.)
+
+
+----------------------------------------------
\ No newline at end of file