'
o+='a - '+T('opcje zaawansowane')+'
'
o+='c - '+T('włącz/wyłącz sterowanie')+'
' //
o+='d - '+T('włącz/wyłącz opis')+'
' //toggle descriptions
// if (document.all) o+='e - '+T('toggle effects')+'
'
// o+='f - '+T('cały ekran')+'
' //full screen
o+='p - '+T('włącz/wyłącz pomoc')+'
' //Toggle help
// if (languages) o+='l - '+T('change language')+'
'
// o+='m - '+T('max rozmiar zdjęcia')+'
'
// o+='p - '+T('toggle pre-cache')+'
'
// o+='r - '+T('włącz/wyłącz losowoć')+'
' //toggle random
o+='s - '+T('start/stop pokazu zdjęć')+'
'
o+='m - '+T('włącz/wyłącz miniatury')+'
'
o+='x - '+T('zamknięcie okna')+'
'
// o+='z - '+T('przełącznie powiększenia (zoom)')+'
'
o+='^ - '+T('przesuń układ sterowania')+'
'//move controls
o+='- - '+T('poprzedni ')+'
'
o+='+ - '+T('następny')+'
'
o+='< - '+T('wolniej')+'
'
o+='> - '+T('szybciej')+'
'
o+='? - '+T('O przeglądarce')+' JSviewer
'
o+='
'+T('Przycisk myszy (zoom)')+'
' //Mouse click (zoom mode)
o+=T('lewy - powiększenie')+'
'
o+=T('prawy -zmiejszenie')+'
'
o+=remotekeys()
output('hiddenlayer',font(o))
var x=divWidth('hiddenlayer')+2*fontsize
var y=divHeight('hiddenlayer')+2*fontsize
if (options&HELP && (!HELPER || HELPER.closed)) {
HELPER=window.open('','JShelp','height='+y+',width='+x+',toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,screenX='+(screen.availWidth-x-10)+',left='+(screen.availWidth-x-10))
if (HELPER) {
HELPER.document.clear()
HELPER.document.writeln(font(o))
HELPER.document.close()
inheritColors(document,HELPER.document)
HELPER.document.onkeypress=HELPER.getKey
}
} else {
if (HELPER && !HELPER.closed) HELPER.close()
HELPER=0
}
}
//
// Construct object prototypes
//
function JSImage() {
this.image=0
this.left=0
this.fixed=0
this.status=0
this.top=0
this.zoom=0
}
//
// Browser specific DHTML functions
//
function getElement(name) {
if (isIE5) return document.all[name]
if (document.getElementById) return document.getElementById(name)
if (document.all) return document.all[name]
if (document.layers) return document[name]
}
function getDoc(name) {
if (isIE5) return document.all[name].document
if (document.getElementById) return document.getElementById(name).ownerDocument
if (document.all) return document.all[name].document
if (document.layers) return document[name].document
}
function divWidth(name) {
if (isIE5) return document.all[name].offsetWidth
if (document.getElementById) return document.getElementById(name).offsetWidth
if (document.all) return document.all[name].offsetWidth
if (document.layers) return document[name].document.width
}
function divHeight(name) {
if (isIE5) return document.all[name].offsetHeight
if (document.getElementById) return document.getElementById(name).offsetHeight
if (document.all) return document.all[name].offsetHeight
if (document.layers) return document[name].document.height
}
function getLayer(name) {
if (isIE5) return document.all[name].style
if (document.getElementById) return document.getElementById(name).style
if (document.all) return document.all[name].style
if (document.layers) return document[name]
}
function getX(layer) {
layer=getLayer(layer)
if (isIE5) return layer.pixelLeft
if (document.getElementById) return parseInt(layer.left)
if (document.all) return layer.pixelLeft
if (document.layers) return layer.x
}
function getY(layer) {
layer=getLayer(layer)
if (isIE5) return layer.pixelTop
if (document.getElementById) return parseInt(layer.top)
if (document.all) return layer.pixelTop
if (document.layers) return layer.y
}
function getLanguage() {
var lang=navigator.userLanguage?navigator.userLanguage:navigator.language
return lang.substr(0,2)
}
function setClip(layer,x,y,t,r,b,l) {
debug(); layer=getLayer(layer)
if (isIE5) {
layer.clip='rect('+t+'px '+r+'px '+b+'px '+l+'px)'
layer.pixelLeft=x
layer.pixelTop=y
} else if (document.getElementById) {
layer.left=x
layer.top=y
layer.clip='rect('+t+' '+r+' '+b+' '+l+')'
} else if (document.all) {
layer.clip='rect('+t+'px '+r+'px '+b+'px '+l+'px)'
layer.pixelLeft=x
layer.pixelTop=y
layer.overflow='hidden'
} else if (document.layers) {
layer.clip.top=t
layer.clip.right=r
layer.clip.bottom=b
layer.clip.left=l
layer.moveTo(x,y)
}
}
function setWidth(layer,w) {
layer=getLayer(layer)
if (isIE5)
layer.posWidth=w
else if (document.getElementById)
layer.width=w
else if (document.all)
layer.posWidth=w
else if (layer.clip)
layer.clip.width=w
}
function output(layer,html) {
if (isIE5) {
layer=eval(layer)
layer.innerHTML=html
} else if (document.getElementById)
document.getElementById(layer).innerHTML=html
else if (document.all) {
layer=eval(layer)
layer.innerHTML=html
} else if (document.layers) {
var doc=getDoc(layer)
doc.open()
doc.writeln(html)
doc.close()
}
}
function setXY(layer,x,y) {
debug(); layer=getLayer(layer)
if (isIE5) {
layer.pixelLeft=x
layer.pixelTop=y
} else if (document.getElementById) {
layer.left=x
layer.top=y
} else if (document.all) {
layer.pixelLeft=x
layer.pixelTop=y
} else if (document.layers)
layer.moveTo(x,y)
}
function center(layer,y) { setXY(layer,Math.round((width-divWidth(layer)-leftMargin-rightMargin)/2)+leftMargin,y) }
function setCursor(curtype) { if (document.all) document.body.style.cursor=curtype }
function setVisibility(layer,vis) {
debug()
layer=getLayer(layer)
layer.visibility=(vis?'visible':'hidden')
}
function remotekeys() {
return ''
}
function getKey(evt) {
var key=document.all?event.keyCode:
evt.keyCode?evt.keyCode:
evt.charCode?evt.charCode:
evt.which?evt.which:void 0
dokey(String.fromCharCode(key).toLowerCase())
return false
}
function dokey(key) {
switch(key) {
case '!': toggleOption(DEBUGMODE); break
case '+': case '=': nextImage(); break
case '-': previousImage(); break
case '<': case ',': slower(); break
case '>': case '.': faster(); break
case '^': toggleOption(CONTROLTOP); break
case 'a': toggleOption(ADVANCED); break
case 'c': toggleOption(CONTROLS); break
case 'd': toggleOption(CAPTIONS); break
case 'e': toggleOption(EFFECTS); break
case 'f': gofullScreen(); break
case 'p': toggleOption(HELP); break
case 'l': toggleOption(LANGUAGES); break
// case 'm': toggleOption(MAXSIZE); break
case 'o': alert('options='+options); break
// case 'p': toggleOption(PRECACHE); break
case 'r': toggleOption(RANDOM); break
case 's': slideshow(); break
case 'm': toggleOption(THUMBS); break
case 'x': exitfullScreen(); break
case 'z': toggleOption(ZOOM); break
case '?': alert(about()); break
case '\r': if (kpic && kpic<=pics) { displayImage(save(kpic-1)) }
kpic=0
break
default: if (!isNaN(key)) {
kpic=kpic*10+parseInt(key)
} else {
debug(T('You typed')+': '+key)
}
}
}
//
// Debug functions
//
function startDebug() {
DEBUG=window.open()
if (DEBUG) {
DEBUG.document.clear()
DEBUG.document.writeln('
') DEBUG.document.writeln(remotekeys()+'
'+about())
DEBUG.document.onkeypress=DEBUG.getKey
log(navigator.userAgent)
log(document.URL)
window.focus()
}
}
function log(s) {
if (DEBUG && !DEBUG.closed) {
var localtime=new Date()
DEBUG.document.writeln(localtime+' '+s)
DEBUG.scrollTo(0,99999999)
} else DEBUG=0
}
function stopDebug() {
log(T('End debug')+'.')
if (DEBUG && !DEBUG.closed) DEBUG.document.close()
DEBUG=0
}
function funcall(caller) {
if (caller) {
var s=caller.toString()
var results=s.match(/function\s+([^\(]+)\(([^\)]*)\)\s.+/)
var func=results?results[1]:''
var args=results?results[2]:''
args=args.split(',')
for (var i=0;i')
if (Y+t
'
}
function moreThumbs() { if (across*down
'
var offset
for (offset=1;offset
'
output('thumbnails',o)
setClip('thumbnails',leftMargin,topMargin+Math.round((height-topMargin-bottomMargin-divHeight('thumbnails'))/2),0,(THUMBSIZE+2*(bufspace+border+5))*across,(THUMBSIZE+2*(bufspace+border))*down,0)
leftOffset=leftMargin+divWidth('thumbnails')+2*bufspace
toggleVisibility()
}
//
// Image navigation
//
function firstImage() { displayImage(save(0)) }
function previousImage() {
var image
if (options&RANDOM) {
index=(index+History.length-1)%History.length
if (History[index]<0) {
image=pick(pic,pics)
History[index]=image
History[(index+History.length-1)%History.length]=-1
} else image=History[index]
} else image=(pic+pics-1)%pics
displayImage(image)
}
function nextImage() {
var image
if (options&RANDOM) {
index=(index+1)%History.length
if (History[index]<0) {
image=lookahead
lookahead=pick(image,pics)
History[index]=image
History[(index+1)%History.length]=-1
} else image=History[index]
} else {
image=(pic+1)%pics
lookahead=(image+1)%pics
}
displayImage(image)
}
function lastImage() { displayImage(save(pics-1)) }
//
// Slideshow functions
//
function nextSlide() { if (options&SLIDESHOW) nextImage(); else startstop.value=Tr('Start') }
function slideshow() {
if (options&SLIDESHOW) {
window.clearTimeout(recheck)
window.clearTimeout(rethumb)
window.clearTimeout(redisp)
startstop.value=Tr('Start')
toggleOption(SLIDESHOW)
} else {
startstop.value=Tr('Stop')
toggleOption(SLIDESHOW)
nextSlide()
}
}
function faster() {
if (timer>125) {
timer=Math.round(timer/2)
if (options&SLIDESHOW) {
window.clearTimeout(redisp)
nextSlide()
}
} else alert(Tr("I can't push her any faster captain")+"!")
}
function slower() { timer*=2 }
//
// Toggle functions
//
function toggleVisibility() {
var a=divHeight('navbar')
var b=divHeight('advbar')
var c=divHeight('colorbar')
topOffset=bottomOffset=0
if (options&CONTROLS) {
bottomOffset=options&ADVANCED?(spectrum?a+b+c:a+b):a
if (options&CONTROLTOP) { topOffset=bottomOffset; bottomOffset=0 }
}
leftOffset=options&THUMBS?divWidth('thumbnails'):0
rightOffset=0
topOffset+=topMargin; bottomOffset+=bottomMargin
leftOffset+=leftMargin; rightOffset+=rightMargin
center('advbar',options&CONTROLTOP?a-5+topMargin:height-a-b-bottomMargin)
setVisibility('advbar',options&CONTROLS && options&ADVANCED)
center('colorbar',options&CONTROLTOP?a+b-15+topMargin:height-a-c-5-bottomMargin)
setVisibility('colorbar',options&CONTROLS && options&ADVANCED && spectrum)
if (navbarX>0) setXY('navbar',navbarX,options&CONTROLTOP?5+topMargin:height-a+5-bottomMargin)
else center('navbar',options&CONTROLTOP?5+topMargin:height-a+5-bottomMargin)
setVisibility('navbar',options&CONTROLS)
setVisibility('noframes',options&CONTROLS && outerframe && !fullscreen)
setVisibility('thumbnails',options&THUMBS)
setVisibility('lessthumbs',options&THUMBS && across>0)
setVisibility('morethumbs',options&THUMBS && pics>down*across)
setVisibility('langs',options&LANGUAGES && languages)
drawScreen()
}
function toggleOption(opt) {
options^=opt
setCookie('options',options)
for (var f=0;document.forms[f];f++) for (var e=0;document.forms[f].elements[e];e++)
if (document.forms[f].elements[e].name=='opt'+opt && document.forms[f].elements[e].type=='checkbox')
document.forms[f].elements[e].checked=(options&opt)
if (opt&DEBUGMODE) { if (options&DEBUGMODE) startDebug(); else stopDebug() }
if (opt&HELP) showHelp()
if (opt&MAXSIZE) Images[pic].fixed=0
if (opt&PRECACHE && options&PRECACHE) postFetch()
if (opt&RANDOM && options&RANDOM) { lookahead=pick(pic,pics); if (History[index]==-1) save(pic) }
if (opt&RANDOM && options&THUMBS) displayThumbs()
if (opt&(DEBUGMODE|EFFECTS|PRECACHE|RANDOM)) return
toggleVisibility()
}
function setOption(opt) { options|=opt }
function clearOption(opt) { options&=(DEBUGMODE*2-opt-1) }
//
// Background color functions
//
function color(a,b,c) {
if (a(Images[pic].image.height-H/Images[pic].zoom))
Images[pic].top=Math.round(Images[pic].image.height-H/Images[pic].zoom)
if (Images[pic].left>(Images[pic].image.width-W/Images[pic].zoom))
Images[pic].left=Math.round(Images[pic].image.width-W/Images[pic].zoom)
if (Images[pic].top<0) Images[pic].top=0
if (Images[pic].left<0) Images[pic].left=0
if (Images[pic].left!=l || Images[pic].top!=t) renderImage()
if (document.all) window.event.cancelBubble=true
return false
}
if (document.routeEvent) document.routeEvent(event)
return true
}
function stopDrag(event) {
var x=getx(event)
var y=gety(event)
if (dragZ!=0) {
dragZ*=Images[pic].zoom
if (Images[pic].image.width*dragZ<50 || dragZ>6.0) {
Images[pic].fixed=0
Images[pic].top=0
Images[pic].left=0
} else {
Images[pic].top=Math.round((y-Y)/Images[pic].zoom-(y-Y-Images[pic].top*Images[pic].zoom)/dragZ)
Images[pic].left=Math.round((x-X)/Images[pic].zoom-(x-X-Images[pic].left*Images[pic].zoom)/dragZ)
Images[pic].zoom=dragZ
Images[pic].fixed=1
}
renderImage()
}
dragging=dragZ=0
if (document.all) window.event.cancelBubble=true
return false
}
//
// Mozilla wrappers for drag & drop
//
function mozimageClick(event) {
var x=getx(event)
var y=gety(event)
var l=X+Math.floor(Images[pic].left*Images[pic].zoom)
var t=Y+Math.floor(Images[pic].top*Images[pic].zoom)
return x>l && x'+link(action+'window.displayImage('+p+')','name=thumb'+p,img)+' '
if (!(i%across)) o+=''
}
o+='
')
}
// Set button and scrollbar colors
setColors()
// Display image and thumbnails
toggleVisibility()
displayImage(pic)
// Close help window when unloading JSviewer
if (options&HELP) showHelp()
window.onunload=function() {
if (HELPER && !HELPER.closed) HELPER.close()
if (DEBUG && !DEBUG.closed) DEBUG.close()
}
}
// Set JSviewer default options
options=getCookie('options')
if (!options) options=CAPTIONS|CONTROLS|CONTROLTOP|EFFECTS|PRECACHE|SLIDESHOW|ZOOM
// Create dynamic HTML layers
createLayers()
isIE5=navigator.userAgent.indexOf('MSIE 5.')>0
preload=window.onload
window.onload=main
//
// JSviewer Language Internationalization Database
// languages.js
// version 1.3
//
// Copyright (c) 2004 Seann Herdejurgen (seann@herdejurgen.com)
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. The name of the author may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
//
// JSviewer is distributed as freeware for non-commercial use.
//
// Documentation and updates available on-line at http://www.jsviewer.com/
//
words=new Object()
languages=new Object({
'de' : 'German',
'en' : 'English',
'es' : 'Spanish',
'gr' : 'Greek',
'fr' : 'French',
'nl' : 'Dutch',
'it' : 'Italian',
'sv' : 'Swedish'
})
//
// English
//
words['en']=new Object({
'about' : 'about',
'advanced options' : 'advanced options',
'All rights reserved' : 'All rights reserved',
'Capturing keystroke and resize events' : 'Capturing keystroke and resize events',
'change language' : 'change language',
'Choose a background color' : 'Choose a background color',
'close window' : 'close window',
'Copyright' : 'Copyright',
'Default' : 'Default',
'Disable image effects' : 'Disable image effects',
'Display images faster' : 'Display images faster',
'Display images slower' : 'Display images slower',
'Display JSviewer help' : 'Display JSviewer help',
'Dutch' : 'Dutch',
'Enable image effects' : 'Enable image effects',
'End debug' : 'End debug',
'English' : 'English',
'effects' : 'effects',
'faster' : 'faster',
'Fewer thumbnails' : 'Fewer thumbnails',
'First image' : 'First image',
'Flushing image' : 'Flushing image',
'French' : 'French',
'from cache' : 'from cache',
'full screen' : 'full screen',
'full window' : 'full window',
'German' : 'German',
'Greek' : 'Greek',
'Help' : 'Help',
'Hide advanced options' : 'Hide advanced options',
'Hide thumbnail images' : 'Hide thumbnail images',
"I can't push her any faster captain" : "I can't push her any faster captain",
'in' : 'in',
'Initializing JSviewer' : 'Initializing JSviewer',
'Invalid data source' : 'Invalid data source',
'Italian' : 'Italian',
'JSviewer Help' : 'JSviewer Help',
'JSviewer keyboard controls' : 'JSviewer keyboard controls',
'Language' : 'Language',
'Last image' : 'Last image',
'left - zoom in' : 'left - zoom in',
'Loading images' : 'Loading images',
'max image size' : 'max image size',
'max size' : 'max size',
'Maximize image size on screen' : 'Maximize image size on screen',
'Maximize window size' : 'Maximize window size',
'Missing data source' : 'Missing data source',
'More thumbnails' : 'More thumbnails',
'Mouse click (zoom mode)' : 'Mouse click (zoom mode)',
'move controls' : 'move controls',
'next image' : 'next image',
'Next image' : 'Next image',
'No images defined in pictures list' : 'No images defined in pictures list',
'Pictures not found in data source' : 'Pictures not found in data source',
'pre-cache' : 'pre-cache',
'Pre-load images in the background' : 'Pre-load images in the background',
'previous image' : 'previous image',
'Previous image' : 'Previous image',
'random' : 'random',
'Randomize images' : 'Randomize images',
'right - zoom out' : 'right - zoom out',
'Select a language' : 'Select a language',
'Select an image to display' : 'Select an image to display',
'Setup Mozilla event handlers' : 'Setup Mozilla event handlers',
'Show advanced options' : 'Show advanced options',
'Show thumbnail images' : 'Show thumbnail images',
'slideshow' : 'slideshow',
'slower' : 'slower',
'Spanish' : 'Spanish',
'speed' : 'speed',
'Stack trace' : 'Stack trace',
'start/stop slideshow' : 'start/stop slideshow',
'Start' : 'Start',
'Stop' : 'Stop',
'Swedish' : 'Swedish',
'thumbs' : 'thumbs',
'toggle controls' : 'toggle controls',
'toggle descriptions' : 'toggle descriptions',
'toggle effects' : 'toggle effects',
'toggle help' : 'toggle help',
'toggle pre-cache' : 'toggle pre-cache',
'toggle random' : 'toggle random',
'toggle thumbnails' : 'toggle thumbnails',
'toggle zoom' : 'toggle zoom',
'Unable to display' : 'Unable to display',
'Unable to load' : 'Unable to load',
'Written by' : 'Written by',
'You typed' : 'You typed'
})
//-->