function updateCartDeliveryTotals(classId){
    var classId=document ['navigation'].classid.options[document ['navigation'].classid.selectedIndex].value;
    var deliveryPriceSpan = document.getElementById("deliveryPrice");
    var totalPriceExDelivery = document.getElementById("totalPriceExDelivery");
    var totalPriceSpan = document.getElementById("totalPrice");
    if (deliveryPriceSpan && totalPriceExDelivery && totalPriceSpan) {
        totalPriceExDelivery = Math.round(totalPriceExDelivery.value*100)/100;
        var totalPrice = 0;

        var deliveryPrice = -1;

        if (classId == '56') {
            if (totalPriceExDelivery > 25){
                deliveryPrice = 0;
            } else {
                deliveryPrice = 3.95;
            }
        } else if (classId == '58') {
            if (totalPriceExDelivery > 25){
                deliveryPrice = 4;
            } else {
                deliveryPrice = 7.95;
            }
        } else if (classId == '59') {
            if (totalPriceExDelivery < 25){
                deliveryPrice = 7.95;
            } else {
                deliveryPrice = 4.00;
            }
        } else if (classId == '60') {
            deliveryPrice = 15;
        } 
        if (deliveryPrice == -1) {
            deliveryPrice = 'See next page';
            totalPrice = totalPriceExDelivery;
        } else {
            totalPrice = Math.round((deliveryPrice + totalPriceExDelivery)*100)/100;
            if (((deliveryPrice * 100) % 100) == 0){
                deliveryPrice = String(deliveryPrice) + '.00';
            } else if (((deliveryPrice * 100) % 10) == 0){
                deliveryPrice = String(deliveryPrice) + '0';
            }
        }
        if (((totalPrice * 100) % 100) == 0){
            totalPrice = String(totalPrice) + '.00';
        } else if (((totalPrice * 100) % 10) == 0){
            totalPrice = String(totalPrice) + '0';
        }

        if (document.all) {
            deliveryPriceSpan.innerText = deliveryPrice;
            totalPriceSpan.innerText = totalPrice;
        } else {
            deliveryPriceSpan.textContent = deliveryPrice;
            totalPriceSpan.textContent = totalPrice;
        }
    }
}


function checkStockLevel(stocklevel,partno,recid)
{
    if(stocklevel=='0')
    {
        document.write("<div style=float:right><small>Sorry, out of stock.<a href=\"main.asp\?sitepages=Outofstock\&partno=" + partno + "\"> Email me when available </a><input type=\"hidden\" name=\"partno\" value=\"{partno}\" /></small></div>");

       var q = document.getElementById("quant" + partno + recid);
       q.disabled=true;
    }
}
 
/*toogle container*/
$(document).ready(function(){
	
	$(".toggle_container").hide();

	$("h2.trigger").click(function(){
		$(this).toggleClass("active").next().slideToggle("slow");
	});

});
/*end toogle container*/

