function checkout() {
 window.open('', 'checkout', 'width=580, height=400, top=100, left=100, toolbar=0, menubar=0, location=0, resizable=0, scrollbars=1, status=1');
 document.getElementById("formadresse").target = "checkout";
 document.getElementById("formadresse").submit();
 document.location = "caddie.php?mode=caisse";
}

function check_form_adresse(){
}

function alert_update() {
 document.getElementById("alertupdate").innerHTML="! Actualiser le panier";
}

function updating_caddie() {
 document.getElementById("icon_caddie").src="shop/images/caddie_anim.gif";
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById("caddieMonitor").innerHTML=xmlHttp.responseText 
} 
} 

function popupAlert(id){
 document.getElementById("caddieAlert"+id).style.display = "block";
 setTimeout("clearPopupAlert("+id+")",3000);
}

function clearPopupAlert(id) {
 document.getElementById("caddieAlert"+id).style.display = "none";
}

function add_to_caddie(id) {
 popupAlert(id);
 document.getElementById("caddie_monitor").src="shop/images/caddie_anim.gif";
 q = document.getElementById("q_"+id).value;
 xmlHttp=getHttpObject()
 if (xmlHttp==null)
 {
 alert ("Votre navigateur ne supporte pas cette fonctionnalit&eacute;")
 return
 } 
 var url="shop/update_item_caddie.php";
 url=url+"?id="+id;
 url=url+"&quant="+q;
 xmlHttp.onreadystatechange=stateChanged 
 xmlHttp.open("GET",url,true)
 xmlHttp.send(null)
}

function getHttpObject() {
        if (window.ActiveXObject) {
                return new ActiveXObject("Microsoft.XMLHTTP")
        }
        if (window.XMLHttpRequest) {
                return new XMLHttpRequest();
        }
        return false;
}

