function checkemail(A){if(A=="email address..."||A==""){alert("Please enter an email address...")}else{if(A.length<7||A.indexOf("@")==-1||A.indexOf(".")==-1){alert("Please enter a valid email address")}}}function submitFromHowToOrder(){document.frmAddToBasket.submit()}function check(A){var B=false;if(A.checked==1){B=true}else{for(n=0;n<A.length;n++){if(A[n].checked==1){B=true}}}if(!B){alert("You have not selected anything to put in your basket.\n\nIf you wish to add something to your basket,\ncheck the box(es) next to the desired product(s) then press\nthe 'add to basket' button.\n\nYou can always remove unwanted products later on.")}return B}function validateFrmQuestion(){var A=window.document.frmQuestion.strQuestion.value;var B=A.length;if(B>1000){alert("You have exceeded the maximum size for the enquiry box - please use a maximum of 1000 characters")}}function displayIt(G,F,D,A,E){if(document.getElementById(G)){var B=document.getElementById(G+"_a");var C=document.getElementById(G+"_img");document.getElementById(G).style.display="";if(B.href!=_warip+D){B.href=_warip+D}if(C.src!=_ip+A){C.src=_ip+A}}else{createIt(G,F,D,A,E)}}function hiddenIt(A){if(document.getElementById(A)){document.getElementById(A).style.display="none"}}function createIt(E,D,B,A,C){rw=document.createElement("tr");rw.id=E;cl=document.createElement("td");cl.setAttribute("colSpan",C);a=document.createElement("a");a.id=E+"_a";a.style.display="";a.href=_warip+B;a.target="_blank";img=document.createElement("img");img.id=E+"_img";img.src=_ip+A;a.appendChild(img);cl.appendChild(a);rw.appendChild(cl);D.appendChild(rw)}function checkMe(){var A=0}function toggleOther(){var A=document.getElementById("cbShowOthers");var B=document.getElementById("divOtherTargets");var C=document.getElementById("divModelSppTitle");if(A.checked){B.style.display="block";C.style.display="block"}else{B.style.display="none";C.style.display="none"}}function vSubmit(){if(document.msgForm.senderName.value.length==0){alert("Please enter your name");document.msgForm.senderName.focus();return }if(document.msgForm.senderEmail.value.length==0){alert("Please enter your email address");document.msgForm.senderEmail.focus();return }var C=/[^@\-\.\w]|^[_@\.\-]|[\._\-]{2}|[@\.]{2}|(@)[^@]*\1/;var A=/@[\w\-]+\./;var B=/\.[a-zA-Z]{2,3}$/;var D=document.msgForm.senderEmail.value;if(((D.search(C)!=-1)||(D.search(A))==-1)||(D.search(B)==-1)){alert("Please enter a valid email address");document.msgForm.senderEmail.focus();return }if(document.msgForm.messageText.value.length==0){alert("Please enter a message");document.msgForm.messageText.focus();return }document.msgForm.submit()}function getLotSpConc(A){if(!A||(!isInputNumber(A)&&!(A.toUpperCase().indexOf("GR")==0&&A.length>2))){alert("Please enter a numeric lot number!");return false}else{showDiv("divLoadingShow");document.getElementById("strLotNumber").disabled=true;hideDiv("divBtnShow");$.AjaxCFC({useDefaultErrorHandler:false,type:"GET",url:"/assets/aj/DatasheetSectionsAjax.cfc",method:"glsc",data:{ilotID:A},serialization:"json",success:function(B){showme(B)}})}}function showme(D){hideDiv("divLoadingShow");document.getElementById("strLotNumber").disabled=false;if(D.sr!="N/A"){document.getElementById("strDivConc").value=D.sr;showDiv("divShowConcentration");document.getElementById("strDivLotNumber").innerHTML=D.lid;document.getElementById("strDivConc").innerHTML=D.sr+" mg/ml";hideDiv("divShowForm");hideDiv("divShowConcNotFound")}else{var B="I require the concentration for the lot no. "+D.lid;var E="Make a technical enquiry?";var F="&intAbID="+document.getElementById("strAbId").value;var C="<a rel='nofollow' href='index.html?pageconfig=technical&mode=questionaire&section=presales&txtEnquiry=";var A="'>"+E+"</a>";document.getElementById("linkPlaceHolder").innerHTML=C+B+F+A;showDiv("divShowConcNotFound");hideDiv("divShowConcentration");hideDiv("divShowForm")}}function showDiv(A){document.getElementById(A).style.display="inline"}function hideDiv(A){document.getElementById(A).style.display="none"}function isInputNumber(A){var B="0123456789";for(i=0;i<A.length;i++){if(B.indexOf(A.charAt(i))==-1){return false}}return true}function getLabels(A){$("#shippingTitle").html(A.SHIPPINGTITLE);$("#strFreightTitle").html(A.STRFREIGHTTITLE);$("#strLocalDeliveryTitle").html(A.STRLOCALDELIVERYTITLE);$("#contactUsTitle").html(A.CONTACTUSTITLE);$("#contactUs_Tel_Title").html(A.CONTACTUS_TEL_TITLE);$("#contactUs_Fax_Title").html(A.CONTACTUS_FAX_TITLE);$("#contactUs_Email_Title").html(A.CONTACTUS_EMAIL_TITLE)}function emailStockNotify(A,B){$.AjaxCFC({useDefaultErrorHandler:false,type:"GET",url:"/assets/aj/inStockNotify/inStockNotifyAjax.cfc",method:"isna",data:{ia:A,iu:B},dataType:"html",success:function(C){isn_result(C)}})}function isn_result(A){var B=JSON.parse(A);$("#emailStock").css("font-weight","bold");$("#emailStock").html("You will receive an email when this product is in stock.")}function getAllAjaxData(A,B){$.AjaxCFC({useDefaultErrorHandler:false,type:"GET",url:"/assets/aj/pricingAjax.cfc",method:"gai",data:{iai:A,htoc:B},dataType:"html",success:function(C){getLabels(C.SL);getAllAjaxData_result(C)}})}function updateIntAbPriceID(A){document.frmAddToBasket.intAbPriceId.value=A}function hideMe(A){if(document.getElementById(A)!=null){document.getElementById(A).display="none"}}function submitFromHowToOrder(){document.frmAddToBasket.submit()}function resetTable(){var A=document.getElementById("availabilityPriceTable").tBodies[0];var C=A.rows;while(C.length>1){var B=C[C.length-1];A.removeChild(B)}}function getAllAjaxData_result(A){$("#availabilityPriceTable").css("width","100%");$("#shippingHolder").hide();$("#strFreight").html("");$("#pleaseWait").hide();resetTable();$("#countryPleaseWaitHolder").hide();fileNamePromoBanner="";fileNamePromo="";intNumberOfAbPrices=A.SPD.ARRP.length;strLanguage=A.LAN;strCountry2LCode=A.HTOC;fStockProblem=A.SAD.FPRBSTOCK;for(i=0;i<intNumberOfAbPrices;i++){intAbId=A.SPD.ARRP[i].ABID;strSize=A.SPD.ARRP[i].SNGABMVU;intPoints=A.SPD.ARRP[i].INTPNTS;strHtml=A.SAD.STRHTML;strPrice=A.SPD.ARRP[i].STRPR;intAbPriceId=A.SPD.ARRP[i].INTABPRID;fBarred=A.SAD.FBAR;fUSDA=A.SAD.FUSDA;strAmberPromo=A.SPD.ARRP[i].STRAMBERPROMO;strPromoText=A.SPD.ARRP[i].SGPROMO.STRPROMOTEXT;strPromoLink=A.SPD.ARRP[i].SGPROMO.INTRIDTERMSCONDITLINK;fileNamePromoBanner=A.SPD.ARRP[i].SGPROMO.FILENAMEPROMOBANNER;fInStock=A.SAD.FINSTOCK;fGuest=A.SUD.FG;uid=A.SUD.UID;strPanelInfoText=A.SPD.PNL.PNLTEXT;strPanelInfoLink=A.SPD.PNL.PNLLINK;strHowToOrderCountry=A.HTOC;if(!fInStock&&!fBarred&&!fUSDA&&(fStockProblem!=0)){if(!fGuest){strButtonText='<br/> <img src="/ps/images/email.jpg"> <span id="emailStock"> <input type="button" id="btnOutOfStockEmail"  class="button normal" value="Email me" onClick="emailStockNotify(intAbId,uid);"> when Stock is available </span>'}else{strButtonText='<br/><a href="index.html?pageconfig=your_account">Login</a> to be notified of stock'}strHtml=strHtml+strButtonText}if(!fBarred&&!fUSDA&&strPrice.length!=0&&strPromoText!=null&&strPromoText.length!=0){strPromoTextTemp='<div id="promoText">';strPromoTextTemp=strPromoTextTemp+'<a href="/index.html?pageconfig=resource&rid='+strPromoLink+'"> '+strPromoText+"</a></div>";strHtml=strHtml+strPromoTextTemp}$("promoBannerHolderLink").hide();src="";$("#promoBannerHolder").css("backgroundImage","url("+src+")");$("#promoBannerHolder").css("height","0px");$("#promoBannerHolder").css("width","0px");if(!fUSDA&&fileNamePromoBanner!=null&&fileNamePromoBanner.length!=0){if(strPromoLink!=null&&strPromoLink.length!=0){strBannerHolderLinkURL="/index.html?pageconfig=resource&rid="+strPromoLink;theLinkElement=document.getElementById("promoBannerHolderLink");if(theLinkElement!=null){theLinkElement.href=strBannerHolderLinkURL}$("promoBannerHolderLink").show();$("promoBannerHolder").show();src=fileNamePromoBanner;$("#promoBannerHolder").css("backgroundImage","url("+src+")");$("#promoBannerHolder").css("width","750px");$("#promoBannerHolder").css("height","70px");$("#promoBannerHolder").css("textalign","middle");$("#promoBannerHolder").css("background-repeat","no-repeat")}}if(strPanelInfoText!=null&&strPanelInfoText.length>0){$("#PanelComponentHolder").html(strPanelInfoText)}if(strLanguage.toLowerCase()=="ja"){strBasketGraphic="addtobasket_ja"}else{strBasketGraphic="addtobasket_en"}strButtonTextBegin='<span class="mylink"><img src="/ps/images/'+strBasketGraphic+'_up.gif" onClick="updateIntAbPriceID(';strButtonTextEnd=');submitFromHowToOrder();"></span>';if(intPoints>0){$("#AbPoints").html("Abpoints");strPoints="<td>"+intPoints+"&nbsp;points</td>"}else{$("#AbPoints").html("");strPoints="<td></td>"}if(!(strPrice.length==0||fBarred==1||fUSDA==1)){if(strHowToOrderCountry=="CN"){$("#Availability").show();$("#Price").show();$("#availabilityPriceTable").append("<tr><td>ab"+intAbId+"</td><td> "+strSize+"</td><td>"+strPrice+"</td>"+strPoints+"<td> "+strHtml+"</td></tr>")}else{$("#Availability").show();$("#Price").show();$("#availabilityPriceTable").append("<tr><td>ab"+intAbId+"</td><td> "+strSize+"</td><td>"+strPrice+"</td>"+strPoints+"<td> "+strHtml+"</td><td>"+strButtonTextBegin+intAbPriceId+strButtonTextEnd+"</td></tr>")}}else{$("#Price").hide();$("#orderOnline").hide();$("#availabilityPriceTable").append("<tr><td>ab"+intAbId+"</td><td> "+strSize+'</td><td align="center" colspan="4">'+strHtml+"</td></tr>")}}if(A.FDIST==0){$("#strFreightTitle").show();$("#shippingHolder").show();$("#shippingText").hide();$("#contactUsHolder").show();$("#strFreight").show();$("#strFreightTitle").show();$("#strLocalDeliveryTitle").show();$("#strLocalDelivery").show();$("#shippingText").html("");if(A.SPD.STRNOTES!=null&&A.SPD.STRNOTES.length>0){$("#notesHolder").html(A.SPD.STRNOTES)}else{$("#notesHolder").html("")}if(A.SPD.FREI.length>0){$("#shippingHolder").show();$("#shippingText").show();$("#strFreightTitle").show();$("#strFreight").show();$("#strFreight").html(A.SPD.FREI)}if(A.SPD.LCLDEL.length){$("#shippingText").show();$("#strLocalDeliveryTitle").show();$("#strLocalDelivery").show();$("#strLocalDelivery").html(A.SPD.LCLDEL)}else{$("#strLocalDeliveryTitle").hide();$("#strLocalDelivery").html("")}if(A.SPD.STRMESSAGE!=null&&A.SPD.STRMESSAGE.length){$("#shippingTitle").html("Order Information");$("#strFreightTitle").hide();$("#shippingHolder").show();$("#shippingText").show();$("#strFreight").html(A.SPD.STRMESSAGE)}if(A.SPD.FREI.length+A.SPD.LCLDEL.length==0){hideMe("shippingHolder")}$("#contactUsHolder").show();$("#contactUs_Tel").html(A.SOD.TMPTEL);$("#contactUs_Email").html(A.SOD.TMPMAILTO);$("#contactUs_Fax").html(A.SOD.TMPFAX)}else{$("#shippingText").hide();$("#strFreightTitle").hide();$("#shippingHolder").hide();$("#contactUsHolder").hide();$("#strLocalDeliveryTitle").html("");$("#strLocalDelivery").html("");if(fStockProblem){$("#Price").hide();if(strHtml.length>0){$("#Availability").show()}}else{if(A.SPD.DISTTEXT.length>0){var B="";if(A.SPD.ATS.length){B='<form action="/index.html?pageconfig=contactus" method="post"><select name="regionWithinCountry">';for(i=0;i<A.SPD.ATS.length;i++){B+='<option value="'+A.SPD.ATS[i].TID+'">'+A.SPD.ATS[i].TN+"</option>"}B+='</select><input type="hidden" value="'+A.HTOC+'" name="howToOrderCountry" id="howToOrderCountry"><input type="submit" value="Go"></form>'}$("#availabilityPriceTable").css("width","59%");$("#shippingHolder").show();$("#shippingTitle").show();$("#shippingTitle").html("Distributor Details");$("#strFreight").html(A.SPD.DISTTEXT+B)}}}$("#availabilityPriceTable").show();$("#availabilityPriceTableHolder").slideDown(600);$(".mylink img").hover(function(){this.src=this.src.replace("_up","_down")},function(){this.src=this.src.replace("_down","_up")})}var canSendAjax=true;function logCrossSellingClick(A){if(canSendAjax){$.AjaxCFC({useDefaultErrorHandler:false,type:"GET",url:"/assets/aj/crossSelling2010.cfc",method:"lv",data:{uqid:A},dataType:"html",success:function(){}});canSendAjax=false;setTimeout("canSendAjax=true;",2000)}}function getCrossSelling(A){$.AjaxCFC({useDefaultErrorHandler:false,type:"GET",url:"/assets/aj/crossSelling2010.cfc",method:"gcsi",data:{pid:A},dataType:"html",success:function(C){if(C.TID!=undefined){$("#crossSellTitle").html("<a rel='nofollow' href='"+C.PL+"' onclick='logCrossSellingClick("+C.TID+");'>"+C.DN+"</a>");if((C.AA!=undefined)&&(C.AA.length>0)){var B="";for(i=0;i<C.AA.length;i++){B+='<abbr title="'+C.AA[i].SD+'">'+C.AA[i].SN+"</abbr>";if(i!=(C.AA.length-1)){B+=", "}}$("#crossSellapplications").html(B)}else{if(C.RV>0){$("#crossSellAbreviews").html("<a class='dsIcon rating "+(C.ASR||"star")+"' rel='nofollow' href='"+C.PAL+"' onclick='logCrossSellingClick("+C.TID+");'>"+C.RV+" review"+((C.RV>1)?("s"):(""))+"</a>")}if(C.RF>0){$("#crossSellReferences").html("<a class='dsIcon referencesIcon' rel='nofollow' href='"+C.PRL+"' onclick='logCrossSellingClick("+C.TID+");'>"+C.RF+" reference"+((C.RF>1)?("s"):(""))+"</a>")}if(C.IM>0){$("#crossSellImages").html("<a class='dsIcon imageIcon' rel='nofollow' href='"+C.PL+"#"+getImageFileName(C.IURL)+"' onclick='logCrossSellingClick("+C.TID+");'>"+C.IM+" image"+((C.IM>1)?("s"):(""))+"</a>");$("#imgDSContainer").fadeIn("fast")}}if(C.IURL.length>0){$("#imgDSContainer").html("<a title='"+C.DN+"' class='preview' onclick='logCrossSellingClick("+C.TID+");' href='"+C.PL+"#"+getImageFileName(C.IURL)+"' rel='"+C.IURL+"'><img style='width:140px;' alt='"+C.DN+"' src='"+C.IURL+"' class='alignleft'></a>")}imagePreview();$("#crossSellingBox").fadeIn("slow")}}})}function getImageFileName(A){if(A.length&&A.indexOf("/",0)!=-1){var B=A.split("/");return B[B.length-1]}else{if(A.length&&A.indexOf("\\",0)!=-1){var B=A.split("\\");return B[B.length-1]}}return""};
