function findLivePageWidth(objId){
    
     if(window.innerWidth!=null)
         return window.innerWidth;
     if(document.body.clientWidth!=null)
         return document.body.clientWidth;
      return null;
 }


 function popUp(evt, objectID) {   
   
    
   if(isDHTML) {

       var livePageWidth = findLivePageWidth();      
       domStyle = getStyle(objectID);
       dom=getObject(objectID);        
       state = domStyle.visibility;
       if(dom.offsetWidth) {
               elementWidth = dom.offsetWidth;
       }
       else {
           if(dom.clip.width) {
               elementWidth=dom.clip.width;
           }
       }
       if(state=="visible" || state=="show") {          
           domStyle.visibility="hidden";
       } else {            
            if(evt.pageY) {                
                topVal=evt.pageY+4;               
                leftVal=evt.pageX-(elementWidth/2);
            } else {
                 if(evt.y) {
                     topVal=evt.y+4+document.body.scrollTop;                    
                     leftVal=evt.x-(elementWidth/2)+document.body.scrollLeft;
                 }
            }
            if(leftVal<2) {                   
                 leftVal=2;
            } else {
                 if((leftVal+elementWidth)>livePageWidth) {
                       leftVal=leftVal-(elementWidth/2);
                 }                 
            } 
            domStyle.top=topVal;
            domStyle.left=leftVal;
            domStyle.visibility="visible";            
       }  
    } 
 }
