function enlarge(which,e){
// IE4.0+ 之 程 式
if (document.all){
if (showimage.style.visibility=="hidden"){
showimage.style.left=document.body.scrollLeft+event.clientX
showimage.style.top=document.body.scrollTop+event.clientY
showimage.innerHTML='<img src="'+which+'">'
showimage.style.visibility="visible"
}
return false
}
// Netscape 之 程 式
else if (document.layers){
if (document.showimage.visibility=="hide"){
document.showimage.document.write('<a href="#" onMouseover="drag_dropns(showimage)"><img src="'+which+'" alt="Fire Door"></a>')
document.showimage.document.close()
document.showimage.left=e.x
document.showimage.top=e.y
document.showimage.visibility="show"
}
return false
}
// 如 果 不 是 IE 或 Netscape
// 就 暫 不 提 供 服 務
else
return true
}


function hide_img(){
if (document.all){	// IE4.0+ 之 程 式
showimage.style.visibility="hidden"
return false
}

else if (document.layers){	// Netscape 之 程 式
	document.showimage.visibility="hide"
	return false
}
// 如 果 不 是 IE 或 Netscape
// 就 暫 不 提 供 服 務
else
return true
}

// Netscape 之 drag drop 功 能
var nsx
var nsy
var 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)
}

// IE4.0+ 之 drag drop 功 能

var dragapproved=false

function drag_dropie(){
if (dragapproved==true){
document.all.showimage.style.pixelLeft=tempx+event.clientX-iex
document.all.showimage.style.pixelTop=tempy+event.clientY-iey
return false
}
}

function initializedragie(){
if (event.srcElement.parentElement.id=="showimage"){
iex=event.clientX
iey=event.clientY
tempx=showimage.style.pixelLeft
tempy=showimage.style.pixelTop
dragapproved=true
document.onmousemove=drag_dropie
}}

if (document.all){
	document.onmousedown=initializedragie
	document.onmouseup=new Function("dragapproved=false")
}
