
$(document).ready(function(){skinInit();});function skinInit()
{$('#navigation div.navigation-top').corner('tl tr 15px');$('div.tabbedNavigation ul.tabs li').corner('tl tr 8px');$('.layout-zone-footer').corner('bl br 15px');}
function CheckAddProductAlt(frm,min_order,max_order,allowed_max){var total_quantity_to_add_from_this_page=updateTotal('oa_quantity[]');if(total_quantity_to_add_from_this_page>0)
{if(product_may_be_added)
{var rex=/^(\d{1,})$/;if(!rex.test(frm.elements["oa_quantity"].value)){alert(msg.enter_numeric_product_quantity);frm.elements["oa_quantity"].focus();return false;}
if((frm.elements["oa_quantity"].value*1)<min_order)
{alert(msg.number_of_items_exceeded_min);frm.elements["oa_quantity"].focus();return false;}
if((max_order!="-")&&(frm.elements["oa_quantity"].value*1>max_order)){alert(msg.number_of_items_exceeded_max);frm.elements["oa_quantity"].focus();return false;}
if((allowed_max!="-")&&(frm.elements["oa_quantity"].value*1>allowed_max)){alert(msg.number_of_items_exceed_inventory);frm.elements["oa_quantity"].focus();return false;}
return true;}}
alert("Ooops! Did you forget to enter a quantity?\n\nPlease select the quantities you would like to order.");return false;}
function updateTotal(s){var newTotal=0;var allEls=document.getElementsByTagName("*");for(var i=0;i<allEls.length;i++)
{if(allEls[i].getAttribute("name")!=s)continue;if(isNaN(allEls[i].value))continue;newTotal+=new Number(allEls[i].value);}
return newTotal;}
