﻿function setSearchBoxFocus()
{
    var tboxSearch = document.getElementById("tboxSearch");
    tboxSearch.focus();
}

function submitForm()
{
    var http = null;
    if(window.XMLHttpRequest)
    {
        http = new XMLHttpRequest();             
        if (http.overrideMimeType)
        {
            http.overrideMimeType('text/xml');
        }                
    }
    else
    {
        if (window.ActiveXObject)
        {
            http = new ActiveXObject("Microsoft.XMLHttp");
        }
    }
    
    http.onreadystatechange = function()
                              {
                                if (http.readyState == 4) {
                                    if (http.status == 200) {
                                        var xmldoc = http.responseXML;
                                        var first_node = xmldoc.getElementsByTagName('h1').item(0);
                                        alert(first_node.firstChild.data);                                            
                                    } else {
                                        alert('There was a problem with the request.');
                                    }
                                }
                              };

    http.open("GET", "Default.aspx", true);
    http.send(null);
    
}

function mouseListener()
{
    document.getElementById('xymouse').innerHTML = new Date().getTime();
}
