function popwin(url, height, width, name){
if (name=='') {
name='pop'
}
var top = (window.screen.height)/2 - height/2
var left = (window.screen.width)/2 - width/2

var outStr = 'height=' + height + ',width=' + width + ',top=' + top + ',left=' + left + ',menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no';

window.open(url, name, outStr);
}

function popzoom(pic, zoom, type){
//var zoom=4 //st¿rrelsesforhold zoom:1



var imageWidth=document.images['image'+pic].width
var imageHeight=document.images['image'+pic].height
var imageSrc=document.images['image'+pic].src
var imageSrcLength=imageSrc.length

for (i=0;i< imageSrcLength;i++){
if (imageSrc.substring(imageSrcLength-1-i,imageSrcLength-i) =='/'){
var cropInt = i
var i = imageSrcLength
}
}
var imageName=imageSrc.substring(imageSrcLength-cropInt)
var strTitle="Københavns Domkirke"
if (type==2){
strTitle=imageName
}
openWindow(imageName,imageWidth, imageHeight, zoom, strTitle)
}

function openWindow(imageName, w, h, z, strTitle)
{ 
var height = h*z
var width = w*z
var top = (window.screen.height)/2 - height/2
var left = (window.screen.width)/2 - width/2
var outStr = 'height='+height+',width='+width+',top=' + top + ',left=' + left + ',menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no';
var OpenWindow=window.open("", "newwin",outStr);
OpenWindow.document.write("<HTML>\n")
OpenWindow.document.write("<head><title>"+strTitle+"</title></head>\n")
OpenWindow.document.write("<body bgcolor='#000000' text='#000000' marginwidth=0 marginheight=0 leftmargin=0 topmargin=0>\n")
OpenWindow.document.write("<a href='javascript:self.close()'><img src='gfx/popBig/"+imageName+"' width='"+width+"' height='"+height+"' border='0'></a>\n")
OpenWindow.document.write("</body>\n")
OpenWindow.document.write("</html>\n")
}