//
// ************************
// layer utility routines *
// ************************

function getStyleObject(objectId) {
    // cross-browser function to get an object's style object given its id
    if(document.getElementById && document.getElementById(objectId)) {
	// W3C DOM
	return document.getElementById(objectId);
    } else if (document.all && document.all(objectId)) {
	// MSIE 4 DOM
	return document.all(objectId);
    } else if (document.layers && document.layers[objectId]) {
	// NN 4 DOM.. note: this won't find nested layers
	return document.layers[objectId];
    } else {
	return false;
    }
} // getStyleObject


function openImageWindow(url,title,img_width,img_height)
{
    imgwin=window.open("", "image_win", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,top=0,left=0,width="+img_width+",height="+img_height);
    imgwin.close();
    imgwin=window.open("", "image_win", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,top=0,left=0,width="+img_width+",height="+img_height);

    imgwin.document.write('<html><head><title>'+title+'</title><link rel="stylesheet" type="text/css" href="/style-imgwin.css"></head><body><img src="'+url+'" width="'+img_width+'" height="'+img_height+'"></body>');
    imgwin.focus();
}

function ViewImage(imgfile,title,win_width,win_height)
{
    window.open(imgfile, "photo", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,top=0,left=0,width=500,height=500");
    return false;
}