// Thumbnail image viewer- 
// ZFort Group (www.zfort.com)

/*
function right(e) { 
if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) return false; 
else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) 
{ alert("Contact Huntington Life to obtain images"); return false; } return true; }
document.onmousedown=right; 
*/
if (document.layers) window.captureEvents(Event.MOUSEDOWN); window.onmousedown=gons; 


var ie=document.all
var ns=document.layers
var ns6=document.getElementById&&!document.all

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){
if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) return false; 
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)
}

//drag drop function for IE 4+ and NS6////
/////////////////////////////////

function drag_drop(e){
if (ie&&dragapproved){
crossobj.style.left=tempx+event.clientX-offsetx
crossobj.style.top=tempy+event.clientY-offsety
}
else if (ns6&&dragapproved){
crossobj.style.left=tempx+e.clientX-offsetx
crossobj.style.top=tempy+e.clientY-offsety
}
return false
}

function initializedrag(e){
if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) 
{ alert("Contact Huntington Life to obtain images"); return false; }
if (ie&&event.srcElement.id=="drag"||ns6&&e.target.id=="drag"){
offsetx=ie? event.clientX : e.clientX
offsety=ie? event.clientY : e.clientY

tempx=parseInt(crossobj.style.left)
tempy=parseInt(crossobj.style.top)

dragapproved=true
document.DBE_FORM.onmousemove=drag_drop
}
}

document.DBE_FORM.onmousedown=initializedrag
document.DBE_FORM.onmouseup=new Function("dragapproved=false")
