- this.div.addEvent('click', function(){
- this.options.onClick();
- }.bind(this));
-
- this.position();
-
- window.addEvent('resize', this.position.bind(this));
- window.addEvent('scroll', this.position.bind(this));
- },
-
- position: function(){
- if(this.options.container == document.body){
- var h = window.getHeight()+'px';
- var s = window.getScrollTop()+'px';
- this.div.setStyles({top: s, height: h});
- }else{
- var myCoords = this.options.container.getCoordinates();
- this.div.setStyles({
- top: myCoords.top+'px',
- height: myCoords.height+'px',
- left: myCoords.left+'px',
- width: myCoords.width+'px'
- });
- }
- },
-
- show: function(){
- this.div.setStyles({display: 'block'});
- },
-
- hide: function(){
- this.div.setStyles({display: 'none'});
+ });
+
+ /* debugging output
+ var msg='loaded '+vimgs.length+' image descriptions:';
+ vimgs.each(function(vimg,i){
+ msg+='\nid='+i;
+ vimg.each(function(vimg,i){
+ msg+='\n w='+vimg[0]+' h='+vimg[1]+' url='+vimg[2];
+ });
+ });
+ alert(msg);
+ /* end debugging output */
+
+ /* Initialize objects */
+
+ var ovlparams = {};
+ ovl = new overlay(ovlparams);
+
+ var iboxparams = {
+ overlay: ovl,
+ showNumbers: false,
+ showControls: true,
+ openFromLink: false,
+ movieWidth: 640,
+ movieHeight: 480,
+ descClassName: 'infoBoxDesc',
+ };
+ ibox = new multiBox('infoBox', iboxparams);
+
+ var winparms = {
+ tohide: 'indexContainer',
+ };
+ var showwin = new showWindow('slideshowContainer',winparms);
+
+ var ctlparams = {
+ };
+ var ctl = new Controls('slideshowControls','slideshowContainer',
+ ctlparams);
+
+ var showparms = {
+ cbStart: function(){ showwin.show(); },
+ cbExit: function(){ showwin.hide(); },
+ };
+ var show = new Show(vimgs,showwin,ctl,showparms);
+
+ /* Update HTML */
+
+ $$('.conceal').each(function(el){
+ el.setStyle('display', 'none');
+ });
+ $$('a.infoBox').each(function(el){
+ var url=el.get('href');
+ el.set('href',url+'?conceal');
+ });
+
+ $$('a.showStart').each(function(el){
+ el.addEvent('click',
+ show.start.bind(show,[rimgs[el.get('id')],1]));
+ });
+ $$('a.showImage').each(function(el){
+ el.addEvent('click',
+ show.start.bind(show,[rimgs[el.get('id')],0]));
+ });
+
+ /* Determine if we need to go directly into show mode */
+
+ parsedurl = parseUrl(document.URL);
+ /* alert('Anchor: '+parsedurl['anchor']+'\nURL: '+document.URL); */
+ if ($chk(parsedurl['anchor'])){
+ show.start(rimgs[parsedurl['anchor']],0);