var ajax_anadir_cesta;var ajax_anadir_unidad_cesta_detalle;var ajax_modificar_zona_envio;function vibrar(){     //$("#cesta_breve").effect("pulsate", { times:60 }, 600);     $("#cesta_breve").effect("shake", { times:10 }, 300);     }function ver(id){document.getElementById(id).style.display="block";}function nover(id){    document.getElementById(id).style.display="none";}function modificar_gastos_envio(){    idzona	=	document.getElementById('idzona').value;    var ajax    =	ajax_modificar_zona_envio;    ajax	=	GetXmlHttpObject();    fichero ="ajax_modificar_zona_envio.php"    var url ="/ajax/"+fichero;    url     =url+"?idzona="+idzona+"&rand="+Math.random();    //idnone  = 'total_a_pagar'    ajax.onreadystatechange= function() {        if (ajax.readyState==4)        {            document.getElementById('cesta_grande').innerHTML=ajax.responseText;        }        else        {            document.getElementById('total_a_pagar').innerHTML='Actualizando ...'        }    };    ; //con esto paso parametros    ajax.open("GET",url,true);    ajax.send(null);}function anadir_unidad_cesta_detalle(unidad,idcesta_detalle){    var ajax				=	ajax_anadir_unidad_cesta_detalle;    ajax					=	GetXmlHttpObject();    fichero ="ajax_anadir_unidad_cesta_detalle.php"    var url ="/ajax/"+fichero;    url     =url+"?unidad="+unidad+"&idproducto_precio="+idcesta_detalle+"&rand="+Math.random();    //idnone  = 'total_a_pagar'      ajax.onreadystatechange= function() {        if (ajax.readyState==4)        {            document.getElementById('cesta_grande').innerHTML=ajax.responseText;        }        else        {            document.getElementById('total_a_pagar').innerHTML='Actualizando ...'        }    };    ; //con esto paso parametros    ajax.open("GET",url,true);    ajax.send(null);}function anadir_cesta(idproducto){    idproducto_precio	=	document.getElementById('producto_precio_'+idproducto).value;    var ajax				=	ajax_anadir_cesta;    ajax					=	GetXmlHttpObject();    fichero ="ajax_anadir_cesta.php"    var  url="/ajax/"+fichero;    url     =url+"?idproducto_precio="+idproducto_precio+"&rand="+Math.random();    idnone  = 'cesta_breve'    ajax.onreadystatechange= function() {        if (ajax.readyState==4)        {            document.getElementById(idnone).innerHTML=ajax.responseText;            document.getElementById('estado_'+idproducto).innerHTML='<a style="color:red" href="/es/p1">Ver cesta | Pagar &raquo;</a>'        }        else        {            document.getElementById('estado_'+idproducto).innerHTML='Aņadiendo a la cesta ...'        }    };    ; //con esto paso parametros    ajax.open("GET",url,true);    ajax.send(null);}/*function anadir_cesta(idproducto){    idproducto_precio	=	document.getElementById('producto_precio_'+idproducto).value;    var ajax				=	ajax_anadir_cesta;    ajax					=	GetXmlHttpObject();    fichero ="ajax_anadir_cesta.php"    var  url="/ajax/"+fichero;    url     =url+"?idproducto_precio="+idproducto_precio+"&rand="+Math.random();    idnone  = 'cesta_breve'    ajax.onreadystatechange= function() {        if (ajax.readyState==4)        {                        document.getElementById(idnone).innerHTML=ajax.responseText;        }        else        {            document.getElementById(idnone).innerHTML='Actualizando ...'        }    };    ; //con esto paso parametros    ajax.open("GET",url,true);    ajax.send(null);} */function GetXmlHttpObject(){   var xmlHttp=null;    try  {  // Firefox, Opera 8.0+, Safari        xmlHttp=new XMLHttpRequest();    } catch (e)  {   // Internet Explorer        try    {            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");        } catch (e)    {            xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        }    }    return xmlHttp;}
