function ScrollingObject(id, nPictures, picHeight, scrollHeight, nColumns, padding, vx, vy, t)
{ this.id = id; this.nPictures = nPictures; this.picHeight = picHeight; this.scrollHeight = scrollHeight; this.nColumns = nColumns; this.padding = padding; this.topLimit = 0; this.bottomLimit = 0; this.leftLimit = 0; this.rightLimit = 0; this.TimerID = setTimeout('', 1); this.vx = vx; this.vy = vy; this.T = t; this.px = 0; this.py = 0; this.MoveTop = function()
{ if (document.layers)
{ if (this.topLimit < this.py)
{ document.getElementById(this.id).top = this.py - this.vy; this.py = this.py - this.vy;}
}
else
{ if (this.topLimit < this.py)
{ document.getElementById(this.id).style.top = this.py - this.vy; this.py = this.py - this.vy;}
}
clearTimeout(this.TimerID); me = this; this.TimerID = setTimeout('me.MoveTop()', this.T);}
this.MoveBottom = function()
{ if (document.layers)
{ if (this.bottomLimit > this.py)
{ document.getElementById(this.id).top = this.py + this.vy; this.py = this.py + this.vy;}
}
else
{ if (this.bottomLimit > this.py)
{ document.getElementById(this.id).style.top = this.py + this.vy; this.py = this.py + this.vy;}
}
clearTimeout(this.TimerID); me = this; this.TimerID = setTimeout('me.MoveBottom()', this.T);}
this.Init = function()
{ if (document.layers)
{ this.px = document.getElementById(this.id).left; this.py = document.getElementById(this.id).top;}
else
{ if (document.getElementById(this.id).style.left.indexOf('px') > -1)
this.px = parseInt(document.getElementById(this.id).style.left.substring(0, document.getElementById(this.id).style.left.indexOf("px"))); else
this.px = parseInt(document.getElementById(this.id).style.left); if (document.getElementById(this.id).style.top.indexOf('px') > -1)
this.py = parseInt(document.getElementById(this.id).style.top.substring(0, document.getElementById(this.id).style.top.indexOf("px"))); else
this.py = parseInt(document.getElementById(this.id).style.top);}
this.bottomLimit = this.py; var n = this.nPictures; while ((n % this.nColumns) != 0)
{ n++;}
var h = (n / this.nColumns) * (2 * this.padding + this.picHeight); if (this.scrollHeight > h)
this.topLimit = this.py; else
this.topLimit = this.scrollHeight - h - this.picHeight;}
}
function Foto_Show() { if (document['MainImage']) { theImg = document['MainImage']; theImg.src = this.filename;}
}
function Foto_LoadComplete() { if (document['MainImage']) { theImg = document['MainImage']; for (var i = 0; i < imgsArray.length; i++) { if (imgsArray[i].filename == theImg.src.substr(theImg.src.length - imgsArray[i].filename.length)) { if (document.getElementById('ImageDescription')) document.getElementById('ImageDescription').innerHTML = '&nbsp;' + imgsArray[i].description; if (document.getElementById('ImageCredits')) document.getElementById('ImageCredits').innerHTML = '&nbsp;' + imgsArray[i].credits; if (document.getElementById('ImageLongDescription')) document.getElementById('ImageLongDescription').innerHTML = '&nbsp;' + imgsArray[i].longdescription; if (typeof onPictureChanged == 'function') { onPictureChanged(imgsArray[i]);}
break;}
}
}
}
function Foto(id, alt, description, filename, credits, longdescription, filedate, latitude, longitude, zoomlevel) { this.id = id; this.alt = alt; this.description = description; this.filename = filename; this.Show = Foto_Show; this.LoadComplete = Foto_LoadComplete; if (arguments.length >= 5)
this.credits = credits; else
this.credits = ''; if (arguments.length >= 6)
this.longdescription = longdescription; else
this.longdescription = ''; if (arguments.length >= 7)
this.filedate = filedate; else
this.filedate = null; if (arguments.length >= 8)
this.latitude = latitude; else
this.latitude = null; if (arguments.length >= 9)
this.longitude = longitude; else
this.longitude = null; if (arguments.length >= 10)
this.zoomlevel = zoomlevel; else
this.zoomlevel = null;}
