
	var wlFundamentals = {
	
		"Security Details": {
	
			"Symbol": ["ESV", "The Symbol for this security"]
	
			,
		
			"Issuer Name": ["ESERVGLOBAL LIMITED", "Full legal name of the issuer"]
	
			,
		
			"Security Type": ["Ordinary", "The type of this security"]
	
			,
		
			"GICS Sector": ["Information Technology", "Global Industry Classification Standard Sector"]
	
			,
		
			"GICS Industry Group": ["Software & Services", "Global Industry Classification Standard Industry Group"]
	
			,
		
			"First Active Date": ["4/9/2000", "The date on which the security was first entered into the ASX security database"]
	
			,
		
			"First Quoted Date": ["8/9/2000", "The date on which a security was/will be first quoted on the market"]
	
		},
		
		"Fundamentals": {
	
			"Total Class Issue": ["196,847,706", "The total number of securities of this class quoted on the exchange"]
	
			,
		
			"Market Capitalisation": ["$106,297,800", "The current capitalisation of this security (Total Class Issue	x  Current Price)"]
	
			,
		
			"Asset Backing": ["$0.16", "Net Tangible Assets as last reported by the company, adjusted for dilution"]
	
			,
		
			"Earnings Rate Per Share": ["-$0.2660", "Rolling 12 months earnings per share"]
	
			,
		
			"Earnings Yield": ["n/a", "Percentage of (Earnings Rate per share / Last Price)"]
	
			,
		
			"Price/Earnings Ratio": ["n/a", "Last Price / Earnings Rate per share"]
	
			,
		
			"52week High/Low": ["0.630 / 0.300", "FIXME"]
	
		},
		
		"Dividends": {
	
			"Dividend Rate Per Share": ["$0.0000", "Rolling 12 months dividend rate per share"]
	
			,
		
			"Dividend Yield": ["0.000%", "Percentage of (Dividend Rate per Share / Current Price)"]
	
			,
		
			"Current Dividend Amount": ["$0.000000", "Value of most recent dividend in cents per security (net of witholding tax)"]
	
			,
		
			"Dividend Type": ["Interim", "Interim or Final"]
	
			,
		
			"Dividend Payable Date": ["11/3/2009", "The date when the most recently announced dividend becomes/became payable"]
	
			,
		
			"Franked Percent": ["0.00%", "The percentage of the dividend on which tax has already been paid"]
	
			,
		
			"Gross Dividend Amount": ["$0.0000", "Gross dividend amount"]
	
		}
		
	};
	

function replaceElementWithFundamentalsTable(element) {
	var table, section, row, cell, sectionKey, key;

	// Build a new table from the data structure given
	table = document.createElement('table');
	table.className = "wlFundamentals";

	for (sectionKey in wlFundamentals) {
		row = table.insertRow(table.rows.length);

		cell = row.insertCell(row.cells.length);
		cell.colSpan = 2;
		cell.className = "wlFundamentalsSectionHeader"
		cell.appendChild(document.createTextNode(sectionKey));

		for (key in wlFundamentals[sectionKey]) {
			row = table.insertRow(table.rows.length);

			cell = row.insertCell(row.cells.length);
			cell.appendChild(document.createTextNode(key));
			cell.title = wlFundamentals[sectionKey][key][1];
			cell.className = "wlFundamentalsKey";

			cell = row.insertCell(row.cells.length);
			cell.appendChild(document.createTextNode(
					wlFundamentals[sectionKey][key][0]));
			cell.className = "wlFundamentalsValue";
		}
	}

	// Replace the given element with our new table.
	element.parentNode.insertBefore(table, element);
	element.parentNode.removeChild(element);
}

