

function initializeInfoWindow() {


    try {


        $('button').button();
       
        $('#minSaleDate').datepicker({ inline: true });
        $('#maxSaleDate').datepicker({ inline: true });
    } catch (err) {
        alert(err.Message);
    }

}

function processCustomSearchKeyUp(event, dataSourceId) {

    if (!event) {
        event = window.event;
    }

    if (event.keyCode == 13) {
       
       

        processCustomSearchParameters(dataSourceId)

        return true;
    }
}

function parseHTML(html, targetElement) {
    var elementToReturn;
    var root = document.createElement("div");
    var tabChilds;
    
    root.innerHTML = html;

    var listOfItems;
    
    // Get all child nodes of root div
    
    var allChilds = root.childNodes;
    
    // Loop through all the child nodes and check for id = 'head'
    
    for (var i = 0; i < allChilds.length; i++) {
        
        // if id == 'head', you get your element
        listOfItems += allChilds[i].id;

        if (allChilds[i].id && allChilds[i].id ==  "tabs") {
            
            // Remove it from root
            tabChilds = allChilds[i].childNodes;

            for (var j = 0; j < tabChilds.length; j++) {
                // root.removeChild(allChilds[i]);

                if (tabChilds[j].id && tabChilds[j].id == targetElement) {
                    elementToReturn = tabChilds[j].innerHTML;
                    break;
                }
            }
            break;
        }
        
    }
    
    //document.body.innerHTML = root.innerHTML;

    return elementToReturn;
}

function printPropertyRecordCard(dataSourceId, passedFeatureNumber)
{
	var url;
    var windowObject;
    var xmlhttp = createXMLHTTPObject();

    url = 'http://fayette.in.wthgis.com/tgis/custom.aspx?DSID=' + dataSourceId + '&RequestType=PropertyRecordCard&FeatureID=' + passedFeatureNumber;

    window.open(url, 'replace');

    
	

}

jsLoadComplete();
