﻿// 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;
  

 
     if (location.pathname=='/default.aspx' || location.pathname=='/SMHS/Default.aspx' || location.pathname=='/smhs.aspx' || location.pathname=='/' || location.pathname=='/SMHS/' || location.pathname=='/smhs/' || location.pathname=='/smhs/default.aspx')
    {
         //do nothing


        
         }
         
         
         
         
      else
     {
           
           
          if(slh == 0)
         {
              //the spotLightArea is hidden so do nothing and exit the program
            
           return;
         }
               
         
      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))
                  {
                         
                         
                         if(cah > 1000)
                         {
                             //the contentArea is fairly large so do nothing
                            return;
                            }
                            else
                            {
                            
                              //the leftNav and the spotLightArea combined with the specialtyArea are equal so pad the height by 20%
                       contentArea.style.height = ((cah) + (cah) * (.50)) + "px"; 
                            }
                         } 
                          
                     
                       
                  }
                  
                    
                
                }
    

         
         
         curvyCorners.init();
         
         
}
    
    
    





 function changeColor(div)
    {
        
          var cell = div.id;  
          document.getElementById(cell).style.background='#7ec5b8';
                
    }  
    
    function revertColor(div)
    {
         var cell = div.id;        
         document.getElementById(cell).style.background = '#158184';     
   
    }
    
 