function UpdateOrder(id, name, value)
{

var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

var timestamp = new Date().getTime();
	xmlhttp.onreadystatechange=function()
	{
		if(xmlhttp.readyState==1)
		document.getElementById('updateOrderDiv').innerHTML='Cargando...';
	
		if(xmlhttp.readyState==4)
		{		document.getElementById('updateOrderDiv').innerHTML=xmlhttp.responseText;
xmlhttp = false;
}
	}
	xmlhttp.open("GET",orderUpdateTarget+"?id="+id+"&name="+name+"&value="+value+"&anti-cache=" + timestamp,true);
	xmlhttp.send(null);


}

function AddToBasket(id, amount, linked)
{
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

var timestamp = new Date().getTime();
	xmlhttp.onreadystatechange=function()
	{
		if(xmlhttp.readyState==1)
		document.getElementById('shoppingBasket').innerHTML='Cargando...';
	
		if(xmlhttp.readyState==4)
		{		document.getElementById('shoppingBasket').innerHTML=xmlhttp.responseText;
$.superbox();
xmlhttp = false;
}
	}
	xmlhttp.open("GET",basketTarget+"?id="+id+"&amount="+amount+"&linked="+linked+"&anti-cache=" + timestamp,true);
	xmlhttp.send(null);


}

function RemoveFromBasket(id)
{
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

var timestamp = new Date().getTime();
	xmlhttp.onreadystatechange=function()
	{
		if(xmlhttp.readyState==1)
		document.getElementById('shoppingBasket').innerHTML='Cargando...';
	
		if(xmlhttp.readyState==4)
		{		document.getElementById('shoppingBasket').innerHTML=xmlhttp.responseText;
RemoveFromBasketCallback(xmlhttp.responseText);
xmlhttp = false;
}
	}
	xmlhttp.open("GET",basketRemoveTarget+"?id="+id+"&anti-cache=" + timestamp,true);
	xmlhttp.send(null);


}

function RefreshBasket()
{
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

var timestamp = new Date().getTime();
	xmlhttp.onreadystatechange=function()
	{
		if(xmlhttp.readyState==1)
		document.getElementById('shoppingBasket').innerHTML='Cargando...';
	
		if(xmlhttp.readyState==4)
		{		document.getElementById('shoppingBasket').innerHTML=xmlhttp.responseText;
xmlhttp = false;
}
	}
	xmlhttp.open("GET",basketRefreshTarget+"?anti-cache=" + timestamp,true);
	xmlhttp.send(null);


}

function SendCodes()
{
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

var timestamp = new Date().getTime();
	xmlhttp.onreadystatechange=function()
	{
		if(xmlhttp.readyState==1)
document.getElementById('sendingStatus').style.display = 'block';		document.getElementById('sendingStatus').innerHTML='Enviando...';
	
		if(xmlhttp.readyState==4)
		{		document.getElementById('sendingStatus').innerHTML=xmlhttp.responseText;

xmlhttp = false;
}
	}
	xmlhttp.open("GET",sendCodeTarget+"?anti-cache=" + timestamp,true);
	xmlhttp.send(null);


}

function AddCode(code)
{
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

var timestamp = new Date().getTime();
	xmlhttp.onreadystatechange=function()
	{
		if(xmlhttp.readyState==1)
document.getElementById('codeResult').style.display = 'block';
if (language != 'english')		  document.getElementById('codeResult').innerHTML='Verificando...';
else
document.getElementById('codeResult').innerHTML='Verifying...';
	
		if(xmlhttp.readyState==4)
		{		document.getElementById('codeResult').innerHTML=xmlhttp.responseText;

xmlhttp = false;
}
	}
	xmlhttp.open("GET",addDiscountTarget +"?code="+code+"&language="+language+"&anti-cache=" + timestamp,true);
	xmlhttp.send(null);


}

function CancelCode(codeId)
{
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

var timestamp = new Date().getTime();
	xmlhttp.onreadystatechange=function()
	{
		if(xmlhttp.readyState==1)
		document.getElementById(codeId+'_state').innerHTML='Cambiando...';
	
		if(xmlhttp.readyState==4)
		{		document.getElementById(codeId+'_state').innerHTML=xmlhttp.responseText;

xmlhttp = false;
}
	}
	xmlhttp.open("GET",cancelCodeTarget+"?id="+codeId+"&anti-cache=" + timestamp,true);
	xmlhttp.send(null);


}

function DeactivateCode(codeId)
{
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

var timestamp = new Date().getTime();
	xmlhttp.onreadystatechange=function()
	{
		if(xmlhttp.readyState==1)
		document.getElementById(codeId+'_state').innerHTML='Desactivando...';
	
		if(xmlhttp.readyState==4)
		{		document.getElementById(codeId+'_state').innerHTML=xmlhttp.responseText;

xmlhttp = false;
}
	}
	xmlhttp.open("GET",deactivateCodeTarget+"?id="+codeId+"&anti-cache=" + timestamp,true);
	xmlhttp.send(null);


}


