+ this.imageObj.set('id', this.images[this.image][i][3]);\r
+ this.imageObj.set('title', this.images[this.image][i][4]);\r
+ },\r
+\r
+ restyle: function(imgobj){\r
+ var width = imgobj.get('width');\r
+ var height = imgobj.get('height');\r
+ var vfactor = this.width/width;\r
+ var hfactor = this.height/height;\r
+ var factor = 1;\r
+ if (vfactor < factor) { factor = vfactor; }\r
+ if (hfactor < factor) { factor = hfactor; }\r
+ factor *= .95;\r
+ if (factor < 1) {\r
+ height = Math.round(height * factor);\r
+ width = Math.round(width * factor);\r
+ }\r
+ var topoff = (this.height - height)/2;\r
+ var leftoff = (this.width - width)/2;\r
+ /* alert('dim: '+width+'x'+height+'+'+leftoff+'+'+topoff); */\r
+ imgobj.setStyles({\r
+ position: 'absolute',\r
+ top: topoff,\r
+ left: leftoff,\r
+ width: width,\r
+ height: height,\r
+ });\r