/**
* Body Onload functions
*/
function init_page() {
initPopups();
}
window.onload = init_page;
function setActiveFeature(title)
{
var anchors = document.getElementsByTagName("a");
for (var i = 0; i < anchors.length; i++)
{
if (anchors[i].innerHTML.toLowerCase() == title.toLowerCase())
{
anchors[i].className = "active";
}
}
}
/**
* These functions will convert all anchor tags with the classname "popupImage"
* and add an onclick event to load the image specified in the href attribute
* in a new window with the window size set proportionate to the image size.
*/
function initPopups()
{
var anchors = document.getElementsByTagName("a");
for (var i = 0; i < anchors.length; i++)
{
if (anchors[i].className == "popupImage")
{
anchors[i].onclick = popupImage;
if (anchors[i].title)
var label = anchors[i].title;
else
var label = "Click to see a larger image";
anchors[i].innerHTML += "
" + label;
}
}
}
/*
var arrTemp = self.location.href.split("?");
var picUrl = (arrTemp.length>0)?arrTemp[1]:"";
var NS = (navigator.appName=="Netscape")?true:false;
function FitPic()
{
iWidth = (NS) ? window.innerWidth : document.body.clientWidth;
iHeight = (NS) ? window.innerHeight : document.body.clientHeight;
iWidth = document.images[0].width - iWidth;
iHeight = document.images[0].height - iHeight;
window.resizeBy(iWidth, iHeight);
self.focus();
}
*/
function popupImage()
{
// load the popup image into a temporary Image structure
// once it's finished loading, open the window with the correct Image dimensions
// pulled from the Image structure
var img = new Image();
img.src = this.href; // This must take time to load because it doesn't get the image width the first time...
if (!img.src)
img.src = this.href;
var width = img.width+25;
var height = img.height+25;
if (width <= 50)
width = 600;
if (height <= 50)
height = 500;
var NS = (navigator.appName=="Netscape")?true:false;
iWidth = (NS) ? window.innerWidth : document.body.clientWidth;
iHeight = (NS) ? window.innerHeight : document.body.clientHeight;
if (width > iWidth)
width = iWidth;
if (height > iHeight)
height = iHeight;
var imgWin = window.open(img.src, "popup", "width="+width+",height="+height+"+,resizable=true");
imgWin.focus();
// with (imgWin.document)
// {
// writeln('