//var xmlObject1 = new Object();
/*function xmlhttpPost_table_gold() {
	var currentTime = new Date();
	strURL='http://giaiphap.com.vn/haditech/table_gold.php?'+currentTime.getTime();
    var xmlHttpReq = false;
    
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        xmlObject1.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        xmlObject1.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlObject1.xmlHttpReq.open('POST', strURL, true);
    xmlObject1.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xmlObject1.xmlHttpReq.onreadystatechange = function() {
        if (xmlObject1.xmlHttpReq.readyState == 4) {
            updatepage_table_gold(xmlObject1.xmlHttpReq.responseText);
        }
    }
    xmlObject1.xmlHttpReq.send("");
}

function updatepage_table_gold(str){
    document.getElementById("table_gold").innerHTML = str;
}
*/

var xmlObject4 = new Object();
function xmlhttpPost_currency_price() {
	var currentTime = new Date();
	strURL='http://haditech.net/currency_price.php?'+currentTime.getTime();
    var xmlHttpReq = false;
    
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        xmlObject4.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        xmlObject4.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlObject4.xmlHttpReq.open('POST', strURL, true);
    xmlObject4.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xmlObject4.xmlHttpReq.onreadystatechange = function() {
        if (xmlObject4.xmlHttpReq.readyState == 4) {
            updatepage_currency_price(xmlObject4.xmlHttpReq.responseText);
        }
    }
    xmlObject4.xmlHttpReq.send("");
}

function updatepage_currency_price(str){
    document.getElementById("currency_price").innerHTML = str;
}
function auto_load_data()
{
	xmlhttpPost_currency_price();
	//xmlhttpPost_table_gold();	
	var t3=setInterval("xmlhttpPost_currency_price();",1*60*60 * 1000);
	
} 
