Hi imogeen,
I like your work 
Put the following into your gallery html - at the end of the file.
Code:
<script type='text/javascript'>
function popImage(sUrl, sTitle)
{
window.open(
'photowin.html' + '?t=' + sTitle + 'u=' + sUrl,
'GreyBurnPhoto', 'resizeable=1,height=200,width=200');
}
</script>
Save the following as a file named 'photowin.js':
Code:
/*
The following functions are part of X,
a Cross-Browser Javascript Library,
Distributed under the terms of the GNU LGPL
*/
function xGetURLArguments()
{
var idx = location.href.indexOf('?');
var params = new Array();
if (idx != -1) {
var pairs = location.href.substring(idx+1, location.href.length).split('&');
for (var i=0; i<pairs.length; i++) {
nameVal = pairs[i].split('=');
params[i] = nameVal[1];
params[nameVal[0]] = nameVal[1];
}
}
return params;
}
function xClientWidth()
{
var v=0,d=document,w=window;
if(d.compatMode == 'CSS1Compat' && !w.opera && d.documentElement && d.documentElement.clientWidth)
{v=d.documentElement.clientWidth;}
else if(d.body && d.body.clientWidth)
{v=d.body.clientWidth;}
else if(xDef(w.innerWidth,w.innerHeight,d.height)) {
v=w.innerWidth;
if(d.height>w.innerHeight) v-=16;
}
return v;
}
function xClientHeight()
{
var v=0,d=document,w=window;
if(d.compatMode == 'CSS1Compat' && !w.opera && d.documentElement && d.documentElement.clientHeight)
{v=d.documentElement.clientHeight;}
else if(d.body && d.body.clientHeight)
{v=d.body.clientHeight;}
else if(xDef(w.innerWidth,w.innerHeight,d.width)) {
v=w.innerHeight;
if(d.width>w.innerWidth) v-=16;
}
return v;
}
function xDef()
{
for(var i=0; i<arguments.length; ++i){if(typeof(arguments[i])=='undefined') return false;}
return true;
}
// end of X library functions
var args = xGetURLArguments();
if (args['u'].length == 0) {
alert('The image URL was not specified!');
window.close();
}
window.onload = function()
{
if (args['t'].length > 0) {
document.title = args['t'];
}
var i = document.images['photo'];
var w = i.width - xClientWidth();
var h = i.height - xClientHeight();
window.resizeBy(w, h);
}
Save the following as a file named 'photowin.html':
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Grey Burn Photography</title>
<style type='text/css'>
body {
margin: 0;
padding: 0;
background-color: #FFF;
}
#container {
margin: 0;
padding: 0;
}
#photo {
margin: 0;
padding: 0;
border: none;
}
</style>
<script type='text/javascript' src='photowin.js'></script>
</head>
<body>
<div id='container'><script type='text/javascript'>document.write("<img id='photo' name='photo' src='" + args['u'] + "' alt='" + args['t'] + "'>");</script></div>
</body>
</html>
I haven't tested it. Let me know how it goes
Bookmarks