﻿    //// JScript File
    function PrintSmallFont()
    {  
        if(document.getElementById("ContentTable") != null) 
         {
            document.getElementById("ContentTable").style.font = "12px verdana";
            document.getElementById("ContentTable").className = "SmallFontContent"; 
         }
            
        if(document.getElementById("ContactContent") != null) 
         {
           document.getElementById("ContactContent").className = "SmallFontContent";
         }
        
        if(document.getElementById("Smalla") != null && document.getElementById("Middlea") != null && document.getElementById("Largea") != null)
        {
          document.getElementById("Smalla").className = "SmallFontClicked";
          document.getElementById("Middlea").className = "MiddleFont";
          document.getElementById("Largea").className = "LargeFont";
        }  
        if(GetCookie("Font") != "Small")
        {
            SetCookie("Font", "Small");
        }
    }
    
    function SmallFonta()
    {  
        if(document.getElementById("ContentTable") != null) 
         {
            document.getElementById("ContentTable").style.font = "12px verdana";
            document.getElementById("ContentTable").className = "SmallFontContent"; 
         }
            
        if(document.getElementById("ContactContent") != null) 
         {
           document.getElementById("ContactContent").className = "SmallFontContent";
         }
        
        if(document.getElementById("Smalla") != null && document.getElementById("Middlea") != null && document.getElementById("Largea") != null)
        {
          document.getElementById("Smalla").className = "SmallFontClicked";
          document.getElementById("Middlea").className = "MiddleFont";
          document.getElementById("Largea").className = "LargeFont";
        }  
        if(GetCookie("Font") != "Small")
        {
            SetCookie("Font", "Small");
        }
    }

    function MiddleFonta()
    {
        if(document.getElementById("ContentTable") != null) 
          {
              document.getElementById("ContentTable").style.font = "13px verdana";
              document.getElementById("ContentTable").className = "MiddleFontContent";
          }
        if(document.getElementById("ContactContent") != null) 
          {
             document.getElementById("ContactContent").className = "MiddleFontContent";
          }
        
        if(document.getElementById("Smalla") != null && document.getElementById("Middlea") != null && document.getElementById("Largea") != null)
        {
          document.getElementById("Smalla").className = "SmallFont";
          document.getElementById("Middlea").className = "MiddleFontClicked";
          document.getElementById("Largea").className = "LargeFont";
        }
        if(GetCookie("Font") != "Middle")
        {
            SetCookie("Font", "Middle");
        }        
    }

    function LargeFonta()
    {
       if(document.getElementById("ContentTable") != null) 
       {
            document.getElementById("ContentTable").style.font = "15px verdana";
            document.getElementById("ContentTable").className = "LargeFontContent";
           
        
       }
        
      if(document.getElementById("ContactContent") != null) 
      {
           document.getElementById("ContactContent").className = "LargeFontContent";
      }
       
       if(document.getElementById("Smalla") != null && document.getElementById("Middlea") != null && document.getElementById("Largea") != null)
        {
          document.getElementById("Smalla").className = "SmallFont";
          document.getElementById("Middlea").className = "MiddleFont";
          document.getElementById("Largea").className = "LargeFontClicked";
        }
        if(GetCookie("Font") != "Large")
        {
            SetCookie("Font", "Large");
        }
    }
    
    function SetFont()
    {
        var font = GetCookie("Font");
                
        if(font == "Large")
        {   
            LargeFonta();
        }
        else if(font == "Middle")
        {
            MiddleFonta();
        }
        else
        {
            SmallFonta();
        }
    }

    function SetCookie (name, value) 
    {
        var argv = SetCookie.arguments;
        var argc = SetCookie.arguments.length;
        var expires = (argc > 2) ? argv[2] : null;
        var path = (argc > 3) ? argv[3] : null;
        var domain = (argc > 4) ? argv[4] : null;
        var secure = (argc > 5) ? argv[5] : false;
        document.cookie = name + "=" + escape (value) +
            ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
            ((path == null) ? "" : ("; path=" + path)) +
            ((domain == null) ? "" : ("; domain=" + domain)) +
            ((secure == true) ? "; secure" : "");      
    }

    function getCookieVal (offset) 
    {
        var endstr = document.cookie.indexOf (";", offset);
        if (endstr == -1)
          endstr = document.cookie.length;
        return unescape(document.cookie.substring(offset, endstr));
    }

        
        
    function GetCookie (name) 
    {
        var arg = name + "=";
        var alen = arg.length;
        var clen = document.cookie.length;
        var i = 0;
        while (i < clen) 
        {
          var j = i + alen;
          if (document.cookie.substring(i, j) == arg)
            return getCookieVal (j);
          i = document.cookie.indexOf(" ", i) + 1;
          if (i == 0) break; 
        }
      return null;
    }






