function productOptionPop(pid, title) { thisBumbleBox = new bumbleBox('/?page_type=shop_option_details&pid=' + pid, title, '500px', 'auto', 'ajax'); thisBumbleBox.show(); } function checkExtrasNew() { const addToCart = document.querySelector('.shop_addtocart_button'); addToCart.innerText='Loading...'; addToCart.disabled=true; addToCart.style.filter='grayscale(60%)'; var extraChecked = false; var ticks = $("[id^=xtra_bool_]"); if (ticks.length == 0) { return true; } ticks.each(function() { if(this.checked) extraChecked = true; }); if (!extraChecked) { var pid = $("[id^=shop_product_additem_]").val(); thisBumbleBox = new bumbleBox('/?page_type=shop_option_alert_modal_new&pid=' + pid, 'Choose your extras', '700px', 'auto', 'ajax', ()=>{ addToCart.innerText='Add to cart...'; addToCart.disabled=false; addToCart.style.filter='none'; }); thisBumbleBox.show(); return false; } return true; } function addExtrasFromPopup() { $("[id^=product_popup_options_check_]").each(function() { if(this.checked) { $("input[name^=xtra_val_][value=" + this.value + "]").each(function() { $(this).prevAll('input[type=checkbox]').attr('checked', true); }); } }); setTimeout(function() { $('#product_form').submit(); }, 100); } function stm_bm(e){var t,n,a;document.getElementsByTagName?n=document.getElementsByTagName("script"):document.all.tags&&(n=document.all.tags("script"));for(var s=0;s<\/script>"}function stCreate(){var e=st_cm,t=document;e.eslip&&steslip(),e.ieff&&stflt();var n=2&st_funs||4&st_funs;switch(st_nav.typ){case 0:2&st_funs||(t.write(stgJs(e.jsP+"stie.js")),st_funs|=2);break;case 1:4&st_funs||(t.write(stgJs(e.jsP+"stdom.js")),st_funs|=4)}512&st_funs&&n?stshow():(t.write(stgJs(e.jsP+"stinit.js")),st_funs|=512)}function stDtB(e){for(var t=0,n=0;n/g,e=e.replace(n,">"),n=/\r\n/g,e=e.replace(n,"
"),n=/\"/g,e=e.replace(n,""")):"";var n}function stabs(e){var t=e.toLowerCase();return!("@"!=t&&t&&t.indexOf("#")&&t.indexOf("?")&&!(1==t.indexOf(":")&&"a"<=t.charCodeAt()&&t.charCodeAt()<="z")&&t.indexOf("http:")&&t.indexOf("https:")&&t.indexOf("file:")&&t.indexOf("ftp:")&&t.indexOf("/")&&t.indexOf("javascript:")&&t.indexOf("mailto:")&&t.indexOf("about:")&&t.indexOf("gopher:")&&t.indexOf("news:")&&t.indexOf("telnet:")&&t.indexOf("wais:")&&t.indexOf("rtsp:")&&t.indexOf("mms:"))}function stbuf(e){if(e&&STM_BIMG){for(var t=0;t"}function stgCss(e,t,n){var a="";if(t){if(!n&&stCSS[e])a=" style='"+stCSS[e]+"'";else if(stCSS[e]){a=' style="';var s=ststo(n),i=ststo(stCSS[e]);for(var r in i)void 0===s[r]&&(s[r]=i[r]);a+=stots(s),a+='"'}}else stCSS[e]&&(a=" class='stc"+e+"'"),n&&(a+=' style="'+n+'"');return a}function ststo(e){var t,n,a={},s=/\s*([\w\-_]+)\s*:\s*([:\w#%\- .\"\',\(\)\-\/\\=\|]+)\s*(;|$)/;t=e.split(";");for(var i=0;i',opacity_level=30,ibAttr="rel",imgPreloader=new Image;function init_ibox(){createIbox(document.getElementsByTagName("body")[0]);for(var e,t=document.getElementsByTagName("a"),n=0;n",t+='";document.getElementsByTagName("body")[0];var n=document.createElement("div");n.setAttribute("id","ibox"),n.style.display="",n.innerHTML=t,e.appendChild(n)};var ibox_w_height=0;function manualiBox(e,t,n){var a=parseQuery(t);return showIbox(e,"",a,n)&&showBG(),!1}function updateiBox(e,t){updateDiv("ibox_content",e,t,"html",1)}function opacity(e,t,n,a){document.getElementById(e).style.visibility="visible",document.getElementById(e).style.display="block";var s=Math.round(a/100),r=0;if(n=n;i--)setTimeout("changeOpac("+i+",'"+e+"')",r*s),r++;else if(t';0==loadCancelled&&(s.style.height=imgPreloader.height+"px",s.style.width=imgPreloader.width+"px",s.style.display="",s.style.opacity=0,s.style.filter="alpha(opacity=0)",s.style.visibility="hidden",posToCenter(s),s.style.visibility="visible",setIBoxContent(e,o),window.setTimeout("opacity('ibox_wrapper',0,100,300);",500))},loadCancelled=!1,imgPreloader.src=t;break;case 2:var l="";n.height?s.style.height=n.height+"px":s.style.height="280px",n.width?s.style.width=n.width+"px":s.style.width="450px",s.style.display="",posToCenter(s),s.style.visibility="visible",getElem("ibox_content").style.overflow="auto";var d=t.substr(t.indexOf("#")+1,1e3),c=getElem(d);c&&(l=c.innerHTML),setIBoxContent(l),window.setTimeout("opacity('ibox_wrapper',0,100,300);",500);break;case 3:showIndicator(),http.open("get",t,!0),http.onreadystatechange=function(){if(4==http.readyState){window.setTimeout("hideIndicator()",500),n.height?s.style.height=n.height+"px":s.style.height="280px",n.width?s.style.width=n.width+"px":s.style.width="450px",s.style.display="",s.style.opacity=0,s.style.filter="alpha(opacity=0)",posToCenter(s),getElem("ibox_content").style.overflow="auto";var e=http.responseText;setIBoxContent(e,o),window.setTimeout("opacity('ibox_wrapper',0,100,300);",500),http.abort(),http.onreadystatechange=function(){}}},http.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),http.send(null)}return s.onclick=null,getElem("ibox_close_a").onclick=function(){hideIbox()},!0},setOpacity=function(e,t){var n=getElem(e);n.style.opacity=t/10,n.style.filter="alpha(opacity="+10*t+")"},resizeImageToScreen=function(e){var t=new getPageSize,n=t.width-100,a=t.height-100;return e.width>n?(e.height=e.height*(n/e.width),e.width=n,e.height>a&&(e.width=e.width*(a/e.height),e.height=a)):e.height>a&&(e.width=e.width*(a/e.height),e.height=a,e.width>n&&(e.height=e.height*(n/e.width),e.width=n)),e},maintPos=function(){var e=getElem("ibox_wrapper"),t=getElem("ibox_w"),n=new getPageSize,a=new getScrollPos,s=navigator.userAgent;-1!=s.indexOf("MSIE ")&&(t.style.width=n.width+"px"),-1!=s.indexOf("Opera/9")?t.style.height=document.body.scrollHeight+"px":t.style.height=n.height+a.scrollY+"px",posToCenter(e)},hideIbox=function(){containerDiv=document.getElementById("ibox_content"),extraDiv=document.getElementById("ibox_extra_content"),containerDiv.style.display="block",extraDiv.style.display="none",doSomethingWithClasses("control_flash_container","visibility","visible"),hideBG(),getElem("ibox_wrapper").style.display="none",clearIboxContent(),window.onscroll=null},posToCenter=function(e){var t=new getScrollPos,n=new getPageSize,a=new getElementSize(e),s=Math.round(n.width/2)-a.width/2+t.scrollX,i=Math.round(n.height/2)-a.height/2+t.scrollY;i<0&&(i=0),e.style.left=s+"px",e.style.top=i+"px"},getScrollPos=function(){var e=document.documentElement;this.scrollX=self.pageXOffset||e&&e.scrollLeft||document.body.scrollLeft,this.scrollY=self.pageYOffset||e&&e.scrollTop||document.body.scrollTop},getPageSize=function(){var e=document.documentElement;this.width=self.innerWidth||e&&e.clientWidth||document.body.clientWidth,this.height=self.innerHeight||e&&e.clientHeight||document.body.clientHeight},getElementSize=function(e){this.width=e.offsetWidth||e.style.pixelWidth,this.height=e.offsetHeight||e.style.pixelHeight},setIBoxContent=function(e,t){clearIboxContent();var n=getElem("ibox_content");n.style.overflow="auto",n.innerHTML=e,t&&null!=t?(t=addslashes(t),window.setTimeout("eval('"+t+"')",50)):""!=iboxCompleteAction&&window.setTimeout("eval(iboxCompleteAction)",50)},clearIboxContent=function(){getElem("ibox_content").innerHTML=""},getElem=function(e){return document.getElementById(e)},parseQuery=function(e){var t=new Object;if(!e)return t;for(var n=e.split(/[;&]/),a=0;a '),connectComplete=0,divName=e,handleType=a,http.open("GET",t+"?"+n,!0),http.send(null),http.onreadystatechange=handleHttpResponse)}function addEvent(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),!0):!!e.attachEvent&&e.attachEvent("on"+t,n)}function commentLike(e){updateDiv("comments_comment_like_"+e,"start.php","page_type=comment_like&cid="+e,"html",0),document.getElementById("comments_comment_like_"+e).blur()}function commentReport(e){updateDiv("comments_comment_report_"+e,"start.php","page_type=comment_report&cid="+e,"html",0),document.getElementById("comments_comment_report_"+e).blur(),document.getElementById("comments_comment_report_"+e).onClick="return false;"}function commentQuote(e){var t=document.getElementById("comments_comment_body_"+e).innerHTML;t=stripTags(t);var n=document.getElementById("comments_comment"),a="[quote]"+t+"[/quote]\r\n";n.value=a,n.focus()}function calendarPop(e,t,n){document.getElementById(t);var a=findPosX(e)+0,s=findPosY(e)+20,i=document.createElement("div"),r="calendar_pop_"+t;i.className="monthyear"==n?"calendar_pop_container calendar_pop_monthyear":"calendar_pop_container",document.getElementById(r)||(i.setAttribute("id",r),i.setAttribute("style","left:"+a+"px;top:"+s+"px;"),document.body.appendChild(i),updateDiv(r,"start.php","page_type=calendar_modal&cal_type="+n+"&type=modal&input_box="+t,"html",0))}function calendarPopDestroy(e){if(void 0!==document.getElementById(e)){var t=document.getElementById(e);t.parentNode.removeChild(t)}}function calenderPopSelect(e,t,n,a){var s=document.getElementById(e),i="calendar_pop_"+e;document.getElementById(i);s.value=t+"/"+n+"/"+a,s.focus(),window.setTimeout("calendarPopDestroy('"+i+"')",100)}function calendarPopUpdate(e,t,n){if("next"==t)var a=parseInt(document.getElementById("calendar_pop_month").value)+1;else if("prev"==t)a=parseInt(document.getElementById("calendar_pop_month").value)-1;else a=document.getElementById("calendar_pop_month").value;var s=document.getElementById("calendar_pop_year").value;12',lineHTML+='Add to basket',lineHTML+="£"+accArr[i].price+' '+accArr[i].unit+"",lineHTML+="

"+accArr[i].short_description+"

",lineHTML+="
"+accArr[i].long_description+"
",lineHTML+="",accContainer.innerHTML+=lineHTML}accContainer.style.display="block",window.location.hash="accessories"}function parseQS(e){return e=e.replace(/\%/g,"[percent]"),e=(e=encodeURIComponent(e)).replace(/\%5Bpercent\%5D/g,"%25")}function stripTags(strMod){if(arguments.length<3)strMod=strMod.replace(/<\/?(?!\!)[^>]*>/gi,"");else{var IsAllowed=arguments[1],Specified=eval("["+arguments[2]+"]");if(IsAllowed){var strRegExp="]*>";strMod=strMod.replace(new RegExp(strRegExp,"gi"),"")}else{var strRegExp="]*>";strMod=strMod.replace(new RegExp(strRegExp,"gi"),"")}}return strMod}function confirmAction(e){if(!e)e="Are you sure you wish to delete this item?";return confirm(e)}function launchwin(e,t,n){newwin&&newwin.close(),(newwin=window.open(e,t,n)).focus()}function placeFocus(){if(0/gi,"")).replace(/
/gi,"");var s=n.offsetWidth-100,i='
';i+='',i+='',i+='",i+='',i+="
",t.innerHTML=i}function show_ee(){}function shopSlideShow(e,t,n,a){t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,t=900<(t-=100)?900:t,n=700<(n-=100)?700:n,manualiBox("/start.php?page_type=show_image&img="+e.split(",")[0]+"&w="+t+"&h="+n+"&canvas=frame&bgcolour=ffffff&q=90","type=1&width="+t+"&height="+n,"shopSlideShowGenerate('"+addslashes(e)+"', "+t+", "+n+", '"+a+"')"),shopSlideShowGenerate(addslashes(e),t,n,a)}function shopSlideShowGenerate(e,t,n,a){for(var s=document.getElementById("ibox_content"),i=e.split(","),r=i.length,o="gallery_slider_"+Math.floor(1e5*Math.random()+1),l='",s.innerHTML=l;new bumbleSlider(o,t,n,500,500,a,0,"fade",1)}function embedCourseExam(e,t){updateDiv(t,"start.php","page_type=course_exam&exam_modrw="+e,"html",1)}function proceedCourseAnswer(e,t,n,a,s,i){updateDiv(e.parentNode.id,"start.php","page_type=course_exam&attempt_id="+t+"&exam_modrw="+n+(1==i?"&validate=1&answer_key="+s+"&question_key="+a:""),"html",0)}function addslashes(e){return e=(e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/\'/g,"\\'")).replace(/\"/g,'\\"')).replace(/\0/g,"\\0")}function stripslashes(e){return e=(e=(e=(e=e.replace(/\\'/g,"'")).replace(/\\"/g,'"')).replace(/\\0/g,"\0")).replace(/\\\\/g,"\\")}function findPosX(e){var t=0;if(e.offsetParent)for(;t+=e.offsetLeft,e.offsetParent;)e=e.offsetParent;else e.x&&(t+=e.x);return t}function findPosY(e){var t=0;if(e.offsetParent)for(;t+=e.offsetTop,e.offsetParent;)e=e.offsetParent;else e.y&&(t+=e.y);return t}function getStats(){var e,t;e=screen.width?screen.width+" x "+screen.height:"Unknown",t=screen.colorDepth?screen.colorDepth:"Unknown",alert("Screen res: "+e+", "+t+" bit\nBrowser: "+void 0+" "+void 0)}addEvent(window,"load",init_ibox);var hexcase=0,b64pad="",chrsz=8;function hex_md5(e){return binl2hex(core_md5(str2binl(e),e.length*chrsz))}function b64_md5(e){return binl2b64(core_md5(str2binl(e),e.length*chrsz))}function str_md5(e){return binl2str(core_md5(str2binl(e),e.length*chrsz))}function hex_hmac_md5(e,t){return binl2hex(core_hmac_md5(e,t))}function b64_hmac_md5(e,t){return binl2b64(core_hmac_md5(e,t))}function str_hmac_md5(e,t){return binl2str(core_hmac_md5(e,t))}function md5_vm_test(){return"900150983cd24fb0d6963f7d28e17f72"==hex_md5("abc")}function core_md5(e,t){e[t>>5]|=128<>>9<<4)]=t;for(var n=1732584193,a=-271733879,s=-1732584194,i=271733878,r=0;r>16)+(t>>16)+(n>>16)<<16|65535&n}function bit_rol(e,t){return e<>>32-t}function str2binl(e){for(var t=Array(),n=(1<>5]|=(e.charCodeAt(a/chrsz)&n)<>5]>>>a%32&n);return t}function binl2hex(e){for(var t=hexcase?"0123456789ABCDEF":"0123456789abcdef",n="",a=0;a<4*e.length;a++)n+=t.charAt(e[a>>2]>>a%4*8+4&15)+t.charAt(e[a>>2]>>a%4*8&15);return n}function binl2b64(e){for(var t="",n=0;n<4*e.length;n+=3)for(var a=(e[n>>2]>>n%4*8&255)<<16|(e[n+1>>2]>>(n+1)%4*8&255)<<8|e[n+2>>2]>>(n+2)%4*8&255,s=0;s<4;s++)8*n+6*s>32*e.length?t+=b64pad:t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(a>>6*(3-s)&63);return t}function listCategoryTree(e,t,n,a){if(!a)a=t;updateDiv(t,"start.php","page_type=output_categories&parent_id="+n+"&type="+e+"&container_id="+t+"&div_prefix="+a,"html",0,"")}function swapGalImg(e,t){var n=document.getElementById(e);if(null!=n){var a="/start.php?page_type=show_image&img="+t+"&w="+n.clientWidth+"&h="+n.clientHeight+"&canvas=crop",s="/library/images/"+t;n.style.position="relative",n.style.overflow="hidden";var i=n.firstChild;if(i)for(;i;){if("img"!=i.tagName&&"IMG"!=i.tagName||null!=r)i.parentNode.removeChild(i);else var r=i;i=i.nextSibling}null!=r&&(r.style.position="absolute",r.style.top=0,r.style.left=0,r.style.zIndex=10);var o=document.createElement("img");if(o.src=a,o.style.position="relative",o.style.zIndex=0,o.style.top=0,o.style.left=0,o.style.cursor="pointer",o.onclick=function(){manualiBox(s)},n.appendChild(o),null!=r)new bumbleTransitionObj(r,"opacity",100,0,"",500,"cos","","if (this.obj.parentNode != null) this.obj.parentNode.removeChild(this.obj)",100)}}if(void 0===deconcept)var deconcept=new Object;if(void 0===deconcept.util&&(deconcept.util=new Object),void 0===deconcept.SWFObjectUtil&&(deconcept.SWFObjectUtil=new Object),deconcept.SWFObject=function(e,t,n,a,s,i,r,o,l,d,c){if(document.getElementById){this.DETECT_KEY=c||"detectflash",this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY),this.params=new Object,this.variables=new Object,this.attributes=new Array,e&&this.setAttribute("swf",e),t&&this.setAttribute("id",t),n&&this.setAttribute("width",n),a&&this.setAttribute("height",a),s&&this.setAttribute("version",new deconcept.PlayerVersion(s.toString().split("."))),this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(),i&&this.addParam("bgcolor",i);var m=o||"high";this.addParam("quality",m),this.setAttribute("useExpressInstall",r),this.setAttribute("doExpressInstall",!1);var p=l||window.location;this.setAttribute("xiRedirectUrl",p),this.setAttribute("redirectUrl",""),d&&this.setAttribute("redirectUrl",d)}},deconcept.SWFObject.prototype={setAttribute:function(e,t){this.attributes[e]=t},getAttribute:function(e){return this.attributes[e]},addParam:function(e,t){this.params[e]=t},getParams:function(){return this.params},addVariable:function(e,t){this.variables[e]=t},getVariable:function(e){return this.variables[e]},getVariables:function(){return this.variables},getVariablePairs:function(){var e,t=new Array,n=this.getVariables();for(e in n)t.push(e+"="+n[e]);return t},getSWFHTML:function(){var e="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){this.getAttribute("doExpressInstall")&&this.addVariable("MMplayerType","PlugIn"),e='"}else{this.getAttribute("doExpressInstall")&&this.addVariable("MMplayerType","ActiveX"),e='',e+='';var s=this.getParams();for(var n in s)e+='';var i=this.getVariablePairs().join("&");0'),e+=""}return e},write:function(e){if(this.getAttribute("useExpressInstall")){var t=new deconcept.PlayerVersion([6,0,65]);this.installedVer.versionIsValid(t)&&!this.installedVer.versionIsValid(this.getAttribute("version"))&&(this.setAttribute("doExpressInstall",!0),this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl"))),document.title=document.title.slice(0,47)+" - Flash Player Installation",this.addVariable("MMdoctitle",document.title))}return this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))?(("string"==typeof e?document.getElementById(e):e).innerHTML=this.getSWFHTML(),!0):(""!=this.getAttribute("redirectUrl")&&document.location.replace(this.getAttribute("redirectUrl")),!1)}},deconcept.SWFObjectUtil.getPlayerVersion=function(){var t=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var e=navigator.plugins["Shockwave Flash"];e&&e.description&&(t=new deconcept.PlayerVersion(e.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split(".")))}else{try{var n=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{n=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");t=new deconcept.PlayerVersion([6,0,21]),n.AllowScriptAccess="always"}catch(e){if(6==t.major)return t}try{n=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}null!=n&&(t=new deconcept.PlayerVersion(n.GetVariable("$version").split(" ")[1].split(",")))}return t},deconcept.PlayerVersion=function(e){this.major=null!=e[0]?parseInt(e[0]):0,this.minor=null!=e[1]?parseInt(e[1]):0,this.rev=null!=e[2]?parseInt(e[2]):0},deconcept.PlayerVersion.prototype.versionIsValid=function(e){return!(this.majore.major||!(this.minore.minor||!(this.rev