var ie=document.all;
var ns=document.layers;
var ns6=document.getElementById&&!document.all;
function closeN4(){document.showimage.visibility="hide";}

function enlarge(which,e){
//Render image code for IE 4+ and NS6
if (ie||ns6){
crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage;
if (crossobj.style.visibility=="hidden"){
crossobj.style.left=20;
crossobj.style.top=ns6? pageYOffset+20 : document.body.scrollTop+20;
crossobj.innerHTML='<img src="'+which+'" alt="click to close" onClick=closepreview()>';
crossobj.style.visibility="visible";
}
else
crossobj.style.visibility="hidden";
return false
}
//Render image code for NS 4
else if (document.layers){
if (document.showimage.visibility=="hide"){
document.showimage.document.write('<a href="#" onClick="closeN4()">close</a><br><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";
}

//drag drop function for NS 4////
/////////////////////////////////

var nsx,nsy,nstemp

function drag_dropns(name){
temp=eval(name);
temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP);
temp.onmousedown=gons;
temp.onmousemove=dragns;
temp.onmouseup=stopns;
}

function gons(e){
temp.captureEvents(Event.MOUSEMOVE);
nsx=e.x;
nsy=e.y;
}
function dragns(e){
temp.moveBy(e.x-nsx,e.y-nsy);
return false
}

function stopns(){
temp.releaseEvents(Event.MOUSEMOVE);
}

