// JavaScript Document popUp
function pageWidth(){
	 if(window.innerWidth != null){
			return window.innerWidth;
	 }
	 if(document.body.clientWidth != null){
			return document.body.clientWidth;
	 }
	 return null;
}
 
function popUp(evt,objectID){
 if(dhtml) {
  var pagWidth = pageWidth();
  domStyle = findBrowser(objectID,1);
  dom = findBrowser(objectID,0);
  state = domStyle.visibility;
  
  if (dom.offsetWidth){
	  elemWidth = dom.offsetWidth;
  } else {
	  if (dom.clip.width){
		  elemWidth = dom.clip.width;
		}
  	}
  
  if(state == 'visible' || state == "show") {
	  domStyle.visibility = "hidden";
  } else {
    	if(evt.pageY) {
	   		topVal = evt.pageY + 4;
	   		leftVal = evt.pageX - (elemWidth/2);
    	} else {
			  if(evt.y){
	    		topVal = evt.y + 4 + document.body.scrollTop;
		 		leftVal = evt.x - (elemWidth/2) + document.body.scrollLeft;
		 		}
			}
			if(leftVal<2){
				leftVal = 2;
			} else {
				 if ((leftVal + elemWidth)>pagWidth){
					 leftVal = leftVal - (elemWidth/2);
				 }
				}
	//domStyle.top = topVal; // positions the element from the top
	//domStyle.left = leftVal; // positions the element from the left
	domStyle.visibility = "visible"; // makes the element visible
		}
	} //end if
} // end function
