﻿// JScript File




function init()
{ 
    
    
      var spotLightArea = document.getElementById('ctl00_spotLightArea');
      var contentArea = document.getElementById('ctl00_contentArea');
      var leftNavArea = document.getElementById('ctl00_leftNavArea');
      var specialtyArea = document.getElementById('ctl00_specialtyArea');
      var topSpotLight = document.getElementById('ctl00_pnlTopSpotlightBack'); 
      var mainTable = document.getElementById('mainTable'); 
   
      
      var strURL = location.href;  
      
      var tsh = topSpotLight.offsetHeight; 
      var sah = specialtyArea.offsetHeight;    
      var lnh = leftNavArea.offsetHeight;   
      var cah = contentArea.offsetHeight;
      var slh = spotLightArea.offsetHeight;
  
      
    
      
      roundpnlSpotLight();
      roundpnlLeftNavBack(); 
     
    
  
     
    
 
     if (location.pathname=='/default.aspx' || location.pathname=='/PMC/Default.aspx' || location.pathname=='/Default.aspx' || location.pathname=='/' || location.pathname=='/PMC/' || location.pathname=='/pmc/' || location.pathname=='/pmc/default.aspx')
    {
         //do nothing
        
         }
         
         
      else
     {
           
     
         
      if (tsh > 25)
         {
               
              //there are spotLights on the page so don't pad the height
              
              
         }
    
    
      else if (tsh <= 25)
         {
              //there are no spotLights on the page 
             
            
         
                    if (lnh > (sah + slh))
                   {
                    
                  
                       
                         //the leftNav is taller than both the specialtyArea and the spotLightArea combined so pad the height of everything by 20%        
                        leftNavArea.style.height = ((lnh) + (lnh) * (.25) ) + "px";
                       contentArea.style.height = mainTable.offsetHeight + "px"; 
                       
             
                   }
                  
                  
                  else if (lnh = (sah + slh))
                  {
                      
                       //the leftNav and the contentArea combined with the specialtyArea are equal so pad the height by 20%
                       contentArea.style.height = ((cah) + (cah) * (.50)) + "px"; 
                       
                  }
                  
                    
                
                }
    

         
}
    
    
    
    
}




 function changeColor(div)
    {
          var cell = div.id;
          document.getElementById(cell).style.background = '#6d929b';
                
    }  
    
    function revertColor(div)
    {
         var cell = div.id;
         document.getElementById(cell).style.background = '#d1ceb2';     

    }
           
           
            function roundpnlLeftNavBack()
  {
     
         settings = {
          tl: { radius: 10 },
          tr: false,
          bl: { radius: 10 },
          br: false,
          antiAlias: true,
          autoPad: true,
          validTags: ["div"]
      }
     
     
     
      
     
     var roundedObj = new curvyCorners(settings, "pnlLeftNavBack");
     roundedObj.applyCornersToAll();
    
      
     }
    
    function roundpnlHeader()
  {
     
         settings = {
          tl: { radius: 5},
          tr: false,
          bl: { radius: 5 },
          br: false,
          antiAlias: true,
          autoPad: true,
          validTags: ["div"]
      }
     
     
     
      
     
     var roundedObj = new curvyCorners(settings, "pnlHeader");
     roundedObj.applyCornersToAll();
    
      
     } 
    
     function roundpnlContent()
  {
     
         settings = {
          tl: false,
          tr: false,
          bl: { radius: 10 },
          br: false,
          antiAlias: true,
          autoPad: true,
          validTags: ["div"]
      }
     
     
     
      
     
     var roundedObj = new curvyCorners(settings, "pnlContent");
     roundedObj.applyCornersToAll();
    
      
     }  
    
     function roundpnlSpotLight()
  {
     
         settings = {
          tl: { radius: 10 },
          tr: { radius: 10 },
          bl: { radius: 10 },
          br: { radius: 10 },
          antiAlias: true,
          autoPad: true,
          validTags: ["div"]
      }
     
     
     
      
     
     var roundedObj = new curvyCorners(settings, "pnlSpotLight");
     roundedObj.applyCornersToAll();
    
      
     }   
  
