
var ie=document.all
var ns=document.layers
var ns6=document.getElementById&&!document.all
var DOM = (document.getElementById ? true : false);
var IE4 = ((document.all && !DOM) ? true : false);
var IE5 =  ((document.all && DOM) ? true : false);
function enlarge(which,e,width,height){
//Render image code for IE 4+ and NS6
header_width = width - 13;
header_height = height;
if ((ie)||ns6){
//Calculate offset from top of iframe window(including scroll info) 
var iframe_width=750;
var iframe_height=400;

var top_offset=(iframe_height/2)-(height/2);
var left_offset=((iframe_width/2)-(width/2))+25; 

crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage;

if (crossobj.style.visibility=="hidden"){
if (ie && crossobj.filters.length > 0) crossobj.filters[0].Apply();

//crossobj.style.left=ns6? pageXOffset+e.clientX : document.body.scrollLeft+event.clientX

crossobj.style.top=ns6? pageYOffset+top_offset : document.body.scrollTop+top_offset;
crossobj.style.left=ns6? left_offset : left_offset;

crossobj.innerHTML='<div OnClick="javascript:closepreview();"><img src="images/header.jpg" height="13" width="'+header_width+'"><img src="images/header_close.jpg" height="13"><br><img src="'+which+'"></div>';
crossobj.style.visibility="visible"
if (ie && crossobj.filters.length > 0) crossobj.filters[0].Play();
}
else{
crossobj.style.visibility="hidden"
if (ie && crossobj.filters.length > 0) crossobj.filters[0].Apply();

crossobj.style.top=ns6? pageYOffset+top_offset : document.body.scrollTop+top_offset;
crossobj.style.left=ns6? left_offset : left_offset;

crossobj.innerHTML='<div OnClick="javascript:closepreview();"><img src="images/header.jpg" height="13" width="'+header_width+'"><img src="images/header_close.jpg" height="13"><br><img src="'+which+'"></div>';
crossobj.style.visibility="visible"
if (ie && crossobj.filters.length > 0) crossobj.filters[0].Play();
}
return false
}
//Render image code for NS 4
else if (document.layers){
if (document.showimage.visibility=="hide"){
document.showimage.document.write('<a href="#" onMouseover="drag_dropns(showimage)"><img src="'+which+'" border=0></a>')
document.showimage.document.close()
document.showimage.left=e.x
document.showimage.top=e.y
document.showimage.visibility="show"
}
else
document.showimage.visibility="hide"
return false
}
//if NOT IE 4+ or NS 4, simply display image in full browser window
else
return true
}

function closepreview(){
crossobj.style.visibility="hidden"
}