var div = document.getElementById('luxecartlist'); 
 
var handleSuccess = function(o){ 
    if(o.responseText !== undefined){ 
        div.innerHTML = o.responseText; 
    } 
} 
 
var handleFailure = function(o){ 
    if(o.responseText !== undefined){ 
        div.innerHTML = "<li>Transaction id: " + o.tId + "</li>"; 
        div.innerHTML += "<li>HTTP status: " + o.status + "</li>"; 
        div.innerHTML += "<li>Status code message: " + o.statusText + "</li>"; 
    } 
} 
 
var callback = 
{ 
  success:handleSuccess, 
  failure: handleFailure, 
  argument: { foo:"foo", bar:"bar" } 
}; 

sUrl = "http://www.luxeapothecary.com/store/luxecart.php?topic=luxecart";
s2Url = "http://www.luxeapothecary.com/store/luxecart.php?topic=luxeaccount";

var getLuxeCart = function(){
	div = document.getElementById('luxecartlist'); 
	var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); 
	if(div.style.display=="none"){
		document.getElementById('luxeaccount').display='none';
		div.style.display="";
	} else {
		div.style.display="none";
	}
};
var getLuxeAccount = function(){
	div = document.getElementById('luxeaccount'); 
	var request = YAHOO.util.Connect.asyncRequest('GET', s2Url, callback); 
	if(div.style.display=="none"){
		document.getElementById('luxecartlist').display='none';
		div.style.display="";
	} else {
		div.style.display="none";
	}
};

var handleProdMenu = function(id,onstate, cancelTO)
{
	var d = document.getElementById(id)
	
	if(onstate)
		d.style.display = '';
	else 
	{
		d.style.display = 'none';
	}

}

var gotoBrand = function(obj)
{
	catIdx = obj.selectedIndex;
	cat = obj.options[catIdx].value;

	if(cat == '339')
	{
	window.location.href='/store/product.php?productid=16398&cat=339&page=1';
	
	} else {
	window.location.href='/store/home.php?cat='+cat;
	}
}
