function ajaxMe(destObj,theURL){var httpRequest;var theDest=document.getElementById(destObj);theURL+='&ajMode=ajaxReq&ajDt='+new Date().valueOf().toString();if(window.XMLHttpRequest){httpRequest=new XMLHttpRequest();if(httpRequest.overrideMimeType){httpRequest.overrideMimeType('text/xml');}}else if(window.ActiveXObject){try{httpRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{httpRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}if(!httpRequest){return true;}httpRequest.onreadystatechange=function(){ajaxContents(httpRequest,theDest);};httpRequest.open('GET',theURL,true);httpRequest.send('');return false;}function ajaxPostMe(destObj,theURL,theParams){var httpRequest;var theDest=document.getElementById(destObj);if(window.XMLHttpRequest){httpRequest=new XMLHttpRequest();if(httpRequest.overrideMimeType){httpRequest.overrideMimeType('text/xml');}}else if(window.ActiveXObject){try{httpRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{httpRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}if(!httpRequest){return true;}httpRequest.onreadystatechange=function(){ajaxContents(httpRequest,theDest);};httpRequest.open('POST',theURL,true);httpRequest.setRequestHeader("Content-type","application/x-www-form-urlencoded");httpRequest.setRequestHeader("Content-length",theParams.length);httpRequest.setRequestHeader("Connection","close");httpRequest.send(theParams);return false;}function ajaxContents(httpRequest,theDest){if(httpRequest.readyState==4){if(httpRequest.status==200){theDest.innerHTML = httpRequest.responseText;}else{theDest.innerHTML="Whoops, something didn't quite work there";}}}function inputCounter(valObj,outObj){outObj.innerHTML=String(Number(valObj.getAttribute('MAXLENGTH'))-valObj.value.length);}function wPop(obj){window.open(obj.href,"RefreshWindow");return false;}function clock(){var today=new Date();var y=today.getFullYear();var j=today.getMonth();var d=today.getDate();var h=today.getHours();var m=today.getMinutes();var s=today.getSeconds();h=padTens(h);m=padTens(m);s=padTens(s);document.getElementById('clock').innerHTML=d+"<sup>"+numberLetters(d)+"</sup>"+theMonths(j)+y+" "+h+":"+m+":"+s;t=setTimeout('clock();',1000);}function padTens(i){if(i<10)i="0"+i;return i;}function numberLetters(i){var string='';switch(i){case 1:case 21:case 31:string='st ';break;case 2:case 22:string='nd ';break;case 3:case 23:string='rd ';break;default:string='th ';break;}return string;}function theMonths(i){var string='';switch(i){case(0):string='January ';break;case(1):string='February ';break;case(2):string='March ';break;case(3):string='April ';break;case(4):string='May ';break;case(5):string='June ';break;case(6):string='July ';break;case(7):string='August ';break;case(8):string='September ';break;case(9):string='October ';break;case(10):string='November ';break;case(11):string='December ';break;}return string;}function mailValidate(){var errs=true;document.getElementById('divAlert').style.top=String(getScrollY()+(window.screen.availHeight/2)-300)+'px';document.getElementById('alertName').innerHTML='';document.getElementById('alertEMail').innerHTML='';document.getElementById('alertNumber').innerHTML='';document.getElementById('alertContent').innerHTML='';if(document.getElementById('mailName').value==''){errs=false;document.getElementById('alertName').innerHTML='Please enter your name.';}if(document.getElementById('mailEMail').value==''){errs=false;document.getElementById('alertEMail').innerHTML='Please enter your email.';}if(document.getElementById('mailNumber').value==''){errs=false;document.getElementById('alertNumber').innerHTML='Please enter your number.';}if(document.getElementById('mailContent').value==''){errs=false;document.getElementById('alertContent').innerHTML='Please enter a message.';}return errs;}function jRm(obj){createCookie(obj.name,obj.value,7);}function jLd(){document.getElementById("mailName").value=readCookie("mailName");document.getElementById("mailEMail").value=readCookie("mailEMail");document.getElementById("mailNumber").value=readCookie("mailNumber");document.getElementById("mailContent").value=readCookie("mailContent");}function jCl(obj){obj.getElementById("mailName").value='';obj.getElementById("mailEMail").value='';obj.getElementById("mailNumber").value='';obj.getElementById("mailContent").value='';eraseCookie("mailName");eraseCookie("mailEMail");eraseCookie("mailNumber");eraseCookie("mailContent");}function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}else var expires="";value=value.replace(/\r\n/gi,"\r").replace(/\n/gi,"\r").replace(/\r/gi,"<br />");document.cookie=name+"="+value+expires+"; path=/";}function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length).replace(/\<br \/\>/gi,"\r\n");}return"";}function eraseCookie(name){createCookie(name,"",-1);}function mnExp(obj){mnExpdr=obj.nextSibling;if(!mnExpdr.style.width){mnExpdr.style.width="0px";mnExpdr.style.borderRight="0";}mnTO=setTimeout("mnExp2();",35);}function mnExp2(){var cur=Number(mnExpdr.style.width.replace("px",""));var diff=mnGp(cur);var newWidth=cur+diff;if(newWidth<=mnMWdt){mnExpdr.style.width=newWidth+"px";mnMM(diff);mnTO=setTimeout("mnExp2();",35);}else{mnExpdr.style.width=mnMWdt+"px";mnExpdr.style.borderRight="1px solid #fff";mnExpdr.childNodes[0].style.display="inline";mnMM(diff);}}function mnGp(cur){var theDiff=(mnMWdt-(2*cur))/(0-mnMWdt);if(theDiff<=0){theDiff=theDiff+1;}else{theDiff=theDiff-1;}theDiff=theDiff*theDiff;theDiff=(15*theDiff)+2;return theDiff;}function mnMM(diff){var theNodes=mnExpdr.parentNode.childNodes;for(var i=0;i<theNodes.length;i++){if(theNodes[i].nodeName.toUpperCase()=="DIV"){if(theNodes[i]!=mnExpdr){theNodes[i].childNodes[0].style.display="none";if(!theNodes[i].style.width){theNodes[i].style.width="0px";theNodes[i].style.borderRight="0";}else{var thisWidth=Number(theNodes[i].style.width.replace("px",""));if(thisWidth-diff>=0){var thisNew=thisWidth-diff;theNodes[i].style.width=thisNew+"px";}else{theNodes[i].style.width="0px";theNodes[i].style.borderRight="0";}}}}}}function flashFader(){var theName="";var padTp=0;var padLt=0;var padRt=0;switch(theAd){case 1:theName="fBk1";if(theOpaq==0)theAd=2;padTp=25+2*theOpaq;padRt=30+(100-theOpaq)*(100-theOpaq)/40;break;case 2:theName="fBk2";if(theOpaq==0)theAd=3;padTp=225-2*theOpaq;padLt=25+theOpaq*theOpaq/32;break;case 3:theName="fBk3";if(theOpaq==0)theAd=4;padTp=25+2*theOpaq;padRt=50+(50-theOpaq)*(50-theOpaq)/8;break;case 4:theName="fBk4";if(theOpaq==0)theAd=5;padTp=215-2*theOpaq;padLt=25+(100-theOpaq)*(100-theOpaq)/25;break;case 5:theName="fBk5";if(theOpaq==0)theAd=6;padTp=42+2*theOpaq;padRt=80+theOpaq*theOpaq/40;break;case 6:theName="fBk6";if(theOpaq==0)theAd=1;padTp=205-2*theOpaq;padLt=75+(50-theOpaq)*(50-theOpaq)/8;break;}theObj=document.getElementById(theName);if(theOpaq==0){theObj.style.display="none";document.getElementById("flashDiv").style.background="url(/resources/"+theName+".jpg) top left no-repeat transparent";}else{theObj.style.display="block";theObj.childNodes[0].style.paddingTop=padTp+"px";if(padLt!=0)theObj.childNodes[0].style.paddingLeft=padLt+"px";if(padRt!=0)theObj.childNodes[0].style.paddingRight=padRt+"px";}setOpacity(theObj,theOpaq);theOpaq+=1;if(theOpaq==100){theOpaq=0;setTimeout("flashFader()",835);}else{setTimeout("flashFader()",35);}}function setOpacity(obj,value){obj.style.opacity=value/100;obj.style.filter="alpha(opacity="+value+")";}function showSubMenu1(){clearSubTo();document.getElementById('subMenuInner').style.display='block';document.getElementById('subMenuInner').innerHTML=document.getElementById("subMenHid1").innerHTML;document.getElementById('subMenuInner').style.backgroundColor='#9CC0EE';}function showSubMenu2(){clearSubTo();document.getElementById('subMenuInner').style.display='block';document.getElementById('subMenuInner').innerHTML=document.getElementById("subMenHid2").innerHTML;document.getElementById('subMenuInner').style.backgroundColor='#75CF91';}function showSubMenu3(){clearSubTo();document.getElementById('subMenuInner').style.display='block';document.getElementById('subMenuInner').innerHTML=document.getElementById("subMenHid3").innerHTML;document.getElementById('subMenuInner').style.backgroundColor='#EBBC60';}function showSubMenu4(){clearSubTo();document.getElementById('subMenuInner').style.display='block';document.getElementById('subMenuInner').innerHTML=document.getElementById("subMenHid4").innerHTML;document.getElementById('subMenuInner').style.backgroundColor='#D65D7A';}function showSubMenu5(){clearSubTo();document.getElementById('subMenuInner').style.display='block';document.getElementById('subMenuInner').innerHTML=document.getElementById("subMenHid5").innerHTML;document.getElementById('subMenuInner').style.backgroundColor='#746D61';}function clearSubTo(){clearTimeout(theSubTo);}function clearSubs(){theSubTo=setTimeout("document.getElementById('subMenuInner').style.display='none';",500);}function hideSubs(){document.getElementById("subMenHid1").style.display='none';document.getElementById("subMenHid2").style.display='none';document.getElementById("subMenHid3").style.display='none';document.getElementById("subMenHid4").style.display='none';document.getElementById("subMenHid5").style.display='none';}function prodDesc(){document.getElementById('theProdImag').style.display='none';document.getElementById('theProdSpec').style.display='none';document.getElementById('theProdPric').style.display='none';document.getElementById('theProdDesc').style.display='block';}function prodSpec(){document.getElementById('theProdImag').style.display='none';document.getElementById('theProdDesc').style.display='none';document.getElementById('theProdPric').style.display='none';document.getElementById('theProdSpec').style.display='block';}function prodImag(obj){document.getElementById('theProdSpec').style.display='none';document.getElementById('theProdDesc').style.display='none';document.getElementById('theProdPric').style.display='none';document.getElementById('theProdImag').style.display='block';document.getElementById('theProdImag').innerHTML='<img src="'+obj.childNodes[0].src.replace('thumb','full')+'" />';}function prodPric(){document.getElementById('theProdImag').style.display='none';document.getElementById('theProdDesc').style.display='none';document.getElementById('theProdSpec').style.display='none';document.getElementById('theProdPric').style.display='block';}function prodCatFilt(obj,theID,theName,theURL){theURL='/ajax/product.php?search='+encodeURIComponent(obj.value)+'&catID='+String(theID)+'&catName='+theName+'&catURL='+theURL;ajaxMe("spProdCatFilt",theURL);}function showConfig(){document.getElementById('divConfig').style.display='block';document.getElementById('divConfig').style.top=String(getScrollY()+(window.screen.availHeight/2)-100)+'px';}function showCO(){divAlt=document.getElementById('divAlert');divAlt.innerHTML='';divAlt.style.padding='0';divAlt.style.display='block';divAlt.style.top=String(getScrollY()+(window.screen.availHeight/2)-300)+'px';divAlt.style.color="#000";divAlt.style.fontSize='14px';}function closeConfig(){document.getElementById('divConfig').style.display='none';}function getScrollY(){var scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;}return scrOfY;}function loginCO(){ajaxPostMe('divAlert','/ajax/loginOrAddress.php','login=true&user='+encodeURIComponent(document.getElementById('LCustomerEMail').value)+'&pass='+encodeURIComponent(document.getElementById('LCustomerEMail').value));}function addressCO(){ajaxPostMe('divAlert','/ajax/loginOrAddress.php','addr=true'+mkPm('BillingFirstnames')+mkPm('BillingSurname')+mkPm('BillingAddress1')+mkPm('BillingAddress2')+mkPm('BillingCity')+mkPm('BillingPostCode')+mkPm('BillingCountry')+mkPm('BillingState')+mkPm('BillingPhone')+mkPm('CustomerEMail')/*+mkPm('CustomerPassword')*/)};function mkPm(elID){resp='';if(document.getElementById(elID))resp='&'+elID+'='+encodeURIComponent(document.getElementById(elID).value);return resp;}var theSubTo;var mnExpdr=null;var mnMWdt=200;var theOpaq=0;var theAd=6;