public void load(String filename) throws Exception
	{
		
		
    	BufferedReader reader;
    	String line = null;
    	 	
    	reader = 
    		new BufferedReader(new FileReader(new File(filename)));

    	while ((line = reader.readLine()) != null) 
    	{
    		
    		if (line.length() > 0 && line.charAt(0) != '#') // ignores comments
    		{	
    			String[] input = line.split("=");
    			
    			input[0] = input[0].trim();
    			input[0] = input[0].toLowerCase();
    				
    			String paramval;
    			int 	clone = name.indexOf(input[0]);
    			try {
    				paramval = input[1].split("#")[0].trim();
    			} catch (Exception e)
    			{
    				paramval = null;
    				System.err.println("Error reading parameter file " + e.getMessage() + ". Ignoring line:");
    				System.err.println("   \"" + line + "\"");    					
    			}

    			if (paramval != null)
    			{
    				if (clone == -1) // parameter hasn't been specified yet
    				{
    				
    					if (paramval != null) // ignore invalid parameters
    					{
    						name.add(input[0]);
    						value.add(paramval);
    					}
    				}
    				else
    				{
    					value.set(clone, paramval);
    				}
    			}	
    		
    		}
    	}
    	
    	reader.close();
	}