    //Variables used for fixing Transparent PNG files in IE.
    var strRootPath = '/';
    
    //The master load function.
    window.onload=function() {                		
		//Does buttons with prefetch in all browsers
		SetupButtons();
		
		//Fix times
		FixTimes();						
    }
    
    function FixTimes() {
        var spanElements = document.getElementsByTagName('span');
        
        for(var i = 0; i < spanElements.length; i++) {
            var e = spanElements[i];
            if (e.title && e.title == "time") {
                e.innerText = new Date('Jan 01, 1900 ' + e.innerText + ' UTC').toLocaleTimeString();
            }            
        }    
    }
          
    function SetupButtons() {
        var ImgElements = document.getElementsByTagName('img');
        var BtnElements = document.getElementsByTagName('input');
        
        for(var i = 0; i < ImgElements.length; i++) {
            AssignButtonProperties(ImgElements[i]);
        }    
        
        for(var i = 0; i < BtnElements.length; i++) {
            if (BtnElements[i].getAttribute("type") == "image") {
                AssignButtonProperties(BtnElements[i]);    
            }
        }     
    }
       
    function AssignButtonProperties(Element) {
        if (Element.getAttribute("srcdown") || Element.getAttribute("srcover")) {
            //We have a winner
            //Pre-load the images and set the mouse events.
            
            Element.onmouseup = ButtonUp;
            Element.onmouseout = ButtonOut;
            Element.onmouseover = ButtonOver;

            if (Element.getAttribute("srcdown")) {
                Element.onmousedown = ButtonDown;
                var img = new Image();
                img.src = GetRootPath(Element.getAttribute("srcdown"));
            }

            if (Element.getAttribute("srcover")) {
                var img = new Image();
                img.src = GetRootPath(Element.getAttribute("srcover"));
            }               
        }
    }
      
    function ButtonDown(e) {
        if (!this.onmousedown) return;
        
        SetButtonImage(this, GetRootPath(this.getAttribute("srcdown")));        
    }
    
    function ButtonUp(e) {
        if (!this.onmouseup) return;
        
        if (this.getAttribute("srcup")) //Only need to call it if the srcup exists, otherwise it hasn't been changed anyhow.
            SetButtonImage(this, GetRootPath(this.getAttribute("srcup")));    
    }
    
    function ButtonOut(e) {
        if (!this.onmouseout) return;
        
        if (this.getAttribute("srcup")) //Only need to call it if the srcup exists, otherwise it hasn't been changed anyhow.
            SetButtonImage(this, GetRootPath(this.getAttribute("srcup")));    
    }
    
    function ButtonOver(e) {
        if (!this.onmouseover) return;
        
