↑
Page Details >>>
Save page space by opening a new window to display larger images on your site when a thumbnail image or a picture text link is clicked. The same window is re-used when the images are the same size.
or
View the apartment
Step 1: Add the below code to the <body> section of your page:
<script
language= "javascript"
type= "text/javascript" >
function
ViewImage ( ifile , ix , iy , ititle )
{
var
win ;
var
sWidth ;
var
sHeight ;
var
NS =
( document . layers )
?
1
:
0 ;
win
=
window . open ( "" , "imageviewer" , "width=" + ix + ",height=" + iy + ",menubar=no,toolbar=no" );
if
( NS )
{
sWidth
=
win . innerWidth ;
sHeight
=
win . innerHeight ;
}
else
{
sWidth
=
win . document . body . clientWidth ;
sHeight
=
win . document . body . clientHeight ;
}
if ( sWidth != ix
||
sHeight != iy )
{
win . close ();
setTimeout ( "ViewImage('" + ifile + "'," + ix + "," + iy + ",'" + ititle + "')" ,
250 );
return ;
}
win . document . open ();
win . document . write ( "<html><head><title>" + ititle + "</title>" );
win . document . write ( "</head><body>" );
win . document . write ( '<div
style="position:absolute;width:' + ix + 'px;height:' + iy + 'px;left:0px;top:0px">' );
win . document . write ( "<img
src=" + ifile + "></div></body></html>" );
win . document . close ();
}
</script>
<a
href= "javascript:ViewImage('faces.gif',576,303,'An
Apartment')" > <img
src= "faces.gif"
width= 80
height= 80
border= 1 > </a>
< br >
or
< br >
<a
href= "javascript:ViewImage('faces.gif',576,303,'An
Apartment')" > View
the apartment </a>
Step 2: The script uses an images as part of its interface. You can create your own, or use the below (resized for easier download):
(right click image, and select "Save Image As")
Upload it into the same directory as your webpage.
→