var AJAX_SHOPPINGCART_POWER_SYSTEM="AJAX_SHOPPINGCART_POWER_SYSTEM";var AJAX_SHOPPINGCART_POWER_SYSTEM_PRODUCTS="AJAX_SHOPPINGCART_POWER_SYSTEM_PRODUCTS";var AJAX_SHOPPINGCART_PROMO_MESSAGE="AJAX_SHOPINGCART_PROMO_MESSAGE";var AJAX_SHOPPINGCART_PROMO_DISTANCE_TYPES="BasketPriceEvaluator";var AJAX_SHOPPINGCART_PROMO_DISTANCE_COUNT=20;var AJAX_SHOPPINGCART_PROMO_DISTANCE_ELIGIBLE_MESSAGE="You are eligible for free delivery!";var AJAX_SHOPPINGCART_PROMO_DISTANCE_AMOUNT_BASKET=50;var AJAX_SHOPPINGCART_PROMO_DISTANCE_REGEX_MESSAGE=/free delivery/;var AJAX_SHOPPINGCART_PROMO_DISTANCE_BECOME_MEMBER_MESSAGE="Please register to receive free shipping!";var AJAX_SHOPPINGCART_PROMO_DISTANCE_I_AM_A_MEMBER_MESSAGE="You are eligible for free delivery!";var AJAX_DEFAULT_RTLCODE="The Body Shop";var POWER_SYSTEM_ASSOCIATION_NAME='products_Partners'
var AJAX_varlist="varlist";var AJAX_QtyList="QtyList";var AJAX_BODYSHOP_VARIANT_FILTER_EXPRESSION_1="";var DISCONT_VIEWDETAILS_PROD_TEMPLATE='<a href="$$$AJAX_ProductRelativePath$$$product.aspx?CatCode=$$$AJAX_ProductCategoryCode$$$&prdcode=$$$AJAX_ParentProductCode$$$" class="Ablack10pxRL"><img alt="More Details" src="/images/spacer.gif" width="10" height="17"> </a>';var DISCONT_VIEWDETAILS_PROD_TEMPLATE_URL_REWRITTEN='<a href="$$$AJAX_ProductRelativePath$$$$$$AJAX_ProductURLRewrittenHomePage$$$?cm_mmc=QuickShopLink" class="Ablack10pxRL"><img alt="More Details" src="/images/spacer.gif" width="10" height="17"></a>';_CoreModalPopUp.beforeOpen="modalBeforeOpen";_CoreModalPopUp.beforeClose="modalBeforeClose";function modalBeforeOpen(){if(AJAX_IsIE6()){ToggleDropDowns('hidden')
ToggleProductDetailVarQTYList('hidden');ToggleJustForYou('hidden');ToggleColorExplorerCategory('hidden');ToggleDiscontinuedDropDowns('hidden')}}
function modalBeforeClose(){if(AJAX_IsIE6()){ToggleDropDowns('visible')
ToggleProductDetailVarQTYList('visible');ToggleJustForYou('visible');ToggleColorExplorerCategory('visible');ToggleDiscontinuedDropDowns('visible')}}
function ToggleDiscontinuedDropDowns(_visibility){if(AJAX_IsIE6()){try{var obj=$get('discontinue_layer_dropdown_container');if(obj!=null){obj.style.visibility=_visibility;}
var obj2=$get('discontinue_sort_containerid')
if(obj2!=null){obj2.style.visibility=_visibility;}
if(oldDivID!=null){if(_visibility=='hidden'){hideOldDiv(oldDivID);}
else{showHideSearchDDL(oldDivID);}}}
catch(err){}}}
function ToggleProductDetailVarQTYList(_visibility){if(AJAX_IsIE6()){try{var obj=$get(AJAX_varlist);if(obj!=null){obj.style.visibility=_visibility;}
var mf=GetMainFormName();if(mf==null)return;var x=GetElementID(AJAX_QtyList,mf);var obj2=$get(x);if(obj2!=null){obj2.style.visibility=_visibility;}}
catch(err){}}}
function ToggleStateList(_visibility){if(AJAX_IsIE6()){try{var obj=$get("state");if(obj!=null){obj.style.visibility=_visibility;}}
catch(err){}}}
function ToggleDropDowns(_visibility){if(AJAX_IsIE6()){GetAllSelects();for(var i=0;i<allVisibleSelects.length;i++){allVisibleSelects[i].style.visibility=_visibility;}
try{var obj2=$get('SHOPPINGCART_LAYER_CONTAINER');if(obj2!=null){var allSelects=obj2.getElementsByTagName("select");for(var i=0;i<allSelects.length;i++){allSelects[i].style.visibility=_visibility;}}}
catch(err){}}}
function ToggleColorExplorerCategory(_visibility){if(AJAX_IsIE6()){try{var obj1=$get('row_filter_category_selected');if(obj1!=null){if(_visibility=='visible'){obj1.style.display="";}
else{obj1.style.display="none";}}}
catch(err){}}}
function ToggleJustForYou(_visibility){if(AJAX_IsIE6()){try{var obj1=$get('justforyou');if(obj1!=null){var allSelects=obj1.getElementsByTagName("select");for(var i=0;i<allSelects.length;i++){allSelects[i].style.visibility=_visibility;}}}
catch(err){}
try{var obj2=$get('MYBODYSHOP_JustForYou');if(obj2!=null){var allSelects=obj2.getElementsByTagName("select");for(var i=0;i<allSelects.length;i++){allSelects[i].style.visibility=_visibility;}}}
catch(err){}
try{var obj3=$get('Category');if(obj3!=null){obj3.style.visibility=_visibility;}}
catch(err){}}}
var allVisibleSelects=new Array();function GetAllSelects(){var index=0;if(allVisibleSelects==null||allVisibleSelects.length==0){var allSelects=document.getElementsByTagName("select");for(var i=0;i<allSelects.length;i++){if(allSelects[i].style.visibility=='visible'){allVisibleSelects[index]=allSelects[i];index++;}}}}
_ShoppingCartBubble_Class.beforeOpen="ShoppingCartBeforeOpen";_ShoppingCartBubble_Class.beforeClose="ShoppingCartBeforeClose";function ShoppingCartBeforeOpen(){try{GetPowerSystem();}
catch(err){}
try{GetPromotionProximity();}
catch(err){DoDefault();}
ToggleDropDowns('hidden')}
function ShoppingCartBeforeClose(){ToggleDropDowns('visible')}
function AJAX_IsIE6(){if(navigator.appName=='Microsoft Internet Explorer'){if(navigator.appVersion.indexOf('MSIE 6.0')!=-1){return true;}}
return false;}
function GetAJAXTopicCodes(){var CommaDelimitedList=""
var parentObj=$get("AJAX_Topic_Filter");var allSelects=parentObj.getElementsByTagName("select");for(var i=0;i<allSelects.length;i++){var selectedValue="";selectedValue=allSelects[i].options[allSelects[i].selectedIndex].value;if(selectedValue!='#'&&selectedValue!='##'){if(CommaDelimitedList==""){CommaDelimitedList=selectedValue;}
else{CommaDelimitedList=CommaDelimitedList+","+selectedValue;}}}
SetClearButtonState(CommaDelimitedList);return CommaDelimitedList;}
function SetClearButtonState(_codes){var obj=$get('ajax_filterbutton');if(obj!=null){if(_codes==""){obj.style.display="none";}
else{obj.style.display="";}}}
function ResetFilterDropDowns(){var parentObj=$get("AJAX_Topic_Filter");var allSelects=parentObj.getElementsByTagName("select");for(var i=0;i<allSelects.length;i++){for(var j=0;j<allSelects[i].options.length;j++){var str=allSelects[i].options[j].value;if(str=="#"){allSelects[i].options.selectedIndex=j;break;}}}}
function ResetCheckOutFilter(){var objectTemp=$get('select_whatisnew');for(var i=0;i<objectTemp.options.length;i++){var str=objectTemp.options[i].value;if(str=="#"){objectTemp.options.selectedIndex=i;break;}}}
function ResetFilters(){ResetFilterDropDowns();}
function GetPromotionProximity()
{var obj=$get(AJAX_SHOPPINGCART_PROMO_MESSAGE);if(obj!=null)
{obj.style.display="none";}
_WebServiceAPI.GetPromotionProximity(CurrentCustomerID,AJAX_SHOPPINGCART_PROMO_DISTANCE_COUNT,AJAX_SHOPPINGCART_PROMO_DISTANCE_TYPES,null,'DisplayPromotionProximityOnComplete');}
function DisplayPromotionProximityOnComplete(result)
{var obj=$get(AJAX_SHOPPINGCART_PROMO_MESSAGE);DoDefaultWithoutEvent();var RegExDistancePromotion=AJAX_SHOPPINGCART_PROMO_DISTANCE_REGEX_MESSAGE;if(result!=null)
{if(obj!=null)
{obj.style.display="";}
if(result.length!=0)
{for(var i=0;i<result.length;i++){if(result[i].Current<result[i].Target)
{if(RegExDistancePromotion.test(result[i].PromotionTextWithComputedDistance)==true)
{obj.innerHTML=result[i].PromotionTextWithComputedDistance;SetCookie('isFreeShippingPromo','True');}}
else
{if((ReadCookie('isFreeShippingPromo')!=null)&&(ReadCookie('isFreeShippingPromo')=="True"))
{obj.innerHTML=AJAX_SHOPPINGCART_PROMO_DISTANCE_ELIGIBLE_MESSAGE;}}}}
else
{if((ReadCookie('isFreeShippingPromo')!=null)&&(ReadCookie('isFreeShippingPromo')=="True"))
{obj.innerHTML=AJAX_SHOPPINGCART_PROMO_DISTANCE_ELIGIBLE_MESSAGE;}}}
if(AJAX_IsIE6()){ToggleDropDowns('hidden');ToggleProductDetailVarQTYList('visible');ToggleJustForYou('visible');ToggleColorExplorerCategory('visible');}}
function GetPowerSystem(){var obj=$get(AJAX_SHOPPINGCART_POWER_SYSTEM);if(obj!=null){obj.style.display="none";}
var obj2=$get('AJAX_COMPLETE_MESSAGE');if(obj2!=null){obj2.style.display="none";}
_WebServiceAPI.GetProductAssociations(AJAX_DEFAULT_RTLCODE,_LastShoppingCartItem.ItemCode,POWER_SYSTEM_ASSOCIATION_NAME,false,false,'DisplayPowerSystemOnComplete');}
function DisplayPowerSystemOnComplete(result){DoDefaultWithoutEvent();var obj=$get(AJAX_SHOPPINGCART_POWER_SYSTEM);var obj2=$get('AJAX_COMPLETE_MESSAGE');if(result!=null){if(obj!=null){obj.style.display="block";}
if(obj2!=null){obj2.style.display="block";}
var sb=new StringBuilder();var sbprdnames=new StringBuilder();sb.append("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");sb.append("<tr>");sbprdnames.append("<tr>");for(var i=0;i<result.length;i++){var IsVariant=true;var HasShades=false;if(result[i].ParentName==""){IsVariant=false;}
if(result[i].HasShades){HasShades=true;}
if(IsVariant==true){if(HasShades)
{sb.append("<td><div align=\"center\"><img src=\"/images/product/small/"+result[i].ParentProductCode+"_s.jpg\" width=\"60\" height=\"60\"  onmouseover=\"javascript:_QuickShop_Class.ShowByObjectPosition(this,'"+result[i].SKU+"',true,5,5,true);\"/></div></td>");}
else
{sb.append("<td><div align=\"center\"><img src=\"/images/product/small/"+result[i].ParentProductCode+"_s.jpg\" width=\"60\" height=\"60\"  onmouseover=\"javascript:_QuickShop_Class.ShowByObjectPosition(this,'"+result[i].ParentProductCode+"',false,5,5,false);\"/></div></td>");}}
else
{if(HasShades)
{sb.append("<td><div align=\"center\"><img src=\"/images/product/small/"+result[i].SKU+"_s.jpg\" width=\"60\" height=\"60\"  onmouseover=\"javascript:_QuickShop_Class.ShowByObjectPosition(this,'"+result[i].SKU+"',false,5,5,true);\"/></div></td>");}
else
{sb.append("<td><div align=\"center\"><img src=\"/images/product/small/"+result[i].SKU+"_s.jpg\" width=\"60\" height=\"60\"  onmouseover=\"javascript:_QuickShop_Class.ShowByObjectPosition(this,'"+result[i].SKU+"',false,5,5,false);\"/></div></td>");}}
sbprdnames.append("<td class=\"Amedgrey09pxR\" style=\"padding-left:10px; padding-right:10px\"><div align=\"center\">"+result[i].Name+"</div></td>");if(result.length>1){if(i<parseInt(result.length)-1){sb.append("<td></td>");sbprdnames.append("<td class=\"Amedgrey09pxR\"><div align=\"center\"></div></td>");}}}
sb.append("</tr>");sb.append(sbprdnames.toString());sb.append("</table>");var objpowersystem=$get(AJAX_SHOPPINGCART_POWER_SYSTEM_PRODUCTS);if(objpowersystem!=null){objpowersystem.innerHTML=sb.toString();}}
if(AJAX_IsIE6()){ToggleDropDowns('hidden');ToggleProductDetailVarQTYList('visible');ToggleJustForYou('visible');ToggleColorExplorerCategory('visible');}}
function DoPerformCheckoutFilter(_obj,_catgCode,_level){var index=_obj.selectedIndex;var selvalue=_obj.options[index].value;if(selvalue!="#"){GetCategoryProductsCodesByCategory(_catgCode,selvalue,(_level==1)?true:false,(_level==1)?CategoryProductsCodesOnComplete:CategoryParentProductsCodesOnComplete);}}
function GetCategoryProductsCodesByCategory(CategoryCode,FilterCriteria,variantsWanted,OnCompleteFuncName){_NavigatorManager.ClearFilter();_WebServiceAPI.GetCategoryProductsCodes(CategoryCode,FilterCriteria,variantsWanted,OnCompleteFuncName);}
function GetCategoryProductsCodesByOnlineStatus(CategoryCode){_WebServiceAPI.GetCategoryProductsCodesByOnlineStatus(CategoryCode,-1,CategoryParentProductsCodesOnComplete);}
function CategoryProductsCodesOnComplete(result){DoDefault();if(result!=null){_NavigatorManager.ClearFilter();_NavigatorManager.FilteredData=result;_NavigatorManager.DoFilterInitialization(VARIANT_LAYER_PARENT_CONTAINS);}
else{alert("No Results for this Filter.");}}
function CategoryParentProductsCodesOnComplete(result){DoDefault();if(result!=null){if(AJAX_IS_TOPIC_PRODUCT_SLIDER_ON){var constructedData=_TopicManager.GetConstruct(result);if(constructedData==null||constructedData.length==0){alert("No Results for this Filter.");}
else{CategoryProductsCodesOnComplete(constructedData);}}
else{_NavigatorManager.FilteredData=result;_NavigatorManager.DoMainFilterInitialization(MAIN_LAYER_PARENT_CONTAINS);}}
else{alert("No Results for this Filter.");}}
function _TODO_replaceAll(str,replacements){for(i=0;i<replacements.length;i++){var idx=str.indexOf(replacements[i][0]);while(idx>-1){str=str.replace(replacements[i][0],replacements[i][1]);idx=str.indexOf(replacements[i][0]);}}
return str;}
Core.Discontinued_Class=function(){this.Discontinued_DivID='DiscontinuedLook';this.ShowBubble=function(Code,IsVariant,hasShades){this.Code=Code;this.hasShades=hasShades;this.IsVariant=IsVariant;if(this.IsVariant){_DiscontinuedProductManager.LoadMakeupVariant(this.Code);}else{if(this.hasShades){_DiscontinuedProductManager.LoadMakeupProduct(this.Code);}else{_DiscontinuedProductManager.LoadSkinCareProduct(this.Code);}}}
this.ShowSearchBubble=function(){_DiscontinuedBubble_Class.LoadProductSearch();}}
Core.Discontinued_Class.prototype=new Core.QuickShop_Class;if(IsTypeDefined){Core.Discontinued_Class.registerClass('Core.Discontinued_Class');}
var _Discontinued_Class=new Core.Discontinued_Class();Core.DiscontinuedProductManager_Class=function(){var ProductAssociation="DISCONT_PRD_ASSC";var VariantAssociation="DISCONT_PRD_ASSC_VAR";this.CurrentCode="";this.AssociationCollection=new Array();this.AddAssociation=function(ProductObject){var exist=false;if(this.AssociationCollection!=null){for(var i=0;i<this.AssociationCollection.length;i++){if(this.AssociationCollection[i].ProductCode==ProductObject.ProductCode){this.AssociationCollection[i]=ProductObject;exist=true;break;}}
if(exist==false){this.AssociationCollection[this.AssociationCollection.length]=ProductObject;}}}
this.GetAssociation=function(ProductCode){for(var i=0;i<this.AssociationCollection.length;i++){if(this.AssociationCollection[i].ProductCode==ProductCode){return this.AssociationCollection[i];}}}
this.LoadProduct=function(ProductCode){DoWait();if(ProductCode!=''){_DiscontinuedBubble_Class.LockCoordinates();_DiscontinuedBubble_Class.HideShades();this.CurrentCode=ProductCode;var _Product=new Core.Product_Class();_Product.ProductCode=ProductCode;this.AddProduct(_Product);_WebServiceAPI.LoadDiscontinuedProduct(AJAX_DEFAULT_RTLCODE,ProductCode,true,true,this.OnRequestComplete);}else{DoDefault();}}
this.LoadMakeupVariant=function(VariantCode){this.Action=0;_DiscontinuedProductManager.LoadProduct(VariantCode);}
this.OnRequestComplete=function(result){if(result!=null){var _Product=_DiscontinuedProductManager.GetProduct(result.SKU);_Product.Result=result;_Product.Loaded=true;_DiscontinuedProductManager.AddProduct(_Product);if(_Discontinued_Class.IsVariant){_WebServiceAPI.GetProductAssociationsIgnoreFlags(AJAX_DEFAULT_RTLCODE,_Product.ProductCode,VariantAssociation,false,true,_DiscontinuedProductManager.AssociationOnRequestComplete);}else{_WebServiceAPI.GetProductAssociationsIgnoreFlags(AJAX_DEFAULT_RTLCODE,_Product.ProductCode,ProductAssociation,true,true,_DiscontinuedProductManager.AssociationOnRequestComplete);}}}
this.AssociationOnRequestComplete=function(result){if(result!=null){result=result[0];var _AssocProduct=new Core.Product_Class();_AssocProduct.ProductCode=result.SKU;_AssocProduct.Result=result;_AssocProduct.Loaded=true;var _Prod=_DiscontinuedProductManager.GetProduct(_DiscontinuedProductManager.CurrentCode);_DiscontinuedProductManager.DoBranching(_Prod,_AssocProduct);}else{var _Prod=_DiscontinuedProductManager.GetProduct(_DiscontinuedProductManager.CurrentCode);_DiscontinuedProductManager.DoBranchingNoAssociation(_Prod);}}
this.DoBranching=function(_Product,_AssocProduct){_DiscontinuedBubble_Class.IsMakeupProduct=true;switch(this.Action){case 0:_DiscontinuedBubble_Class.IsMakeupProduct=true;_DiscontinuedBubble_Class.Code=_Product.ProductCode;_DiscontinuedBubble_Class.AssocCode=_AssocProduct.ProductCode;_DiscontinuedBubble_Class.LoadVariantRequestComplete(_Product.Result,_AssocProduct.Result);break;case 1:_DiscontinuedBubble_Class.IsMakeupProduct=false;_DiscontinuedBubble_Class.Code=_Product.ProductCode;_DiscontinuedBubble_Class.AssocCode=_AssocProduct.ProductCode;_DiscontinuedBubble_Class.LoadProductRequestComplete(_Product.Result,_AssocProduct.Result);break;case 2:_DiscontinuedBubble_Class.IsMakeupProduct=true;_DiscontinuedBubble_Class.Code=_Product.ProductCode;_DiscontinuedBubble_Class.AssocCode=_AssocProduct.ProductCode;_DiscontinuedBubble_Class.LoadProductRequestComplete(_Product.Result,_AssocProduct.Result);break;default:break;}}
this.DoBranchingNoAssociation=function(_Product){if(_Product!=null){_DiscontinuedBubble_Class.IsMakeupProduct=true;switch(this.Action){case 0:_DiscontinuedBubble_Class.IsMakeupProduct=true;_DiscontinuedBubble_Class.LoadVariantRequestComplete(_Product.Result,null);break;case 1:_DiscontinuedBubble_Class.IsMakeupProduct=false;_DiscontinuedBubble_Class.LoadProductRequestComplete(_Product.Result,null);break;case 2:_DiscontinuedBubble_Class.IsMakeupProduct=true;_DiscontinuedBubble_Class.LoadProductRequestComplete(_Product.Result,null);break;default:break;}}}
this.LoadVariant=function(VariantCode){if(VariantCode!=''){var _Variant=new Core.Product_Class();_Variant.ProductCode=VariantCode;_DiscontinuedProductManager.AddVariant(_Variant);_WebServiceAPI.LoadDiscontinuedProduct(AJAX_DEFAULT_RTLCODE,VariantCode,true,false,_DiscontinuedProductManager.VariantOnRequestComplete);}}
this.VariantOnRequestComplete=function(result){if(result!=null){_WebServiceAPI.GetDiscontinuedProductAssociationsIgnoreFlags(AJAX_DEFAULT_RTLCODE,result.SKU,VariantAssociation,false,true,_DiscontinuedProductManager.AssociationVariantOnRequestComplete);}}
this.AssociationVariantOnRequestComplete=function(result){if(result!=null){var _Variant=new Core.Product_Class();_Variant.ProductCode=result[0].SKU;_Variant.Result=result[0];_DiscontinuedBubble_Class.SetSelectedShade(_Variant.Result);}else{_DiscontinuedBubble_Class.SetSelectedShade(null);}}}
Core.DiscontinuedProductManager_Class.prototype=new Core.ProductManager_Class;if(IsTypeDefined){Core.DiscontinuedProductManager_Class.registerClass('Core.DiscontinuedProductManager_Class');}
var _DiscontinuedProductManager=new Core.DiscontinuedProductManager_Class();Core.DiscontinuedBubble_Class=function(){this.Bubble_DivID="Discontinued_ProductBubble_Div";this.Bubble_ImageID="Discontinued_ProductBubble_Image";this.Bubble_ImageID2="Discontinued_ProductBubble2_Image";this.Bubble_AssociatedImageID="Discontinued_AssociatedProductBubble_Image";this.Bubble_QuantityID="Discontinued_ProductBubble_Quantity";this.Bubble_PriceID="Discontinued_ProductBubble_Price";this.Bubble_ProductNameID="Discontinued_ProductBubble_ProductName";this.Bubble_ProductNameID2="Discontinued_ProductBubble2_ProductName";this.Bubble_AssocProductNameID="Discontinued_ProductBubble_AssociatedProductName";this.Bubble_ProductDescriptionID="Discontinued_ProductBubble_ProductDescription";this.Bubble_AddToBagID="Discontinued_ProductBubble_AddToBag";this.Bubble_OutOfStockID="Discontinued_ProductBubble_OutOfStock"
this.Code="";this.AssocCode="";this.Bubble_LayerDropDownListID="Discontinued_ProductBubble_VariantDropDownList";this.Bubble_DropDownListID="DropDown_"+this.Bubble_LayerDropDownListID;this.ProductBubble_Small_ShadesID="Discontinued_ProductBubble_Small_Shades"
this.ProductBubble_RecommendedShadeID="Discontinued_ProductBubble_Recommended_Shade";this.ProductBubble_RecommendedShadeImgID="Discontinued_ProductBubble_Recommended_ShadeImg";this.ProductBubble_RecommendedProdNameID="Discontinued_ProductBubble_Recommended_ProdName";this.ProductBubble_RecommendedContinerID="RecommendedContainer";this.ProductBubble_RecommendedContinerID1="RecommendedContainer1";this.ProductBubble_RecommendedContinerID2="RecommendedContainer2";this.Variants_Main_All_Thumbnails='Ajax_Main_Bubble_All_Thumbnail_Shades';this.Variants_ThumbnailDivID='Ajax_allShades_layer';this.DiscontinuedSearch_DivID='Discontinued_SearchBubble_Div';this.Discontinued_ProductsDropDownID="Discontinued_ProductsDropDown";this.Discontinued_VariantsDropDownID="Discontinued_VariantsDropDown";this.Discontinued_ShadeSelectID="Discontinued_ShadeSelect";this.Discontinued_Search_ButtonID="Discontinued_Search_Button";this.Discontinued_CategoryDropDownID="Discontinued_CategoryDropDown";this.VIEWMOREDETAILS_ID="Discontinued_PRODUCT_BUBBLE_VIEWMOREDETAILS";this.VIEWMOREDETAILS_INNERHTML_TEMPLATE="";this.SelectShadeLabel="Discontinued_ProductBubble_SelectShadeLabel";this.DropDownShadeLabel="Discontinued_ProductBubble_DropDownShadeLabel";this.DropDownSizeLabel="Discontinued_ProductBubble_DropDownSizeLabel";this.Discontinued_ProductBubble_FoundID="Discontinued_ProductBubble_Found";this.Discontinued_ProductBubble_NotFoundID="Discontinued_ProductBubble_NotFound";this.Discontinued_ProductBubble_NotFoundID1="Discontinued_ProductBubble_NotFound1";this.Discontinued_ProductBubble_QtyLabelID="Discontinued_ProductBubble_QtyLabel";this.Discontinued_ProductBubble_PriceLabelID="Discontinued_ProductBubble_PriceLabel";this.Discontinued_ProductBubble_QuantityContainerID="Discontinued_ProductBubble_QuantityContainer";this.Discontinued_ProductBubble_AddToBagContainerID="Discontinued_ProductBubble_AddToBagContainer";this.Discontinued_ProductBubble_BottomBarID="Discontinued_ProductBubble_BottomBar";this.VIEWMOREDETAILS2_ID="PRODUCT_BUBBLE2_VIEWMOREDETAILS";this.VIEWMOREDETAILS_INNERHTML_TEMPLATE2="";this.Bubble_Image_Prefix="/images/product/"+PRODUCT_SMALL_IMAGE_PREFIX;this.Bubble_Image_SwatchPrefix="/images/product/"+VARIANT_MEDIUM_SHADE_IMAGE_PREFIX;this.Bubble_Image_Suffix=PRODUCT_MEDIUM_IMAGE_SUFFIX;this.Bubble_Image_SwatchSuffix=VARIANT_SMALL_SHADE_IMAGE_SUFFIX;this.Discontinued_ProductBubble_SelectedShadeNameID='Discontinued_ProductBubble_SelectedShadeName';this.Discontinued_ProductBubble_AssociatedSelectedShadeNameID='Discontinued_ProductBubble_AssociatedSelectedShadeName';this.LoadProductSearch=function(){var obj1=$get(this.DiscontinuedSearch_DivID);if(obj1!=null){obj1.style.visibility='visible';}
var ddobj=$get(this.Discontinued_CategoryDropDownID);if(ddobj!=null){this.FilterProductsByCategory(ddobj.options[ddobj.selectedIndex].value);_CoreModalPopUp._PopupControlID=this.DiscontinuedSearch_DivID;_CoreModalPopUp.ShowModal();}}
this.FilterProductsByCategory=function(CategoryCode){if(CategoryCode!="#"&&CategoryCode!=""){_WebServiceAPI.GetCategoryProductsByOnlineStatus(AJAX_DEFAULT_RTLCODE,CategoryCode,-1,true,this.SetProductDropDown);this.ResetFilterDropDown(_DiscontinuedBubble_Class.Discontinued_VariantsDropDownID);this.hideShowDropDown(_DiscontinuedBubble_Class.Discontinued_ShadeSelectID,false);}else{this.ResetFilterDropDown(_DiscontinuedBubble_Class.Discontinued_ProductsDropDownID);this.ResetFilterDropDown(_DiscontinuedBubble_Class.Discontinued_VariantsDropDownID);this.hideShowDropDown(_DiscontinuedBubble_Class.Discontinued_ShadeSelectID,false);}}
this.FilterVariantsByProduct=function(ProductCode){if(ProductCode!="#"&&ProductCode!=""){if(ProductCode.indexOf(":1")!=-1){_WebServiceAPI.GetVariantInformationIgnoreFlags(AJAX_DEFAULT_RTLCODE,ProductCode.replace(":1",""),true,this.SetVariantDropDown);}
else{this.hideShowDropDown(_DiscontinuedBubble_Class.Discontinued_ShadeSelectID,false);}}else{this.ResetFilterDropDown(_DiscontinuedBubble_Class.Discontinued_VariantsDropDownID);this.hideShowDropDown(_DiscontinuedBubble_Class.Discontinued_ShadeSelectID,false);}}
this.GetSku=function(str){if(str.indexOf(":")!=-1){var str_array=str.split(":");return str_array[0];}
else{return str;}}
this.HasShades=function(str){if(str.indexOf(":1")!=-1){return true;}
else{return false;}}
this.SetProductDropDown=function(Products){if(Products!=null){var ddobj=$get(_DiscontinuedBubble_Class.Discontinued_ProductsDropDownID);if(ddobj!=null){var sb=new StringBuilder();sb.append("<select class=\"Ablack10pxR\" onchange=\"javascript:_DiscontinuedBubble_Class.FilterVariantsByProduct(this.options[this.selectedIndex].value);_DiscontinuedBubble_Class.SetSearchButton(_DiscontinuedBubble_Class.GetSku(this.options[this.selectedIndex].value), false, _DiscontinuedBubble_Class.HasShades(this.options[this.selectedIndex].value));\">");for(i=0;i<Products.length;i++){if(i==0){_DiscontinuedBubble_Class.SetSearchButton(Products[i].SKU,false,Products[i].HasShades);if(Products[i].HasShades){_DiscontinuedBubble_Class.FilterVariantsByProduct(Products[i].SKU+":1");}}
sb.append("<option value='");sb.append(Products[i].SKU);if(Products[i].HasShades){sb.append(":1");}
else{sb.append(":0");}
sb.append("'>");sb.append(Products[i].Name);sb.append("</option>");}
sb.append("</select>");ddobj.innerHTML=sb.toString();}}}
this.SetVariantDropDown=function(result){if(result!=null){_DiscontinuedBubble_Class.hideShowDropDown(_DiscontinuedBubble_Class.Discontinued_ShadeSelectID,true);var Products=result;var ddobj=$get(_DiscontinuedBubble_Class.Discontinued_VariantsDropDownID);if(ddobj!=null){var sb=new StringBuilder();sb.append("<select class=\"Ablack10pxR\" onchange=\"javascript:_DiscontinuedBubble_Class.SetSearchButton(this.options[this.selectedIndex].value, true, false);\">");sb.append("<option value='#'>- Select -</option>");for(i=0;i<Products.length;i++){if(Products[i].Online=='-1'){sb.append("<option value='");sb.append(Products[i].SKU);sb.append("'>");sb.append(Products[i].Name);sb.append("</option>");}}
sb.append("</select>");ddobj.innerHTML=sb.toString();}}}
this.SetSearchButton=function(ProductCode,ProductType,HasShades){var searchBtn=$get(_DiscontinuedBubble_Class.Discontinued_Search_ButtonID);var str="javascript:_Discontinued_Class.ShowBubble('"+ProductCode+"',"+ProductType+","+HasShades+");";str+="$get(_DiscontinuedBubble_Class.DiscontinuedSearch_DivID).style.visibility='hidden';"
searchBtn.onclick=new Function(str);}
this.hideShowDropDown=function(parentObjName,display){var shadeSelect=$get(parentObjName);if(display==true)
shadeSelect.style.display="";else
shadeSelect.style.display="none";}
this.ResetFilterDropDown=function(parentObjName){var parentObj=$get(parentObjName);var allSelects=parentObj.getElementsByTagName("select");for(var i=0;i<allSelects.length;i++){for(var j=0;j<allSelects[i].options.length;j++){allSelects[i].options[j]=null;}
allSelects[i].options[0]=new Option('- Select -','#');}}
this.LoadProductRequestComplete=function(ProductResult,AssociationResult){this.PopulateData(ProductResult,AssociationResult);}
this.LoadVariantRequestComplete=function(ProductResult,AssociationResult){this.PopulateVariantData(ProductResult,AssociationResult);}
this.ShowHideBubbleImage=function(objID,value){var obj=$get(objID);if(obj!=null)
obj.src=value;}
this.ShowHideBubbleProductName=function(objID,value,showHide){var obj=$get(objID);if(obj!=null){if(showHide)
obj.innerHTML=value;else
obj.innerHTML='';}}
this.ShowHideBubbleContainer=function(objID,value,showHide){var obj=$get(objID);if(obj!=null){if(showHide){obj.style.display="";obj.style.visibility="visible";if(value!='')
obj.innerHTML=value;}else{obj.style.display="none";obj.style.visibility="hidden";}}}
this.ShowHideBottomSection=function(showHide){this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_QtyLabelID,'',showHide);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_PriceLabelID,'',showHide);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_QuantityContainerID,'',showHide);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_AddToBagContainerID,'',showHide);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_BottomBarID,'',showHide);}
this.BuildViewMoreLink=function(prdCode,_Product){var viewmoredetailsobj=$get(this.VIEWMOREDETAILS_ID);if(viewmoredetailsobj!=null){var strviewmoredetails=DISCONT_VIEWDETAILS_PROD_TEMPLATE
var _urlrewritten=""
if(_Product.URLRewrittenHomePage){if(_Product.URLRewrittenHomePage!=""){strviewmoredetails=DISCONT_VIEWDETAILS_PROD_TEMPLATE_URL_REWRITTEN;_urlrewritten=_Product.URLRewrittenHomePage;}}
if(this.VIEWMOREDETAILS_INNERHTML_TEMPLATE==""){this.VIEWMOREDETAILS_INNERHTML_TEMPLATE=strviewmoredetails;}else{strviewmoredetails=this.VIEWMOREDETAILS_INNERHTML_TEMPLATE;}
strviewmoredetails=strviewmoredetails.replace("$$$AJAX_ParentProductCode$$$",prdCode);strviewmoredetails=strviewmoredetails.replace("$$$AJAX_ProductCategoryCode$$$",_Product.CategoryPath);strviewmoredetails=strviewmoredetails.replace("$$$AJAX_ProductRelativePath$$$",this.GetRelativePath(_Product.CategoryHomePage));if(_urlrewritten!=""){strviewmoredetails=strviewmoredetails.replace("$$$AJAX_ProductURLRewrittenHomePage$$$",_urlrewritten);}
viewmoredetailsobj.innerHTML=strviewmoredetails.toString();}}
this.PopulateData=function(prodResult,assocResult){DoDefault();if(prodResult==null){return false;}
if(prodResult.Variants==null){return false;}
if(typeof(prodResult)=='undefined'){return false;}
if(typeof(prodResult.Variants)=='undefined'){return false;}
var prodBubble=$get(this.Bubble_DivID);if((prodBubble==null)||(prodBubble=='undefined')){alert('The \"'+this.Bubble_DivID+'\" is not found.');return;}
var selshadelabelobj=$get(this.Discontinued_ProductBubble_SelectedShadeNameID);if(selshadelabelobj!=null){selshadelabelobj.style.display="none";}
var selshadelabelobj=$get(this.Discontinued_ProductBubble_AssociatedSelectedShadeNameID);if(selshadelabelobj!=null){selshadelabelobj.style.display="none";}
var dropdownlistObj=$get(this.Bubble_LayerDropDownListID);this.ShowHideBubbleImage(this.Bubble_ImageID,this.Bubble_Image_Prefix+prodResult.SKU+this.Bubble_Image_Suffix);this.ShowHideBubbleProductName(this.Bubble_ProductNameID,prodResult.Name,true);this.ShowHideBubbleProductName(this.Bubble_ProductNameID2,prodResult.Name,true);var productBubbleSmShadesObj=$get(this.ProductBubble_Small_ShadesID);if(productBubbleSmShadesObj!=null){if(this.IsMakeupProduct){this.ShowHideBubbleContainer(this.DropDownShadeLabel,'',true);this.ShowHideBubbleContainer(this.DropDownSizeLabel,'',false);var innerHTML="<table width=\"70%\" border=0 cellspacing=1 cellpadding=1><tr><td><div class=\"BL_green1px\" align=\"left\"><p class=\"Adrkgrey12pxR\">Select a "+prodResult.Name+" Shade</p></div></td></tr></table>"
innerHTML+=this.GetShadeTableString(prodResult,true);productBubbleSmShadesObj.innerHTML=innerHTML;productBubbleSmShadesObj.style.display="";}else{this.ShowHideBubbleContainer(this.DropDownShadeLabel,'',false);this.ShowHideBubbleContainer(this.DropDownSizeLabel,'',true);this.ShowHideBubbleContainer(this.SelectShadeLabel,'',false);this.ShowHideBubbleContainer(this.ProductBubble_RecommendedContinerID,'',false);this.ShowHideBubbleContainer(this.ProductBubble_RecommendedContinerID1,'',false);this.ShowHideBubbleContainer(this.ProductBubble_RecommendedContinerID2,'',false);productBubbleSmShadesObj.innerHTML="";productBubbleSmShadesObj.style.display="none";}}
if(assocResult!=null){if(this.AssocCode==null||this.AssocCode=='')
this.AssocCode=assocResult.ProductCode;this.DetermineMultiplePrices(assocResult.Variants);this.ShowHideBubbleImage(this.Bubble_AssociatedImageID,this.Bubble_Image_Prefix+this.AssocCode+this.Bubble_Image_Suffix)
this.ShowHideBubbleProductName(this.Bubble_AssocProductNameID,assocResult.Name,true);if(this.IsMakeupProduct){this.ShowHideBubbleContainer(this.SelectShadeLabel,'',false);if(assocResult.Variants!=null){this.ShowHideBubbleContainer(this.SelectShadeLabel,assocResult.Variants[0].Name,true);this.ShowHideBubbleContainer(this.Bubble_LayerDropDownListID,'',false);this.SetSelectedShade(assocResult.Variants[0]);if(assocResult.ParentName==""){this.ShowHideBubbleContainer(this.ProductBubble_RecommendedProdNameID,assocResult.Name,true);}
else{this.ShowHideBubbleContainer(this.ProductBubble_RecommendedProdNameID,assocResult.ParentName+" "+assocResult.Name,true);}}}else{if(assocResult.Variants!=null){var hasuniqueprices=false;if(this.DistinctPrice!=0){hasuniqueprices=true;}
this.ShowHideBubbleContainer(this.Bubble_PriceID,"$ "+assocResult.Variants[0].MainPrice,true);this.ShowHideBubbleContainer(this.Bubble_LayerDropDownListID,GenerateDropDownVariants(assocResult.Variants,this.Bubble_DropDownListID,hasuniqueprices,this.ShowPriceOnDropDown,'_DiscontinuedBubble_Class.SelectItem();'),true);this.ShowHideBubbleContainer(this.ProductBubble_RecommendedContinerID1,'',true);this.ShowHideBubbleContainer(this.ProductBubble_RecommendedContinerID2,'',true);}else{this.ShowHideBubbleContainer(this.Bubble_LayerDropDownListID,'',false);}}
this.BuildViewMoreLink(this.AssocCode,assocResult);_LastShoppingCartItem.PopulateData("","",this.AssocCode,assocResult.Name,this.DistinctPrice);if(this.DistinctPrice==0){this.SelectItem();}
this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_FoundID,'',true);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_NotFoundID,'',false);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_NotFoundID1,'',false);this.ShowHideBottomSection(true);var obj=$get(this.Bubble_PriceID);if(obj!=null){obj.style.visibility='visible';obj.style.display="";}}else{if(this.IsMakeupProduct&&prodResult.Variants!=null){this.GetAssociatedShade(prodResult.Variants[0].SKU);}
else{this.ShowHideBottomSection(false);this.ShowHideBubbleContainer(this.DropDownShadeLabel,'',false);this.ShowHideBubbleContainer(this.DropDownSizeLabel,'',false);this.ShowHideBubbleContainer(this.SelectShadeLabel,'',false);this.ShowHideBubbleContainer(this.Bubble_PriceID,'',false);this.ShowHideBubbleContainer(this.Bubble_LayerDropDownListID,'',false);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_FoundID,'',false);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_NotFoundID,'',true);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_NotFoundID1,'',true);}}
$get(this.Bubble_DivID).style.visibility='visible'
_CoreModalPopUp._PopupControlID=this.Bubble_DivID;_CoreModalPopUp.ShowModal();}
this.PopulateVariantData=function(prodResult,assocResult){DoDefault();if(prodResult==null){return false;}
if(typeof(prodResult)=='undefined'){return false;}
var prodBubble=$get(this.Bubble_DivID);if((prodBubble==null)||(prodBubble=='undefined')){alert('The \"'+this.Bubble_DivID+'\" is not found.');return;}
var dropdownlistObj=$get(this.Bubble_LayerDropDownListID);var obj=$get(this.Bubble_ImageID);var imgobj2=$get(this.Bubble_ImageID2);var prodnameobj=$get(this.Bubble_ProductNameID);var prodnameobj2=$get(this.Bubble_ProductNameID2);var productBubbleSmShadesObj=$get(this.ProductBubble_Small_ShadesID);var productdescrobj=$get(this.Bubble_ProductDescriptionID);$get(this.ProductBubble_RecommendedContinerID).style.display="none";if(prodnameobj!=null){prodnameobj.innerHTML=prodResult.Name;}
if(prodnameobj2!=null){prodnameobj2.innerHTML=prodResult.Name;}
if(productdescrobj!=null){productdescrobj.innerHTML=prodResult.Description;}
if(obj!=null){obj.src=this.Bubble_Image_SwatchPrefix+prodResult.SKU+this.Bubble_Image_SwatchSuffix;}
if(imgobj2!=null){imgobj2.src=this.Bubble_Image_SwatchPrefix+prodResult.SKU+this.Bubble_Image_SwatchSuffix;}
var labelObj=$get(this.SelectShadeLabel);var shadeobj1=$get(this.DropDownShadeLabel);var sizeobj2=$get(this.DropDownSizeLabel);if(productBubbleSmShadesObj!=null){if(shadeobj1!=null){shadeobj1.style.display="none";shadeobj1.style.visibility='hidden';}
if(sizeobj2!=null){sizeobj2.style.display="";sizeobj2.style.visibility='visible';}
productBubbleSmShadesObj.innerHTML="";productBubbleSmShadesObj.style.display="none";}
if(assocResult!=null){if(this.AssocCode==null||this.AssocCode=='')
this.AssocCode=assocResult.ProductCode;this.DistinctPrice=assocResult.MainPrice;var obj=$get(this.Bubble_AssociatedImageID);if(obj!=null){obj.src=this.Bubble_Image_SwatchPrefix+this.AssocCode+this.Bubble_Image_SwatchSuffix;}
var assocprodnameobj=$get(this.Bubble_AssocProductNameID);if(assocprodnameobj!=null){assocprodnameobj.innerHTML=assocResult.Name;}
var priceobj=$get(this.Bubble_PriceID);if(priceobj!=null){if(this.DistinctPrice!=0){priceobj.innerHTML="$ "+this.DistinctPrice;}
else{priceobj.innerHTML="";}}
if(this.IsMakeupProduct){if(labelObj!=null){labelObj.innerHTML="";labelObj.innerHTML=assocResult.Name
if(dropdownlistObj!=null){dropdownlistObj.style.display='none';}
this.SetSelectedShade(assocResult);var obj=$get(this.ProductBubble_RecommendedProdNameID);if(obj!=null){if(assocResult.ParentName==""){obj.innerHTML=assocResult.Name;}
else{obj.innerHTML=assocResult.ParentName+" "+assocResult.Name;}}}}else{if(dropdownlistObj!=null){dropdownlistObj.style.visibility='hidden';dropdownlistObj.style.display='none';}
if(labelObj!=null){labelObj.innerHTML="";}}
this.BuildViewMoreLink(this.AssocCode,assocResult);_LastShoppingCartItem.PopulateData("","",this.AssocCode,assocResult.Name,this.DistinctPrice);if(this.DistinctPrice==0){this.SelectItem();}
this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_FoundID,'',true);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_NotFoundID,'',false);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_NotFoundID1,'',false);}else{this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_FoundID,'',false);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_NotFoundID,'',true);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_NotFoundID1,'',true);this.ShowHideBottomSection(false);this.ShowHideBubbleContainer(this.DropDownShadeLabel,'',false);this.ShowHideBubbleContainer(this.DropDownSizeLabel,'',false);this.ShowHideBubbleContainer(this.SelectShadeLabel,'',false);this.ShowHideBubbleContainer(this.Bubble_PriceID,'',false);this.ShowHideBubbleContainer(this.Bubble_LayerDropDownListID,'',false);}
$get(this.Bubble_DivID).style.visibility='visible'
_CoreModalPopUp._PopupControlID=this.Bubble_DivID;_CoreModalPopUp.ShowModal();}
this.GetAssociatedShade=function(VariantCode){var selshadeobj=$get('A_'+VariantCode);if(selshadeobj!=null){var selshadelabelobj=$get(this.Discontinued_ProductBubble_SelectedShadeNameID);if(selshadelabelobj!=null){selshadelabelobj.style.display='';selshadelabelobj.innerHTML=selshadeobj.alt;}
this.getswapimagesrc(selshadeobj,'on');}
var variant=_DiscontinuedProductManager.LoadVariant(VariantCode);}
this.SetSelectedShade=function(Variant){if(Variant!=null){this.ShowHideBubbleContainer(this.ProductBubble_RecommendedContinerID,'',true);this.ShowHideBubbleContainer(this.ProductBubble_RecommendedContinerID1,'',true);this.ShowHideBubbleContainer(this.ProductBubble_RecommendedContinerID2,'',true);this.ShowHideBubbleContainer(this.SelectShadeLabel,Variant.Name,true);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_AssociatedSelectedShadeNameID,Variant.Name,true);this.ShowHideBubbleContainer(this.Bubble_PriceID,"$ "+Variant.MainPrice,true);this.ShowHideBubbleContainer(this.ProductBubble_RecommendedShadeImgID,"<img src='"+this.Bubble_Image_SwatchPrefix+Variant.SKU+".gif' width=50 height=50/>",true);this.ShowHideBubbleContainer(this.ProductBubble_RecommendedShadeID,Variant.Name,true);this.ShowHideBubbleImage(this.Bubble_AssociatedImageID,this.Bubble_Image_Prefix+Variant.ParentProductCode+this.Bubble_Image_Suffix)
this.ShowHideBubbleContainer(this.Bubble_AssocProductNameID,Variant.ParentName,true);this.ShowHideBubbleContainer(this.ProductBubble_RecommendedProdNameID,Variant.ParentName,true);this.BuildViewMoreLink(Variant.ParentProductCode,Variant);this.ShowHideBottomSection(true);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_FoundID,'',true);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_NotFoundID,'',false);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_NotFoundID1,'',false);var obj1=$get(this.Bubble_LayerDropDownListID);if(obj1!=null){obj1.innerHTML=this.BuildDrpDownVariant(Variant,this.Bubble_DropDownListID,'_DiscontinuedBubble_Class.SelectItem();')
obj1.style.display="none";obj1.style.visibility="hidden";}
this.ManageStock(Variant.StockWeb.toString());}
else{this.ShowHideBubbleContainer(this.ProductBubble_RecommendedShadeImgID,"<img src='/images/spacer.gif' width=50 height=50/>",true);this.ShowHideBubbleContainer(this.ProductBubble_RecommendedShadeID,"Sorry no match",true);this.ShowHideBubbleContainer(this.SelectShadeLabel,"No match",true);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_FoundID,'',false);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_NotFoundID,'',true);this.ShowHideBubbleContainer(this.Discontinued_ProductBubble_NotFoundID1,'',true);this.ShowHideBubbleContainer(this.ProductBubble_RecommendedContinerID,'',false);this.ShowHideBubbleContainer(this.ProductBubble_RecommendedContinerID1,'',false);this.ShowHideBubbleContainer(this.ProductBubble_RecommendedContinerID2,'',false);}}
this.BuildDrpDownVariant=function(Variant,DropDownID,onchangeFuncCall)
{var sb=new StringBuilder();sb.append("");if(Variant!=null){sb.append("<select id=\"");sb.append(DropDownID);sb.append("\" class=\"Ablack10pxR\" onchange=\""+onchangeFuncCall+"\">");sb.append("<option value=\"");sb.append(Variant.SKU);sb.append("#");sb.append(Variant.MainPrice);sb.append("#");sb.append(Variant.StockWeb.toString());sb.append("\">");sb.append(Variant.Name);sb.append("</option>");sb.append("</select>")}
return sb.toString();}
this.GetShadeTableString=function(result){if(result!=null&&result.Variants!=null){var VariantsToBeDisplayed=result.Variants;var CurrentRowNumber=0;var CurrentCellInCurrentRow=0;var sb=new StringBuilder();var HasShadeSubGroup=false;var StartSubGroupConst='$#Begin#$';var PreviousSubGroupValue=StartSubGroupConst;var swatchW=VARIANT_SMALL_SHADE_WIDTH;var swatchH=VARIANT_SMALL_SHADE_HEIGHT;if(typeof(SHADE_SUB_GROUP_FLD)!='undefined'||SHADE_SUB_GROUP_FLD!=''){HasShadeSubGroup=true;sb.append("<table border=0 cellspacing=1 cellpadding=1><tr><td >");}else{sb.append("<table border=0 cellspacing=1 cellpadding=1><tr>");}
var previousSku="#_999_notavailable_999_#";var filter=this.FilterVariantList;for(var i=0;i<VariantsToBeDisplayed.length;i++){if(previousSku!=VariantsToBeDisplayed[i].SKU){previousSku=VariantsToBeDisplayed[i].SKU;if(filter==''||filter.indexOf(VariantsToBeDisplayed[i].SKU)!=-1){if(HasShadeSubGroup==true){var currenSubGroupValue="";if(VariantsToBeDisplayed[i].Properties!=null){var _Properties=VariantsToBeDisplayed[i].Properties;for(var j=0;j<_Properties.length;j++){if(_Properties[j].Name.toLowerCase()==SHADE_SUB_GROUP_FLD.toLowerCase()){currenSubGroupValue=_Properties[j].Value;;}}}
if(PreviousSubGroupValue!=currenSubGroupValue&&HasShadeSubGroup==true){if(PreviousSubGroupValue!=StartSubGroupConst){if(CurrentRowNumber>0&&CurrentCellInCurrentRow<this.RowSize){for(var k=CurrentCellInCurrentRow;k<this.RowSize;k++)
{sb.append("<td><img src=\""+SPACER_IMAGE+"\""+" width=\""+swatchW+"\" height=\""+swatchH+"\" border=\"0\"></td>");}}
sb.append("</tr></table></div></td></tr></table></div>");}
sb.append("<div class=\"BL_pink1px\" align=\"left\"><table border=0 cellspacing=1 cellpadding=1><tr><td width=\"35%\" class=\"Adrkpink10pxR\" >");sb.append(currenSubGroupValue);sb.append("</td><td align=\"left\">");sb.append("<div class=\"Adrkpink10pxR\"><table border=0 cellspacing=1 cellpadding=1><tr>");CurrentRowNumber+=1;CurrentCellInCurrentRow=0;PreviousSubGroupValue=currenSubGroupValue;}}
if(CurrentCellInCurrentRow>=this.RowSize){sb.append("</tr><tr>");CurrentRowNumber+=1;CurrentCellInCurrentRow=0;}
sb.append("<td><img id='A_"+VariantsToBeDisplayed[i].SKU+"' src='"+this.Bubble_ImagePrefix_SmallShade+VariantsToBeDisplayed[i].SKU+this.Bubble_ImageSuffix_SmallShade+"' onclick=\"javascript:_DiscontinuedBubble_Class.getswapimagesrc(this,'on');_DiscontinuedBubble_Class.GetAssociatedShade('"+VariantsToBeDisplayed[i].SKU+"');\" style=\"cursor:pointer\""+" width=\""+swatchW+"\"  height=\""+swatchH+"\" alt=\""+VariantsToBeDisplayed[i].Name+"\"></td>");CurrentCellInCurrentRow+=1;}}}
if(CurrentRowNumber>0&&CurrentCellInCurrentRow<this.RowSize){for(var i=CurrentCellInCurrentRow;i<this.RowSize;i++)
{sb.append("<td><img src=\""+SPACER_IMAGE+"\""+" width=\""+swatchW+"\" height=\""+swatchH+"\" border=\"0\"></td>");}}
sb.append("</tr></table>");if(HasShadeSubGroup){sb.append("</div></td></tr></table></div></td></tr></table>");}
if(CurrentRowNumber>5){_CoreModalPopUp._IsforegroundElementLarge=true;}else{_CoreModalPopUp._IsforegroundElementLarge=false;}
return sb.toString();}
return"";}}
Core.DiscontinuedBubble_Class.prototype=new Core.ProductBubble_Class;if(IsTypeDefined){Core.DiscontinuedBubble_Class.registerClass('Core.DiscontinuedBubble_Class');}
var _DiscontinuedBubble_Class=new Core.DiscontinuedBubble_Class();Core.VideoBubble_Class=function(){this.Bubble_DivID="Video_Bubble";this.FlashDivID="flashDiv";this.VideoPath="";this.VideoHeight="260";this.VideoWidth="326";this._VideoPopUp;this.HideMe=function()
{if(AJAX_IsIE6()){ToggleProductDetailVarQTYList('visible');}
this._VideoPopUp.HideModal();}
this.ShowBubble=function(vidPath){this.VideoPath=vidPath;this.CreateFlashControl("clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","video",this.VideoWidth,this.VideoHeight,this.VideoPath,"","true");this._VideoPopUp=new Core.ModalPopUp();this._VideoPopUp._PopupControlID=this.Bubble_DivID;this._VideoPopUp.ShowModal();}
this.ShowBubbleWidhtHeight=function(vidPath,vidwidth,vidheight){this.VideoPath=vidPath;this.VideoWidth=vidwidth;this.VideoHeight=vidheight;this.CreateFlashControl("clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","video",this.VideoWidth,this.VideoHeight,this.VideoPath,"","true");this._VideoPopUp=new Core.ModalPopUp();this._VideoPopUp._PopupControlID=this.Bubble_DivID;if(AJAX_IsIE6()){ToggleProductDetailVarQTYList('hidden');}
this._VideoPopUp.ShowModal();}
this.CreateFlashControl=function(CLSID,ObjectID,WIDTH,HEIGHT,URL,FLASHVARS,AUTOSTART)
{var d=$get(this.FlashDivID);var objectTag='<object classid='+CLSID+' id='+ObjectID+' width='+WIDTH+' height='+HEIGHT+' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0">';objectTag=objectTag+'<param name="allowScriptAccess" value="sameDomain">';objectTag=objectTag+'<param name="movie" value='+URL+'>'
objectTag=objectTag+'<param name="FlashVars" value='+FLASHVARS+'>';objectTag=objectTag+'<param name="quality" value="high">'
objectTag=objectTag+'<param name="autoStart" value=\"'+AUTOSTART+'\"/>';objectTag=objectTag+'<param name="wmode" value="transparent" />'
objectTag=objectTag+'<embed wmode="transparent" autoStart= "'+AUTOSTART+'" src="'+URL+'" flashVars="'+FLASHVARS+'" quality="high" bgcolor="#000000" width="'+WIDTH+'" height="'+HEIGHT+'" name="main" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">';objectTag=objectTag+"</object>";d.innerHTML=objectTag;}}
if(IsTypeDefined){Core.VideoBubble_Class.registerClass('Core.VideoBubble_Class');}
var _VideoBubble_Class=new Core.VideoBubble_Class();Core.TopicFavoriteBubble_Class=function(){this.ConfirmBubble_DivID="TopicConfirmFavorite_Bubble";this.TopicCode="";this.TopicType="";this.ConfirmBubble;this.AddFavorite=function(topCode,topType){this.TopicCode=topCode;this.TopicType=topType;if(CustomerSigned==true){_TopicManager.SaveTopic(this.TopicCode,this.TopicType,_TopicFavoriteBubble_Class.SaveTopicComplete);}else{_SignInBubble.TopicType=topType;_SignInBubble.ShowBubbleFromFavoritesBubble(this.TopicCode);}}
this.SaveTopicComplete=function(result){DoDefault();if(result.ActivityStatus==true){_CoreModalPopUp._PopupControlID=_TopicFavoriteBubble_Class.ConfirmBubble_DivID;_CoreModalPopUp.ShowModal();}}}
if(IsTypeDefined){Core.TopicFavoriteBubble_Class.registerClass('Core.TopicFavoriteBubble_Class');}
var _TopicFavoriteBubble_Class=new Core.TopicFavoriteBubble_Class();Core.EventBubble_Class=function(){this.Bubble_DivID="Event_Bubble";this._EventPopUp;this.EventBubble_TopHTMLID="TopHTML";this.ShowBubble=function(topCode,topType){_ScrollPopup_Class._PopupControlID=this.Bubble_DivID;this.GetEventTopicInformation(topCode,topType,displayEvent);if(AJAX_IsIE6()){try{var obj=$get("state");if(obj!=null){obj.style.visibility='hidden';obj.style.display='none';}}
catch(err){}}
_ScrollPopup_Class.ShowModal();}
this.GetEventTopicInformation=function(TopicCode,TopicType,OnCompleteFuncName){if(!IsAjaxLoaded()){return false;}
try{DoWait();MicrosoftFrance.MCS.Commerce.WS.AJAXProject.TopicWebService.GetTopicInformation(TopicCode,TopicType,eval(OnCompleteFuncName),onError);}
catch(e){DoDefault();window.status=e.message;}
return false;}
function displayEvent(result)
{if(result!=null){DoDefault();var _Properties=result.Properties;for(var j=0;j<_Properties.length;j++){var topObj=$get("TopHTML");var midObg=$get("MidHtml");var btmObj=$get("BottomHTML");var hidObj=$get("HiddenHTML");if(_Properties[j].Name=="BB_Article_Content")
{topObj.innerHTML=_Properties[j].Value;}
if(_Properties[j].Name=="BB_Article_Content_2")
{btmObj.innerHTML=_Properties[j].Value;}
if(_Properties[j].Name=="BB_Article_Content_3")
{midObg.innerHTML=_Properties[j].Value;}
hidObj.innerHTML="<input type='hidden' id='hidtopiccode' value='"+result.TopicCode+"'>";}}
else
{alert("No results for this event.");}}}
if(IsTypeDefined){Core.EventBubble_Class.registerClass('Core.EventBubble_Class');}
var _EventBubble_Class=new Core.EventBubble_Class();Core.Where2GetItMap_Class=function(){this.Bubble_DivID="Where2GetItMap_Bubble";this._MapPopUp;this.MapSpanID="StoreMap"
this.ShowBubble=function(add1,city,state,zip){this._MapPopUp=new Core.ModalPopUp();this._MapPopUp._PopupControlID=this.Bubble_DivID;this.GetMapInformation(add1,city,state,zip,displayMap);}
this.HideMe=function()
{if(AJAX_IsIE6()){ToggleStateList('visible');}
this._MapPopUp.HideModal();}
this.GetMapInformation=function(add1,city,state,zip,OnCompleteFuncName){if(!IsAjaxLoaded()){return false;}
try{DoWait();Loreal.US.eCommerce.WS.Lancome.US.AJAXProject.Where2getitMapWebService.GetWhere2getitMap(add1,city,state,zip,eval(OnCompleteFuncName),onError);}
catch(e){DoDefault();window.status=e.message;}
return false;}
function displayMap(result)
{DoDefault();if(result!=null){var mapObj=$get("StoreMap");mapObj.innerHTML="<img id='Map' name='Map' style='BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none' align='middle' border='0' src='"+result[0]+"' />";var mapIDObj=$get("MapIdSpan");mapIDObj.innerHTML=result[1];var mapLoadingObj=$get("Loading");mapLoadingObj.style.visibility="hidden";if(AJAX_IsIE6()){ToggleStateList('hidden');}
_Where2GetItMap_Class._MapPopUp.ShowModal();}
else
{alert("No map for this store.");}}}
if(IsTypeDefined){Core.Where2GetItMap_Class.registerClass('Core.Where2GetItMap_Class');}
var _Where2GetItMap_Class=new Core.Where2GetItMap_Class();Core.ScrollPopup=function(){this._backgroundElement=null;this._foregroundElement=null;this._PopupControlID=null;this.beforeOpen=null;this.beforeClose=null;this._IsforegroundElementLarge=false;this._Initialize=function(){if(this._backgroundElement==null){this._backgroundElement=document.createElement('div');this._backgroundElement.style.display='none';this._backgroundElement.style.position='absolute';this._backgroundElement.className='modalBackground';document.body.appendChild(this._backgroundElement);}}
this._InitializeForeground=function(){this._foregroundElement=$get(this._PopupControlID);this._foregroundElement.style.display='none';this._foregroundElement.style.position='absolute';document.body.appendChild(this._foregroundElement);}
this.ShowModal=function(){if((this._backgroundElement==null)||(typeof(this._backgroundElement)=='undefined')){this._Initialize();}
if(this._PopupControlID!=null){this._InitializeForeground();}
var clientWidth=630;var clientHeight=460;var scrollLeft=(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);var scrollTop=(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);if(window.innerWidth){clientWidth=(window.__safari?window.innerWidth:Math.min(window.innerWidth,document.documentElement.clientWidth));}
else{clientWidth=document.documentElement.clientWidth;}
if(window.innerHeight){clientHeight=(window.__safari?window.innerHeight:Math.min(window.innerHeight,document.documentElement.clientHeight));}
else{clientHeight=document.documentElement.clientHeight;}
this._backgroundElement.style.left=scrollLeft+'px';this._backgroundElement.style.top=scrollTop+'px';this._backgroundElement.style.width=clientWidth+'px';this._backgroundElement.style.height=clientHeight+'px';this._backgroundElement.style.display='block';this._foregroundElement.style.display='block';if(this._foregroundElement!=null){this._foregroundElement.style.left=scrollLeft+((clientWidth-this._foregroundElement.offsetWidth)/2)+'px';if(this._IsforegroundElementLarge==true){this._foregroundElement.style.top=scrollTop+((clientHeight-this._foregroundElement.offsetHeight)/4)+'px';}
else{if(this._foregroundElement.style.top==null||this._foregroundElement.style.top=='')
{this._foregroundElement.style.top='119px';}
else
{this._foregroundElement.style.top=scrollTop+((clientHeight-this._foregroundElement.offsetHeight)/2)+'px';}
if(this._foregroundElement.style.top.indexOf('-')>-1)
this._foregroundElement.style.top=this._foregroundElement.style.top.replace("-","");}}
IS_MODELPOPUP_VISIBLE=true;if(this.beforeOpen!=null){eval(this.beforeOpen+"();");}}
this.Hide=function(){this.HideModal();if(this.beforeClose!=null){eval(this.beforeClose+"();");}}
this.HideModal=function(){if(this._backgroundElement!=null){this._backgroundElement.style.display='none';}
if(this._foregroundElement!=null){this._foregroundElement.style.display='none';}
IS_MODELPOPUP_VISIBLE=false;this._IsforegroundElementLarge=false;if(AJAX_IsIE6()){try{var obj=$get("state");if(obj!=null){obj.style.visibility='visible';obj.style.display='';}}
catch(err){}}}
this.ResizeHandler=function(){if(this._backgroundElement!=null&&this._backgroundElement.style.display!='none'){_ScrollPopup_Class.ShowModal();}}
this.ScrollHandler=function(){if(_ScrollPopup_Class._backgroundElement!=null&&_ScrollPopup_Class._backgroundElement.style.display!='none'){var clientWidth=630;var clientHeight=460;var scrollLeft=(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);var scrollTop=(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);if(window.innerWidth){clientWidth=(window.__safari?window.innerWidth:Math.min(window.innerWidth,document.documentElement.clientWidth));}
else{clientWidth=document.documentElement.clientWidth;}
if(window.innerHeight){clientHeight=(window.__safari?window.innerHeight:Math.min(window.innerHeight,document.documentElement.clientHeight));}
else{clientHeight=document.documentElement.clientHeight;}
_ScrollPopup_Class._backgroundElement.style.left=scrollLeft+'px';_ScrollPopup_Class._backgroundElement.style.top=scrollTop+'px';_ScrollPopup_Class._backgroundElement.style.width=clientWidth+'px';_ScrollPopup_Class._backgroundElement.style.height=clientHeight+'px';_ScrollPopup_Class._backgroundElement.style.display='block';}}}
if(IsTypeDefined){Core.ScrollPopup.registerClass('Core.ScrollPopup');}
var _ScrollPopup_Class=new Core.ScrollPopup();Core.EmailFriendBubble_Class=function(){this.ProductEmailTemplate="TellAFriendProduct.xml";this.TopicEmailTemplate="Topic_TellAFriend.xml";this.IsStaticTemplate=false;this.Bubble_DivID="EmailFriend_div";this.BubbleConfirm_DivID="EmailFriendConfirm_div";this.FieldError="<span style='color:#FF0000'><strong>!&nbsp;</strong></span>";this.GeneralErrorID="EmailFriend_GeneralError";this.GeneralError="<div style='color:#FF0000'><strong>Please fill all the required fields with valid data.</strong></div>";this.EmailError="<div style='color:#FF0000'><strong>Please enter a valid email address.</strong></div>";this.EmailAddressesLimitError="<div style='color:#FF0000'><strong>Please do not enter more than 10 email addresses.</strong></div>";this.FatalError="<div style='color:#FF0000'><strong>Sorry this email cannot be sent.</strong></div>";this.Sender_FnameID="Sender_Fname";this.Sender_FnameErrorID="Sender_FnameError";this.Sender_LnameID="Sender_Lname";this.Sender_LnameErrorID="Sender_LnameError";this.Sender_EmailID="Sender_Email";this.Sender_EmailErrorID="Sender_EmailError";this.Friend_EmailID="Friend_Email";this.Friend_EmailErrorID="Friend_EmailError";this.Friend_MessageID="Friend_Message";this.Sender_CopyEmailID="Sender_CopyEmail";this.Friend_EmailListID="Friend_EmailList";this.hasErrors=false;this.EmailhasErrors=false;this.EmailAddressesLimithasError=false;this.ProductCode="";this.TopicCode="";this.TopicType="";this.LeftPosition="";this.TopPosition="";this.ShowBubble=function(which){_CoreModalPopUp._PopupControlID=this.Bubble_DivID;_CoreModalPopUp.ShowModal();}
this.ShowConfirmBubble=function(){var senderEmailListobj=$get(this.Friend_EmailListID);var friendEmailobj=$get(this.Friend_EmailID);if((friendEmailobj!=null)&&(senderEmailListobj!=null))
senderEmailListobj.innerHTML=this.GetEmailList(friendEmailobj.value);_CoreModalPopUp._PopupControlID=this.BubbleConfirm_DivID;_CoreModalPopUp.ShowModal();}
this.SendEmail=function(){this.hasErrors=false;this.EmailhasErrors=false;var copyEmail=false;var validTemplate="";var code="";var isProduct=false;var pageUrl=document.URL;var fromFname=this.ValidateTextField($get(this.Sender_FnameID),this.Sender_FnameErrorID,this.FieldError);var fromLname=this.ValidateTextField($get(this.Sender_LnameID),this.Sender_LnameErrorID,this.FieldError);var fromEmail="";if($get(this.Sender_EmailID)!=null)
fromEmail=$get(this.Sender_EmailID).value;this.ValidateEmailField(fromEmail,this.Sender_EmailErrorID,this.FieldError);var toEmail="";if($get(this.Friend_EmailID)!=null)
toEmail=$get(this.Friend_EmailID).value;this.ValidateEmailField(toEmail,this.Friend_EmailErrorID,this.FieldError);var fromMsg="";if($get(this.Friend_MessageID)!=null)
fromMsg=$get(this.Friend_MessageID).value;if($get(this.Sender_CopyEmailID)!=null)
copyEmail=$get(this.Sender_CopyEmailID).checked;if(this.hasErrors||this.EmailhasErrors||this.EmailAddressesLimithasError){var errorsb=new StringBuilder();if(this.hasErrors)
errorsb.append(this.GeneralError);if(this.EmailhasErrors)
errorsb.append(this.EmailError);if(this.EmailAddressesLimithasError)
errorsb.append(this.EmailAddressesLimitError);$get(this.GeneralErrorID).innerHTML=errorsb.toString();return;}
if(this.ProductCode!=""){validTemplate=this.ProductEmailTemplate;isProduct=true;code=this.ProductCode;}else if(this.TopicCode!=""){validTemplate=this.TopicEmailTemplate;isProduct=false;code=this.TopicType+":"+this.TopicCode;}else if(this.IsStaticTemplate==true){validTemplate=this.TopicEmailTemplate;isProduct=false;}
if(IsAjaxLoaded())
{try
{DoWait();MicrosoftFrance.MCS.Commerce.WS.AJAXProject.CustomerWebService.SendMailTellAFriend(fromFname,fromLname,fromEmail,fromMsg,toEmail,copyEmail,code,isProduct,validTemplate,'html',pageUrl,this.OnCompleteRequest,onError,onTimeout);if($get('Sender_Fname')!=null)
$get('Sender_Fname').value='';if($get('Sender_Lname')!=null)
$get('Sender_Lname').value='';if($get('Sender_Email')!=null)
$get('Sender_Email').value='';if($get('Friend_Email')!=null)
$get('Friend_Email').value='';if($get('Friend_Message')!=null)
$get('Friend_Message').value='';}
catch(ex)
{DoDefault();window.status=ex.message;}}
return false;}
this.ValidateField=function(field,errorID,errorVal){var fieldVal="";if(field!=null){fieldVal=field.value;if(fieldVal.length<=0){$get(errorID).innerHTML=errorVal;this.hasErrors=true;}else{$get(errorID).innerHTML='';}}
return fieldVal;}
this.ValidateTextField=function(field,errorID,errorVal){var fieldVal="";if(field!=null){fieldVal=field.value;var regExp=new RegExp("^[a-z0-9 '-]+$","gi");if(fieldVal.length<=0||fieldVal.match(regExp)!=fieldVal){$get(errorID).innerHTML=errorVal;this.hasErrors=true;}else{$get(errorID).innerHTML='';}}
return fieldVal;}
this.ValidateEmailField=function(email,errorID,errorVal){if(email.indexOf(',')==-1)
{var emailhasError=false;var at="@";var dot=".";var lat=email.indexOf(at);var lstr=email.length;var ldot=email.indexOf(dot);if(email!=null)
{var regExpr="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?"
var fieldVal="";var regExp=new RegExp(regExpr,"gi");fieldVal=email;if(fieldVal.length<=0||fieldVal.match(regExp)!=fieldVal)
{emailhasError=true;}}
if(email.indexOf(at)==-1||email.indexOf(at)==0||email.indexOf(at)==lstr)
emailhasError=true;if(email.indexOf(dot)==-1||email.indexOf(dot)==0||email.indexOf(dot)==lstr)
emailhasError=true;if(email.indexOf(at,(lat+1))!=-1)
emailhasError=true;if(email.substring(lat-1,lat)==dot||email.substring(lat+1,lat+2)==dot)
emailhasError=true;if(email.indexOf(dot,(lat+2))==-1)
emailhasError=true;if(email.indexOf(" ")!=-1)
emailhasError=true;if(emailhasError){$get(errorID).innerHTML=errorVal;this.EmailhasErrors=emailhasError;return;}else{$get(errorID).innerHTML='';}}else{var elist=email.split(",");if(elist.length<=10){if(this.EmailAddressesLimithasError)
this.EmailAddressesLimithasError=false;for(i=0;i<=elist.length-1;i++){this.ValidateEmailField(elist[i],errorID,errorVal);}}else{$get(errorID).innerHTML=errorVal;this.EmailAddressesLimithasError=true;return;}}}
this.OnCompleteRequest=function(result){DoDefault();if(result!=null){if(result=="true"){var eDiv=$get(_EmailFriendBubble_Class.Bubble_DivID)
if(eDiv!=null){eDiv.style.display="none";}
_EmailFriendBubble_Class.ShowConfirmBubble();}else{$get(_EmailFriendBubble_Class.GeneralErrorID).innerHTML=_EmailFriendBubble_Class.FatalError;_EmailFriendBubble_Class.ShowBubble();}}else{alert("Sorry this email cannot be sent.");}}
this.GetEmailList=function(emailList){var sb=new StringBuilder();if(emailList.indexOf(',')==-1){sb.append(emailList);}else{var elist=emailList.split(",");for(i=0;i<=elist.length-1;i++){sb.append(elist[i]);sb.append("<br/>");}}
return sb.toString();}}
if(IsTypeDefined){Core.EmailFriendBubble_Class.registerClass('Core.EmailFriendBubble_Class');}
var _EmailFriendBubble_Class=new Core.EmailFriendBubble_Class();Core.SearchError_Class=function(){this.Bubble_DivID="SearchError_Bubble";this._MapPopUp;this.ShowBubbleLostFocus=function(absoluteURL,caller){this._MapPopUp=new Core.ModalPopUp();this._MapPopUp._PopupControlID=this.Bubble_DivID;this.SearchKeyword(absoluteURL,caller);}
this.HideMe=function()
{if(AJAX_IsIE6())
{ToggleStateList('visible');}
this._MapPopUp.HideModal();}
this.ShowBubble=function(absoluteURL){this._MapPopUp=new Core.ModalPopUp();this._MapPopUp._PopupControlID=this.Bubble_DivID;this.SearchKeyword(absoluteURL,null);}
this.ShowBubbleWithoutCheck=function(){this._MapPopUp=new Core.ModalPopUp();this._MapPopUp._PopupControlID=this.Bubble_DivID;_SearchError_Class._MapPopUp.ShowModal();}
this.HideMe=function()
{if(AJAX_IsIE6())
{ToggleStateList('visible');}
this._MapPopUp.HideModal();}
this.SearchKeyword=function(absoluteURL,caller)
{if(!IsAjaxLoaded()){return false;}
try
{var mf=GetMainFormName();if(mf==null)return;var searchVal=document.forms[mf].elements["SearchKeywords"].value;var i;var returnString="";var filteredValues="'\"";for(i=0;i<searchVal.length;i++)
{var c=searchVal.charAt(i);if(filteredValues.indexOf(c)==-1)
returnString+=c;}
searchVal=returnString.toLowerCase();if(searchVal.toLowerCase()=="search"||searchVal.toLowerCase()=="")
{_SearchError_Class._MapPopUp.ShowModal();if(caller!=null&&caller!='undefined')
{caller.blur();}}
else
{document.location.href=absoluteURL+"search/search.aspx?Search="+searchVal+"&orderdesc=true";}}
catch(e){DoDefault();window.status=e.message;}
return false;}}
if(IsTypeDefined){Core.SearchError_Class.registerClass('Core.SearchError_Class');}
var _SearchError_Class=new Core.SearchError_Class();Core.PromoCode_Class=function(){this.Bubble_DivID="PromoCode_Bubble";this._PromoPopUp;this.ShowBubble=function(absoluteURL){this._PromoPopUp=new Core.ModalPopUp();this._PromoPopUp._PopupControlID=this.Bubble_DivID;this.PromoCheck(absoluteURL);}
this.HideMe=function()
{if(AJAX_IsIE6()){ToggleStateList('visible');}
this._PromoPopUp.HideModal();}
this.PromoCheck=function(absoluteURL){if(!IsAjaxLoaded()){return false;}
try{var mf=GetMainFormName();var promoVal=$get("ctl00_ctl00_brandlayout0_ctl00_mainbody0_ctl00_ctl05_ctl00_ctl00_KeyCodeSuccessMessage");var x=GetElement("KeyCodeSuccessMessage",mf);var ErrorVal=$get("ErrorSpan");var promoBox=GetElement("keycode",mf);var promostring=promoBox.value.trim();if(promostring.length>0&&ErrorVal.innerHTML.length==0&&promoVal.innerHTML.length==0)
{_PromoCode_Class._PromoPopUp.ShowModal();}
else
{window.location=absoluteURL;}}
catch(e){DoDefault();window.status=e.message;}
return false;}}
if(IsTypeDefined){Core.PromoCode_Class.registerClass('Core.PromoCode_Class');}
var _PromoCode_Class=new Core.PromoCode_Class();Core.PopUp_Class=function(){this.Bubble_DivID="PopUp_Bubble";this._DisplayPopUp;this.ShowBubble=function(){this._DisplayPopUp=new Core.ModalPopUp();this._DisplayPopUp._PopupControlID=this.Bubble_DivID;this._DisplayPopUp.ShowModal();}
this.HideMe=function()
{if(AJAX_IsIE6()){ToggleStateList('visible');}
this._DisplayPopUp.HideModal();}}
if(IsTypeDefined){Core.PopUp_Class.registerClass('Core.PopUp_Class');}
var _PopUp_Class=new Core.PopUp_Class();Core.PopUpSecond_Class=function(){this.Bubble_DivID="PopUpSecond_Bubble";this._DisplayPopUp;this.ShowBubble=function(){this._DisplayPopUp=new Core.ModalPopUp();this._DisplayPopUp._PopupControlID=this.Bubble_DivID;this._DisplayPopUp.ShowModal();}
this.HideMe=function()
{if(AJAX_IsIE6()){ToggleStateList('visible');}
this._DisplayPopUp.HideModal();}}
if(IsTypeDefined){Core.PopUpSecond_Class.registerClass('Core.PopUpSecond_Class');}
var _PopUpSecond_Class=new Core.PopUpSecond_Class();