	var ie=document.all
	var dom=document.getElementById
	var ns4=document.layers
	var calunits=document.layers? "" : "px"
	var bouncelimit
	var direction="up"
	var usedropin=0
	var showleft
	var showtop
	var height
	
function findPos(blkid) {
	var curleft = curtop = curhigh = curwide = 0;
//alert(blkid)
//alert(obj.offsetParent.tagname)
//	obj = document.getElementById("est");
//	alert(obj.offsetWidth);
//	obj = document.getElementById("esttbl");
//	alert(obj.offsetWidth);
	obj = document.getElementById(blkid);
	curhigh += obj.offsetHeight;
	curwide = obj.offsetWidth;
//alert(curwide)
	if (obj.offsetParent){
		do {
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop;
			} while (obj = obj.offsetParent);
		}
//alert(curleft + " " + curtop + " " + curhigh)
	return [curleft,curtop,curhigh,curwide];
	}

function showPosition(oCell){
    var oElement = document.all.oCell;
 	alert(oElement.offsetParent.tagname)   
    alert("The TD element is at (" + oElement.offsetLeft + 
          "," + oElement.offsetTop + ")\n" + "The offset parent is " 
          + oElement.offsetParent.tagName );
  	}

//function PopupMe(block){
function xShowBox(block, showtop, showleft, showwide, showhigh){
	if (!dom&&!ie&&!ns4){
		window.open("http://www.dhasys.com/index.htm", "", "scrollbars=0")
		}
	else{
		bouncelimit=32 //(must be divisible by 8)
		blockobj=(dom)?document.getElementById(block).style : ie? document.all.block : document.block
		blockframe=(dom)?document.getElementById("cframe") : ie? document.all.cframe : document.cframe
		blockframe.src=block
		blockobj.position="absolute"
		blockobj.top=showtop
		blockobj.left=showleft
		blockobj.width=showwide
		blockobj.heidht=showhigh
		if(usedropin){
			scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
			blockobj.top=scroll_top-250+calunits}
			blockobj.visibility=(dom||ie)? "visible" : "show"
			if(usedropin){
				dropstart=setInterval("dropin()",50)
				}
			}
	}
	
function dropin(){
	scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
	if (parseInt(crossobj.top)<100+scroll_top){
		crossobj.top=parseInt(crossobj.top)+40+calunits
		if (parseInt(crossobj.top)>100+scroll_top){crossobj.top=100+scroll_top}
		}
	else{
		clearInterval(dropstart)
		bouncestart=setInterval("bouncein()",50)
		}
	}
		
function bouncein(){
	crossobj.top=parseInt(crossobj.top)-bouncelimit+calunits
	if (bouncelimit<0) bouncelimit+=8
	bouncelimit=bouncelimit*-1
	if (bouncelimit==0){
		clearInterval(bouncestart)
		}
	}
	
function dismissbox(){
	if (window.bouncestart) clearInterval(bouncestart)
	crossobj.visibility="hidden"
	}

function HideBox(block){
	blockobj=(dom)?document.getElementById(block).style : ie? document.all.block : document.block
	if (window.bouncestart) clearInterval(bouncestart)
	blockobj.visibility="hidden"
	}

function ShowBox(block, showtop, showleft, showwide){
	var temp, c
	//var posarray
	//blkobj=(dom)?document.getElementById(block+"blk").all // : ie? document.all.block : document.block
	//blkobj= document.getElementById(block+"blk").all.block // : ie? document.all.block : document.block
	//showPosition(block+"blk")
//alert(block)
//alert(ie)
//	alert(navigator.appName)
	divobj=(dom)?document.getElementById(block).style : ie? document.all.block : document.block
	divobj=(dom)?document.getElementById(block).style : ie? document.all.block : document.block
	//if (window.bouncestart) clearInterval(bouncestart)
//alert("Hello got block")
	divobj.visibility="visible"
	divobj.position="absolute"
//alert("IE="+ie)
//	if (ie) {
	posarray = findPos(block)
	temp = posarray[2]
	posarray = findPos(block+"blk")
	if (ie && navigator.appName!="Opera"){
		divobj.width=showwide
		}
	else{
		divobj.width=showwide + 40
		}
//	if (block == "metrics") {
//		}
	if (showleft < 0) {
//alert("objwidth: "+divobj.width)
//alert(posarray[0])
//alert(temp)
		c = divobj.width
/*alert(c.length)
alert(c)
alert(c.indexOf('px'))
alert(parseInt(divobj.width))
alert(posarray[3])
alert(showwide)
*/
		c.length = c.indexOf('px')
		divobj.left=posarray[0] - ((parseInt(showwide)+40) - posarray[3])
//alert("after left: "+divobj.left)			
		}
	else {
//alert('In else 1');
		divobj.left=posarray[0] - 2
		}
	if (showtop < 0) {
//alert(temp)
		mytop = posarray[1] - temp
		//mytop += posarray[2]
		if (block != "metrics"){
			divobj.left=posarray[0] - 2
			}
		else{
//alert(divobj.width)
			//divobj.left=parseInt(divobj.left) + 2
//alert(divobj.width)
			}
		divobj.top=mytop
		}
	else {
//alert('Else');
		mytop = posarray[1]
		mytop += posarray[2]
		divobj.top=mytop - 2
		}
//		}
//	else {
//		divobj.left=showleft
//		divobj.top=showtop
//		}
//alert(posarray[0] + " " + posarray[1])
	}

function truebody(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body}

function toggleVisibility(me){
		if (me.style.visibility=="hidden"){
			me.style.visibility="visible";
			}
		else {
			me.style.visibility="hidden";
			}
		}

