function getXmlHttp(){
    var xmlhttp;
    try {
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
        try {
	      xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	    } catch (E) {
	      xmlhttp = false;
	    }
    }
    if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
         xmlhttp = new XMLHttpRequest();
    }
    return xmlhttp;
}

function vote(id) {
    document.getElementById("btn_"+id).src="images/_inCart_1.gif";
    var req = getXmlHttp() 
    //req.onreadystatechange = function() {}
    req.open('GET', 'addToCart_AJAX.php?id='+id, true); 
    req.send(null);  
}

function vote_detail(id) {
    document.getElementById("btn_"+id).src="images/_inCart_1.gif";
    var req = getXmlHttp() 
    //req.onreadystatechange = function() {}
    req.open('GET', 'addToCart_AJAX.php?id='+id, true); 
    req.send(null);  
}

function vote_detail_oil(id) {
    document.getElementById("btn_"+id).src="images/_inCart_1.gif";
    var req = getXmlHttp() 
    //req.onreadystatechange = function() {}
    req.open('GET', 'addToCart_AJAX_oil.php?id='+id, true); 
    req.send(null);  
}

function vote_detail_otto(id) {
    document.getElementById("btn_"+id).src="images/_inCart_1.gif";
    var req = getXmlHttp() 
    //req.onreadystatechange = function() {}
    req.open('GET', 'addToCart_AJAX_otto.php?id='+id, true); 
    req.send(null);  
}

function vote_detail_bath(id) {
    document.getElementById("btn_"+id).src="images/_inCart_1.gif";
    var req = getXmlHttp() 
    //req.onreadystatechange = function() {}
    req.open('GET', 'addToCart_AJAX_bath.php?id='+id, true); 
    req.send(null);  
}

function vote_detail_jewelry(id) {
    document.getElementById("btn_"+id).src="images/_inCart_1.gif";
    var req = getXmlHttp() 
    //req.onreadystatechange = function() {}
    req.open('GET', 'addToCart_AJAX_jewelry.php?id='+id, true); 
    req.send(null);  
}

function vote_gift_1() {
    document.getElementById("btn_gift_1").src="images/_getGift_2.gif";
    var req = getXmlHttp() 
    //req.onreadystatechange = function() {}
    req.open('GET', 'addToCartGift_1_AJAX.php', true); 
    req.send(null);  
}

function vote_gift_2() {
    document.getElementById("btn_gift_2").src="images/_getGift_2.gif";
    var req = getXmlHttp() 
    //req.onreadystatechange = function() {}
    req.open('GET', 'addToCartGift_2_AJAX.php', true); 
    req.send(null);  
}


function vote_other(id) {
    document.getElementById("btn_"+id).src="images/_inCart_1.gif";
    var req = getXmlHttp() 
    req.open('GET', 'addToCart_AJAX_other.php?id='+id, true); 
    req.send(null);  
}


function hideInfo(){
    document.getElementById('book').style.display = "none";
}

