﻿var spinner = "<img src='/images/spinner.gif' alt='正在加载' />";

///
/// Return a XMLHTTPRequest in a browser independent fashion.
///
function GetXMLHttp()
{
    var xmlhttp=false;
    
    try 
    {
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } 
    catch (e) 
    {
        try 
        {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch (E)
        {
            xmlhttp = false;
        }
    }

    // Mozilla then?
    if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
       xmlhttp = new XMLHttpRequest();
    }
    
    return xmlhttp;
}


function getUniqueID()
{
    var today = new Date();
    today = today.getFullYear() + " - " + today.getMonth() + " - " + today.getDay() + " - " + today.getHours() + " - " + today.getSeconds() + " - " + today.getMilliseconds();
    today += '-' + Math.floor(Math.random() * (10000 + 1)) ;
    return today;
}