function RemoveFromBasketCallback(content)
{

var micrositeObjName = "";
if (theMicrosite == "English")
{
 micrositeObjName = "flower-shop";
}
else
{
 micrositeObjName = "floristeria-online";
}

  if (content.indexOf("REDIRECT") > -1)
    window.location.href= theSiteUrl + "/" + micrositeObjName + "/";


}

function GetDeliveryHours(date,pocode)
{
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

var timestamp = new Date().getTime();
	xmlhttp.onreadystatechange=function()
	{
		if(xmlhttp.readyState==1)
		document.getElementById('deliveryHours').innerHTML='Cargando...';
	
		if(xmlhttp.readyState==4)
		{		document.getElementById('deliveryHours').innerHTML=xmlhttp.responseText;
changeDeliveryHours();
xmlhttp = false;

}
	}
	xmlhttp.open("GET",deliveryHoursTarget+"?date="+date+"&pocode="+pocode+"&anti-cache=" + timestamp,true);
	xmlhttp.send(null);


}

function GetDeliveryHoursF(date,pocode,selectedH)
{
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

var timestamp = new Date().getTime();
	xmlhttp.onreadystatechange=function()
	{
		if(xmlhttp.readyState==1)
		document.getElementById('deliveryHours').innerHTML='Cargando...';
	
		if(xmlhttp.readyState==4)
		{		document.getElementById('deliveryHours').innerHTML=xmlhttp.responseText;
 $('select[name=shipping_hora]').val(selectedH);
changeDeliveryHours();
xmlhttp = false;

}
	}
	xmlhttp.open("GET",deliveryHoursTarget+"?date="+date+"&pocode="+pocode+"&anti-cache=" + timestamp,true);
	xmlhttp.send(null);


}


function UpdateDeliveryCost(date,pocode,time)
{
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

var timestamp = new Date().getTime();
	xmlhttp.onreadystatechange=function()
	{
		if(xmlhttp.readyState==1)
		document.getElementById('shoppingBasket').innerHTML='Cargando...';
	
		if(xmlhttp.readyState==4)
		{
		document.getElementById('shoppingBasket').innerHTML=xmlhttp.responseText;
xmlhttp = false;
}
	}
	xmlhttp.open("GET",deliveryCostTarget+"?date="+date+"&pocode="+pocode+"&time="+time+"&anti-cache=" + timestamp,true);
	xmlhttp.send(null);


}


function VerifyPostCode(postCode)
{
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

var timestamp = new Date().getTime();
	xmlhttp.onreadystatechange=function()
	{
		/*if(xmlhttp.readyState==1)
		document.getElementById('invoiceResult').innerHTML='Generando...';*/
	
		if(xmlhttp.readyState==4)
		{
			var result = xmlhttp.responseText;
			if (result == 'yes')
			{
				document.getElementById('postcodeCheck').style.display = 'none';
				document.getElementById('comprabutton').style.display = 'inline';
			}
			else
			{
				document.getElementById('postcodeCheck').style.display = 'block';
				document.getElementById('comprabutton').style.display = 'none';
			}
			//document.getElementById('invoiceResult').innerHTML=xmlhttp.responseText;
			xmlhttp = false;
		}
	}
	xmlhttp.open("GET",verifyPoCodeTarget+"?po_code="+postCode+"&anti-cache=" + timestamp,true);
	xmlhttp.send(null);


}

function GenerateInvoice(id)
{
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

var timestamp = new Date().getTime();
	xmlhttp.onreadystatechange=function()
	{
		if(xmlhttp.readyState==1)
		document.getElementById('invoiceResult').innerHTML='Generando...';
	
		if(xmlhttp.readyState==4)
		{		document.getElementById('invoiceResult').innerHTML=xmlhttp.responseText;
xmlhttp = false;
}
	}
	xmlhttp.open("GET",generateInvoiceTarget+"?order-id="+id+"&anti-cache=" + timestamp,true);
	xmlhttp.send(null);


}


function UpdateInvoice(id,value)
{
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

var timestamp = new Date().getTime();
	xmlhttp.onreadystatechange=function()
	{
		if(xmlhttp.readyState==1)
		document.getElementById('updateInvoiceDiv').innerHTML='Cargando...';
	
		if(xmlhttp.readyState==4)
		{		document.getElementById('updateInvoiceDiv').innerHTML=xmlhttp.responseText;
xmlhttp = false;
}
	}
	xmlhttp.open("GET",invoiceUpdateTarget+"?id="+id+"&value="+value+"&anti-cache=" + timestamp,true);
	xmlhttp.send(null);


}