var number_item=1,itemsToDispose=[];function clean_product_code(a){a.value=a.value.replace(/\W+/g,"")}function validateEmail(a,b){return a.toLowerCase()==b.toLowerCase()?/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(a):"nomatch"} function abundatrade_logout(){jQuery.ajax({type:"POST",url:"http://"+abundacalc.server+"/trade/process/user/logout/",dataType:"jsonp"}).done(function(){get_login_status()})}var just_logging_in=!1;function abundatrade_login(){just_logging_in=!0;submit_modal(null,null)}var loggedIn=!1; function get_login_status(){null!=jQuery("#login_status_abundatrade").val()&&(jQuery("#login_status_abundatrade").get(0).innerHTML="",jQuery.ajax({type:"POST",url:"http://"+abundacalc.server+"/trade/process/user/status/",dataType:"jsonp"}).done(function(a){a.status?(jQuery("#login_status_abundatrade").get(0).innerHTML="Hello "+a.first_name+" "+a.last_name+' logout',loggedIn="Super Cow"==a.first_name?!1: !0):(jQuery("#login_status_abundatrade").get(0).innerHTML='Login/Register',loggedIn=!1)}))} function clear_session(a){jQuery(a).hasClass("disabled")||jQuery.prompt("Are you sure you want to delete the entire listing?",{buttons:{Delete:!0,Cancel:!1},callback:function(a){a&&(a=jQuery.ajax({type:"GET",url:"http://"+abundacalc.server+"/trade/process/request.php",data:"action=clear_session",dataType:"jsonp"}),a.done(function(a){jQuery("#abundaCalcBody_request").children().remove();a.total_qty="0.00";a.currency_for_total="$";a.total="0.00";display_totals(a)}),a.fail(function(a,b,d){alert("Request failed: "+ b+" - "+d)}))}});number_item=1}function new_session(){number_item=1;var a=jQuery.ajax({type:"GET",url:"http://"+abundacalc.server+"/trade/process/request.php",data:"action=new_session",dataType:"jsonp"});a.done(function(){});a.fail(function(){please_wait(!1)})} function display_totals(a){jQuery("#product_code").val("");jQuery("#item_count").html(a.total_qty);jQuery("#total_item_count").html(a.total_qty);jQuery("#grand_total").html(a.currency_for_total+a.total);jQuery("#total_prevaluation").html(a.currency_for_total+a.total);please_wait(!1);0').parent().find("td > div").slideUp("slow",function(){jQuery(this).parent().parent().remove()})} function load_previous_session(a){var b=jQuery.ajax({type:"GET",url:"http://"+abundacalc.server+"/trade/process/request.php",data:"action=load_previous_session",dataType:"jsonp"});b.success(function(b){for(i=0;i').parent().find("td > div").slideDown("slow",function(){var a= jQuery(this);a.replaceWith(a.contents())}),display_totals(part)});b.fail(function(a,b,d){alert("Request failed: "+b+" - "+d)})}function addDuplicatesToQuantity(a){for(var b=$$("td.upc"),c=$$("td.quantity"),f=0,d=0;d
Getting the realtime values for your item
waiting
";jQuery("#abundaCalcTbl").prepend(row_html)} function lookup_item(a){jQuery(a).hasClass("disabled")||(5').parent().find("td > div").slideDown("slow",function(){var a=jQuery(this);a.replaceWith(a.contents())});display_totals(a)}),a.fail(function(a,c,f){alert("Request failed: "+c+" - "+f);please_wait(!1)})):jQuery.prompt("The product code must be at least 6 characters long.
Enter a UPC or Amazon ASIN."));return!1}function please_wait(){} var regular_display="

Sending your trade request and locking in your quote!
Give our pecking pigeons a second

"; function displayLogin(){return!loggedIn?'





Forgot your password?': "

Welcome back!

"}function displayLoginButtons(){return loggedIn?{Cancel:0,"Ready to submit":1}:just_logging_in?{Cancel:0,Login:-1,Register:1}:{Cancel:0,Login:-1,Register:1,"Continue as Guest":2}} function checkpass(){orig=jQuery("#password").val();conf=jQuery("#confirmPass").val();8>orig.length?jQuery("#shortpass").show():(jQuery("#shortpass").hide(),0!=conf.length&&(orig!=conf?(jQuery("#badpass").show(),jQuery("#goodpass").hide()):(jQuery("#goodpass").show().delay(2E3).fadeOut(),jQuery("#badpass").hide())))} function checkemail(){isguest||(jQuery("#researching").fadeIn(),request=jQuery.ajax({url:"http://"+abundacalc.server+"/trade/process/user/create/",dataType:"jsonp",data:"email="+jQuery("#email_abundatrade").val()}),request.done(function(a){jQuery("#researching").hide();"invalid request"!=a.error?jQuery("#bademail").show():jQuery("#bademail").hide()}))}isguest=!1; function hide_for_guest(){isguest=!0;jQuery("#confirmPass").hide();jQuery("#label_confirm").hide();jQuery("#label_pass").hide();jQuery("#password").hide()} function processLogin(a,b){if(loggedIn){if(0==b)return 0;if(1==b)return jQuery.prompt.goToState("state5"),!1}else{if(0==b)return 0;1==b&&Register(register_pass(),regular_finish,submit_my_list);2==b&&(hide_for_guest(),jQuery.prompt.goToState("state1"));-1==b&&(jQuery("#logging_on").fadeIn(),request=jQuery.ajax({url:"http://"+abundacalc.server+"/trade/process/user/login/",dataType:"jsonp",data:"user="+jQuery("#abundatrade_user").val()+"&password="+jQuery("#abundatrade_password").val()+"&remember="+ jQuery("#remember").is(":checked")}),request.done(function(a){a.error?(jQuery("#logging_on").fadeOut(),jQuery("#login_error").delay(800).show()):(jQuery("#login_error").hide(),just_logging_in?(get_login_status(),just_logging_in=!1,jQuery.prompt.close()):(get_login_status(),just_logging_in=!1,loggedIn=!0,jQuery.prompt.goToState("state5")))}));return!1}} function display_promo(){return loggedIn?'

':'How did you hear about us?