def loadheader(filename):
    """
    Load NAME file and parse header lines into dict.
    filename -- input NAME file
    """
    header = {}
    
    with open(filename, 'r') as f:
        
        for line in range(1, 19):
            h = f.readline()
            
            if ":" in h:
                (key, val) = h.split(":", 1)
                key = key.strip()
                val = val.strip()
            
                header[key] = val

    return header