function searchShow(show)
{
    if (!show)
        $("#searchTopPart").animate({height: "hide"}, 300);
    else
        $("#searchTopPart").animate({height: "show"}, 300);
}

function changeCountryShow(show)
{
    var abs = getAbsolutePos(document.getElementById("changeCountryDiv"));
	
    $("#changeCountryPart").css("top", String(abs.y + 15) + 'px');
	$("#changeCountryPart").css("left", String(abs.x) + 'px');
	
    if (!show)
        $("#changeCountryPart").animate({height: "hide"}, 300);
    else
        $("#changeCountryPart").animate({height: "show"}, 300);
}

function loginShow(show)
{
	var abs = getAbsolutePos(document.getElementById("welcome"));
	
	$("#loginPart").css("top", String(abs.y + 20) + 'px');
	$("#loginPart").css("left", String(abs.x) + 'px');
    
    if (!show)
		$("#loginPart").animate({height: "hide"}, 300);
	else
        $("#loginPart").animate({height: "show"}, 300);
}

function changeCountry(id)
{
    window.location = "Default.aspx?AreaID=" + id;
}

function totalProductQuantity()
{
    var total = 0;
	for (var i = 0; i < $("#orderLineQuantities div").length; i++)
	{
	    total += parseInt($("#orderLineQuantities div")[i].innerHTML);
	}
	$("#totalOrderLineQuantity").html(total);
}