YAHOO.util.Event.addListener(window, "load", function() {
    YAHOO.example.EnhanceFromMarkup = new function() {
        var myColumnDefs = [
            {key:"school",label:"School District",sortable:true},
            {key:"entity",label:"Applying Entity",sortable:true},
            {key:"date",label:"Application Date",formatter:YAHOO.widget.DataTable.formatDate,sortable:true},
			{key:"tax",label:"First Full Tax Year",sortable:true},
            {key:"phase",label:"Phase",sortable:true} 
        ];

        this.parseNumberFromCurrency = function(sString) {
            // Remove dollar sign and make it a float
            return parseFloat(sString.substring(1));
        };

        this.myDataSource = new YAHOO.util.DataSource(YAHOO.util.Dom.get("entities"));
        this.myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
        this.myDataSource.responseSchema = {
            fields: [{key:"school"},
                    {key:"entity"},
                    {key:"date", parser:"date"},
					{key:"tax"},
                    {key:"phase"}
            ]
        };

        this.myDataTable = new YAHOO.widget.DataTable("markup", myColumnDefs, this.myDataSource,
                {caption:"",
                sortedBy:{key:"school",dir:"desc"}}
        );
    };
});

