function prodColorSwitch(a,b)
{
	var colorId = $("prod_color").getValue();
	var url = "/storeAx/checkAttrImage/id/"+b+"/value/"+colorId+"/";
}

function loadTableOvers()
{
	$('.linkRow').mouseover( function() {
		$(this).css({ backgroundColor:"#ace" });
	});
	$('.linkRow').mouseout( function() {
		$(this).css({ backgroundColor:"#fff" });
	});
}

function goThere(a)
{
	window.location.href=a;
}

function printpage()
{
	window.print();
}

function printIt(a)
{
	w=window.open('/MyAccount/viewOrder/id/'+a+'/print/true/','results','width=400,height=350,left=50,top=50,resizable=1, scrollbars=1');
	w.focus();
	return false;
}

function estimateShipping()
{
	var zip = $("#zipcode").val();
	var units = $("#units").val();

	$.ajax({
		type: "POST",
		url: "/storeAx/getShipping/zip/"+zip+"/units/"+units+"/",
		data: "something=1",
		success: function(msg){
			if(msg != 'error')
			{
				$(".shipEst").hide();
				$("#showEst2").html(msg);
				$("#showEst").show();
			}
		}
	});
}

function swapProductImageSm(attrId, prodId)
{
	$("#prod_color").selectOptions(attrId, true);
	swapProductImage(attrId, prodId);
}

function swapProductImage(attrId, prodId)
{
	$.ajax({
		type: "POST",
		url: "/storeAx/checkAttrImage/id/"+attrId+"/value/"+prodId+"/",
		data: "something=1",
		success: function(msg){
			if(msg != 'n')
			{
				$("#productImage").attr('src',msg);
			}
		}
	});
}

function runCountry(cnt)
{
    var test = $("#"+cnt).val();
    if(test == 'US')
    {
        $("#state_field").hide();
        $("#state_list").show();
        $('#state_field').attr("disabled", true);
        $('#state_list').attr("disabled", false);
    }else{
        $("#state_field").show();
        $("#state_list").hide();
        $('#state_field').attr("disabled", false);
        $('#state_list').attr("disabled", true);
    }
}