I played around with that script some more and like this variation much better. It centers the popups horizontally and sizes the popup window to the picture. (just replace from the start here to the end of the original script):
Code:
//do NOT edit pass this line
////center popup code////////////
function detectexist(obj){
return (typeof obj !="undefined")
}
function getpos(){
leftpos=(detectexist(window.screenLeft))? screenLeft+document.documentElement.clientWidth/2-popwidth/2 : detectexist(window.screenX)? screenX+innerWidth/2-popwidth/2 : 0
toppos=(detectexist(window.screenTop))? screenTop+document.documentElement.clientHeight/2-popheight/2 : detectexist(window.screenY)? screenY+innerHeight/2-popheight/2 : 0
if (window.opera){
leftpos-=screenLeft
toppos-=screenTop
}
}
getpos()
var winattributes='width='+popwidth+',height='+popheight+',resizable=yes,left='+leftpos+',top='+toppos
/////end center popup code///////
var preloadedimages=new Array()
for (i=0;i<photos.length;i++){
preloadedimages[i]=new Image()
preloadedimages[i].src=photos[i]
}
var preloadedlinks=new Array()
for (i=0;i<photoslink.length;i++){
preloadedlinks[i]=new Image()
preloadedlinks[i].src=photoslink[i]
}
function applyeffect(){
if (document.all && photoslider.filters){
photoslider.filters.revealTrans.Transition=Math.floor(Math.random()*23)
photoslider.filters.revealTrans.stop()
photoslider.filters.revealTrans.apply()
}
}
function playeffect(){
if (document.all && photoslider.filters)
photoslider.filters.revealTrans.play()
}
function keeptrack(){
window.status="Image "+(which+1)+" of "+photos.length
}
function backward(){
if (which>0){
which--
applyeffect()
document.images.photoslider.src=photos[which]
playeffect()
keeptrack()
}
}
function forward(){
if (which<photos.length-1){
which++
applyeffect()
document.images.photoslider.src=photos[which]
playeffect()
keeptrack()
}
}
function transport(){
if (!window.opera){
leftpos=(detectexist(window.screenLeft))? screenLeft+document.documentElement.offsetWidth/2-Math.floor((preloadedlinks[which].width+20)/2) : detectexist(window.screenX)? screenX+innerWidth/2-Math.floor((preloadedlinks[which].width+20)/2) : 0
winattributes='width='+(preloadedlinks[which].width+20)+',height='+(preloadedlinks[which].height+20)+',resizable=yes,left='+leftpos+',top='+toppos
}
window.open(photoslink[which],"",winattributes)
}
Bookmarks