
var BLOWUP_ie=document.all
var BLOWUP_ns6=document.getElementById&&!document.all

var verticalShim=-47 // to adjust vertical screen position
var horizontalShim =-3 // to adjust horizontal screen position (jsHorizAdjustment is style-dependent)

var JStag, JSref

function BLOWUP_ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat" && !window.opera)? document.documentElement : document.body
}
function enlarge(pathPre, which, pathPost, e, position, imgwidth, imgheight, caption, callerTag, ref){
JStag = callerTag
  JSref = ref
  
if (BLOWUP_ie||BLOWUP_ns6){
BLOWUP_crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage
if (position=="center"){ 
pgyoffset=BLOWUP_ns6? parseInt(pageYOffset) : parseInt(BLOWUP_ietruebody().scrollTop)

horzpos=BLOWUP_ns6? horizontalShim+pageXOffset+window.innerWidth/2-imgwidth/2 : horizontalShim+BLOWUP_ietruebody().scrollLeft+BLOWUP_ietruebody().clientWidth/2-imgwidth/2
vertpos=BLOWUP_ns6? verticalShim+pgyoffset+window.innerHeight/2-imgheight/2 : verticalShim+pgyoffset+BLOWUP_ietruebody().clientHeight/2-imgheight/2
if (window.opera && window.innerHeight) //compensate for Opera toolbar
vertpos=pgyoffset+window.innerHeight/2-imgheight/2
vertpos=Math.max(pgyoffset, vertpos)
}
else{
var horzpos=BLOWUP_ns6? pageXOffset+e.clientX : BLOWUP_ietruebody().scrollLeft+event.clientX
var vertpos=BLOWUP_ns6? pageYOffset+e.clientY : BLOWUP_ietruebody().scrollTop+event.clientY
}
BLOWUP_crossobj.style.left=horzpos+"px"
BLOWUP_crossobj.style.top=vertpos+"px"

if (JStag=='Home') {
BLOWUP_crossobj.innerHTML = '<span style="font-size:8px"><br></span>'
BLOWUP_crossobj.innerHTML = BLOWUP_crossobj.innerHTML+'<span style="cursor:hand"><img onclick="precloseaction(JStag);closepreview()" src="'+pathPre+which+pathPost+'" width="'+imgwidth+'" height="'+imgheight+'" alt="'+JSlangRef+' '+JSref+' :: '+JSlangClickPhotoToViewDetails+'"></span>'
  BLOWUP_crossobj.innerHTML = BLOWUP_crossobj.innerHTML+'<div align="center" id="dragbar" onClick="precloseaction(JStag);closepreview()"><span id="closetext" style="font-size:10px;font-weight:bold;color:#990000; onClick="precloseaction(JStag);closepreview()">'+JSlangClickPhotoToViewDetails+'</span></div>'
  BLOWUP_crossobj.innerHTML = BLOWUP_crossobj.innerHTML+'<div id="captionbar" title="'+JSlangRef+' '+JSref+' :: '+JSlangClickPhotoToViewDetails+'" onClick="precloseaction(JStag);closepreview()"><span id="text"><br>'+caption+'</span></div>'
  BLOWUP_crossobj.innerHTML = BLOWUP_crossobj.innerHTML+'<div id="closebar" onClick="closepreview()"><span id="text" title="'+JSlangBlowupClose+'" style="color:#675d2d"><br>[<span onmouseover="style.color=\'#c0142e\';style.textDecoration=\'underline\'" onmouseout="style.color=\'#675d2d\';style.textDecoration=\'none\'">'+JSlangBlowupClose+'</span>]<br></span></div>'
}
else {
BLOWUP_crossobj.innerHTML = '<div align="right" id="dragbar" onClick="precloseaction(JStag);closepreview()"><span id="closetext" onClick="precloseaction(JStag);closepreview()">'+JSlangBlowupClickToClose+'<b> X</b></span></div>'
BLOWUP_crossobj.innerHTML = BLOWUP_crossobj.innerHTML+'<span style="cursor:hand"><img onclick="precloseaction(JStag);closepreview()" src="'+pathPre+which+pathPost+'" width="'+imgwidth+'" height="'+imgheight+'" alt="'+JSlangRef+' '+JSref+' :: '+JSlangBlowupClickToClose+'"></span>'
}


BLOWUP_crossobj.style.visibility="visible"
BLOWUP_crossobj.style.zIndex="1"
return false
}
else //if NOT IE 4+ or NS 6+, simply display image in full browser window
return true
}
function precloseaction(tag) {
  if (tag=='Home') window.parent.location.href='Details.asp?language='+JSlanguage+'&rubric=properties&caller=Home'+'&ref='+JSref
}
function closepreview(){
BLOWUP_crossobj.style.visibility="hidden"
}

function drag_drop(e){
if (BLOWUP_ie&&dragapproved){
BLOWUP_crossobj.style.left=BLOWUP_tempx+event.clientX-offsetx+"px"
BLOWUP_crossobj.style.top=BLOWUP_tempy+event.clientY-offsety+"px"
}
else if (BLOWUP_ns6&&dragapproved){
BLOWUP_crossobj.style.left=BLOWUP_tempx+e.clientX-offsetx+"px"
BLOWUP_crossobj.style.top=BLOWUP_tempy+e.clientY-offsety+"px"
}
return false
}

function initializedrag(e){
if (BLOWUP_ie&&event.srcElement.id=="dragbar"||BLOWUP_ns6&&e.target.id=="dragbar"){
offsetx=BLOWUP_ie? event.clientX : e.clientX
offsety=BLOWUP_ie? event.clientY : e.clientY

BLOWUP_tempx=parseInt(BLOWUP_crossobj.style.left)
BLOWUP_tempy=parseInt(BLOWUP_crossobj.style.top)

dragapproved=true
document.onmousemove=drag_drop
}
}

function len3(num) {
  if ((''+num).length==1) 
  	return '00'+num
  else if ((''+num).length==2) 
  	return '0'+num
  else
	return num
}

document.onmousedown=initializedrag
document.onmouseup=new Function("dragapproved=false")
