<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">var url="http://www.westfieldfasteners.co.uk/cgi-bin/";var urls="https://www.westfieldfasteners.co.uk/cgi-bin/";var to_ip="www.westfieldfasteners.co.uk";var saved_session_des;var DeleteReturn;var delCountryCode;var invCountryCode;var carCountryCode;var http_calculate;var saved_delivery_addresses_table_height;var saved_invoice_addresses_table_height;window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}gtag("js",new Date);gtag("config","UA-17800932-1");gtag("config","AW-1013066449");(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"187151806",enableAutoSpaTracking:true};o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;s&amp;&amp;s!=="loaded"&amp;&amp;s!=="complete"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,document,"script","//bat.bing.com/bat.js","uetq");if(window.location.protocol=="https:"){var url=urls}function on_page_1_load(){check_set_cookie();sm_note();email_address();email_address_again();refresh_persistent_login_cookie();are_you_signed_in()}function on_other_page_load(message){check_set_cookie();sm_note();email_address();refresh_persistent_login_cookie();are_you_signed_in();if(message){record_event(message)}}function on_privacy_policy_page_load(){on_other_page_load();email_address_again()}function on_returns_policy_page_load(){on_other_page_load()}function on_contact_us_page_load(){on_other_page_load();email_address_again()}function on_delivery_page_load(){on_other_page_load();email_address_again()}function check_set_cookie(){var time="&amp;time="+(new Date).getTime();var id=get_cookie("ID");var persistent_login=get_cookie("persistent_login");var session_login=get_cookie("session_login");if(document.getElementById("consent_form_html")!=null){place_consent_form_html();var analytical_cookie_consent=get_cookie("analytical_cookie_consent");var marketing_cookie_consent=get_cookie("marketing_cookie_consent");document.getElementById("analytical_cookies_checkbox").checked=analytical_cookie_consent;document.getElementById("marketing_cookies_checkbox").checked=marketing_cookie_consent;gtag("consent","update",{ad_storage:"granted",analytics_storage:"granted"});gtag("consent","update",{ad_user_data:"granted",ad_personalization:"granted"});if(analytical_cookie_consent==null||analytical_cookie_consent==""){}if(marketing_cookie_consent==null||marketing_cookie_consent==""){}}if(id==null||id==""){var http=false;if(navigator.appName=="Microsoft Internet Explorer"){http=new ActiveXObject("Microsoft.XMLHTTP")}else{http=new XMLHttpRequest}http.open("GET",urls+"main2.pl?sub=new_ID"+"&amp;login_number="+persistent_login+"&amp;login_name="+session_login+time,true);http.onreadystatechange=function(){if(http.readyState==4){var biscuit=http.responseText;document.cookie=biscuit;biscuit=get_cookie("ID");if(biscuit==null)document.cookie=biscuit;return}};http.send(null)}else{var date=new Date;date.setTime(date.getTime()+3*24*60*60*1e3);var expires="; expires="+date.toGMTString();document.cookie="ID="+id+";path=/"+expires;return id}}function show_cookie_consent_form(){document.getElementById("consent_div").style.display="block";setTimeout(function(){document.getElementById("consent_div").style["opacity"]="1"},300)}function accept_all_cookies(){document.getElementById("analytical_cookies_checkbox").checked=true;document.getElementById("marketing_cookies_checkbox").checked=true;set_consent_cookies_checkbox();setTimeout(function(){document.getElementById("consent_div").style.display="none"},300)}function necessary_cookies_only(){document.getElementById("analytical_cookies_checkbox").checked=false;document.getElementById("marketing_cookies_checkbox").checked=false;set_consent_cookies_checkbox();document.getElementById("consent_div").style["opacity"]="0";setTimeout(function(){document.getElementById("consent_div").style.display="none"},300)}function customise_cookie_settings(){document.getElementById("analytical_cookies_checkbox").checked=false;document.getElementById("marketing_cookies_checkbox").checked=false;set_consent_cookies_checkbox();document.getElementById("table1_container").style["max-height"]="0px";setTimeout(function(){document.getElementById("table2_container").style["max-height"]="600px"},500)}function confirm_cookie_settings(){document.getElementById("consent_div").style["opacity"]="0";setTimeout(function(){document.getElementById("consent_div").style.display="none"},300)}function set_consent_cookies_checkbox(){var analytical_cookies_checkbox=document.getElementById("analytical_cookies_checkbox").checked;var marketing_cookies_checkbox=document.getElementById("marketing_cookies_checkbox").checked;var age=60*60*24*180;document.cookie="analytical_cookie_consent="+analytical_cookies_checkbox+"; max-age="+age+"; path=/";document.cookie="marketing_cookie_consent="+marketing_cookies_checkbox+"; max-age="+age+"; path=/";if(analytical_cookies_checkbox==true){gtag("consent","update",{ad_storage:"granted",analytics_storage:"granted"})}else{gtag("consent","update",{ad_storage:"granted",analytics_storage:"granted"})}if(marketing_cookies_checkbox==true){gtag("consent","update",{ad_user_data:"granted",ad_personalization:"granted"})}else{gtag("consent","update",{ad_user_data:"granted",ad_personalization:"granted"})}var time="&amp;time="+(new Date).getTime();var id=get_cookie("ID");var persistent_login=get_cookie("persistent_login");var session_login=get_cookie("session_login");var http=false;if(navigator.appName=="Microsoft Internet Explorer"){http=new ActiveXObject("Microsoft.XMLHTTP")}else{http=new XMLHttpRequest}http.open("GET",urls+"main2.pl?sub=set_consent_cookies_checkbox"+"&amp;analytical_cookies_checkbox="+analytical_cookies_checkbox+"&amp;marketing_cookies_checkbox="+marketing_cookies_checkbox+"&amp;login_number="+persistent_login+"&amp;login_name="+session_login+"&amp;ID="+id+time,true);http.onreadystatechange=function(){if(http.readyState==4){}};http.send(null)}function get_cookie(cookie_name){var results=document.cookie.match("(^|;) ?"+cookie_name+"=([^;]*)(;|$)");if(results)return unescape(results[2]);else return null}function delete_cookie(cookie_name){var id=get_cookie("ID");var cookie_date=new Date;cookie_date.setTime(cookie_date.getTime()-1);document.cookie="ID="+id+";path=/;expires="+cookie_date.toGMTString()}function place_consent_form_html(){var html='&lt;div id="consent_div"&gt;'+"&lt;table borde cellpadding=0 cellspacing=0&gt;"+"&lt;tr&gt;"+"&lt;td&gt;"+'&lt;div id="table1_container"&gt;'+'&lt;table borde class="consent_table"&gt;'+"&lt;tr&gt;"+'&lt;th class="consent"&gt;Cookie Privacy&lt;/th&gt;'+'&lt;th align="right"&gt;&lt;div class="consent_link2" onclick="necessary_cookies_only()"&gt;X&lt;/div&gt;&lt;/th&gt;'+"&lt;/tr&gt;"+"&lt;tr&gt;"+'&lt;td colspan=2 class="consent"&gt;By clicking "Accept all cookies", you agree that Westfield Fasteners Ltd can store cookies on your device and disclose information in accordance with our &lt;a class="consent_link" href="https://www.westfieldfasteners.co.uk/Privacy_Policy.html" target="_blank"&gt;Privacy Policy&lt;/a&gt;.&lt;/td&gt;'+"&lt;/tr&gt;"+"&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;"+"&lt;tr&gt;"+'&lt;td class="consent"&gt;&lt;div class="consent_button1" onclick="accept_all_cookies()"&gt;Accept all cookies&lt;/div&gt;&lt;/td&gt;'+'&lt;td class="consent"&gt;&lt;div class="consent_button1" onclick="necessary_cookies_only()"&gt;Necessary cookies only&lt;/div&gt;&lt;/td&gt;'+"&lt;/tr&gt;"+"&lt;tr&gt;"+'&lt;td class="consent" colspan=2&gt;&lt;div class="consent_button2" onclick="customise_cookie_settings()"&gt;Customise settings&lt;/div&gt;&lt;/td&gt;'+"&lt;/tr&gt;"+"&lt;/table&gt;"+"&lt;/div&gt;"+"&lt;/td&gt;"+"&lt;/tr&gt;"+"&lt;tr&gt;"+"&lt;td&gt;"+'&lt;div id="table2_container"&gt;'+"&lt;form&gt;"+'&lt;table borde class="consent_table"&gt;'+"&lt;tr&gt;"+'&lt;th class="consent"&gt;Cookie Privacy&lt;/th&gt;'+'&lt;th align="right"&gt;&lt;div class="consent_link2" onclick="confirm_cookie_settings()"&gt;X&lt;/div&gt;&lt;/th&gt;'+"&lt;/tr&gt;"+"&lt;tr&gt;"+'&lt;td colspan=2 class="consent"&gt;By clicking "Accept all cookies", you agree that Westfield Fasteners Ltd can store cookies on your device and disclose information in accordance with our &lt;a class="consent_link" href="https://www.westfieldfasteners.co.uk/Privacy_Policy.html" target="_blank"&gt;Privacy Policy&lt;/a&gt;.&lt;/td&gt;'+"&lt;/tr&gt;"+"&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;"+"&lt;tr&gt;"+'&lt;td class="consent"&gt;&lt;div class="consent_button1" onclick="accept_all_cookies()"&gt;Accept all cookies&lt;/div&gt;&lt;/td&gt;'+'&lt;td class="consent"&gt;&lt;div class="consent_button1" onclick="necessary_cookies_only()"&gt;Necessary cookies only&lt;/div&gt;&lt;/td&gt;'+"&lt;/tr&gt;"+"&lt;tr&gt;"+'&lt;td class="consent" colspan=2&gt;&lt;/td&gt;'+"&lt;/tr&gt;"+"&lt;tr&gt;"+'&lt;th class="consent"&gt;Necessary Cookies&lt;/th&gt;'+'&lt;th align="right"&gt;&lt;/th&gt;'+"&lt;/tr&gt;"+"&lt;tr&gt;"+'&lt;td colspan=2 class="consent"&gt;Necessary cookies enable core functionality such as compiling and placing an order. The website cannot function properly without these cookies, and can only be disabled by changing your browser preferences.&lt;/td&gt;'+"&lt;/tr&gt;"+"&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;"+'&lt;th class="consent"&gt;Analytical Cookies&lt;/th&gt;'+'&lt;th align="right"&gt;&lt;input type="checkbox" onclick="set_consent_cookies_checkbox()" id="analytical_cookies_checkbox" name="analytical_cookies_checkbox" value="on"&gt;&lt;/th&gt;'+"&lt;/tr&gt;"+"&lt;tr&gt;"+'&lt;td colspan=2 class="consent"&gt;Analytical cookies help us to improve our website by collecting and reporting information on its usage.&lt;/td&gt;'+"&lt;/tr&gt;"+"&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;"+'&lt;th class="consent"&gt;Marketing Cookies&lt;/th&gt;'+'&lt;th align="right"&gt;&lt;input type="checkbox" onclick="set_consent_cookies_checkbox()" id="marketing_cookies_checkbox" name="marketing_cookies_checkbox"&gt;&lt;/th&gt;'+"&lt;/tr&gt;"+"&lt;tr&gt;"+'&lt;td colspan=2 class="consent"&gt;We use marketing cookies to help us improve the relevancy of advertising campaigns you receive.&lt;/td&gt;'+"&lt;/tr&gt;"+"&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;"+"&lt;tr&gt;"+'&lt;td class="consent" colspan=2&gt;&lt;div class="consent_button2" onclick="confirm_cookie_settings()"&gt;Confirm settings&lt;/div&gt;&lt;/td&gt;'+"&lt;/tr&gt;"+"&lt;/table&gt;"+"&lt;/form&gt;"+"&lt;/div&gt;"+"&lt;/td&gt;"+"&lt;/tr&gt;"+"&lt;/table&gt;"+"&lt;/div&gt;";document.getElementById("consent_form_html").innerHTML=html}function sm_note(){refresh_persistent_login_cookie();var time="&amp;time="+(new Date).getTime();var id=get_cookie("ID");var http=false;if(navigator.appName=="Microsoft Internet Explorer"){http=new ActiveXObject("Microsoft.XMLHTTP")}else{http=new XMLHttpRequest}http.open("GET",urls+"main2.pl?sub=sm_note&amp;ID="+id+time,true);http.onreadystatechange=function(){if(http.readyState==4){var mySplitResult=http.responseText.split("||||");if(document.getElementById("promise_order_list_side")!=undefined){document.getElementById("promise_order_list_side").style["text-align"]="left"}document.getElementById("orderlistside").innerHTML=mySplitResult[0]}};http.send(null)}function email_address(){var username="enquiries";var at="@";var domain="westfieldfasteners.co.uk";document.getElementById("enquiries").innerHTML=username+at+domain}function email_address_again(){var username="enquiries";var at="@";var domain="westfieldfasteners.co.uk";document.getElementById("enquiries_again").innerHTML=username+at+domain}function refresh_persistent_login_cookie(){var persistent_login=get_cookie("persistent_login");if(persistent_login==null){}else{var date=new Date;date.setTime(date.getTime()+15*60*1e3);var expires="; expires="+date.toGMTString();document.cookie="persistent_login="+persistent_login+";path=/"+expires}}function are_you_signed_in(){var persistent_login=get_cookie("persistent_login");var session_login=get_cookie("session_login");document.getElementById("stretch2_login").style["transition"]="0";document.getElementById("stretch_login").style["transition"]="0";if(persistent_login==null||session_login==null){document.getElementById("sign_out_login").style["display"]="none";document.getElementById("login_name_login").style["display"]="none";document.getElementById("sign_in_login").style["display"]="flex";document.getElementById("stretch2_login").style["max-width"]="400px";document.getElementById("stretch_login").style["max-width"]="0px"}else{document.getElementById("sign_out_login").style["display"]="flex";document.getElementById("login_name_login").style["display"]="flex";document.getElementById("sign_in_login").style["display"]="none";document.getElementById("login_name_login").innerHTML="Account Menu ("+session_login+")";document.getElementById("stretch_login").style["max-width"]="400px"}}function are_you_signed_in_animated(){var persistent_login=get_cookie("persistent_login");var session_login=get_cookie("session_login");document.getElementById("stretch2_login").style["transition"]="max-width 500ms ease-in-out";document.getElementById("stretch_login").style["transition"]="max-width 500ms ease-in-out";if(persistent_login==null||session_login==null){document.getElementById("stretch_login").style["max-width"]="0px";setTimeout(function(){document.getElementById("sign_out_login").style["display"]="none";document.getElementById("login_name_login").style["display"]="none";document.getElementById("sign_in_login").style["display"]="flex";document.getElementById("stretch2_login").style["max-width"]="400px"},500)}else{document.getElementById("stretch2_login").style["max-width"]="0px";setTimeout(function(){document.getElementById("sign_out_login").style["display"]="flex";document.getElementById("login_name_login").style["display"]="flex";document.getElementById("sign_in_login").style["display"]="none";document.getElementById("login_name_login").innerHTML="Account Menu ("+session_login+")";document.getElementById("stretch_login").style["max-width"]="400px"},500)}}function sign_out(){var persistent_login=get_cookie("persistent_login");var date=new Date;date.setTime(date.getTime()-1);var expires="; expires="+date.toGMTString();document.cookie="persistent_login="+persistent_login+";path=/"+expires;var time="&amp;time="+(new Date).getTime();var id=get_cookie("ID");var http=false;if(navigator.appName=="Microsoft Internet Explorer"){http=new ActiveXObject("Microsoft.XMLHTTP")}else{http=new XMLHttpRequest}http.open("GET",urls+"main2.pl?sub=sign_out&amp;id="+id+time,true);http.onreadystatechange=function(){if(http.readyState==4){are_you_signed_in_animated()}};http.send(null);var page=window.location.href;if(page.match("Core.html")){setTimeout(function(){window.location.href="Sign_In.html?You&amp;nbsp;have&amp;nbsp;been&amp;nbsp;signed&amp;nbsp;out"},800)}}function account_menu(){if(get_cookie("persistent_login")==null||get_cookie("session_login")==null){sign_out();return}window.location.href="Core.html?account_menu"}function dropdown(id,identifier,option,listselect){refresh_persistent_login_cookie();var x=document.getElementById(id).style["max-height"];var patt=new RegExp("em");if(patt.test(x)){document.getElementById(id).style["max-height"]="0px";document.getElementById(id).style["overflow-y"]="hidden"}else{document.getElementById(id).style["max-height"]="20em";setTimeout(function(){document.getElementById(id).style["overflow-y"]="auto"},200)}if(option!=undefined){document.getElementById("dropbtn_"+id).innerHTML=option;document.getElementById("dropbtn_"+id).value=option;window[listselect]()}}function openNav(){refresh_persistent_login_cookie();document.getElementById("overlay_page_layout_1").style.width="100%";document.getElementById("overlay_page_layout_1").style.opacity="0.7";document.getElementById("body_html_header").style.position="relative";document.getElementById("body_html_header").style.overflow="hidden";document.getElementById("slide_nav_page_layout_1").style.width="100%";document.getElementById("slide_nav_page_layout_1").style.overflow="auto";document.getElementById("slide_nav_left_page_layout_1").style.left="0px";document.getElementById("wrap_page_layout_1").style.overflow="hidden";document.getElementById("a_login").innerHTML="&lt;span class='span_link_login' onclick='closeNav()'&gt;&lt;img class='b_login' width='48px' height='48px' alt='close navigation button' src='/Images2/SVGs/menu_cross.svg'&gt;&lt;/span&gt;";document.addEventListener("mouseup",closeNav)}function closeNav(){refresh_persistent_login_cookie();document.getElementById("overlay_page_layout_1").style.opacity="0";document.getElementById("body_html_header").style.position="static";document.getElementById("body_html_header").style.overflow="auto";document.getElementById("slide_nav_page_layout_1").style.overflow="hidden";document.getElementById("slide_nav_left_page_layout_1").style.left="-250px";document.getElementById("wrap_page_layout_1").style["overflow"]="inline";setTimeout(function(){document.getElementById("slide_nav_page_layout_1").style.width="0";document.getElementById("overlay_page_layout_1").style.width="0";document.getElementById("a_login").innerHTML="&lt;span class='span_link_login' onclick='openNav()'&gt;&lt;img class='b_login' width='48px' height='48px' alt='open navigation button'  src='/Images2/SVGs/menu_3d_4.svg'&gt;&lt;/span&gt;"},500);document.removeEventListener("mouseup",closeNav)}function record_event(message){var time="&amp;time="+(new Date).getTime();var id=get_cookie("ID");var persistent_login=get_cookie("persistent_login");var session_login=get_cookie("session_login");if(navigator.appName=="Microsoft Internet Explorer"){http=new ActiveXObject("Microsoft.XMLHTTP")}else{http=new XMLHttpRequest}http.open("GET",urls+"main2.pl?sub=record_event&amp;ID="+id+"&amp;message="+message+"&amp;login_number="+persistent_login+"&amp;login_name="+session_login+time,true);http.onreadystatechange=function(){if(http.readyState==4){}};http.send(null)}function open_image_modal(id,maxwidth){document.getElementById("myModal").style.display="block";document.getElementById("img01").src=document.getElementById(id).src;document.getElementById("img01").style.display="block";document.getElementById("img01").style["border-radius"]="10px";document.getElementById("caption").innerHTML=document.getElementById(id).alt;if(maxwidth){document.getElementById("img01").style["max-width"]=maxwidth}}function close_image_modal(){document.getElementById("myModal").style.display="none"}function on_page_3_load(){check_set_cookie();refresh_persistent_login_cookie();var str=window.location.search;var patt=new RegExp("google_shopping");if(patt.test(str)){var FormArray=window.location.search.split("=");FormArray[0]=FormArray[1].substring(1);var id=FormArray[1];var bit=FormArray[2];var array=bit.split("&amp;");var qty=array[0];document.getElementById(id).value=qty;FormArray[1]=FormArray[1].replace(/qty_/,"");calculate(FormArray[1],FormArray[0]);setTimeout(function(){document.getElementById(id).value=qty},1e3)}sm_note();email_address();are_you_signed_in()}function gather_qtys(mids_on_page){refresh_persistent_login_cookie();var time="&amp;time="+(new Date).getTime();var id=get_cookie("ID");var login_number=get_cookie("persistent_login");var login_name=get_cookie("session_login");var http2=false;if(navigator.appName=="Microsoft Internet Explorer"){http2=new ActiveXObject("Microsoft.XMLHTTP")}else{http2=new XMLHttpRequest}http2.open("POST",urls+"main2.pl",true);http2.setRequestHeader("Content-type","application/x-www-form-urlencoded");http2.onreadystatechange=function(){if(http2.readyState==4){var mySplitResult=http2.responseText.split("||||");var arLen=mySplitResult.length;for(var i=0,len=arLen;i&lt;len;i=i+8){if(document.getElementById("qty_"+mySplitResult[i])!=null){document.getElementById("qty_"+mySplitResult[i]).value=mySplitResult[i+1];document.getElementById("button_"+mySplitResult[i]).innerHTML=mySplitResult[i+2];document.getElementById("sale_qtys_"+mySplitResult[i]).innerHTML=mySplitResult[i+3];if(document.getElementById("stock_level_"+mySplitResult[i])!=null){document.getElementById("stock_level_"+mySplitResult[i]).innerHTML=mySplitResult[i+4]}document.getElementById("price_"+mySplitResult[i]).innerHTML=mySplitResult[i+5];document.getElementById("each_"+mySplitResult[i]).innerHTML=mySplitResult[i+6];document.getElementById("m_qty_"+mySplitResult[i]).value=mySplitResult[i+1];document.getElementById("m_button_"+mySplitResult[i]).innerHTML=mySplitResult[i+2];document.getElementById("m_sale_qtys_"+mySplitResult[i]).innerHTML=mySplitResult[i+3];if(document.getElementById("m_stock_level_"+mySplitResult[i])!=null){document.getElementById("m_stock_level_"+mySplitResult[i]).innerHTML=mySplitResult[i+4]}document.getElementById("m_price_"+mySplitResult[i]).innerHTML=mySplitResult[i+5];document.getElementById("m_each_"+mySplitResult[i]).innerHTML=mySplitResult[i+6]}}}};http2.send("sub=gather_qtys&amp;mids_on_page="+mids_on_page+"&amp;login_number="+login_number+"&amp;login_name="+login_name+"&amp;version=20240206&amp;ID="+id+time)}function calculate(mid,shop){document.getElementById("m_price_"+mid).innerHTML="&lt;img src='/Images2/SVGs/loader.svg') id='loader_customer_details'&gt;";document.getElementById("price_"+mid).innerHTML="&lt;img src='/Images2/SVGs/loader.svg') id='loader_customer_details'&gt;";document.getElementById("each_"+mid).innerHTML="";document.getElementById("qty_"+mid).innerHTML="";document.getElementById("button_"+mid).innerHTML="";document.getElementById("m_each_"+mid).innerHTML="";document.getElementById("m_qty_"+mid).innerHTML="";document.getElementById("m_button_"+mid).innerHTML="";refresh_persistent_login_cookie();var time="&amp;time="+(new Date).getTime();var id=get_cookie("ID");document.getElementById("button_"+mid).innerHTML="";if(http_calculate!=undefined){http_calculate.abort()}if(navigator.appName=="Microsoft Internet Explorer"){http_calculate=new ActiveXObject("Microsoft.XMLHTTP")}else{http_calculate=new XMLHttpRequest}var qty=document.getElementById("qty_"+mid).value;qty=qty.replace(/[^0-9]/g,"");qty=qty.replace(/^0/g,"");document.getElementById("qty_"+mid).value=qty;document.getElementById("m_qty_"+mid).value=qty;document.getElementById("m_price_"+mid).innerHTML="&lt;img src='/Images2/SVGs/loader.svg') id='loader_customer_details'&gt;";document.getElementById("price_"+mid).innerHTML="&lt;img src='/Images2/SVGs/loader.svg') id='loader_customer_details'&gt;";http_calculate.open("GET",urls+"main2.pl?sub=calculate&amp;mid="+mid+"&amp;qty="+qty+"&amp;ID="+id+"&amp;shop="+shop+time,true);http_calculate.onreadystatechange=function(){if(http_calculate.readyState==4){var mySplitResult=http_calculate.responseText.split("||||");if(mySplitResult[0]!=undefined){document.getElementById("price_"+mid).innerHTML=mySplitResult[0]}if(mySplitResult[1]!=undefined){document.getElementById("each_"+mid).innerHTML=mySplitResult[1]}if(mySplitResult[2]!=undefined){document.getElementById("qty_"+mid).value=mySplitResult[2]}if(mySplitResult[3]!=undefined){document.getElementById("button_"+mid).innerHTML=mySplitResult[3]}if(mySplitResult[0]!=undefined){document.getElementById("m_price_"+mid).innerHTML=mySplitResult[0]}if(mySplitResult[1]!=undefined){document.getElementById("m_each_"+mid).innerHTML=mySplitResult[1]}if(mySplitResult[2]!=undefined){document.getElementById("m_qty_"+mid).value=mySplitResult[2]}if(mySplitResult[3]!=undefined){document.getElementById("m_button_"+mid).innerHTML=mySplitResult[3]}}};http_calculate.send(null)}function m_calculate(mid,shop){document.getElementById("m_price_"+mid).innerHTML="&lt;img src='/Images2/SVGs/loader.svg') id='loader_customer_details'&gt;";document.getElementById("price_"+mid).innerHTML="&lt;img src='/Images2/SVGs/loader.svg') id='loader_customer_details'&gt;";document.getElementById("each_"+mid).innerHTML="";document.getElementById("qty_"+mid).innerHTML="";document.getElementById("button_"+mid).innerHTML="";document.getElementById("m_each_"+mid).innerHTML="";document.getElementById("m_qty_"+mid).innerHTML="";document.getElementById("m_button_"+mid).innerHTML="";refresh_persistent_login_cookie();var time="&amp;time="+(new Date).getTime();var id=get_cookie("ID");document.getElementById("m_button_"+mid).innerHTML="";if(http_calculate!=null){http_calculate.abort()}if(navigator.appName=="Microsoft Internet Explorer"){http_calculate=new ActiveXObject("Microsoft.XMLHTTP")}else{http_calculate=new XMLHttpRequest}var qty=document.getElementById("m_qty_"+mid).value;qty=qty.replace(/[^0-9]/g,"");qty=qty.replace(/^0/g,"");document.getElementById("m_qty_"+mid).value=qty;document.getElementById("qty_"+mid).value=qty;document.getElementById("m_price_"+mid).innerHTML="&lt;img src='/Images2/SVGs/loader.svg') id='loader_customer_details'&gt;";document.getElementById("price_"+mid).innerHTML="&lt;img src='/Images2/SVGs/loader.svg') id='loader_customer_details'&gt;";http_calculate.open("GET",urls+"main2.pl?sub=calculate&amp;mid="+mid+"&amp;qty="+qty+"&amp;ID="+id+"&amp;shop="+shop+time,true);http_calculate.onreadystatechange=function(){if(http_calculate.readyState==4){var mySplitResult=http_calculate.responseText.split("||||");if(mySplitResult[0]!=undefined){document.getElementById("price_"+mid).innerHTML=mySplitResult[0]}if(mySplitResult[1]!=undefined){document.getElementById("each_"+mid).innerHTML=mySplitResult[1]}if(mySplitResult[2]!=undefined){document.getElementById("qty_"+mid).value=mySplitResult[2]}if(mySplitResult[3]!=undefined){document.getElementById("button_"+mid).innerHTML=mySplitResult[3]}if(mySplitResult[0]!=undefined){document.getElementById("m_price_"+mid).innerHTML=mySplitResult[0]}if(mySplitResult[1]!=undefined){document.getElementById("m_each_"+mid).innerHTML=mySplitResult[1]}if(mySplitResult[2]!=undefined){document.getElementById("m_qty_"+mid).value=mySplitResult[2]}if(mySplitResult[3]!=undefined){document.getElementById("m_button_"+mid).innerHTML=mySplitResult[3]}}};http_calculate.send(null)}function add(mid,expectation,message){document.getElementById("m_button_"+mid).innerHTML="&lt;img src='/Images2/SVGs/loader.svg') id='loader_customer_details'&gt;";document.getElementById("button_"+mid).innerHTML="&lt;img src='/Images2/SVGs/loader.svg') id='loader_customer_details'&gt;";refresh_persistent_login_cookie();var time="&amp;time="+(new Date).getTime();var id=get_cookie("ID");var persistent_login=get_cookie("persistent_login");var session_login=get_cookie("session_login");if(id==null){document.getElementById("javascript_check").innerHTML="&lt;h2&gt;!!Cookies need to be enabled in order to use this website!!&lt;/h2&gt;"}if(message==undefined){message="added"}var http=false;if(navigator.appName=="Microsoft Internet Explorer"){http=new ActiveXObject("Microsoft.XMLHTTP")}else{http=new XMLHttpRequest}var qty=document.getElementById("qty_"+mid).value;http.open("GET",urls+"main2.pl?sub=add&amp;mid="+mid+"&amp;login_number="+persistent_login+"&amp;login_name="+session_login+"&amp;qty="+qty+"&amp;expectation="+expectation+"&amp;ID="+id+time,true);http.onreadystatechange=function(){if(http.readyState==4){var mySplitResult=http.responseText.split("||||");document.getElementById("m_button_"+mid).innerHTML="&lt;font color='#156300'&gt;"+message+"&lt;/font&gt;";document.getElementById("button_"+mid).innerHTML="&lt;font color='#156300'&gt;"+message+"&lt;/font&gt;";document.getElementById("orderlistside").innerHTML=mySplitResult[1];setTimeout(function(){document.getElementById("button_"+mid).innerHTML=mySplitResult[0];document.getElementById("m_button_"+mid).innerHTML=mySplitResult[0]},1500)}};http.send(null)}function change_customer_product_code(mid,wf,des){refresh_persistent_login_cookie();var time="&amp;time="+(new Date).getTime();var id=get_cookie("ID");var login_number=get_cookie("persistent_login");var login_name=get_cookie("session_login");if(login_number==null){alert("You have been logged out");location.reload();return}var code=document.getElementById("customer_code_"+mid).innerHTML;if(code=="add code"){code=""}var message="Any product code that you save here will be used on all paperwork and labels for your order and any subsequent orders on this account. Leave the code blank to delete it from the account.";code=prompt(message+"\n\n"+wf+" - "+des+"\n\nPlease enter your product code for this item:",code);code=code.trim();code=code.replace(/\s+/g," ");var pattern=/^[a-z0-9,\.\-_= *#\/]+$/i;if(code===""){}else if(pattern.test(code)===false){alert("Product codes can only contain letters, numbers and the following characters ,.-_= *#/");return}var http2=false;if(navigator.appName=="Microsoft Internet Explorer"){http2=new ActiveXObject("Microsoft.XMLHTTP")}else{http2=new XMLHttpRequest}http2.open("POST",urls+"main2.pl",true);http2.setRequestHeader("Content-type","application/x-www-form-urlencoded");http2.onreadystatechange=function(){if(http2.readyState==4){var mySplitResult=http2.responseText.split("||||");var unforseen_errors=mySplitResult[0];var response_type=mySplitResult[1];var response_value=mySplitResult[2];if(response_type=="code"){var returned_code=response_value;if(returned_code===null||returned_code==""||returned_code=="null"){document.getElementById("customer_code_"+mid).innerHTML="add code"}else{document.getElementById("customer_code_"+mid).innerHTML=returned_code}}else if(response_type=="error"){alert(response_value);return}}};http2.send("sub=change_customer_product_code&amp;mid="+mid+"&amp;login_number="+login_number+"&amp;login_name="+login_name+"&amp;code="+code+"&amp;ID="+id+time)}</pre></body></html>