﻿function GetXmlHttpObject(handler) {
    var objXmlHttp;

    try {
        // Firefox, Opera 8.0+, Safari  
        objXmlHttp = new XMLHttpRequest();
        objXmlHttp.onreadystatechange = handler;
    }
    catch (e) {
        // Internet Explorer6+  try
        try {
            objXmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
            objXmlHttp.onreadystatechange = handler;
        }
        catch (e) {
            try {
                objXmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
                objXmlHttp.onreadystatechange = handler;
            }
            catch (e) {
                alert("Your browser does not support AJAX!");
                return false;
            }
        }
    }
    return objXmlHttp;
}
function toFloat(value) {
    var f = parseFloat(value.replace(",", "."), 10);
    if (!isNaN(f))
        return f;
    else
        return 0;
}

