    var currentLightboxId="divBox1";
	 
	function ResizeBox()
    {
       if(document.getElementById(currentLightboxId).style.display!="none")
       {
           document.getElementById("divBg").style.width=document.documentElement.clientWidth+document.documentElement.scrollLeft+"px";
           document.getElementById("divBg").style.left="0px";
           var position=findPosition(document.getElementById("dvInsight"));
                            
           document.getElementById(currentLightboxId).style.left=position[0]+195+"px";
       }
    }
    
    window.onscroll=ResizeBox;
    window.onresize=ResizeBox;
    
    //**************************************************************************************
    //
    //
    function DisplayBox(divId)
    {        
        currentLightboxId=divId;
        //alert(currentLightboxId);
        document.getElementById("divBg").style.width=document.documentElement.clientWidth+document.documentElement.scrollLeft+"px";
        //document.getElementById("divBg").style.left="0px";
        var pElement=document.getElementById("divfooter");
        var position=findPosition(pElement);

        
        document.getElementById("divBg").style.height=position[1]+40+"px";  
          
        document.getElementById("divBg").style.display="";
        
        document.getElementById(currentLightboxId).style.display="";
            
        position=findPosition(document.getElementById("dvInsight"));
        document.getElementById(currentLightboxId).style.top= position[1] + "px";
        
        //position=findPosition(document.getElementById("dvInsight"));
        var width= document.getElementById("dvInsight").offsetWidth;
                         
        document.getElementById(currentLightboxId).style.left=position[0]+195+"px";
    }
    
    function findPosition(pElement) 
    {
        var curleft = curtop = 0;
        if (pElement.offsetParent) 
        {
            curleft = pElement.offsetLeft
            curtop = pElement.offsetTop
            while (pElement = pElement.offsetParent) 
            {
                curleft += pElement.offsetLeft
                curtop += pElement.offsetTop
            }
        }
        return [curleft,curtop];
    }
    
    //hidden
    function HidBox()
    {
        document.getElementById("divBg").style.width="1px";    
        document.getElementById("divBg").style.height="1px"; 
        
        document.getElementById(currentLightboxId).style.display="none";
    }