function closeorredirect(elementid,url){if(document.getElementById(elementid).className=='SubNavGroupCurrent'){document.getElementById(elementid).className='SubNavGroup';}else{document.location.href=url;}}
function featuredbrandsrollover(divid,strimg){if(strimg==2){newimg="url('http://img.boundarybathrooms.co.uk/Buttons/Blue_02.jpg')";}
if(strimg==1){newimg="url('http://img.boundarybathrooms.co.uk/Buttons/Blue_01.jpg')";}
document.getElementById(divid).style.backgroundImage=newimg;}
function showHideDiv(divid){if(document.getElementById(divid)){if(document.getElementById(divid).style.display==""){document.getElementById(divid).style.display="none";}else{document.getElementById(divid).style.display="";}}}
function getBrowserWidth(){var viewportwidth;var viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}
return viewportwidth;}
function adjustLayers(){var browserWidth;var browserCenter;var menusLeft
browserWidth=getBrowserWidth();browserCenter=Math.round(browserWidth/2);menusLeft=browserCenter-490
if(menusLeft<0){menusLeft=0;}
x=document.getElementById("head_menu")
x.style.paddingLeft=menusLeft+"px";x.style.visibility='visible';x=document.getElementById("shop_form")
document.getElementById("shop_form_text").style.marginLeft=menusLeft + "px";x.style.visibility='visible';if(x=document.getElementById("body_list")){var productWidth
var productRow
var productLeft
productWidth=browserWidth-368;if(productWidth>1044){productRow=6;}else if(productWidth>870){productRow=5;}else if(productWidth>696){productRow=4;}else{productRow=3;}
productLeft=Math.round((productWidth-(productRow*174))/2);productLeft=String(productLeft-12);if(productLeft<0){productLeft=0;}
x.style.paddingLeft=productLeft+"px";}}
function loadMap(){if(GBrowserIsCompatible()){function createMarker(point,number){var marker=new GMarker(point);GEvent.addListener(marker,"click",function(){marker.openInfoWindowHtml("<b>Boundary Bathrooms</b><br />Ainsworth and Dent House<br />Regent Street<br />Colne<br />Lancashire<br />BB8 8LD");});return marker;}
var map=new GMap2(document.getElementById("map"));map.setCenter(new GLatLng(53.85013,-2.19563),13);map.addControl(new GSmallMapControl());map.addControl(new GMapTypeControl());map.setMapType(G_MAP_TYPE);var point=new GLatLng(53.85013,-2.19563);map.addOverlay(createMarker(point,1));}}
function focusContact(){document.contactus_form.contact_name.focus();}
function trimStr(str){while(str.charAt(0)==(" ")){str=str.substring(1);}
while(str.charAt(str.length-1)==" "){str=str.substring(0,str.length-1);}
return str;}
function checkemailaddress(inputbox){var teststring
teststring=inputbox.toString()
if(inputbox==""){return 1002}
if(teststring.length<=6){return 1002}
var illegalchrs=new Array("*","£","$","!")
var counter
for(counter=0;counter<=illegalchrs.length;counter++){if(teststring.indexOf(illegalchrs[counter])!=-1){return 1002}}
var atpositionback=teststring.lastIndexOf("@")
var dotpositionback=teststring.lastIndexOf(".")
var atpositionfront=teststring.indexOf("@")
if(atpositionback==-1){return 1002}
if(dotpositionback==-1){return 1002}
if(atpositionfront!=atpositionback){return 1002}
if(atpositionback>dotpositionback){return 1002}
return 0}
function checkContact(){if(trimStr(contactus_form.contact_name.value)==""){alert("Please provide your name");contactus_form.contact_name.focus();contactus_form.contact_name.select();return false;}
if(trimStr(contactus_form.contact_email.value)==""){alert("Please provide your email");contactus_form.contact_email.focus();contactus_form.contact_email.select();return false;}
if(checkemailaddress(contactus_form.contact_email.value)!=0){alert("Please provide a valid email");contactus_form.contact_email.focus();contactus_form.contact_email.select();return false;}
if(trimStr(contactus_form.contact_phone.value)==""){alert("Please provide your telephone number");contactus_form.contact_phone.focus();contactus_form.contact_phone.select();return false;}
return true;}
function makeRequest(script_src,script_qry,element_id){var http_request=false;var url=script_src;url=url+"?"+script_qry;if(window.XMLHttpRequest){http_request=new XMLHttpRequest();if(http_request.overrideMimeType){http_request.overrideMimeType('text/xml');}}else if(window.ActiveXObject){try{http_request=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{http_request=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}
if(!http_request){alert('Giving up :( Cannot create an XMLHTTP instance');return false;}
http_request.onreadystatechange=function(){showResult(http_request,element_id);};http_request.open('GET',url,true);http_request.send(null);}
function showResult(http_request,element_id){if(http_request.readyState==4){if(http_request.status==200){x=document.getElementById(element_id);x.innerHTML='';x.innerHTML=http_request.responseText;}else{x=document.getElementById(element_id);x.innerHTML='';x.innerHTML='Operation Failed';}}}
function clearResult(element_id){x=document.getElementById(element_id);x.innerHTML='';}
function getCatBrandMenu(cat_id){if(cat_id==undefined)
{cat_id=document.field_search.searchCatTypeID.value;}
var script_src="/bb-ajax.asp";var element_id="brandSelect";var script_qry="menu=brand_cattype&id="+cat_id;makeRequest(script_src,script_qry,element_id);var element_id="rangeSelect";var script_qry="menu=range&id=0"
makeRequest(script_src,script_qry,element_id);}
function getSubBrandMenu(){var script_src="/bb-ajax.asp";var element_id="brandSelect";var script_qry=""
if(document.field_search.searchSubTypeID.value=="")
{script_qry="menu=brand_cattype&id="+document.field_search.searchCatTypeID.value;}else{script_qry="menu=brand_subtype&id="+document.field_search.searchSubTypeID.value;}
makeRequest(script_src,script_qry,element_id);var element_id="rangeSelect";var script_qry="menu=range&id=0";makeRequest(script_src,script_qry,element_id);}
function getSubTypeMenu(row_id){if(row_id==0){var script_src="/bb-ajax.asp";var element_id="subTypeSelect";var script_qry="menu=subType&id="+document.field_search.searchCatTypeID.value+"&row="+row_id;getCatBrandMenu(document.field_search.searchCatTypeID.value);}else{var script_src="/bb-ajax.asp";var element_id="subTypeSelect";if(row_id==2){var script_qry="menu=subType&id="+document.RTEDemo.catTypeID.value+"&row="+row_id;}else{var script_qry="menu=subType&id="+document.field_search.catTypeID.value+"&row="+row_id;}}
makeRequest(script_src,script_qry,element_id);}
function getRangeMenu(row_id){if(row_id==0){var element_id="rangeSelect";var script_src="/bb-ajax.asp";var script_qry="menu=range&id="+document.field_search.searchBrandID.value+"&row="+row_id+"&cat="+document.field_search.searchCatTypeID.value+"&sub="+document.field_search.searchSubTypeID.value;}else{var element_id="rangeSelect";var script_src="bb-ajax.asp";if(row_id==2){var script_qry="menu=range&id="+document.RTEDemo.brandID.value+"&row="+row_id;}else{var script_qry="menu=range&id="+document.field_search.brandID.value+"&row="+row_id;}}
makeRequest(script_src,script_qry,element_id);}
function updateQty(inputid){var whichField="wq"+inputid;if(isNaN(document.getElementById(whichField).value)){document.getElementById(whichField).value="1";}
document.location.href="/e-cart.asp?action=update_item&id="+inputid+"&uQty="+document.getElementById(whichField).value;}
function removeItem(id){document.location.href="/e-cart.asp?action=remove_item&id="+id;}
function add_product_to_basket_check(itmCode,itmName,itmPrice,itmRetail,itmShippingCode,itmStandardDelivery,itmProductCode,intShippingSupplemental,intHasLinkedOptions){var thisField="";var tmpArray;var AdditionalItemsCounter=document.getElementById("AdditionalItemsCounter").value;var notCheckedCountAddtional=0;var checkedCountAddtional=0;var allOptionsCounter=0;var notCheckedCountOption=0;var checkedCountOption=0;if(AdditionalItemsCounter>0)
{for(i=0;i<AdditionalItemsCounter;i++)
{tmpField="AdditionalItem_"+i;if(eval("document.forms.product_detail_form."+tmpField+".length")==undefined)
{if(eval("document.forms.product_detail_form."+tmpField).checked==true)
{checkedCountAddtional++;}}
for(n=0;n<eval("document.forms.product_detail_form."+tmpField+".length");n++)
{if(eval("document.forms.product_detail_form."+tmpField+"[n]").checked==true)
{checkedCountAddtional++;}}}}
if(document.getElementById("allOptionsCounter")!=null)
{allOptionsCounter=document.getElementById("allOptionsCounter").value;if(document.getElementById("option_0_0")!=null)
{for(i=0;i<allOptionsCounter;i++)
{tmpField="option_"+i;for(n=0;n<eval("document.forms.product_detail_form."+tmpField+".length");n++)
{if(eval("document.forms.product_detail_form."+tmpField+"[n]").checked==true)
{checkedCountOption++;}}}}}
if(checkedCountAddtional<AdditionalItemsCounter)
{alert("Please select required product options");}else if(checkedCountOption<allOptionsCounter){alert("Please select required product options");}
else
{if(trimStr(document.getElementById("productQty").value)==""||isNaN(document.getElementById("productQty").value)||document.getElementById("productQty").value<1){document.getElementById("productQty").style.backgroundColor="#FF0000";alert("Please enter quantity required -- numbers only");document.getElementById("productQty").focus();}else{var itmQty=document.getElementById("productQty").value;var itmOptionCount=0;var itmOptions=document.getElementById("itemOptionsString").value;document.getElementById("productQty").style.backgroundColor="#66C2FF";var additionalItemsOrderString=document.getElementById("AdditionalItemsOrderString").value;var intHasLinkedOptions=intHasLinkedOptions;if(intHasLinkedOptions=="1")
{var aiCount=document.getElementById("AdditionalItemsCounter").value;var foundCount=0;var tmpfield
for(i=0;i<aiCount;i++)
{tmpfield="AdditionalItem_"+i;for(n=0;n<document.getElementsByName(tmpfield).length;n++)
{if(document.getElementsByName(tmpfield)[n].checked)
{foundCount=1;}}}
if(foundCount==0)
{alert("Please select one option");}else{if(additionalItemsOrderString==""){document.location.href="/e-cart.asp?action=add_item&itemstring=$"+itmCode+"^"+itmName+"^"+itmQty+"^"+itmPrice+"^"+itmRetail+"^"+itmOptions+"^"+itmShippingCode+"^"+itmStandardDelivery+"^"+itmProductCode+"^"+intShippingSupplemental;}else{document.location.href="/e-cart.asp?action=add_multi-item&itemstring=$"+itmCode+"^"+itmName+"^"+itmQty+"^"+itmPrice+"^"+itmRetail+"^"+itmOptions+"^"+itmShippingCode+"^"+itmStandardDelivery+"^"+itmProductCode+"^"+intShippingSupplemental+"&additionalitemstring="+additionalItemsOrderString;}}}else{if(additionalItemsOrderString==""){document.location.href="/e-cart.asp?action=add_item&itemstring=$"+itmCode+"^"+itmName+"^"+itmQty+"^"+itmPrice+"^"+itmRetail+"^"+itmOptions+"^"+itmShippingCode+"^"+itmStandardDelivery+"^"+itmProductCode+"^"+intShippingSupplemental;}else{document.location.href="/e-cart.asp?action=add_multi-item&itemstring=$"+itmCode+"^"+itmName+"^"+itmQty+"^"+itmPrice+"^"+itmRetail+"^"+itmOptions+"^"+itmShippingCode+"^"+itmStandardDelivery+"^"+itmProductCode+"^"+intShippingSupplemental+"&additionalitemstring="+additionalItemsOrderString;}}}}}
function createAdditionalItemString(itmCode,itmName,itmPrice,itmRetail,itmShippingCode,itmStandardDelivery,itmProductCode,intShippingSupplemental,radioCount){var itmQty=1;var itmOptions=itmProductCode;var additionalItemsOrderString=document.getElementById("AdditionalItemsOrderString").value;var newItemToAdd=itmCode+"^"+itmName+"^"+itmQty+"^"+itmPrice+"^"+itmRetail+"^"+itmOptions+"^"+itmShippingCode+"^"+itmStandardDelivery+"^"+itmProductCode+"^"+intShippingSupplemental;var AdditionalItemsCounter=document.getElementById("AdditionalItemsCounter").value;var AdditionalItemsDefaultString=document.getElementById("AdditionalItemsDefaultString").value;if(additionalItemsOrderString.indexOf(newItemToAdd)>=0)
{}else{var AdditionalItemsTmpArray=new Array(AdditionalItemsCounter+1);var AdditionalItemsTmpArray2=new Array(AdditionalItemsCounter+1);AdditionalItemsTmpArray2=additionalItemsOrderString.split("$");AdditionalItemsTmpArray[radioCount]=newItemToAdd;additionalItemsOrderString="";var additionalItemsOrderValue=0.00;var additionalItemsRetailValue=0.00;var tmpField="";var thisField="";var tmpArray;for(i=0;i<AdditionalItemsCounter;i++)
{tmpField="AdditionalItem_"+i;if(eval("document.forms.product_detail_form."+tmpField+".length")==undefined)
{if(eval("document.forms.product_detail_form."+tmpField).checked==true)
{thisField=eval("document.forms.product_detail_form."+tmpField+".value");tmpArray=thisField.split("||");itmRetail=tmpArray[2];itmPrice=tmpArray[3];additionalItemsOrderValue+=Number(itmPrice);additionalItemsRetailValue+=Number(itmRetail);additionalItemsOrderString+="$"+tmpArray[0]+"^"+tmpArray[1]+"^1^"+itmPrice+"^"+itmRetail+"^^"+itmShippingCode+"^"+itmStandardDelivery+"^"+itmProductCode+"^"+intShippingSupplemental;}}else{for(n=0;n<eval("document.forms.product_detail_form."+tmpField+".length");n++)
{if(eval("document.forms.product_detail_form."+tmpField+"[n]").checked==true)
{thisField=eval("document.forms.product_detail_form."+tmpField+"[n].value");tmpArray=thisField.split("||");itmRetail=tmpArray[2];itmPrice=tmpArray[3];additionalItemsOrderValue+=Number(itmPrice);additionalItemsRetailValue+=Number(itmRetail);additionalItemsOrderString+="$"+tmpArray[0]+"^"+tmpArray[1]+"^1^"+itmPrice+"^"+itmRetail+"^^"+itmShippingCode+"^"+itmStandardDelivery+"^"+tmpArray[0]+"^"+intShippingSupplemental;}}}}
document.getElementById("AdditionalItemsOrderString").value=additionalItemsOrderString;document.getElementById("AdditionalItemsOrderValue").value=roundEmTo2(additionalItemsOrderValue);document.getElementById("AdditionalItemsRetailValue").value=roundEmTo2(additionalItemsRetailValue);var productTotalPrice=Number(document.getElementById("ProductPrice").value.replace(",",""));productTotalPrice=roundEmTo2(productTotalPrice);var productTotalPriceRetail=Number(document.getElementById("ProductPriceRetail").value.replace(",",""))
productTotalPriceRetail=roundEmTo2(productTotalPriceRetail);var optionPrice=(Number(additionalItemsOrderValue)*1.2);var optionRetail=(Number(additionalItemsRetailValue)*1.2);var displayItemRRPCost=(Number(productTotalPriceRetail)+Number(optionRetail))
displayItemRRPCost=roundEmTo2(displayItemRRPCost);var displayItemUnitCost=(Number(productTotalPrice)+Number(optionPrice))
displayItemUnitCost=roundEmTo2(displayItemUnitCost);if(document.getElementById("ItemUnitCost").innerHTML.toLowerCase()!="£ <b>call for prices</b>")
{document.getElementById("ItemUnitCost").innerHTML="£ "+displayItemUnitCost;}else{document.getElementById("ItemUnitCost").innerHTML="£ <b>Call for Prices</b>";}
document.getElementById("ItemRRPCost").innerHTML="£ "+displayItemRRPCost;}}
function removeAdditionalItemString(itmCode,itmName,itmPrice,itmRetail,itmShippingCode,itmStandardDelivery,itmProductCode,intShippingSupplemental){var itmQty=1;var itmOptions=""
var additionalItemsToRemove="$"+itmCode+"^"+itmName+"^"+itmQty+"^"+itmPrice+"^"+itmRetail+"^"+itmOptions+"^"+itmShippingCode+"^"+itmStandardDelivery+"^"+itmProductCode+"^"+intShippingSupplemental;var additionalItemsOrderString=document.getElementById("AdditionalItemsOrderString").value
var positionadditionalItemsToRemove=additionalItemsOrderString.indexOf(additionalItemsToRemove)
if(positionadditionalItemsToRemove==-1){}else{additionalItemsOrderString=additionalItemsOrderString.replace(additionalItemsToRemove,"");var additionalItemsOrderValue=document.getElementById("AdditionalItemsOrderValue").value
additionalItemsOrderValue=(Number(additionalItemsOrderValue)-Number(itmPrice))
var additionalItemsRetailValue=document.getElementById("AdditionalItemsRetailValue").value
additionalItemsRetailValue=(Number(additionalItemsRetailValue)-Number(itmRetail))
document.getElementById("AdditionalItemsOrderString").value=additionalItemsOrderString;document.getElementById("AdditionalItemsOrderValue").value=roundEmTo2(additionalItemsOrderValue);document.getElementById("AdditionalItemsRetailValue").value=roundEmTo2(additionalItemsRetailValue);var optionPrice=(Number(additionalItemsOrderValue)*1.2);var optionRetail=(Number(additionalItemsRetailValue)*1.2);var productTotalPrice=Number(document.getElementById("ProductPrice").value.replace(",",""));productTotalPrice=roundEmTo2(productTotalPrice);var productTotalPriceRetail=Number(document.getElementById("ProductPriceRetail").value.replace(",",""))
productTotalPriceRetail=roundEmTo2(productTotalPriceRetail);var displayItemUnitCost=(Number(productTotalPrice)+Number(optionPrice))
displayItemUnitCost=roundEmTo2(displayItemUnitCost);var displayItemRRPCost=(Number(productTotalPriceRetail)+Number(optionRetail))
displayItemRRPCost=roundEmTo2(displayItemRRPCost);if(document.getElementById("ItemUnitCost").innerHTML.toLowerCase()!="£ <b>call for prices</b>")
{document.getElementById("ItemUnitCost").innerHTML="£ "+displayItemUnitCost;}else{document.getElementById("ItemUnitCost").innerHTML="£ <b>Call for Prices</b>";}
document.getElementById("ItemRRPCost").innerHTML="£ "+displayItemRRPCost;}}
function remove2AdditionalItemString(radioCount){var AdditionalItemsCounter=document.getElementById("AdditionalItemsCounter").value;var additionalItemsOrderString=document.getElementById("AdditionalItemsOrderString").value;var AdditionalItemsTmpArray=new Array(AdditionalItemsCounter+1);var additionalIndividualItemsArray;var individualUnitPrice=0.00;var individualRetailPrice=0.00;AdditionalItemsTmpArray=additionalItemsOrderString.split("$");additionalItemsOrderString="";radioCount++;var additionalItemsOrderValue=0.00;var additionalItemsRetailValue=0.00;for(i=1;i<=AdditionalItemsCounter;i++)
{individualUnitPrice=0.00;individualRetailPrice=0.00;if(i==radioCount)
{additionalItemsOrderString+="$";individualUnitPrice=0.00;individualRetailPrice=0.00;}else{if(AdditionalItemsTmpArray[i]==undefined){additionalItemsOrderString="";individualUnitPrice=0.00;individualRetailPrice=0.00;}else{additionalItemsOrderString+="$"+AdditionalItemsTmpArray[i];additionalIndividualItemsArray=AdditionalItemsTmpArray[i].split("^");individualUnitPrice=additionalIndividualItemsArray[2];individualRetailPrice=additionalIndividualItemsArray[3];}}
if(individualUnitPrice==undefined)
{individualUnitPrice=0.00;individualRetailPrice=0.00;}
additionalItemsOrderValue=Number(additionalItemsOrderValue)+Number(individualUnitPrice);additionalItemsRetailValue=Number(additionalItemsRetailValue)+Number(individualRetailPrice);document.getElementById("AdditionalItemsOrderString").value=additionalItemsOrderString;document.getElementById("AdditionalItemsOrderValue").value=roundEmTo2(additionalItemsOrderValue);document.getElementById("AdditionalItemsRetailValue").value=roundEmTo2(additionalItemsRetailValue);var optionPrice=(Number(additionalItemsOrderValue)*1.2);var optionRetail=(Number(additionalItemsRetailValue)*1.2);var productTotalPrice=Number(document.getElementById("ProductPrice").value.replace(",",""));productTotalPrice=roundEmTo2(productTotalPrice);var productTotalPriceRetail=Number(document.getElementById("ProductPriceRetail").value.replace(",",""))
productTotalPriceRetail=roundEmTo2(productTotalPriceRetail);var displayItemUnitCost=(Number(productTotalPrice)+Number(optionPrice))
displayItemUnitCost=roundEmTo2(displayItemUnitCost);var displayItemRRPCost=(Number(productTotalPriceRetail)+Number(optionRetail))
displayItemRRPCost=roundEmTo2(displayItemRRPCost);if(document.getElementById("ItemUnitCost").innerHTML.toLowerCase()!="£ <b>call for prices</b>")
{document.getElementById("ItemUnitCost").innerHTML="£ "+displayItemUnitCost;}else{document.getElementById("ItemUnitCost").innerHTML="£ <b>Call for Prices</b>";}
document.getElementById("ItemRRPCost").innerHTML="£ "+displayItemRRPCost;}}
function createItemString(){var optionCount=document.getElementById("allOptionsCounter").value;var itmOptions="";var productTotalPrice=document.getElementById("ProductInitialPrice").value.replace(",","");var productTotalPriceRetail=document.getElementById("ProductInitialPriceRetail").value.replace(",","");var optionArray="";var optionPrice=0.00;var optionRetail=0.00;var thisOption="";var additionalItemsOrderValue=document.getElementById("AdditionalItemsOrderValue").value
var additionalItemsRetailValue=document.getElementById("AdditionalItemsRetailValue").value
if(Number(productTotalPrice)>0){for(o=0;o<optionCount;o++){var optionsLength=document.getElementsByName("option_"+o).length;for(l=0;l<optionsLength;l++){if(eval("document.forms.product_detail_form.option_"+o+"_"+l).checked==true){optionArray=eval("document.forms.product_detail_form.option_"+o+"_"+l).value.split("||");optionId=optionArray[0];optionName=optionArray[1];optionRetail=optionArray[2]*1.2;if(optionArray[0]!=""&&optionArray[1]!=""){itmOptions=itmOptions+"¬"+eval("document.forms.product_detail_form.option_"+o+"_"+l).value;productTotalPrice=Number(productTotalPrice)+Number(optionRetail);productTotalPriceRetail=Number(productTotalPriceRetail)+Number(optionRetail);}}}}
productTotalPrice=roundEmTo2(productTotalPrice);productTotalPriceRetail=roundEmTo2(productTotalPriceRetail);var displayItemUnitCost=Number(productTotalPrice)+(Number(additionalItemsOrderValue*1.2));displayItemUnitCost=roundEmTo2(displayItemUnitCost);var displayItemRRPCost=Number(productTotalPriceRetail)+(Number(additionalItemsRetailValue*1.2));displayItemRRPCost=roundEmTo2(displayItemRRPCost);if(document.getElementById("ItemUnitCost").innerHTML.toLowerCase()!="£ <b>call for prices</b>"&&document.getElementById("ItemUnitCost").innerHTML.toLowerCase()!="£ <b>call for prices</b>")
{document.getElementById("ItemUnitCost").innerHTML="£ "+displayItemUnitCost;}else{document.getElementById("ItemUnitCost").innerHTML="£ <b>Call for Prices</b>";}
document.getElementById("ItemRRPCost").innerHTML="£ "+displayItemRRPCost;document.getElementById("itemOptionsString").value=itmOptions;document.getElementById("ProductPrice").value=productTotalPrice;}else{for(o=0;o<=optionCount;o++){var optionsLength=document.getElementsByName("option_"+o).length;for(l=0;l<optionsLength;l++){if(eval("document.forms.product_detail_form.option_"+o+"["+l+"]").checked==true){optionArray=document.getElementsByName("option_"+o)[l].value.split("||");optionId=optionArray[0];optionName=optionArray[1];optionRetail=optionArray[2]*1.2;if(optionArray[0]!=""&&optionArray[1]!=""){itmOptions=itmOptions+"¬"+document.getElementsByName("option_"+o)[l].value;productTotalPriceRetail=Number(productTotalPriceRetail)+Number(optionRetail)}}}}
document.getElementById("ItemRRPCost").innerHTML="£ "+productTotalPriceRetail;document.getElementById("itemOptionsString").value=itmOptions;}}
function getQueryVariable(variable){var query=window.location.search.substring(1);var vars=query.split("&");for(var i=0;i<vars.length;i++){var pair=vars[i].split("=");if(pair[0]==variable){return pair[1];}}}
function refine_product(variantCount){var variable="pgt";var query=window.location.search.substring(1);if(query!="")
{query=query.replace("&utm_source=google&utm_medium=sfeed&utm_campaign=bb","");}
if(query!="")
{query=query.replace("utm_source=google&utm_medium=sfeed&utm_campaign=bb","");}
var vars=query.split("&");var variantString="";var v=0;var availQS=query;if(query=="")
{query="productid="+document.getElementById("ProductInitialProductId").value;query+="&productgroupid="+document.getElementById("ProductInitialProductGroupId").value;}
if(query.indexOf("CatTypeName")<0)
{query+="&CatTypeName="+document.getElementById("CanonicalCatName").value;query+="&SubTypeName="+document.getElementById("CanonicalSubTypeName").value;}
for(o=0;o<=variantCount;o++){var variantOptionsLength=document.getElementsByName("variant_"+o).length;for(v=0;v<variantOptionsLength;v++){if(eval("document.forms.product_detail_form.variant_"+o+"["+v+"]").checked==true){variantString+=eval("document.forms.product_detail_form.variant_"+o+"["+v+"]").value;if(o<variantCount){variantString+="^";}}}}
if(variantString!=""){var foundPairMatch=0;for(var i=0;i<vars.length;i++){var pair=vars[i].split("=");if(pair[0]==variable){foundPairMatch=1;document.location.href="/product-detail-new.asp?"+query.replace(pair[1],variantString);}}
if(foundPairMatch==0){document.location.href="/product-detail-new.asp?"+query+"&pgt="+variantString;}}}
function roundEmTo2(original){var result=Math.round(original*100)/100
var thisResult=result.toString();var roundEmArray=thisResult.split(".");if(roundEmArray.length==2)
{var strDecimals=roundEmArray[1];if(strDecimals.length==1)
{thisResult=roundEmArray[0]+"."+roundEmArray[1]+"0";}
else
{thisResult=roundEmArray[0]+"."+roundEmArray[1];}}
else
{thisResult=thisResult+".00";}
return thisResult;}
function tomoney(n){n=Math.round(n*100)/100;if(n.toFixed){return n.toFixed(2);}else{return~~n+'.'+String(Math.round((n?n:1)*100)).slice(-2);}}
function dnt(){return;}
function moneyFormat(textObj){var newValue=textObj;var decAmount="";var dolAmount="";var decFlag=false;var aChar="";for(i=0;i<newValue.length;i++){aChar=newValue.substring(i,i+1);if(aChar>="0"&&aChar<="9"){if(decFlag){decAmount=""+decAmount+aChar;}else{dolAmount=""+dolAmount+aChar;}}
if(aChar=="."){if(decFlag){dolAmount="";break;}
decFlag=true;}}
if(dolAmount==""){dolAmount="0";}
if(dolAmount.length>1){while(dolAmount.length>1&&dolAmount.substring(0,1)=="0"){dolAmount=dolAmount.substring(1,dolAmount.length);}}
if(decAmount.length>2){if(decAmount.substring(2,3)>"4"){decAmount=parseInt(decAmount.substring(0,2))+1;if(decAmount<10){decAmount="0"+decAmount;}else{decAmount=""+decAmount;}}else{decAmount=decAmount.substring(0,2);}
if(decAmount==100){decAmount="00";dolAmount=parseInt(dolAmount)+1;}}
if(decAmount.length==1){decAmount=decAmount+"0";}
if(decAmount.length==0){decAmount=decAmount+"00";}
if(newValue.substring(0,1)!='-'||(dolAmount=="0"&&decAmount=="00")){return dolAmount+"."+decAmount;}else{return dolAmount+"."+decAmount;}}
function checkForm(fieldString)
{if(fieldString!="")
{var dottedLine="---------------------------------------\n";var alertMessage=dottedLine;alertMessage+=" Please complete the following information\n";alertMessage+=dottedLine;var originalAlert=alertMessage;var fieldArray=fieldString.split("^");var firstFieldToFocus="";var strInvalid=" ";for(f=0;f<fieldArray.length;f++)
{if(fieldArray[f]=="Billing_Address")
{if(document.getElementById(fieldArray[f]).innerText==""||document.getElementById(fieldArray[f]).value=="")
{alertMessage+="\n ** "+fieldArray[f].replace("_"," ");if(firstFieldToFocus=="")
{firstFieldToFocus=fieldArray[f];}}}else{if(document.getElementById(fieldArray[f]).value==""||document.getElementById(fieldArray[f]).value==fieldArray[f])
{alertMessage+="\n ** "+fieldArray[f].replace("_"," ");if(firstFieldToFocus=="")
{firstFieldToFocus=fieldArray[f];}}}}
if(document.getElementById("Billing_Postcode")!=null)
{if(document.getElementById("Billing_Postcode").value!="")
{if(document.getElementById("Billing_Postcode").value.indexOf(strInvalid)==-1)
{alertMessage+="\n ** Postcode - full postcode required including spaces ie: BB8 8LD";if(firstFieldToFocus=="")
{firstFieldToFocus="Billing_Postcode";}}}}
if(document.getElementById("CustomerDeliveryPostcode")!=null)
{if(document.getElementById("CustomerDeliveryPostcode").value!="")
{if(document.getElementById("CustomerDeliveryAddress").value=="")
{alertMessage+="\n ** Delivery Address";if(firstFieldToFocus=="")
{firstFieldToFocus="CustomerDeliveryAddress";}}}}
if(alertMessage!=originalAlert)
{alertMessage+="\n\n"+dottedLine;alert(alertMessage);setFocus(firstFieldToFocus);return false;}
if(document.getElementById("CreateOrxderButton2")!=null)
{window.scrollTo(0,0);document.getElementById('ProcessingCenter').className='ShowMe';document.getElementById('ProcessingDisabledLayer').className='ShowMe';for(i=0;i<=5000;i++){}}}else{return false;}}
function setFocus(elementId)
{var elementExists=document.getElementById(elementId);if(elementExists!=null)
{document.getElementById(elementId).focus();}}
function processing(){window.scrollTo(0,0);document.getElementById('ProcessingCenter').className='ShowMe';document.getElementById('ProcessingDisabledLayer').className='ShowMe';}
var newWindow1=null;var newWindow2=null;var newWindow3=null;var newWindow4=null;var newWindow5=null;function imageZoom(Item){URL="/Product-Zoom.asp?Product="+Item
if(!newWindow1||newWindow1.closed){newWindow1=window.open(URL,"subwin1","height=600,width=500,toolbars=no,status=no,scrollbars=no");newWindow1.focus();}else{newWindow1.close();newWindow1=window.open(URL,"subwin1","height=600,width=500,toolbars=no,status=no,scrollbars=no");newWindow1.focus();}}
function emailAFriend(ProductName,ProductID){URL="/EmailAFriend.asp?ProductID="+ProductID+"&ProductName="+ProductName
if(!newWindow2||newWindow2.closed){newWindow2=window.open(URL,"subwin2","height=600,width=500,toolbars=no,status=no,scrollbars=no");newWindow2.focus();}else{newWindow2.close();newWindow2=window.open(URL,"subwin2","height=600,width=500,toolbars=no,status=no,scrollbars=no");newWindow2.focus();}}
function technicalInfo(ProductName,ProductID){URL="/Product-TechnicalInfo.asp?ProductID="+ProductID+"&ProductName="+ProductName
if(!newWindow3||newWindow3.closed){newWindow3=window.open(URL,"subwin3","height=600,width=500,toolbars=no,status=no,scrollbars=no");newWindow3.focus();}else{newWindow3.close();newWindow3=window.open(URL,"subwin3","height=600,width=500,toolbars=no,status=no,scrollbars=no");newWindow3.focus();}}
function testimonials(ProductName,ProductID,CatID,SubTypeID,BrandID,RangeID){URL="/Product-Testimonials.asp?ProductID="+ProductID+"&ProductName="+ProductName+"&CatID="+CatID+"&SubTypeID= "+SubTypeID+"&BrandID="+BrandID+"&RangeID="+RangeID
if(!newWindow4||newWindow4.closed){newWindow4=window.open(URL,"subwin4","height=600,width=500,toolbars=no,status=no,scrollbars=no");newWindow4.focus();}else{newWindow4.close();newWindow4=window.open(URL,"subwin4","height=600,width=500,toolbars=no,status=no,scrollbars=no");newWindow4.focus();}}
function WhatCustomersBought(ProductName,ProductID){URL="/Product-Bought.asp?ProductID="+ProductID+"&ProductName="+ProductName
if(!newWindow5||newWindow5.closed){newWindow5=window.open(URL,"subwin5","height=600,width=560,toolbars=no,status=no,scrollbars=yes");newWindow5.focus();}else{newWindow5.close();newWindow5=window.open(URL,"subwin5","height=600,width=560,toolbars=no,status=no,scrollbars=yes");newWindow5.focus();}}
function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}
function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)
if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function loadimages(){slider1=document.getElementById("slidegroup1");slider2=document.getElementById("slidegroup2");slider1.innerHTML=CrossSellStrip;slider2.innerHTML=CrossSellStrip;slider2.style.left="280px";startaction=setInterval("slideleft()",parseInt(30));};function slideleft(){if(parseInt(slider1.style.left)>(280*(-1))){slider1.style.left=(parseInt(slider1.style.left)+scrollamount)+"px"}else{slider1.style.left=(parseInt(slider2.style.left)+280+scrollamount)+"px"}
if(parseInt(slider2.style.left)>(280*(-1))){slider2.style.left=(parseInt(slider2.style.left)+scrollamount)+"px"}else{slider2.style.left=(parseInt(slider1.style.left)+280)+"px"}}
function thumbwow(num,thumOffset,thumSize,label){if(parseInt(slider1.style.left)<=0){if(thumOffset+parseInt(slider1.style.left)>0-thumSize){leftstart=thumOffset+parseInt(slider1.style.left)}else{leftstart=thumOffset+parseInt(slider2.style.left)}}else{if(thumOffset+parseInt(slider2.style.left)>0-thumSize){leftstart=thumOffset+parseInt(slider2.style.left)}else{leftstart=thumOffset+parseInt(slider1.style.left)}}
document.getElementById("blowup").style.left=leftstart+0+(Math.round((thumSize-thumSize/0.9-2)/2))+"px";document.getElementById("blowup").innerHTML='<a href="'+AuctionLink[num]+'" title="'+label+'"><img src="'+AuctionThum[num]+'" height="100" border="0" /></a>';document.getElementById("blowup").style.visibility="visible";document.getElementById("slidelabel").innerHTML=label;}
function unwow(){document.getElementById("blowup").style.visibility="hidden";document.getElementById("slidelabel").innerHTML=document.getElementById("slidelabel").title}
var has_inner=typeof(window.innerWidth)=='number';var has_element=document.documentElement&&document.documentElement.clientWidth;function center_box(box,width,height)
{cleft=has_inner?pageXOffset+
(window.innerWidth-width)/2:has_element?document.documentElement.scrollLeft+
(document.documentElement.clientWidth-width)/2:document.body.scrollLeft+
(document.body.clientWidth-width)/2;ctop=has_inner?pageYOffset+(window.innerHeight-height)/2:has_element?document.documentElement.scrollTop+
(document.documentElement.clientHeight-height)/2:document.body.scrollTop+
(document.body.clientHeight-height)/2;box.style.left=cleft>0?cleft+'px':'0px';box.style.top=ctop>0?ctop+'px':'0px';}
function hide_other_alone(obj)
{if(!document.getElementsByTagName)
return;var all_divs=document.body.getElementsByTagName("DIV");for(i=0;i<all_divs.length;i++)
{if(all_divs.item(i).style.position!='absolute'||all_divs.item(i)==obj||!all_divs.item(i).alonePopupBox)
{continue;}
all_divs.item(i).style.display='none';}
return;}
function show_hide_centered_box(an,width,height,borderStyle)
{show_hide_centered_href(an.href,width,height,borderStyle);return false;}
function show_hide_centered_href(href,width,height,borderStyle)
{var boxdiv=document.getElementById(href);if(boxdiv!=null)
{if(boxdiv.style.display=='none')
{hide_other_alone(boxdiv);center_box(boxdiv,width,height);boxdiv.style.display='block';if(!boxdiv.contents.contentWindow)
boxdiv.contents.src=href;}
else
boxdiv.style.display='none';return false;}
hide_other_alone(null);boxdiv=document.createElement('div');boxdiv.setAttribute('id',href);boxdiv.alonePopupBox=1;boxdiv.style.display='block';boxdiv.style.position='absolute';boxdiv.style.width=width+'px';boxdiv.style.height=height+'px';boxdiv.style.border=borderStyle;boxdiv.style.textAlign='right';boxdiv.style.padding='4px';boxdiv.style.background='#FFFFFF';boxdiv.style.zIndex=200;document.body.appendChild(boxdiv);var offset=0;var close_href=document.createElement('a');close_href.href='javascript:void(0);';close_href.onclick=function()
{show_hide_centered_href(href,width,height,borderStyle);}
close_href.appendChild(document.createTextNode('Close Window'));boxdiv.appendChild(close_href);offset=close_href.offsetHeight;var contents=document.createElement('iframe');contents.overflowX='hidden';contents.overflowY='scroll';contents.frameBorder='0';contents.style.width=width+'px';contents.style.height=(height-offset)+'px';boxdiv.contents=contents;boxdiv.appendChild(contents);center_box(boxdiv,width,height);if(contents.contentWindow)
contents.contentWindow.document.location.replace(href);else
contents.src=href;return;}
function move_box(an,box)
{var cleft=0;var ctop=0;var obj=an;while(obj.offsetParent)
{cleft+=obj.offsetLeft;ctop+=obj.offsetTop;obj=obj.offsetParent;}
box.style.left=cleft+'px';ctop+=an.offsetHeight+8;if(document.body.currentStyle&&document.body.currentStyle['marginTop'])
{ctop+=parseInt(document.body.currentStyle['marginTop']);}
box.style.top=ctop+'px';}
function hide_other_alone(obj)
{if(!document.getElementsByTagName)
return;var all_divs=document.body.getElementsByTagName("DIV");for(i=0;i<all_divs.length;i++)
{if(all_divs.item(i).style.position!='absolute'||all_divs.item(i)==obj||!all_divs.item(i).alonePopupBox)
{continue;}
all_divs.item(i).style.display='none';}
return;}
function show_hide_box(an,width,height,borderStyle)
{var href=an.href;var boxdiv=document.getElementById(href);if(boxdiv!=null)
{if(boxdiv.style.display=='none')
{hide_other_alone(boxdiv);move_box(an,boxdiv);boxdiv.style.display='block';if(!boxdiv.contents.contentWindow)
boxdiv.contents.src=href;}
else
boxdiv.style.display='none';return false;}
hide_other_alone(null);boxdiv=document.createElement('div');boxdiv.setAttribute('id',href);boxdiv.alonePopupBox=1;boxdiv.style.display='block';boxdiv.style.position='absolute';boxdiv.style.width=width+'px';boxdiv.style.height=height+'px';boxdiv.style.border=borderStyle;boxdiv.style.textAlign='right';boxdiv.style.padding='4px';boxdiv.style.background='#FFFFFF';document.body.appendChild(boxdiv);var offset=0;var close_href=document.createElement('a');close_href.href='javascript:void(0);';close_href.onclick=function()
{show_hide_box(an,width,height,borderStyle);}
close_href.appendChild(document.createTextNode('Close Window'));boxdiv.appendChild(close_href);offset=close_href.offsetHeight;var contents=document.createElement('iframe');contents.overflowX='hidden';contents.overflowY='scroll';contents.frameBorder='0';contents.style.width=width+'px';contents.style.height=(height-offset)+'px';boxdiv.contents=contents;boxdiv.appendChild(contents);move_box(an,boxdiv);if(contents.contentWindow)
contents.contentWindow.document.location.replace(href);else
contents.src=href;return false;}
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return"";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;function cdtime(container,targetdate){if(!document.getElementById||!document.getElementById(container))return
this.container=document.getElementById(container)
this.currentTime=new Date()
this.targetdate=new Date(targetdate)
this.timesup=false
this.updateTime()}
cdtime.prototype.updateTime=function(){var thisobj=this
this.currentTime.setSeconds(this.currentTime.getSeconds()+1)
setTimeout(function(){thisobj.updateTime()},1000)}
cdtime.prototype.displaycountdown=function(baseunit,functionref){this.baseunit=baseunit
this.formatresults=functionref
this.showresults()}
cdtime.prototype.showresults=function(){var thisobj=this
var timediff=(this.targetdate-this.currentTime)/1000
if(timediff<0){this.timesup=true
this.container.innerHTML=this.formatresults()
return}
var oneMinute=60
var oneHour=60*60
var oneDay=60*60*24
var dayfield=Math.floor(timediff/oneDay)
var hourfield=Math.floor((timediff-dayfield*oneDay)/oneHour)
var minutefield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour)/oneMinute)
var secondfield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour-minutefield*oneMinute))
if(this.baseunit=="hours"){hourfield=dayfield*24+hourfield
dayfield="n/a"}
else if(this.baseunit=="minutes"){minutefield=dayfield*24*60+hourfield*60+minutefield
dayfield=hourfield="n/a"}
else if(this.baseunit=="seconds"){var secondfield=timediff
dayfield=hourfield=minutefield="n/a"}
this.container.innerHTML=this.formatresults(dayfield,hourfield,minutefield,secondfield)
setTimeout(function(){thisobj.showresults()},1000)}
function formatresults2(){if(this.timesup==false){var displaystring="<a href=\"/image-nav.asp?PageType=Categories-Sub&CatTypeID=117&CategoryName=Special+Offers+and+Clearance\"><span class=\"big\">May Sale</span><br />Ends In<br /><span class=\"big\">"+arguments[1]+" Hours "+arguments[2]+" Mins</a>"}
else{var displaystring=""}
return displaystring}
var CRITEO=function(){var f={F:[],C:function(){if(arguments.callee.ag){return;}arguments.callee.ag=true;for(var i=0;i<f.F.length;i++){f.F[i]();}},Q:function(R){this.F[this.F.length]=R;if(document.addEventListener){document.addEventListener("DOMContentLoaded",f.C,null);}if(/KHTML|WebKit/i.test(navigator.userAgent)){var P=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(P);delete P;f.C();}},10);}/*@cc_on@if(@_win32)var T="src='javascript:void(0)'";if(location.protocol=="https:")T="src=//0";document.write("<scr"+"ipt id=__cto_ie_onload defer "+T+"><\/scr"+"ipt>");var s=document.getElementById("__cto_ie_onload");s.onreadystatechange=function(){if(this.readyState=="complete"){f.C();}};@end@*/;if(typeof window.onload!='function'){window.onload=f.C;}else{var D=window.onload;window.onload=function(){f.C();if(D){D();}};}}};function A(s){if(document.getElementsByTagName){var h=document.getElementsByTagName('head')[0];if(!h){h=document.createElement('HEAD');document.documentElement.appendChild(h);}if(h&&h.appendChild){h.appendChild(s);}}};function B(){if(typeof(window.encodeURIComponent)==='undefined'){var r={ab:function(H){H=""+H;var t,s,G="",i=0;while(i<H.length){t=H.charCodeAt(i++);if(t>=0xDC00&&t<0xE000){continue;}if(t>=0xD800&&t<0xDC00){if(i>=H.length){continue;}s=H.charCodeAt(i++);if(s<0xDC00||t>=0xDE00){continue;}t=((t-0xD800)<<10)+(s-0xDC00)+0x10000;}if(t<0x80){G+=String.fromCharCode(t);}else if(t<0x800){G+=String.fromCharCode(0xC0+(t>>6),0x80+(t&0x3F));}else if(t<0x10000){G+=String.fromCharCode(0xE0+(t>>12),0x80+(t>>6&0x3F),0x80+(t&0x3F));}else{G+=String.fromCharCode(0xF0+(t>>18),0x80+(t>>12&0x3F),0x80+(t>>6&0x3F),0x80+(t&0x3F));}}return G;},I:"0123456789ABCDEF",V:function(n){return r.I.charAt(n>>4)+r.I.charAt(n&0xF);},K:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-"};window.encodeURIComponent=function(s){s=r.ab(s);var G="";for(var i=0;i<s.length;i++){if(r.K.indexOf(s.charAt(i))== -1){G+="%"+r.V(s.charCodeAt(i));}else{G+=s.charAt(i);}}return G;};}};function L(){if(document.getElementsByTagName){var n=1;var o=[];var l=[];var U,O,M,aa,ae,ac;var a=document.getElementsByTagName('div');for(var i=0;i<a.length;i++){if(a[i].id&&a[i].id.substring(0,3).toLowerCase()=="cto"&&a[i].childNodes){U=O=M=aa=ac=null;ae=2;for(var j=0;j<a[i].childNodes.length;j++){var t=a[i].childNodes[j];if(t&&t.tagName&&t.tagName.toLowerCase()=="div"&&t.className&&t.className.substring(0,3).toLowerCase()=="cto"){var v=(t.textContent?t.textContent:(t.innerText?t.innerText:null));switch(t.className.toLowerCase()){case 'ctowidgetserver':U=v;break;case 'ctodatatype':O=v;break;case 'ctowidgettype':M=v;break;case 'ctoparams':aa=v;break;case 'ctoversion':ae=v;break;case 'ctodata':ac=t.innerHTML;break;}}}if(U&&((!O&&M)||(O&& !M))){var u="v="+ae;if(aa){u+="&"+aa;}u="p"+n+"="+encodeURIComponent(u);if(ac){u+="&d"+n+"="+encodeURIComponent(ac);}if(M){u+="&w"+n+"="+M;}else{u+="&t"+n+"="+O;}var s;for(s=0;s<o.length;s++){if(o[s]==U){break;}}if(s!=o.length&&l[s]&&(l[s].length+u.length)>2000){CRITEO.AddScript(l[s]);l[s]=null;}if(s==o.length|| !l[s]){o[s]=U;l[s]=U+"display.js?";}else{l[s]+="&";}l[s]+=u;n++;}}}for(var k=0;k<l.length;k++){if(l[k]){CRITEO.AddScript(l[k]);}}}};function J(){B();L();};return{Q:function(){if(typeof(CRITEO_Loaded)!="undefined"){return;}CRITEO_Loaded=1;f.Q(function(){J();});},AddStyle:function(ad){if(document.createElement){var s=document.createElement('style');if(s){s.setAttribute('type','text/css');A(s);if(s.styleSheet){try{s.styleSheet.cssText=ad;}catch(e){}}else{var t=document.createTextNode(ad);s.appendChild(t);}}}},AddScript:function(u){if(document.createElement){var s=document.createElement('script');if(s){s.type='text/javascript';s.src=u;A(s);}}},AddImage:function(a,u){if(document.createElement){var af=document.createElement('IMG');if(af){if(a){var d=document.getElementById(a);if(d===null){d=document.createElement('DIV');d.id=a;d.style.display="none";document.body.appendChild(d);}if(d!==null&&d.appendChild){d.appendChild(af);}}af.src=u;}}},NewGuid:function(m){var g="";for(var i=0;i<m;i++){g+=Math.floor(Math.random()*0xF).toString(0xF);}return g+"";}};}();var CRITEO_Loaded;CRITEO.Q();

