function toggleExtras()
{
	if (document.getElementById('extras').style.height == '0px')
	{
		// Open
		var statsAnim = new YAHOO.util.Anim('extras', {height: {to: 400} }, 1, YAHOO.util.Easing.easeOut);
		statsAnim.animate();
		document.getElementById('extrasOpen').value = 1;
	} else {
		// Shut
		var statsAnim = new YAHOO.util.Anim('extras', {height: {to: 0} }, 1, YAHOO.util.Easing.easeOut);
		statsAnim.animate();
		document.getElementById('extrasOpen').value = 0;
	}
}

YAHOO.example.ACFlatData = new function(){
    // Define a custom formatter function
    this.fnCustomFormatter = function(oResultItem, sQuery) {
        var sKey = oResultItem[0];
        var nQuantity = oResultItem[1];
        var sKeyQuery = sKey.substr(0, sQuery.length);
        var sKeyRemainder = sKey.substr(sQuery.length);
        var aMarkup = ["<div class='sample-result'><span class='sample-query'>",
            sKeyQuery,
            "</span>",
            sKeyRemainder,
            "</div>"];
        return (aMarkup.join(""));
    };

    // Instantiate one XHR DataSource and define schema as an array:
    //     ["Record Delimiter",
    //     "Field Delimiter"]
    this.oACDS = new YAHOO.widget.DS_XHR("properties/subdivisions", ["\n", "\t"]);
    this.oACDS.responseType = YAHOO.widget.DS_XHR.TYPE_FLAT;
    this.oACDS.maxCacheEntries = 60;
    this.oACDS.queryMatchSubset = true;
    
    var timer = .25;

    // Instantiate first AutoComplete
    var myInput = document.getElementById('subdivision1');
    var myContainer = document.getElementById('subdivisionContainer1');
    this.oAutoComp0 = new YAHOO.widget.AutoComplete(myInput,myContainer,this.oACDS);
    this.oAutoComp0.queryDelay = timer;
    this.oAutoComp0.formatResult = this.fnCustomFormatter;

    // Second
    var myInput = document.getElementById('subdivision2');
    var myContainer = document.getElementById('subdivisionContainer2');
    this.oAutoComp1 = new YAHOO.widget.AutoComplete(myInput,myContainer,this.oACDS);
    this.oAutoComp1.queryDelay = timer;
    this.oAutoComp1.formatResult = this.fnCustomFormatter;

    // Third
    var myInput = document.getElementById('subdivision3');
    var myContainer = document.getElementById('subdivisionContainer3');
    this.oAutoComp2 = new YAHOO.widget.AutoComplete(myInput,myContainer,this.oACDS);
    this.oAutoComp2.queryDelay = timer;
    this.oAutoComp2.formatResult = this.fnCustomFormatter;
};
