function AddToCart(itemId)
{
//	howMany = document.getElementById(itemId+'_qty').value
howMany = 1;

if (document.getElementById(itemId+'_pOpt'))
	pOption = document.getElementById(itemId+'_pOpt').value
	else
	pOption = 0
	
	if (pOption == 'select') {
		alert("Please select a size to continue.");
		return false;
	}
	whereTo = "/shopping-cart/ss-cart-action.php?action=Add&product="+itemId+"_"+pOption+"&qty="+howMany
	window.location = whereTo
}
function viewBy() {
		perPage = document.getElementById('pp').value
		howSort = document.getElementById('po').value
		curSub = '';//document.getElementById('cs').value
		whereTo = "?pp="+perPage+"&po="+howSort;//+"&s="+curSub
		window.location = whereTo
}
$(document).ready(function(){
$("div.dropDown").children("span.itemPrice").remove();		
$("div.dropDown").children("span.itemSalePrice").remove();	
$("div.dropDown").children("span.itemOriginalPrice").remove();	

$("button.addEmail").click(function() {
					var email = $(this).parent('span.itemNotify').children('input.email').val();
					var itemId = $(this).parent('span.itemNotify').children('input.ItemId').val();
					var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
					var thisOne = $(this).parent("span.itemNotify");
					if (filter.test(email)) {	// Good Email
						$.ajax({
							type: "POST",
							url: "/includes/ss-quick-notify.php",
							data: "email="+email+"&itemId="+itemId,
							success: function(html){
								$(thisOne).empty();
								$(thisOne).append(html);
							}
						});	
					}
					else {	// Bad Email
						$(this).parent("span.itemNotify").append('<span class="msg error">Invalid email address, please try again.</span>');
						setTimeout('$("span.error").fadeOut(800)', 5000);
					}

				return false;	
	});
});