function validateegl(){var a=$F("reportnum");var d=/^(.*)$/i;if(a.match(d)){var b="/webservice/egl/";var c="reportnum="+a;var e=new Ajax.Updater({success:"ajworkspace"},b,{method:"get",parameters:c,evalScripts:true});return true}else{alert("Please confirm the EGL report number has been entered correctly.");return false}}function validateags(){return true}function validategia(){var a=$F("reportnum");var b=$F("weight");var f=/([0-9+]{7,8})/i;if(a.match(f)){var e=/([0-9+]{1,2}\.[0-9+]{1,2})/i;if(b.match(e)){var c="/webservice/gia/";var d="reportnum="+a+"&caratweight="+b;var g=new Ajax.Updater({success:"ajworkspace"},c,{method:"get",parameters:d,evalScripts:true});return true}else{return false}}else{return false}}function updatehelp(d){if($F("helpid")!=d){$("helpid").value=d;var a="/webservice/updatehelp/";var b="helpsection="+d;var c=new Ajax.Updater({success:"rhshelp"},a,{method:"get",parameters:b,evalScripts:true});return true}}function validatePackingSlipAddress(){if($F("d2c_firstname")==""||$F("d2c_lastname")==""){alert("Please enter your name in order to complete the packing slip.");return false}else{if($F("d2c_address1")==""||$F("d2c_city")==""){alert("Please complete your address.  This information is used to complete the packing slip on the next page and is the address where you would want your items returned should you decide not to sell.");return false}else{return true}}}function validateSaleAgreement(){var a=$("saleForm").serialize().toQueryParams()["payment_method"];if(a=="check"){$("saleForm").submit()}else{if(a=="wire"){$("saleForm").submit()}else{alert("Please select the method in which you would like to receive payment prior to printing the sale agreement.")}}}function validateSaleAgree(){var a=$("saleForm").serialize().toQueryParams()["payment_method"];if(a=="check"||a=="wire"){return true}else{alert("Please select the method in which you would like to receive payment prior to printing the sale agreement document.");return false}}function enablefield(a){var b=$(a);if(b!=null){b.disabled=false}}function disablefield(a){var b=$(a);if(b!=null){b.disabled=true}}function showhide(a){if(document.getElementById){obj=document.getElementById(a);if(obj.style.display=="none"){obj.style.display=""}else{obj.style.display="none"}}}function show(a){if(document.getElementById){obj=document.getElementById(a);obj.style.display=""}}function hide(a){if(document.getElementById){obj=document.getElementById(a);obj.style.display="none"}};
