//General
//for example: instead of each module writing out script found in moduleMaxMin_OnClick have the functionality cached
//

        function displayloans() 
        {
            var keywords = document.getElementsByName('KEYWORDS');
           
                for (var i=0; i < keywords.length; i++) 
                {
                    if (keywords[i].content.indexOf("Stafford") > -1)
                    {
                        toggleOn("dnn_Stafford");
                    }  
                    else
                    {
                        toggleOff("dnn_Stafford");
                    }  
                
                    if (keywords[i].content.indexOf("Plus") > -1)
                    {
                        toggleOn("dnn_Plus");
                    }  
                    else
                    {
                        toggleOff("dnn_Plus");
                    }  
                    
                    if (keywords[i].content.indexOf("Grad") > -1)
                    {
                        toggleOn("dnn_Grad");
                    }  
                    else
                    {
                        toggleOff("dnn_Grad");
                    }  
                
                    if (keywords[i].content.indexOf("Edloan") > -1)
                    {
                        toggleOn("Edloan");
                    }  
                    else
                    {
                        toggleOff("Edloan");
                    }  
                    
                    if (keywords[i].content.indexOf("TuitionSolution") > -1)
                    {
                        toggleOn("dnn_TuitionSolution");
                    }  
                    else
                    {
                        toggleOff("dnn_TuitionSolution");
                    }  
                    
                    if (keywords[i].content.indexOf("XtraCreditStandard") > -1)
                    {
                        toggleOn("dnn_XtraCreditStandard");
                    }  
                    else
                    {
                        toggleOff("dnn_XtraCreditStandard");
                    }  
             
                    if (keywords[i].content.indexOf("EPL") > -1)
                    {
                        toggleOn("dnn_EPL");
                    }  
                    else
                    {
                        toggleOff("dnn_EPL");
                    }  
            }
        }
        
        function toggleOn(obj) 
        {
            if (document.getElementById(obj) == null)
            {
                return;
            }
            else
            {
	            var el = document.getElementById(obj);
            
                if (el.style.display != 'inline' ) 
                {
	                el.style.display = 'inline';
                }
	         }
        }
        
        function toggleOff(obj) 
        {
            if (document.getElementById(obj) == null)
            {
                return;
            }
            else
            {
	            var el = document.getElementById(obj);
            
                if (el.style.display != 'none' ) 
                {
	                el.style.display = 'none';
                }
	         }
        }