2 <script type='text/javascript'>
3 // Gratuitiously copied from http://dhtmlpopups.webarticles.org/basics.php
4 // Determine how much the visitor had scrolled
6 var scrolledX, scrolledY;
7 if( self.pageYOffset ) {
8 scrolledX = self.pageXOffset;
9 scrolledY = self.pageYOffset;
10 } else if( document.documentElement && document.documentElement.scrollTop ) {
11 scrolledX = document.documentElement.scrollLeft;
12 scrolledY = document.documentElement.scrollTop;
13 } else if( document.body ) {
14 scrolledX = document.body.scrollLeft;
15 scrolledY = document.body.scrollTop;
18 // Determine the coordinates of the center of the page
21 if( self.innerHeight ) {
22 centerX = self.innerWidth;
23 centerY = self.innerHeight;
24 } else if( document.documentElement && document.documentElement.clientHeight ) {
25 centerX = document.documentElement.clientWidth;
26 centerY = document.documentElement.clientHeight;
27 } else if( document.body ) {
28 centerX = document.body.clientWidth;
29 centerY = document.body.clientHeight;
32 function myPopupRelocate() {
33 var scrolledX, scrolledY;
34 if( self.pageYOffset ) {
35 scrolledX = self.pageXOffset;
36 scrolledY = self.pageYOffset;
37 } else if( document.documentElement && document.documentElement.scrollTop ) {
38 scrolledX = document.documentElement.scrollLeft;
39 scrolledY = document.documentElement.scrollTop;
40 } else if( document.body ) {
41 scrolledX = document.body.scrollLeft;
42 scrolledY = document.body.scrollTop;
46 if( self.innerHeight ) {
47 centerX = self.innerWidth;
48 centerY = self.innerHeight;
49 } else if( document.documentElement && document.documentElement.clientHeight ) {
50 centerX = document.documentElement.clientWidth;
51 centerY = document.documentElement.clientHeight;
52 } else if( document.body ) {
53 centerX = document.body.clientWidth;
54 centerY = document.body.clientHeight;
57 var leftOffset = scrolledX + (centerX - 250) / 2;
58 var topOffset = scrolledY + (centerY - 200) / 2;
60 document.getElementById("mypopup").style.top = topOffset + "px";
61 document.getElementById("mypopup").style.left = leftOffset + "px";
64 window.onload=function(){
66 document.getElementById("mypopup").style.display = "block";
67 document.body.onscroll = myPopupRelocate;
68 window.onscroll = myPopupRelocate;
71 <div id='mypopup' name='mypopup' style='position: absolute; width: 400px; height: 131px; display: none; background: #FFC url(/intranet-tmpl/prog/img/alert-bg.gif) repeat-x left 0; border: 1px solid #bcbcbc; right: 0px; top: 500px'>
72 <span id="message" style="position: absolute; top: 5px; left: 5px;">
73 <strong style="color: #900;">WARNING:</strong>
75 The database returned an error while [% IF ( card_element ) %]saving [% card_element %] [% element_id %][% ELSE %]attempting a save operation[% END %]. Please have your system administrator check the error log for details.
77 The database returned an error while [% IF ( card_element ) %]deleting [% card_element %] [% element_id %][% ELSIF ( image_ids ) %][% image_ids %][% ELSE %]attempting a delete operation[% END %]. Please have your system administrator check the error log for details.
79 An unsupported operation was attempted[% IF ( element_id ) %] on [% card_element %] [% element_id %][% END %]. Please have your system administrator check the error log for details.
81 An error has occurred. Please ask your system administrator to check the error log for more details.
83 A non-existent or invalid library code was supplied. Please <a href="/cgi-bin/koha/circ/selectbranchprinter.pl">verify</a> that you have a library selected.
85 An error has occurred while attempting to upload the image file. Please ask you system administrator to check the error log for more details.
87 Image exceeds 500KB. Please resize and import again.
89 The database image quota currently only allows a maximum of [% image_limit %] images to be stored at any one time. Please delete one or more images to free up quota space.
91 An error has occurred and the item(s) was not added to batch [% batch_id %]. Please have your system administrator check the error log for details.
93 The item(s) was not added because the library is not set. Please set your library before adding items to a batch.
95 An error has occurred and the item(s) was not removed from batch [% batch_id %]. Please have your system administrator check the error log for details.
97 An error has occurred and batch [% batch_id %] was not deleted. Please have your system administrator check the error log for details.
99 An error has occurred and batch [% batch_id %] not fully de-duplicated.
103 <span id="close" style="position: absolute; top: 100px; left: 175px;">
104 <input type='submit' value='Close' onClick='document.getElementById("mypopup").style.display = "none"'>