			function startTimer()
			{
				// Stop previous timer
				if (this.$timer) {
					clearTimeout(this.$timer);
				}
				this.$timer = setTimeout(function() {hideAll();}, 1000);
			}
			function stopTimer()
			{
				if (this.$timer) {clearTimeout(this.$timer);}
			}			
			
			function hideAll()
			{
				var x = document.getElementsByTagName('div');			
				for (var i=0;i<x.length;i++)
				{			
					// Close all divs with an ID starting with 'subdiv_'
					if (x[i].id.substring(0,7) == 'subdiv_'){
							x[i].style.display = "none";
					}
				}
				var allATags = document.getElementsByTagName('a');				
				for(var i=0;i<allATags.length;i++)
				{
				    // Set css class of all a with ID starting with 'menulink_'
				    if(allATags[i].id.substring(0,9) == 'menulink_'){
						    $(allATags[i]).attr("class","LitiumMenuItem");
					}
				}	

			}
								    				
			function showSubMenu(sender, elementID, cssClass)
			{						
                stopTimer();
				// Loop through all divs
				var x = document.getElementsByTagName('div');
				var allATags = document.getElementsByTagName('a');
				var ourElement = document.getElementById(elementID);
				
				for(var i=0;i<allATags.length;i++)
				{
				    // Set css class of all a with ID starting with 'menulink_'
				    if(allATags[i].id.substring(0,9) == 'menulink_'){
				    	if (allATags[i].id != sender.id){
						    $(allATags[i]).attr("class","LitiumMenuItem");

						}
					}
				}
				
				for (var i=0;i<x.length;i++)
				{			
					// Close all divs with and ID starting with 'subdiv_'
					if (x[i].id.substring(0,7) == 'subdiv_'){
						if (x[i].id != ourElement.id){
							x[i].style.display = "none";
						}
					}
				}

			    $(sender).attr("class",cssClass);
				$(ourElement).show();
				// Set left position based on parent object
				var pos = $(sender).offset();
			    $(ourElement).css("left", pos["left"]);

			}
			
			
			function startActionTimer()
			{
				// Stop previous timer
				if (this.$actionTimer) {
					clearTimeout(this.$actionTimer);
				}
				this.$actionTimer = setTimeout(function() {hideAllAction();}, 1000);
			}
			
			function stopActionTimer()
			{
				if (this.$actionTimer) {clearTimeout(this.$actionTimer);}
			}
			
			
			function hideAllAction()
			{
				var x = document.getElementsByTagName('div');			
				for (var i=0;i<x.length;i++)
				{			
					// Close all divs with and ID starting with 'subdiv_'
					if (x[i].id.substring(0,7) == 'actdiv_'){
							x[i].style.display = "none";
					}
				}
				var allATags = document.getElementsByTagName('a');				
//				for(var i=0;i<allATags.length;i++)
//				{
//				    // Set css class of all a with ID starting with 'menulink_'
//				    if(allATags[i].id.substring(0,9) == 'menulink_'){
//						    $(allATags[i]).attr("class","LitiumMenuItem");
//					}
//				}	

			}
			
			function showActionMenu(sender, elementID, cssClass)
			{						
                stopActionTimer();
				// Loop through all divs
				var x = document.getElementsByTagName('div');
				var allATags = document.getElementsByTagName('a');
				var ourElement = document.getElementById(elementID);
				
//				for(var i=0;i<allATags.length;i++)
//				{
//				    // Set css class of all a with ID starting with 'menulink_'
//				    if(allATags[i].id.substring(0,9) == 'menulink_'){
//				    	if (allATags[i].id != sender.id){
//						    $(allATags[i]).attr("class","LitiumMenuItem");

//						}
//					}
//				}
				
				for (var i=0;i<x.length;i++)
				{			
					// Close all divs with and ID starting with 'subdiv_'
					if (x[i].id.substring(0,7) == 'actdiv_'){
						if (x[i].id != ourElement.id){
							x[i].style.display = "none";
						}
					}
				}

			    $(sender).attr("class",cssClass);
				$(ourElement).show();
				// Set left position based on parent object
				var pos = $(sender).offset();
			    $(ourElement).css("left", pos["left"]+8);
			    var pos2 = $(sender).offset();
			    $(ourElement).css("top", pos2["top"]+28);

			}
				
	        function SetDivHeight()
		    {
		        // Declare
                var totalHeight = getTotalDivHeight();	
		        // Determine if the total amount of divs are larger than the screen size 
                if(totalHeight < windowHeight()){
		            $(document.getElementById("LitiumBottomMain")).height(windowHeight()-totalHeight - 25 );
		        }
                // Determine if the text inside the bottom div are larger than the parent div
                if($(document.getElementById("LitiumBottomMainText")).height() > $(document.getElementById("LitiumBottomMain")).height())
                {		                
		            $(document.getElementById("LitiumBottomMain")).height($(document.getElementById("LitiumBottomMainText")).height());
		        }	        	        
		    }
		    
		    function getTotalDivHeight()
		    {
		        var totalHeight = 0;
		    	totalHeight += $(document.getElementById("LitiumMenu")).height();
		        totalHeight += $(document.getElementById("LitiumColors")).height();
		        totalHeight += $(document.getElementById("LitiumMain")).height();
		        totalHeight += $(document.getElementById("LitiumBottomTop")).height();
		        return totalHeight;
		    }
		    
            function windowHeight() {
                var height = 0;
                if( typeof( window.innerHeight ) == 'number' ) {
                //Non-IE
                height = window.innerHeight;
                } else if( document.documentElement && document.documentElement.clientHeight ) {
                //IE 6+ in 'standards compliant mode'
                height = document.documentElement.clientHeight;
                } else if( document.body && document.body.clientHeight ) {
                height = document.body.clientHeight;                                                                                                                   }
                return parseInt(height);
            }	
            
            