//<!--
//OMG Don't Ask...

attr_useragent=navigator.userAgent.toLowerCase();attr_wafftv=(attr_useragent.indexOf("wafftv")!=-1);attr_opera=(attr_useragent.indexOf("opera")!=-1);attr_net60=(attr_useragent.indexOf("netscape6/6.0")!=-1);attr_net40=(attr_useragent.indexOf("4.7")!=-1);function attr_init(widgetname){var values=attr_get_values(widgetname);if(!values){attr_disable_children(widgetname);return;}
for(var i=0;i<values.length;i++){if(values[i]==null||values[i]==""||values[i].indexOf("-")>-1){attr_disable_children(widgetname);}else{var children=attr_dependencies[widgetname].children;for(var j=0;j<children.length;j++){attr_set_values(children[j]);attr_init(children[j]);}}}}
function attr_reset_pf(){var theform=document.forms[attr_formname];for(var i=0;i<theform.elements.length;i++){if(theform.elements[i].type.indexOf("select")>=0){attr_reset_select(theform.elements[i]);}}}
function attr_reset_select(theselect){for(var i=0;i<theselect.options.length;i++){var opt=theselect.options[i];if(opt.defaultSelected){opt.selected=true;}}}
function createButtonLoad(){document.write("<input type='hidden' name='ActionAttributeLoad'>");}
function array_equals(a,b){if(a.length&&b.length){if(a.length!=b.length)return false;for(var i=0;i<a.length;i++){if(a[i]!=b[i])return false;}
return true;}else{return(a==b);}}
function array_intersect(array1,array2){if(array1==null||array2==null)return null;var numvalues=0;for(var i=0;i<array1.length;i++){for(var j=0;j<array2.length;j++){if(array1[i]==array2[j]){numvalues++;break;}}}
if(numvalues==0)return null;var newarray=new Array(numvalues);var tmpindex=0;for(var i=0;i<array1.length;i++){for(var j=0;j<array2.length;j++){if(array1[i]==array2[j]){newarray[tmpindex++]=array1[i];break;}}}
return newarray;}
function array_merge(array1,array2){if(array1==null)return array2;if(array2==null)return array1;var newarray=new Array();for(var i=0;i<array1.length;i++){newarray[newarray.length]=array1[i];}
var testval="";var isNew=0;for(var i=0;i<array2.length;i++){testval=array2[i][1];isNew=0;for(var j=0;j<array1.length;j++){if(testval==array1[j][1]){isNew=1;}}
if(isNew==0){newarray[newarray.length]=array2[i];}}
return newarray;}
function array_minus(array1,array2){if(array1==null||array1.length==0)return null;if(array2==null)return array1;var numvalues=0;var flag=0;for(var i=0;i<array1.length;i++){flag=0;for(var j=0;j<array2.length;j++){if(array1[i]==array2[j])flag++;}
if(flag==0)numvalues++;}
if(numvalues==0)return null;var newarray=new Array(numvalues);var tmpindex=0;for(var i=0;i<array1.length;i++){flag=0;for(var j=0;j<array2.length;j++){if(array1[i]==array2[j])flag++;}
if(flag==0)newarray[tmpindex++]=array1[i];}
return newarray;}
function attr_get_widget(widgetname){return document.forms[attr_formname][widgetname];}
function attr_get_values(widgetname){var widget=attr_get_widget(widgetname);if(!widget)return null;if(widget.type!='select-one'&&widget.type!='select-multiple'&&!widget.length){if(widget.value!=null){if(widget.type=="checkbox"){if(widget.checked){return new Array(widget.value);}else{return null;}}else{return new Array(widget.value);}}else{return null;}}
var numvalues=0;var len=(widget.options)?widget.options.length:widget.length;for(var i=0;i<len;i++){if(widget.options){if(widget.options[i].selected)numvalues++;}else{if(widget[i].checked)numvalues++;}}
if(numvalues==0){return null;}else{selectedvalues=new Array(numvalues);var tmpindex=0;for(var i=0;i<len;i++){if(widget.options){if(widget.options[i].selected)selectedvalues[tmpindex++]=widget.options[i].value;}else{if(widget[i].checked)selectedvalues[tmpindex++]=widget[i].value;}}}
return selectedvalues;}
function attr_set_values(widgetname){var current=attr_dependencies[widgetname];var parents=attr_dependencies[widgetname].parents;var childvalues=null;var tmpparentvalues=null;for(var i=0;i<parents.length;i++){tmpparentvalues=attr_get_values(parents[i]);if(tmpparentvalues!=null){var attr_widget_obj=attr_dependencies[parents[i]][widgetname];if(attr_widget_obj!=null){for(var j=0;j<tmpparentvalues.length;j++){childvalues=array_merge(childvalues,attr_dependencies[parents[i]][widgetname]["v"+tmpparentvalues[j]]);}}}}
if(childvalues!=null){var widget=attr_get_widget(widgetname);widget.disabled=false;widget.className="fieldenabled";if(widget.type.indexOf('select')>=0){widget.options.length=0;var hasDefaults=false;for(var i=0;i<childvalues.length;i++){widget.options[i]=new Option(childvalues[i][0],childvalues[i][1]);if(childvalues[i][2]){widget.options[i].selected=true;hasDefaults=true;}}
if(!hasDefaults){widget.options[0].selected=true;}}else{widget.value=childvalues[0][1];}}else{attr_disable(widgetname);attr_disable_children(widgetname);}}
function attr_disable_children(widgetname){var children=attr_dependencies[widgetname].children;for(var i=0;i<children.length;i++){attr_disable(children[i]);}
for(var i=0;i<children.length;i++){attr_disable_children(children[i]);}}
function attr_disable(widgetname){var widget=attr_get_widget(widgetname);if(!widget){return;};if(widget.type=="hidden"){widget.value="";return;}
if(!widget.options)return;if(widget.size>1||(!document.getElementById||document.all))widget.options.length=1;widget.options[0]=new Option(attr_dependencies[widgetname].disabledlabel,"-10");widget.options[1]=new Option(attr_dependencies[widgetname].disabledlabel,"-10",true,true);widget.options[0].selected=true;widget.options[1].selected=false;if(!attr_net60){widget.disabled=true;widget.className="fielddisabled";}
return;}
function attr_clear_children(widgetname){var children=attr_dependencies[widgetname].children;for(var i=0;i<children.length;i++){attr_clear(children[i]);}
for(var i=0;i<children.length;i++){attr_clear_children(children[i]);}}
function attr_clear(widgetname){widget=attr_get_widget(widgetname);if(widget)
{if(attr_net40&&widget.type.indexOf('select')>=0){widget.options[widget.selectedIndex].value="-10";}else{widget.value="";}}}
function attr_onchange(widgetname){if(attr_wafftv)attr_submit();if(typeof(attr_dependencies)!="undefined"){var current=attr_dependencies[widgetname];if(current!=null){if(current.vvp.length>0){var widgetvvpvalues=array_intersect(attr_get_values(widgetname),current.vvp);var newvvpvalues=array_minus(widgetvvpvalues,current.vvpselected);var lostvvpvalues=array_minus(current.vvpselected,widgetvvpvalues);if(newvvpvalues!=null||lostvvpvalues!=null){attr_clear_children(widgetname);attr_submit();return;}}
var children=current.children;for(var i=0;i<children.length;i++){attr_set_values(children[i]);}
for(var i=0;i<children.length;i++){attr_onchange(children[i]);}}}}
function attr_submit(){var theform=document.forms[attr_formname];for(var i=0;i<theform.length;i++){if(theform.elements[i].name=="aus_form_changed")theform.elements[i].value=1;}
if(typeof(theform.ButtonBack)!="undefined")
{theform.ButtonBack.value="";}
theform.ButtonLoad.value=1;theform.submit();}
function SetAttrValues(search_form){var pf=document.product_finder;var sf=eval("document."+search_form);if(pf.combinetmp){if(pf.combinetmp.checked){pf.combine.value="Y";pf.satitle.value=sf.query.value;if(sf.sotextsearched!=null){if(sf.sotextsearched.checked){pf.sotextsearched.value="2";}
else{pf.sotextsearched.value="";}}}
else{pf.combine.value="N";pf.satitle.value="";pf.sotextsearched.value="";}}}


function AFFProductFinderManager(pParent,pName)
{if(!this.objType)this.objType="AFFProductFinderManager";this.base=AFFBaseControl;this.base(pParent,pName);var attr_useragent=navigator.userAgent.toLowerCase();var attr_wafftv=(attr_useragent.indexOf("wafftv")!=-1);var attr_opera=(attr_useragent.indexOf("opera")!=-1);var attr_net60=(attr_useragent.indexOf("netscape6/6.0")!=-1);var attr_net40=(attr_useragent.indexOf("4.7")!=-1);var c=null;with(this)
_registerListener(oDocument._getEvent("load"),EVENT_AFTER,"reset_pf");this.attr_init=function(){var a=arguments;var widgetname=a[0];var values=this.attr_get_values(widgetname);if(!values){this.attr_disable_children(widgetname);return;}
for(var i=0;i<values.length;i++){if(values[i]==null||values[i]==""||values[i].indexOf("-")>-1){this.attr_disable_children(widgetname);}else{var children=c.oAttr_dependencies[widgetname].children;for(var j=0;j<children.length;j++){this.attr_set_values(children[j]);this.attr_init(children[j]);}}}}
this.attr_setonchange=function(){var a=arguments;var widgetname=a[0];var children=c.oAttr_dependencies[widgetname].children;if(children.length>0)
{var widget=this.attr_get_widget(widgetname);widget.onchange=function()
{annsfabulousfinds.oDocument._getControl('ProductFinderManager').attr_onchange(widgetname);}
for(var j=0;j<children.length;j++){this.attr_setonchange(children[j]);}}}
this.reset_pf=function(){c=annsfabulousfinds.oDocument.getConfig("Attributes.PFConfig");if(c)
{var theform=document.forms[c.sFormName];if(theform)
{for(var i=0;i<theform.elements.length;i++){t=theform.elements[i].type;if(t)
{if(t.indexOf("select")>=0){this.attr_reset_select(theform.elements[i]);}}}
for(i=0;i<c.aInits.length;i++)
{this.attr_init(c.aInits[i]);}
for(j=0;j<c.aTopAttributes.length;j++)
{c.aTopAttributes[j]
this.attr_setonchange(c.aTopAttributes[j]);}}}}
this.attr_reset_select=function(){var a=arguments;var theselect=a[0];for(var i=0;i<theselect.options.length;i++){var opt=theselect.options[i];if(opt.defaultSelected){opt.selected=true;}}}
this.array_equals=function(){var a=arguments;var arg1=a[0];var arg2=a[1];if(arg1.length&&arg2.length){if(arg1.length!=arg2.length)return false;for(var i=0;i<arg1.length;i++){if(arg1[i]!=arg2[i])return false;}
return true;}else{return(arg1==arg2);}}
this.array_intersect=function(){var a=arguments;var array1=a[0];var array2=a[1];if(array1==null||array2==null)return null;var numvalues=0;for(var i=0;i<array1.length;i++){for(var j=0;j<array2.length;j++){if(array1[i]==array2[j]){numvalues++;break;}}}
if(numvalues==0)return null;var newarray=new Array(numvalues);var tmpindex=0;for(var i=0;i<array1.length;i++){for(var j=0;j<array2.length;j++){if(array1[i]==array2[j]){newarray[tmpindex++]=array1[i];break;}}}
return newarray;}
this.array_merge=function(){var a=arguments;var array1=a[0];var array2=a[1];if(array1==null)return array2;if(array2==null)return array1;var newarray=new Array();for(var i=0;i<array1.length;i++){newarray[newarray.length]=array1[i];}
var testval="";var isNew=0;for(var i=0;i<array2.length;i++){testval=array2[i][1];isNew=0;for(var j=0;j<array1.length;j++){if(testval==array1[j][1]){isNew=1;}}
if(isNew==0){newarray[newarray.length]=array2[i];}}
return newarray;}
this.array_minus=function(){var a=arguments;var array1=a[0];var array2=a[1];if(array1==null||array1.length==0)return null;if(array2==null)return array1;var numvalues=0;var flag=0;for(var i=0;i<array1.length;i++){flag=0;for(var j=0;j<array2.length;j++){if(array1[i]==array2[j])flag++;}
if(flag==0)numvalues++;}
if(numvalues==0)return null;var newarray=new Array(numvalues);var tmpindex=0;for(var i=0;i<array1.length;i++){flag=0;for(var j=0;j<array2.length;j++){if(array1[i]==array2[j])flag++;}
if(flag==0)newarray[tmpindex++]=array1[i];}
return newarray;}
this.attr_get_widget=function(){var a=arguments;var widgetname=a[0];return document.forms[c.sFormName][widgetname];}
this.attr_get_values=function(){var a=arguments;var widgetname=a[0];var widget=this.attr_get_widget(widgetname);if(!widget)return null;if(widget.type!='select-one'&&widget.type!='select-multiple'&&!widget.length){if(widget.value!=null){if(widget.type=="checkbox"){if(widget.checked){return new Array(widget.value);}else{return null;}}else{return new Array(widget.value);}}else{return null;}}
var numvalues=0;var len=(widget.options)?widget.options.length:widget.length;for(var i=0;i<len;i++){if(widget.options){if(widget.options[i].selected)numvalues++;}else{if(widget[i].checked)numvalues++;}}
if(numvalues==0){return null;}else{selectedvalues=new Array(numvalues);var tmpindex=0;for(var i=0;i<len;i++){if(widget.options){if(widget.options[i].selected)selectedvalues[tmpindex++]=widget.options[i].value;}else{if(widget[i].checked)selectedvalues[tmpindex++]=widget[i].value;}}}
return selectedvalues;}
this.attr_set_values=function(){var a=arguments;var widgetname=a[0];var current=c.oAttr_dependencies[widgetname];var parents=c.oAttr_dependencies[widgetname].parents;var childvalues=null;var tmpparentvalues=null;for(var i=0;i<parents.length;i++){tmpparentvalues=this.attr_get_values(parents[i]);if(tmpparentvalues!=null){var attr_widget_obj=c.oAttr_dependencies[parents[i]][widgetname];if(attr_widget_obj!=null){for(var j=0;j<tmpparentvalues.length;j++){childvalues=this.array_merge(childvalues,c.oAttr_dependencies[parents[i]][widgetname]["v"+tmpparentvalues[j]]);}}}}
if(childvalues!=null){var widget=this.attr_get_widget(widgetname);widget.disabled=false;widget.className="fieldenabled";if(widget.type.indexOf('select')>=0){widget.options.length=0;var hasDefaults=false;for(var i=0;i<childvalues.length;i++){widget.options[i]=new Option(childvalues[i][0],childvalues[i][1]);if(childvalues[i][2]){widget.options[i].selected=true;hasDefaults=true;}}
if(!hasDefaults){widget.options[0].selected=true;}}else{widget.value=childvalues[0][1];}}else{this.attr_disable(widgetname);this.attr_disable_children(widgetname);}}
this.attr_disable_children=function(){var a=arguments;var widgetname=a[0];var children=c.oAttr_dependencies[widgetname].children;for(var i=0;i<children.length;i++){this.attr_disable(children[i]);}
for(var i=0;i<children.length;i++){this.attr_disable_children(children[i]);}}
this.attr_disable=function(){var a=arguments;var widgetname=a[0];var widget=this.attr_get_widget(widgetname);if(!widget){return;};if(widget.type=="hidden"){widget.value="";return;}
if(!widget.options)return;if(widget.size>1||(!document.getElementById||document.all))widget.options.length=1;widget.options[0]=new Option(c.oAttr_dependencies[widgetname].disabledlabel,"-10");widget.options[1]=new Option(c.oAttr_dependencies[widgetname].disabledlabel,"-10",true,true);widget.options[0].selected=true;widget.options[1].selected=false;if(!attr_net60){widget.disabled=true;widget.className="fielddisabled";}
return;}
this.attr_clear_children=function(){var a=arguments;var widgetname=a[0];var children=c.oAttr_dependencies[widgetname].children;for(var i=0;i<children.length;i++){this.attr_clear(children[i]);}
for(var i=0;i<children.length;i++){this.attr_clear_children(children[i]);}}
this.attr_clear=function(){var a=arguments;var widgetname=a[0];widget=this.attr_get_widget(widgetname);if(attr_net40&&widget.type.indexOf('select')>=0){widget.options[widget.selectedIndex].value="-10";}else{widget.value="";}}
this.attr_onchange=function(){var a=arguments;var widgetname=a[0];if(this.attr_wafftv)this.attr_submit();if(typeof(c.oAttr_dependencies)!="undefined"){var current=c.oAttr_dependencies[widgetname];if(current!=null){if(current.vvp.length>0){var widgetvvpvalues=this.array_intersect(this.attr_get_values(widgetname),current.vvp);var newvvpvalues=this.array_minus(widgetvvpvalues,current.vvpselected);var lostvvpvalues=this.array_minus(current.vvpselected,widgetvvpvalues);if(newvvpvalues!=null||lostvvpvalues!=null){this.attr_clear_children(widgetname);this.attr_submit();return;}}
var children=current.children;for(var i=0;i<children.length;i++){this.attr_set_values(children[i]);}
for(var i=0;i<children.length;i++){this.attr_onchange(children[i]);}}}}
this.attr_submit=function(){var a=arguments;var theform=document.forms[c.sFormName];if(theform)
{for(var i=0;i<theform.length;i++){if(theform.elements[i].name=="aus_form_changed")theform.elements[i].value=1;}
if(typeof(theform.ButtonBack)!="undefined")
{theform.ButtonBack.value="";}
if(typeof(theform.ButtonLoad)!="undefined")
{theform.ButtonLoad.value=1;}
theform.submit();}}
this.SetAttrValues=function(){var a=arguments;var search_form=a[0];var pf=document.product_finder;var sf=eval("document."+search_form);if(pf.combinetmp){if(pf.combinetmp.checked){pf.combine.value="Y";pf.satitle.value=sf.query.value;if(sf.sotextsearched!=null){if(sf.sotextsearched.checked){pf.sotextsearched.value="2";}
else{pf.sotextsearched.value="";}}}
else{pf.combine.value="N";pf.satitle.value="";pf.sotextsearched.value="";}}}}
new AFFProductFinderManager(annsfabulousfinds.oDocument.oPage,"ProductFinderManager");


var coKeepValues="";var coBeforeBucks="";var coTotalSelected=0;var coCurSelected=0;var coMaxLimit,coTotalSelected;var coDomain=null;var coMsg;var coForm;function coGetDomain(){var domLoc=coCookieArr[0].indexOf("domain=");if(domLoc!=-1){var endLoc=coCookieArr[0].indexOf("~",domLoc);if(endLoc==-1){endLoc=coCookieArr[0].indexOf("$",domLoc);}
if(endLoc==-1){endLoc=coCookieArr[0].length;}
var newDom=coCookieArr[0].substring(domLoc+7,endLoc);if(newDom!=''){coDomain=newDom;}}}
function coSaveBTL(){var coBTLStart=coCookieArr[0].indexOf("BTL=");if(coBTLStart!=-1){coCookieArr[0]=coCookieArr[0].substring(0,coBTLStart+4)+escape(document.location)+coCookieArr[0].substring(coCookieArr[0].indexOf("~",coBTLStart));coSetStoredItemList();}else{coCookieArr[0]="BTL="+escape(document.location)+"~"+coCookieArr[0];coSetStoredItemList();}}
function getCookieArr(){TmpCookie=readCookieletEx("annsfabulousfinds","compare-items");if(!TmpCookie||TmpCookie==""){arrOut=new Array("","");}else{arrOut=TmpCookie.split("$");}
if(arrOut.length<2){arrOut[1]="";}
return arrOut;}
function coAddToCookie(thisValue){if(coCookieArr[1].indexOf(thisValue)==-1){coCookieArr[1]=coCookieArr[1]+"|"+thisValue;coSetStoredItemList();return true;}
return false;}
function coRemoveFromCookie(thisValue){curLoc=coCookieArr[1].indexOf(thisValue);if(curLoc<0){return false;}
if(curLoc>0){coCookieArr[1]=coCookieArr[1].substring(0,curLoc-1)+coCookieArr[1].substring(curLoc+thisValue.length);}else if(curLoc==0){coCookieArr[1]=coCookieArr[1].substring(thisValue.length);}
coSetStoredItemList();return true;}
function coOnLoad(thisForm){coForm=thisForm;if(coCookieArr==null)coCookieArr=getCookieArr();var cookie=affGetKeyValuePairArray(coCookieArr[0],"~","=");if(typeof(cookie)!="undefined")
{if(typeof(cookie["use"])!="undefined")
{coCookieArr[1]="";cookie=affRemoveFromKeyValuePairs(cookie,"~","=","use");coCookieArr[0]=affBuildKeyValuePairString(cookie,"~","=");var CookieVal=coCookieArr[0]+"$"+coCookieArr[1];writeCookieletEx("annsfabulousfinds","compare-items",CookieVal,coDomain,"/");}}
coGetDomain();var cbName1,cbName2;if(thisForm){var arrCoItems=coGetStoredItemList();var arrBoxNames=new Array("LineID","coitem");for(var i=0;i<arrCoItems.length;i++){for(var q=0;q<arrBoxNames.length;q++){var isHere=false;var thisBoxName=arrBoxNames[q];if(thisForm.elements[thisBoxName]){if(thisForm.elements[thisBoxName].length){for(var j=0;j<thisForm.elements[thisBoxName].length;j++){if(thisForm.elements[thisBoxName][j].value==arrCoItems[i]){thisForm.elements[thisBoxName][j].checked=true;isHere=true;}}}else{if(thisForm.elements[thisBoxName].value==arrCoItems[i]&&thisForm.elements[thisBoxName].type=="checkbox"){thisForm.elements[thisBoxName].checked=true;isHere=true;}}}}
if(!isHere){coKeepValues+=arrCoItems[i]+"|";}else{coCurSelected++;}
if(arrCoItems[i]!=''){coTotalSelected++;}}
if(document.all||document.getElementById){coUpdatePrevSelText();coChangeDisplay();}}}
function compareLimitTest(thisCheckbox){var coMaxLimit=(coMsg.max!=null)?coMsg.max:25;if(thisCheckbox.checked){if(coTotalSelected+1>coMaxLimit){coAlertMax();thisCheckbox.checked=false;return false;}else{if(coAddToCookie(thisCheckbox.value)==true){coTotalSelected++;coCurSelected++;coChangeDisplay();}}}else{if(coRemoveFromCookie(thisCheckbox.value)==true){coTotalSelected=coTotalSelected-1;coCurSelected=coCurSelected-1;coChangeDisplay();}
if(coForm!=null){for(var i=0;i<coForm.elements.length;i++){var eElem=coForm.elements[i];if(eElem.name=="coitem"&&eElem.value==thisCheckbox.value&&eElem.checked)eElem.checked=false;}}}}
function coChangeDisplay(){var id="CompareShop";var text=coCurSelText();if(text&&coMsg.prev)text=text.concat(", ",coMsg.prev);else if(coMsg.prev)text=coMsg.prev;if(document.getElementById&&document.getElementById(id)){document.getElementById(id).innerHTML=text;}else if(document.all&&document.all[id]){document.all[id].innerHTML=text;}}
function coGetStoredItemList(){var cookieList=getCookieArr();return cookieList[1].split("|");}
function coSetStoredItemList(){var CookieVal=coCookieArr[0]+"$"+coCookieArr[1];writeCookieletEx("annsfabulousfinds","compare-items",CookieVal,coDomain,"/");}
var siMaxLimit=12;function AFFItemPicker(pForm)
{this.thisForm=pForm;this.maxLimit=siMaxLimit;this.init=function()
{with(this)
{cleanCookieForItemPicker();bindCheckboxes();preSelectCheckboxes();}}
this.cleanCookieForItemPicker=function()
{var cookie=this.getKeyValuePairArray(coCookieArr[0],"~","=");if(typeof(cookie)!="undefined")
{if(typeof(cookie["use"])=="undefined")
{coCookieArr[1]="";this.addToKeyValuePairs(cookie,"use","I");coCookieArr[0]=this.buildKeyValuePairString(cookie,"~","=");var CookieVal=coCookieArr[0]+"$"+coCookieArr[1];writeCookieletEx("annsfabulousfinds","compare-items",CookieVal,coDomain,"/");}}}
this.bindCheckboxes=function()
{with(this)
{var checkboxes=document.getElementsByName("itemPicker");var cbLen=checkboxes.length;for(var i=0;i<cbLen;i++)
{checkboxes[i].onclick=siProcessItem;}}}
this.preSelectCheckboxes=function()
{with(this)
{coGetDomain();var cbName1;var cbName2;if(thisForm)
{var arrCoItems=coGetStoredItemList();var arrBoxNames=new Array("itemPicker");for(var i=0;i<arrCoItems.length;i++)
{for(var q=0;q<arrBoxNames.length;q++)
{var isHere=false;var thisBoxName=arrBoxNames[q];if(thisForm.elements[thisBoxName])
{if(thisForm.elements[thisBoxName].length)
{for(var j=0;j<thisForm.elements[thisBoxName].length;j++)
{if(thisForm.elements[thisBoxName][j].value==arrCoItems[i])
{thisForm.elements[thisBoxName][j].checked=true;isHere=true;}}}
else
{if(thisForm.elements[thisBoxName].value==arrCoItems[i]&&thisForm.elements[thisBoxName].type=="checkbox")
{thisForm.elements[thisBoxName].checked=true;isHere=true;}}}}
if(!isHere)
{coKeepValues+=arrCoItems[i]+"|";}
else
{coCurSelected++;}
if(arrCoItems[i]!='')
{coTotalSelected++;}}}}}
this.siProcessItem=function()
{with(this)
{if(checked)
{if(coTotalSelected+1>siMaxLimit)
{siAlertMax();checked=false;return false;}
else
{if(coAddToCookie(value)==true)
{coTotalSelected++;coCurSelected++;}}}
else
{if(coRemoveFromCookie(value)==true)
{coTotalSelected=coTotalSelected-1;coCurSelected=coCurSelected-1;}}}
if(typeof(annsfabulousfinds)!="undefined")
{if(annsfabulousfinds.oDocument.oPage.sMsg)annsfabulousfinds.oDocument.oPage.sMsg.displayLayer();}}
this.addToKeyValuePairs=affAddToKeyValuePairs;this.removeFromKeyValuePairs=affRemoveFromKeyValuePairs;this.getKeyValuePairArray=affGetKeyValuePairArray;this.buildKeyValuePairString=affBuildKeyValuePairString;with(this)
{init();}}
function siOnLoad(thisForm)
{var affItemPicker=new AFFItemPicker(thisForm);doFindingFormSubmit=function(){};}
function affAddToKeyValuePairs(pArray,pKey,pValue)
{pArray[pKey]=pValue;}
function affBuildKeyValuePairString(pArray,pDel1,pDel2)
{var str="";for(var i in pArray)
{str+=pDel1+i+pDel2+pArray[i];}
str+=pDel1;return str;}
function affRemoveFromKeyValuePairs(pArray,pDel1,pDel2,pRemove)
{var str="";for(var i in pArray)
{if(i!=pRemove)
{str+=pDel1+i+pDel2+pArray[i];}}
str+=pDel1;return affGetKeyValuePairArray(str,pDel1,pDel2);}
function affGetKeyValuePairArray(pParsable,pDel1,pDel2)
{if(typeof(pParsable)=="undefined"){return;}
var kvp=pParsable;var kvp_array=new Array();while(kvp.indexOf(pDel1)!=-1)
{var outterdel=kvp.indexOf(pDel1);var innerdel=kvp.indexOf(pDel2);if(outterdel>innerdel)
{var key=kvp.substring(0,innerdel);var value=kvp.substring(innerdel+1,outterdel);if(key!="")
{kvp_array[key]=value;}}
kvp=kvp.substring(outterdel+1);}
if(kvp!="")
{var innerdel=kvp.indexOf(pDel2);var key=kvp.substring(0,innerdel);var value=kvp.substring(innerdel+1);if(key!="")
{kvp_array[key]=value;}
kvp="";}
return kvp_array;}
var coCookieArr=(typeof annsfabulousfinds!='undefined')?getCookieArr():null;

var re=new RegExp("2","g");var coMsg,coTotalSelected,coCurSelected;function coUpdatePrevSelText(){var tmp=coTotalSelected-coCurSelected;if(tmp==0&&coCurSelected==0&&coMsg.usechbx!=""){coMsg.prev=coMsg.usechbx;}else if(tmp==1){coMsg.prev=coMsg.prev1;}else{coMsg.prev=coMsg.prev2.replace(re,tmp);}}
function coAlertMax(){var tmp=coMsg.limit1.replace(re,coMsg.max)+"\n";tmp+=coMsg.limit2;alert(tmp);}
function coCurSelText(){var str="";var tmp=coTotalSelected-coCurSelected;if(tmp!=0||coCurSelected!=0||coMsg.usechbx=="")coUpdatePrevSelText();else{coMsg.usechbx="";return str;}
coMsg.usechbx="";return(coCurSelected==1)?coMsg.select1:coMsg.select2.replace(re,coCurSelected);}
function coChangeUrl(){if(document.forms['compare']){document.forms['compare'].submit();return false;}
return true;}

var category_level0,cat0_name,category_level1,cat1_name,category_level2,cat2_name,category_level3,cat3_name,category_level4,cat4_name,category_level5,cat5_name,category_name,region_id;function setCategoryLevel(){for(var i=0;i<setCategoryLevel.arguments.length;i++){var val=setCategoryLevel.arguments[i].split(',');eval('category_level'+i+'="'+val[0]+'";');eval('cat'+i+'_name="'+val[1]+'";');}}
function setCategoryName(name,region){eval('category_name="'+name+'";');eval('region_id="'+region+'";');}

function doFindSortChange(position)
{sortURL=findSortArray[position];if(typeof sortURL!="undefined"&&sortURL!=null&&sortURL!="")
{window.location.href=sortURL;}}

function UpdateCategoryChar(pFormName,menuName){var cl=annsfabulousfinds.oGlobals.oClient;var isNav4=(is.nav&is.ver==4)?true:false;var isMacOpera7=(cl.bMac&&cl.bOpera&&cl.iVer==7)?true:false;if(pFormName==null||pFormName==''){pFormName="find";}
if(menuName==null||menuName==''){menuName="sacat";}
var un="undefined";var oFrm=document.forms[pFormName];if(typeof(oFrm)!=un)
{var oElem=oFrm.elements[menuName];if(typeof(oElem)!=un)
{if(typeof(oElem.options)!=un)
{var categories=oElem.options;categories.selectedIndex=0;if(!isNav4&&!isMacOpera7){for(i=0;i<categories.length;i++){var cat=categories[i];if(cat.text.indexOf('>')==0){cat.text="\u2514"+cat.text.substr(1);categories[i]=cat;}}}}}}}
function changePulseCategory(pFormName){if(pFormName==null||pFormName==''){pFormName="find";}
var form=document.forms[pFormName];if(form!=null)form.submit();}

var GotoFormURL;function setGotoURL(pURL,pJSSafeValue,pInputs)
{var sTitle=pJSSafeValue;if(annsfabulousfinds&&annsfabulousfinds.oGlobals.oEnvironment.bCountryDoubleByte&&self.encodeURIComponent){sTitle="satitle="+encodeURIComponent(pJSSafeValue)+"&";}
else{sTitle="satitle="+escape(pJSSafeValue)+"&";}
return pURL+'?'+sTitle+pInputs.replace(/&amp;/g,"&");}
function getPageClicked(){if(gbCfg&&typeof gbCfg!="undefined")GotoFormURL=setGotoURL(gbCfg.u,gbCfg.v,gbCfg.q);var page=document.forms['find'].elements["fgtp"].value;var isNum=(isNaN(page))?false:true;var url=GotoFormURL+"fgtp="+page;return(typeof GotoFormURL!='undefined'&&isNum)?url:document.location;}

var searchBaseURL,searchActionURL,searchTitleURL,searchDescURL,searchCompletedURL,searchBase,searchTitle,searchDesc,searchCompleted;function FindPool(pName,pHost,pUrl){this.name=pName;this.host=pHost;this.url=pUrl;this.fullUrl=this.host+this.url;}
function findURL(myForm){searchBase=new FindPool('searchBase','',searchBaseURL);if(searchActionURL==null||searchActionURL==''){searchActionURL=searchBaseURL;}
searchTitle=new FindPool('searchTitle',searchTitleURL,searchActionURL);searchDesc=new FindPool('searchDesc',searchDescURL,searchActionURL);searchCompleted=new FindPool('searchCompleted',searchCompletedURL,searchActionURL);if(typeof searchBase.fullUrl!="undefined"&&searchBase.fullUrl.indexOf("http://")==0)
myForm.action=searchBase.fullUrl;else
{if(typeof searchDesc.host!="undefined"&&typeof searchTitle.host!="undefined"&&typeof searchCompleted.host!="undefined")
{if(myForm.elements["fis"]!=null&&myForm.elements["fis"].checked==true)
myForm.action=searchCompleted.fullUrl;else if(myForm.elements["fts"]!=null&&myForm.elements["fts"].checked==true)
myForm.action=searchDesc.fullUrl;else if(myForm.srchdesc!=null&&myForm.srchdesc.checked==true)
myForm.action=searchDesc.fullUrl;else myForm.action=searchTitle.fullUrl;}}}
function doFindingFormSubmit(myForm,pUseEncoding)
{if(typeof zip_element!='undefined'&&zip_element!=null){updateZipCode(zip_element);}
synchInputs(myForm.elements['sascs']);if(typeof zip_element!='undefined'&&zip_element!=null){updateZipCode(zip_element);}
if(myForm.sofocus.value=='goto')
{var cfg=annsfabulousfinds.oDocument.getConfig("ResultSet");if(cfg!=null)return onGoToPage(myForm);document.location=getPageClicked();return false;}
else
{var control=annsfabulousfinds.oDocument._getControl("CustomizeDisplay");if(control&&control.active)return control.cancel(window.event,function(){return doFindingFormSubmit(myForm,pUseEncoding);});findURL(myForm);if(typeof myForm.satitle!='undefined'){if(myForm.sofocus.value=='pf')
myForm.satitle.value=myForm.pf_query.value;else if(myForm.sofocus.value=='mppf')myForm.satitle.value=myForm.elements["mppfqy"].value;if(typeof myForm.pf_query!='undefined'){myForm.pf_query.value=myForm.satitle.value;}
if(typeof myForm.elements["mppfqy"]!='undefined'){myForm.elements["mppfqy"].value=myForm.satitle.value;}
if(myForm.sofocus.value=='pf')myForm.satitle.value=myForm.pf_query.value;else if(myForm.sofocus.value=='bs'){if(typeof myForm.pf_query!='undefined'){myForm.pf_query.value=myForm.satitle.value;}}}
myForm.submit();return false;}}
function doProductFindingFormSubmit(myForm,pUseEncoding){myForm.submit();return true;}


var basic_search=["satitle","fts","sacat","bs","fpos"];var aQntySO,aSllrSO,aBidSO,aGftSO,aDstSO,aPaySO,aTimeSO,aDateSO,aScsSO,aLctnSO,aPrcSO,oC,aStSO;var find=document.forms['find'];var DEFAULT_DISTANCE_RANGE="200";var DEFAULT_ZIP_TEXT="";var usingDefaultZip=true;var zip_element=null;function initSearch(){find=document.forms['find'];oC=annsfabulousfinds.oGlobals.oClient;if(!oC.bWaffTV){bindEvent(find);if(typeof(find.sofocus)!="undefined")find.sofocus.value='bs';if((typeof(find.sass)!='undefined')&&(typeof(strSoiInit)!='undefined'))setInitSellerID(strSoiInit);}
aQntySO=addSelected(['sacqyop','sacqy']);aSllrSO=addSelected(['sass']);aBidSO=addSelected(['sabdlo','sabdhi']);aGftSO=addSelected(['sagfs']);aDstSO=addSelected(['fpos','sadis']);aPaySO=addSelected(['fpaym']);aTimeSO=addSelected(['ftrt','ftrv']);aDateSO=addSelected(['dfs','dfe','dfts','dfte']);aScsSO=addSelected(['sascs']);aLctnSO=addSelected(['floc','sargn']);aPrcSO=addSelected(['saprclo','saprchi']);aStSO=addSelected(['saslt']);}
function addSelected(aName){var aSO=new Array();for(var i=0;i<aName.length;i++){var eElem=find.elements[aName[i]];if(typeof eElem!='undefined'){if(typeof eElem.type=='undefined'&&typeof eElem.length!='undefined')for(var j=0;j<eElem.length;j++)aSO[aSO.length]=eElem[j];else aSO[aSO.length]=new formParam(eElem.name,eElem.value);}}
return aSO;}
function formParam(n,v){this.name=n;this.value=v;}
function bindEvent(form){var e=form.elements;for(var i=0;i<e.length;i++){if((e[i].type==null)||(e[i].name==null))continue;if((e[i].type=='hidden')||(e[i].name==''))continue;if(e[i].onfocus==null){if(oC.bSafari)e[i].addEventListener("click",setFocus,false);else e[i].onfocus=setFocus;}}}
function setFocus(){var focus=getFocus(this);document.forms['find'].sofocus.value=focus;if(focus=='pf')updatePFTracking();}
function getFocus(element){for(var i=0;i<basic_search.length;i++)if(basic_search[i]==element.name)return'bs';if(element.name=="_ipn")return'_ipn';if(element.name=="fgtp")return'goto';if(element.name=="pdquery"||element.name=="pd")return'pd';if(isPartsBuilderElement(element))return'mppf';if(element.name.substring(0,1)=="a"||element.name=="pf"||element.name=="pf_query")return'pf';return'so';}
function clearPriceFields(element){for(var i=0;i<aPrcSO.length;i++){var fld=find.elements[aPrcSO[i].name];if(typeof fld!='undefined')fld.value=(element.checked)?aPrcSO[i].value:'';}}
function clearQuantityField(element){for(var i=0;i<aQntySO.length;i++){var fld=find.elements[aQntySO[i].name];if(typeof fld!='undefined'){if(fld.name=="sacqyop"){for(var j=0;j<fld.options.length;j++){if(element.checked){fld.options[j].selected=(aQntySO[i].value.indexOf(fld.options[j].value)>-1)?true:false;}
else{fld.options[j].selected=(j==0)?true:false;}}
if(fld.selectedIndex==-1)
fld.selectedIndex=0;}
else{fld.value=(element.checked)?aQntySO[i].value:'';}}}}
function clearSellerField(element){for(var i=0;i<aSllrSO.length;i++){var fld=find.elements[aSllrSO[i].name];if(typeof fld!='undefined'){if(element.checked)
fld.value=aSllrSO[i].value;else fld.value='';}}}
function clearBidFields(element){for(var i=0;i<aBidSO.length;i++){var fld=find.elements[aBidSO[i].name];if(typeof fld!='undefined')fld.value=(element.checked)?aBidSO[i].value:'';}}
function checkSeller(element){find.seller.checked=(element=='')?false:true;}
function checkInitSellerID(pSoiInit){if(find.sass.value==pSoiInit){find.sass.value='';}}
function setInitSellerID(pSoiInit){if(find.sass.value=='')
find.sass.value=pSoiInit;}
function checkPrice(){find.price.checked=(find.elements["saprchi"]==''&&find.elements["saprchi"]=='')?false:true;}
function checkQnty(){find.quantity.checked=(find.elements["sacqy"]=='')?false:true;}
function clearGiftOptions(element){for(var i=0;i<aGftSO.length;i++){myGift=aGftSO[i];myGift.checked=element.checked;}}
function checkBids(){find.fbd.checked=(find.sabdlo==''&&find.sabdhi=='')?false:true;}
function checkDateFilter(){find.dff.checked=true;}
function resetDistanceFilter(element,bUserZip){if(typeof(find.elements["fspt"])!="undefined"){for(var i=0;i<aDstSO.length;i++){var fld=find.elements[aDstSO[i].name];if(typeof fld!='undefined'){if(fld.name=="sadis"){for(var j=0;j<fld.options.length;j++){if(element.checked){fld.options[j].selected=(aDstSO[i].value.indexOf(fld.options[j].value)>-1)?true:false;}
else{fld.options[j].selected=(fld.options[j].value==DEFAULT_DISTANCE_RANGE)?true:false;}}
if(fld.selectedIndex==-1)
fld.selectedIndex=0;}
else{if(!bUserZip){if(aDstSO[i].value==DEFAULT_ZIP_TEXT)aDstSO[i].value="";fld.value=(element.checked)?aDstSO[i].value:DEFAULT_ZIP_TEXT;}
usingDefaultZip=!element.checked;}}}}}
function updateZipCode(element){for(var i=0;i<find.elements.length;i++){var fld=find.elements[i];if(fld.name=="fpos")fld.value=element.value;}}
function updateZipElement(element){zip_element=element;}
function clearZipField(element){if(usingDefaultZip){element.value="";usingDefaultZip=false;}}
function resetPayFilter(element){if(isChbx(find.elements["fpay"]))resetFilter(aPaySO,element.checked);}
function resetTimeFilter(element){if(isChbx(find.elements["ft"]))resetFilter(aTimeSO,element.checked);}
function resetSellerTypeFilter(element){if(isChbx(find.elements["fslt"]))resetStFilter(aStSO,element.checked);}
function resetDateFilter(element){if(isChbx(find.elements["dff"]))resetFilter(aDateSO,element.checked);}
function isChbx(e){return(typeof(e)!="undefined"&&e.type=="checkbox");}
function resetFilter(aSO,checked){if(checked==true)setFilter(aSO);else{for(var j=0;j<aSO.length;j++){var dd=find.elements[aSO[j].name];if(dd)dd.selectedIndex=0;}}}
function setFilter(aSO){for(var j=0;j<aSO.length;j++){var dd=find.elements[aSO[j].name];if(typeof dd!='undefined'&&typeof dd.options!='undefined')
for(var i=0;i<dd.options.length;i++)
if(dd.options[i].value==aSO[j].value)dd.options[i].selected=true;}}
function resetStFilter(aSO,checked){if(checked==true)setFilter(aSO);else{for(var j=0;j<aSO.length;j++){var dd=find.elements[aSO[j].name];if(dd)dd.selectedIndex=1;}}}
function checkSaleClass(){find.elements["fscl"].checked=true;}
function clearSaleClassField(element){for(var i=0;i<aScsSO.length;i++){var fld=find.elements[aScsSO[i].name];if(typeof fld!='undefined'){for(var j=0;j<fld.options.length;j++){if(element.checked){fld.options[j].selected=(aScsSO[i].value.indexOf(fld.options[j].value)>-1)?true:false;}
else{fld.options[j].selected=(j==0)?true:false;}}
if(fld.selectedIndex==-1)
fld.selectedIndex=0;}}}
function resetLocation(element){if(isChbx(find.elements["floc"])){if(element.checked==true)setFilter(aLctnSO);}else{if(!element.checked&&typeof(find.elements["sargn"])!="undefined"){if(find.elements["sargn"].type=="select-one"){find.elements["sargn"].selectedIndex=0;find.elements["sargn"].options[0].value="-1";}else find.elements["sargn"].value="-1";}}}
function checkLocation(){var e=find.elements["floc"];if(typeof(e)!="undefined")e.checked=true;}
function isPartsBuilderElement(e){return((typeof find.mppf!='undefined')&&(e.name=='mppf'||e.name=="mppfqy"||e.name=="fmmd"||e.name=="fmmk"||e.name=="fylo"||e.name=="fyhio"));}
function updatePFTracking(){if(typeof find.rctrack!='undefined')find.rctrack.value='0';}
function disableBIN(){var e=find.elements["sascs"];if(typeof(e)!="undefined"){if(typeof(e.length)!="undefined"){for(var i=0;i<e.length;i++){if(typeof(e[i])!="undefined")
e[i].checked=false;}}
else{e.checked=false;}}}
function disableADFormat(){var e=find.elements["fadf"];if(typeof(e)!="undefined")e.checked=false;}
function Localize(pStr){return pStr;}
function synchInputs(aElem){if(typeof aElem=='undefined')return;var bSelected=false;var eHidden=null;var eVisible=null;for(i=0;i<aElem.length;i++){if(aElem[i].type=="hidden")eHidden=aElem[i];if(aElem[i].type=="checkbox"){eVisible=aElem[i];bSelected=aElem[i].checked;}}
if(bSelected)eHidden.value=eVisible.value;}

var moreInfovisible=false;function moreInfoToggle(){var element=getStyleObject("prodInfo");var showLinkElement=getStyleObject("showProdInfo");var hideLinkElement=getStyleObject("hideProdInfo");if(moreInfovisible){element.display='none';showLinkElement.display='block';hideLinkElement.display='none';moreInfovisible=false;}
else{element.display='block';showLinkElement.display='none';hideLinkElement.display='block';moreInfovisible=true;}}
function getStyleObject(objectId){if(document.getElementById&&document.getElementById(objectId)){return document.getElementById(objectId).style;}else if(document.all&&document.all(objectId)){return document.all(objectId).style;}else if(document.layers&&document.layers[objectId]){return document.layers[objectId];}else{return false;}}

function Finding(pBase,pName){if(!this.objType)this.objType="SearchResultsPage";this.base=AFFBaseControl;this.base(pBase,pName);this.createSearchControls=function(){var bHasForm=(typeof document.forms['find']!='undefined');if(coMsg!=null)coOnLoad(document.forms[coMsg.form]);if(bHasForm)UpdateCategoryChar('find');setCategoryLevel("0,","0,","0,","0,","0,","0,");if(typeof sHelpContext!='undefined')
annsfabulousfinds.oDocument._getControl("helpContextualRaffrand")._exec("execute","find",sHelpContext);var oCJ=annsfabulousfinds.oDocument.oCookieJar;if(oCJ.readCookielet("annsfabulousfinds","js")!="1")oCJ.setOptimizationCookie();if(bHasForm)initSearch();}
with(this){var e=oDocument._getEvent("load");_registerListener(e,EVENT_BEFORE,"createSearchControls");}}
new Finding(annsfabulousfinds.oDocument.oPage,"SearchResults");

function FindingDependency(pBase,pName){if(!this.objType)this.objType="FindingDependencyGroup";this.base=AFFBaseControl;this.base(pBase,pName);this.oD=annsfabulousfinds.oDocument;this.createControls=function(){var c=this.oD.getConfig("Finding.Dependency");if(c!=null){for(var i=0;i<c.aList.length;i++){var cfg=c.aList[i];new FindingDependentFormOption(this,cfg.c,cfg);}
for(var i=0;i<c.bList.length;i++){var cfg=c.bList[i];new FindingCrossDependentFormOption(this,cfg.c,cfg);}}}
with(this){var e=oDocument._getEvent("load");_registerListener(e,EVENT_BEFORE,"createControls");}}
new FindingDependency(annsfabulousfinds.oDocument.oPage,"FindingDependency");function FindingDependentFormOption(pBase,pName,pConfig){if(!this.objType)this.objType="DependentFormOption";this.base=AFFHTMLCheckbox;this.base(pBase,pName);this.oC=pConfig;this.dependency=function(bChecked){if(bChecked)this.check(true);}
this.watchedCheckbox=new AFFHTMLCheckbox(this,this.oC.p);this.watchedCheckbox.checkDependency=function(){this.parent.dependency(this.isChecked());}
this.watchedCheckbox._registerEvent("onclick","checkDependency");}
function FindingCrossDependentFormOption(pBase,pName,pConfig){if(!this.objType)this.objType="CrossDependentFormOption";this.base=AFFHTMLCheckbox;this.base(pBase,pName);this.oC=pConfig;this.crossDependency=function(bChecked){if(bChecked)this.check(false);}
this.watchedCheckbox=new AFFHTMLCheckbox(this,this.oC.p);this.watchedCheckbox.checkCrossDependency=function(){this.parent.crossDependency(this.isChecked());}
this.watchedCheckbox._registerEvent("onclick","checkCrossDependency");}



//'

function AFFHTMLFrame(pParent,pName,pCfg)
{if(!this.objType)
this.objType="AFFHTMLFrame";this.base=AFFHTML;this.base(pParent,pName,pName,false,pCfg);this.eFrameElem=null;this.getElem=affHTMLFrameGetElem;this.bindHTML=affHTMLFrameBindHTML;this.bindEvents=this.enable=function(){};this.setSource=affHTMLFrameSetSource;this.cleanupMemoryBase=this.cleanupMemory;this.cleanupMemory=affHTMLFrameCleanupMemory;this.resize=affHTMLFrameResize;this.onBeforeResize=this.onAfterResize=null;}
function affHTMLFrameGetElem(pName)
{with(this)
{var f=null,oD=oDocument;var d=oD.doc,w=oD.win;if(w.frames)
f=eFrameElem=w.frames[pName];if(d.getElementById)
f=d.getElementById(pName);return f;}}
function affHTMLFrameBindHTML()
{with(this)
{eElem=getElem(sElemName);if(eElem)
assignJSObject(eElem);}}
function affHTMLFrameCleanupMemory()
{this.cleanupMemoryBase();this.eFrameElem=null;}
function affHTMLFrameSetSource(pURL)
{if(pURL==null||pURL.trim()==''){return;}
with(this)
{oDocument.setGlobalParent(this);if(pURL.has("ej2child=true"))
pURL+="&ej2parent="+name;if(eFrameElem)
eFrameElem.location.replace(pURL);else if(eElem)
eElem.src=pURL;}}
function affHTMLFrameResize(pMaxWidth)
{with(this)
{if(onBeforeResize)
onBeforeResize();var f=eFrameElem;if(!f||!(f.document||f.contentDocument))
f=getElem(sElemName);if(f&&typeof(f.document)!="unknown")
{var oDoc=f.document?f.document:f.contentDocument,db=oDoc.body,es=eElem.style,c=this.parent.oGlobals.oClient,w="100%",h=db.offsetHeight,oh;if(c.bSafari)
{oh=db.offsetHeight;w=oDoc.width;h=annsfabulousfinds.oDocument.doc.doctype!=null?oDoc.height+15:oDoc.height+1;}
else if(c.bFirefox)
{w=oDoc.width;h=oDoc.height}
else if(c.bWin||c.bOpera)
{w=db.scrollWidth;h=c.bNav&&annsfabulousfinds.oDocument.doc.doctype!=null?db.scrollHeight+30:db.scrollHeight;}
if(pMaxWidth&&c.bFirefox)
w="100%";if(this.oConfig)
{w=this.oConfig.iWidth||w;h=this.oConfig.iHeight||h;}
es.width=(w=="100%")?w:w+"px";es.height=h+"px";if(onAfterResize)
onAfterResize();}}}

function AFFSearchRelatedItems(pParent,pName,pCfg)
{if(!this.objType)
this.objType="AFFMyFavorites";this.base=AFFHTML;this.base(pParent,pName,pName,false,pCfg);this.oFrame="";this.cfg=this.oConfig=pCfg||null;this.ORIENTATION_HORIZONTAL="0";this.getHTML=function()
{with(this)
{var s='<iframe framafforder="0" id="'+cfg.sFrameId+'" marginheight=';s+=(cfg.sOrientation==ORIENTATION_HORIZONTAL)?'"1"':'"0"'
s+=' marginwidth="0" name="'+cfg.sFrameId+'" scrolling="no" style="width: 100%; height: 1px;">&nbsp;</iframe>';return s;}}
this.loadContent=function()
{with(this)
{oFrame.setSource(cfg.sContentUrl.replaceTokens(parent.parent.oCookieJar.readCookielet("annsfabulousfinds","sfLMD")));}}
this.resize=function()
{var o=this.oFrame;if(o)
o.resize();}
this.writeContainer=function(pConfig)
{with(this)
{var oP=parent,oD=oP.oDocument;cfg=oConfig=pConfig;cfg.sFrameId="searchRelatedItems";var eFrame=getElem("SearchRelatedItems");if(eFrame)eFrame.innerHTML=getHTML();oFrame=new AFFHTMLFrame(this,cfg.sFrameId,cfg);oFrame.bind();_registerListener(oD._getEvent("load"),EVENT_AFTER,"loadContent");}}
var pConfig=annsfabulousfinds.oDocument.getConfig("Common.searchRelatedItems");if(pConfig)this.writeContainer(pConfig);}
new AFFSearchRelatedItems(annsfabulousfinds.oDocument.oPage,"searchRelatedItems");


function AFFPrefetch(pParent,pName)
{if(!this.objType)
this.objType="AFFPrefetch";this.base=AFFBaseControl;this.base(pParent,pName);this.iTimeout=3000;this.aList=[];this.load=function(pPath)
{this.aList[this.aList.length]=pPath;}
this.init=function()
{var a=this.aList,s='';for(var i=0;i<a.length;i++)
{s+='<scr'+'ipt id="'+this.name+'_'+i+'" type="text/x-annsfabulousfindsScript"></'+'script>';}
this.oDocument.write(s);}
this.fetch=function()
{var oClient=annsfabulousfinds.oGlobals.oClient;if(oClient&&oClient.bWin)
{var a=this.aList,nm,cnt=1;var elem=this.oDocument.getUIElem(this.name+"_0");if(elem&&a.length>0)
elem.src=a[0];for(var i=1;i<a.length;i++)
{nm=this.name+"_"+i;elem=this.oDocument.getUIElem(nm);if(elem&&a[i])
{setTimeout('annsfabulousfinds.oDocument.getUIElem("'+nm+'").src = "'+a[i]+'"',cnt*this.iTimeout);cnt++;}}}}
var e=this.oDocument._getEvent("footer");if(e)
this._registerListener(e,this.EVENT_AFTER,"init");this._registerListener(this.oDocument._getEvent("load"),this.EVENT_AFTER,"fetch");}
annsfabulousfinds.oUtils.oPrefetch=new AFFPrefetch(annsfabulousfinds.oUtils,"Prefetch_JS_Files");

function AFFHTMLLayer(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="AFFHTMLLayer";this.base=AFFHTML;this.base(pParent,pName,pName,pDisabled,pCfg);this.aBindEvents=new Array;this.getElem=affHTMLLayerGetElem;this.getValue=affHTMLLayerGetValue;this.setValue=affHTMLLayerSetValue;}
function affHTMLLayerGetElem(pName)
{var s=pName,d=this.oDocument.doc;if(d.getElementById)
return d.getElementById(s);else if(d.all)
return d.all(s);this.throwWarning("Not supported","getElem");}
function affHTMLLayerGetValue(pIsText)
{if(this.eElem)
{if(pIsText)
{if(this.oDocument.oGlobals.oClient.bFirefox)
return this.eElem.textContent;else
return this.eElem.innerText;}
else
return this.eElem.innerHTML;}
else
return"";}
function affHTMLLayerSetValue(pVal,pIsText)
{if(this.eElem)
{if(pIsText)
{if(this.oDocument.oGlobals.oClient.bFirefox)
this.eElem.textContent=pVal;else
this.eElem.innerText=pVal;}
else
this.eElem.innerHTML=pVal;}}


function AFFHTMLImage(pParent,pName,pDisabled,pSource,pDisabledSource,pCfg)
{if(!this.objType)
this.objType="AFFHTMLImage";this.base=AFFHTML;this.base(pParent,pName,pName,pDisabled,pCfg);this.sEnabledSource=this.sDisabledSource=pSource;if(pDisabledSource)
this.sDisabledSource=pDisabledSource;this.getElem=affHTMLImageGetElem;this.source=affHTMLImageSource;this.enableBase=this.enable;this.enable=affHTMLImageEnable;this.subscribeEvents("onclick","onmouseover","onmouseout");}
function affHTMLImageGetElem(pName)
{return this.getDocElem(pName,'images');}
function affHTMLImageSource(pSrc,pText)
{var im=this.eElem;if(typeof(im)=='undefined')
return;if(typeof(pSrc)=="undefined")
return(im)?im.src:"";else
{im.src=pSrc;if(pText!=null)
im.alt=pText;}}
function affHTMLImageEnable(pEnable)
{with(this)
{enableBase(pEnable);if(sDisabledSource&&eElem)
eElem.src=(pEnable)?sEnabledSource:sDisabledSource;}}


window.toPixels=function(number){return number+"px";};window.metaInfo=function(name,value){var tags=document.getElementsByTagName("meta");for(var idx=0;(idx<tags.length);idx++){if(tags[idx][name]==value)return tags[idx];}
return null;};window.scrollTop=function(){if(window.pageYOffset!=null)return window.pageYOffset;else if(document.documentElement&&document.documentElement.scrollTop)return Math.max(document.documentElement.scrollTop,document.body.scrollTop);else return document.body.scrollTop;};window.scrollLeft=function(){if(window.pageXOffset!=null)return window.pageXOffset;else if(document.documentElement&&document.documentElement.scrollLeft)return Math.max(document.documentElement.scrollLeft,document.body.scrollLeft);else return document.body.scrollLeft;};window.scrollWidth=function(){return Math.max(document.body.offsetWidth,document.body.scrollWidth);};window.scrollHeight=function(){var scrollHeight=Math.max(document.body.offsetHeight,document.body.scrollHeight);if(document.documentElement)return Math.max(scrollHeight,document.documentElement.offsetHeight);else return scrollHeight;};window.clientTop=function(){if(document.documentElement)return document.documentElement.clientTop;else return document.body.clientTop;};window.clientLeft=function(){if(document.documentElement)return document.documentElement.clientLeft;else return document.body.clientLeft;};window.clientWidth=function(){var documentElement=document.documentElement;if(documentElement&&documentElement.clientWidth&&window.innerWidth)return Math.min(documentElement.clientWidth,window.innerWidth);else if(documentElement&&documentElement.clientWidth)return documentElement.clientWidth;else if(window.innerWidth)return window.innerWidth;else if(document.body.clientWidth)return document.body.clientWidth;else return document.body.offsetWidth;};window.clientHeight=function(){var documentElement=document.documentElement;if(documentElement&&documentElement.clientHeight&&window.innerHeight)return Math.min(documentElement.clientHeight,window.innerHeight);else if(documentElement&&documentElement.clientHeight)return documentElement.clientHeight;else if(window.innerHeight)return window.innerHeight;else if(document.body.clientHeight)return document.body.clientHeight;else return document.body.offsetHeight;};window.offsetTop=function(element){for(var offsetTop=0;(element!=null);element=element.offsetParent)offsetTop+=element.offsetTop;return offsetTop;};window.offsetLeft=function(element){for(var offsetLeft=0;(element!=null);element=element.offsetParent)offsetLeft+=element.offsetLeft;return offsetLeft;};window.eventTop=function(event){if(event.pageY!=null)return event.pageY;else if(document.documentElement&&document.documentElement.scrollTop)return event.clientY+Math.max(document.documentElement.scrollTop,document.body.scrollTop);else return event.clientY+document.body.scrollTop;};window.eventLeft=function(event){if(event.pageX!=null)return event.pageX;else if(document.documentElement&&document.documentElement.scrollLeft)return event.clientX+Math.max(document.documentElement.scrollLeft,document.body.scrollLeft);else return event.clientX+document.body.scrollLeft;};window.createElement=function(name){return document.standardCreateElement?document.standardCreateElement(name):document.createElement(name);};window.containsElement=function(container,element){while((element.parentNode!=null)&&(element!=container))element=element.parentNode;return(element==container);};window.firstTagName=function(parent,tagName){for(var node=parent.firstChild;((node!=null)&&(node.tagName!=tagName));node=node.nextSibling);return node;};


annsfabulousfinds.oDocument.oPage.bTier1=function(){var oCl=annsfabulousfinds.oGlobals.oClient;if(oCl.bIE&&oCl.iVer>5)return true;if(oCl.bFirefox)return true;return false;}
annsfabulousfinds.oDocument.oPage.bTier3=function(){var oCl=annsfabulousfinds.oGlobals.oClient;if(oCl.bIE&&oCl.bMac)return true;if(oCl.bIE&&oCl.iVer>4)return false;if(oCl.bFirefox)return false;if(oCl.bOpera&&window.XMLHttpRequest)return false;if(oCl.bNav&&oCl.iVer>6)return false;if(oCl.bSafari)return false;return true;}


DHTMLEvent=new Object();if(window.addEventListener){DHTMLEvent.addEventListener=function(object,name,listener){return object.addEventListener(name,listener,true);};DHTMLEvent.removeEventListener=function(object,name,listener){object.removeEventListener(name,listener,true);};}
else if(window.attachEvent){DHTMLEvent.addEventListener=function(object,name,listener){return object.attachEvent("on"+name,listener);};DHTMLEvent.removeEventListener=function(object,name,listener){object.detachEvent("on"+name,listener);};}
else{DHTMLEvent.addEventListener=function(object,name,listener){return false};DHTMLEvent.removeEventListener=function(object,name,listener){};};DHTMLEvent.target=function(event){return(event.target)?event.target:event.srcElement;};DHTMLEvent.currentTarget=function(event){return(event.currentTarget)?event.currentTarget:event.srcElement;};DHTMLEvent.originalTarget=function(event){return(event.originalTarget)?event.originalTarget:event.srcElement;};


BalloonDialog=function(parent,name,config){var self=this;this.name=name;this.config=config;this.client=annsfabulousfinds.oGlobals.oClient;this.ie5=(this.client.bIE&&this.client.iVer==5);this.dialog=document.getElementById(this.name);this.dialog=this.dialog.parentNode.removeChild(this.dialog);this.dialog=document.body.insertBefore(this.dialog,document.body.firstChild);this.content=document.getElementById(this.name.concat("Content"));this.frame=document.getElementById(this.name.concat("Frame"));this.body=document.getElementById(this.name.concat("Body"));this.backing=this.createBacking();this.shadow=document.getElementById(this.name.concat("Shadow"));this.arrowLeft=document.getElementById(this.name.concat("ArrowLeft"));this.arrowRight=document.getElementById(this.name.concat("ArrowRight"));this.onmousemove=function(event){return self.onMouseMove(event);};this.onresize=function(){return self.resize();};this.ontimeout=function(){return self.onTimeout();};this.listener=(document.documentElement)?document.documentElement:document.body;this.timer=null;this.resizer=null;};BalloonDialog.prototype.createBacking=function(){var backing=this.backing;if(backing!=null)return backing;backing=window.createElement("iframe");backing.frameBorder=0;backing.className="backing";backing.style.display=this.client.bIE?"block":"none";return this.content.insertBefore(backing,this.content.firstChild);};BalloonDialog.prototype.load=function(content){this.body.innerHTML=content;};BalloonDialog.prototype.open=function(top,left,width,height,origin){this.top=top;this.left=left;this.width=width;this.height=height;this.origin=origin;this.active=true;this.borderWidth=(!this.ie5)?2:0;this.borderHeight=(!this.ie5)?2:0;this.scrollTop=window.scrollTop();this.scrollLeft=window.scrollLeft();this.clientWidth=window.clientWidth();this.clientHeight=window.clientHeight();this.clientBottom=this.scrollTop+this.clientHeight;this.clientRight=this.scrollLeft+this.clientWidth;this.dialog.style.display="none";this.backing.style.width="auto";this.backing.style.height="auto";this.shadow.style.width="auto";this.shadow.style.height="auto";this.frame.style.width="auto";this.frame.style.height="auto";this.resizes=4;this.resize();};BalloonDialog.prototype.resize=function(){this.dialog.style.display="block";var widthLeft=this.clientRight-(this.left+(this.body.offsetWidth+27));var widthRight=(this.left-(this.body.offsetWidth+27))-this.scrollLeft;this.frameHeight=Math.min(this.body.offsetHeight+(this.frame.clientHeight?(this.frame.offsetHeight-this.frame.clientHeight):this.borderHeight),this.clientHeight,this.height);this.frame.style.height=window.toPixels(this.frameHeight-this.borderHeight);if(widthLeft>=0)this.openLeft();else if(widthRight>=0)this.openRight();else if(widthRight>widthLeft)this.openRight();else this.openLeft();this.frameHeight=Math.min(this.body.offsetHeight+(this.frame.clientHeight?(this.frame.offsetHeight-this.frame.clientHeight):this.borderHeight),this.clientHeight,this.height);this.frame.style.height=window.toPixels(this.frameHeight-this.borderHeight);this.offsetTop=Math.max(Math.min(this.top-this.origin,this.clientBottom-this.frame.offsetHeight-this.shadow.offsetTop),this.scrollTop);this.arrowTop=Math.min(this.top-this.offsetTop,this.frame.offsetHeight-27);this.frame.scrollTop=0;this.shadow.style.width=window.toPixels(this.frame.offsetWidth);this.shadow.style.height=window.toPixels(this.frame.offsetHeight);this.dialog.style.top=window.toPixels(this.offsetTop);this.dialog.style.left=window.toPixels(this.offsetLeft);this.backing.style.width=window.toPixels(this.content.offsetWidth);this.backing.style.height=window.toPixels(this.content.offsetHeight);this.arrow.style.top=window.toPixels(this.arrowTop);var element=(document.documentElement)?document.documentElement:document.body;DHTMLEvent.removeEventListener(this.listener,"mousemove",this.onmousemove);DHTMLEvent.addEventListener(this.listener,"mousemove",this.onmousemove);if(this.resizes--)this.resizer=window.setTimeout(this.onresize,100);else this.setTimeout(this.config.timeout,true);};BalloonDialog.prototype.openLeft=function(){this.arrow=this.arrowLeft;this.arrow.style.display="block";this.arrowRight.style.display="none";this.offsetLeft=Math.max(this.left,this.scrollLeft);this.frameWidth=Math.min(this.body.offsetWidth+(this.frame.clientWidth?(this.frame.offsetWidth-this.frame.clientWidth):this.borderWidth),this.clientRight-this.arrowLeft.offsetWidth-this.offsetLeft-this.shadow.offsetLeft,this.width);this.frame.style.width=window.toPixels(this.frameWidth-this.borderWidth);};BalloonDialog.prototype.openRight=function(){this.arrow=this.arrowRight;this.arrow.style.display="block";this.arrowLeft.style.display="none";this.offsetRight=Math.min(this.left,this.clientRight);this.frameWidth=Math.min(this.body.offsetWidth+(this.frame.clientWidth?(this.frame.offsetWidth-this.frame.clientWidth):this.borderWidth),this.offsetRight-this.arrowRight.offsetWidth-this.scrollLeft,this.width);this.frame.style.width=window.toPixels(this.frameWidth-this.borderWidth);this.offsetLeft=Math.max(this.offsetRight-this.dialog.offsetWidth,0);};BalloonDialog.prototype.close=function(){this.active=false;this.dialog.style.display="none";window.clearTimeout(this.timer);window.clearTimeout(this.resizer);DHTMLEvent.removeEventListener(this.listener,"mousemove",this.onmousemove);if(this.onclose)this.onclose();};BalloonDialog.prototype.setTimeout=function(timeout,active){this.active=active;window.clearTimeout(this.timer);this.timer=(timeout)?window.setTimeout(this.ontimeout,timeout):null;return false;};BalloonDialog.prototype.onTimeout=function(event){this.close();};BalloonDialog.prototype.onMouseMove=function(event){var eventTarget=DHTMLEvent.target(event);if(window.containsElement(this.link,eventTarget))return this.setTimeout(this.timeout,true);else if(window.containsElement(this.frame,eventTarget))return this.setTimeout(this.timeout,true);else if(window.containsElement(this.arrow,eventTarget))return this.setTimeout(this.timeout,true);var xorg=window.offsetLeft(this.arrow)-window.eventLeft(event);var yorg=window.offsetTop(this.arrow)-window.eventTop(event);if((Math.abs(xorg)<25)&&(Math.abs(yorg)<25))return this.setTimeout(this.timeout,true);else if(this.active)return this.setTimeout(this.config.mouseout,false);};BalloonDialog.prototype.hideSelects=function(){this.selects=new Array();var dialogTop=window.offsetTop(this.dialog);var dialogLeft=window.offsetLeft(this.dialog);var dialogBottom=dialogTop+this.dialog.offsetHeight;var dialogRight=dialogLeft+this.dialog.offsetWidth;var selects=document.getElementsByTagName("select");for(var idx=0;(idx<selects.length);idx++){var select=selects[idx];var selectTop=window.offsetTop(select);var selectLeft=window.offsetLeft(select);var selectBottom=selectTop+select.offsetHeight;var selectRight=selectLeft+select.offsetWidth;if((selectTop>dialogBottom)||(selectBottom<dialogTop))continue;else if((selectLeft>dialogRight)||(selectRight<dialogLeft))continue;select.style.visibility="hidden";this.selects[this.selects.length]=select;}};BalloonDialog.prototype.showSelects=function(){for(var idx=0;(idx<this.selects.length);idx++){this.selects[idx].style.visibility="inherit";}};


function ShowMe(pBase,config){
	var self=this;
	this.objType="ShowMe";
	this.base=AFFBaseControl;
	this.base(pBase,"ShowMe");
	this.config=config;
	this.onopen=function(){
		return self.onOpen();
	};
	this.onclose=function(){
		return self.onClose();
	};
	this.onmouseout=function(event){
		return self.onMouseOut(event);
	};
	this.body=document.getElementById("ShowMeDialogBody");
	this.image=document.getElementById("ShowMeDialogImage");
	this.thumbs=document.getElementById("ShowMeDialogThumbs");
	this.thumblayer=document.getElementById("ShowMeThumbLayer");
	this.slider=document.getElementById("ShowMeSlider");
	this.paginationUp=document.getElementById("paginationUp");
	this.paginationDown=document.getElementById("paginationDown");
	this.sliderUp=document.getElementById("ArrowUp");
	this.sliderDown=document.getElementById("ArrowDown");
	this.onloadimage=function(event){
		return self.onLoadImage(event);
	};
	this.onloaderror=function(){
		return self.onLoadError();
	};
	this.onloadticker=function(){
		return self.showProgress();
	};
	this.onscrolldown=function(){
		return self.onScrollDown();
	};
	this.onscrollup=function(){
		return self.onScrollUp();
	};
	this.onimgload=function(){
		return self.shrinknShowSSImage();
	};
	this.onload=function(){
		return self.preCache();
	};
	this.dialog=new BalloonDialog(this,"ShowMeDialog",config);
	this.dialog.onclose=this.onclose;
};

ShowMe.prototype.setDelay=function(event,link,gallery,top,left){
	this.link=link;
	this.gallery=gallery;
	this.top=window.offsetTop(this.link)+top;this.left=window.offsetLeft(this.link)+left;window.clearTimeout(this.timer);
	this.timer=window.setTimeout(this.onopen,this.config.mouseover);
	DHTMLEvent.removeEventListener(this.link,"mouseout",this.onmouseout);
	DHTMLEvent.addEventListener(this.link,"mouseout",this.onmouseout);return false;
};

ShowMe.prototype.onMouseOut=function(event){
	window.clearTimeout(this.timer);
	DHTMLEvent.removeEventListener(this.link,"mouseout",this.onmouseout);
	return false;
};

ShowMe.prototype.onOpen=function(){
	this.SGContent();
	this.bigImages=new Array(this.gallery.nImgs);
	this.dialog.link=this.link;
	this.dialog.body.style.width=window.toPixels((this.gallery.enableThumbs=="true"&&(this.gallery.nImgs>1))?510:420);
	this.dialog.open(this.top,this.left,this.config.width,this.config.height,this.config.origin);
	this.slider.style.top=window.toPixels(0);
	DHTMLEvent.removeEventListener(this.link,"mouseout",this.onmouseout);
	this.loader=new Object();
	this.loader.index=0;
	this.loader.elapsed=0;
	this.preCache();
};
ShowMe.prototype.preCache=function(){
	this.loaded=false;
	this.loader.image=new Image();
	this.loader.start=new Date().getTime();
	var index=this.loader.index+1;
	var bigImgUrl=this.config.host+this.gallery.id;
	this.loader.tick=Math.max(Math.round(this.loader.elapsed/16),250);
	this.loader.timeout=window.setTimeout(this.onloaderror,Math.max(32*this.loader.tick,30000));
	this.loader.image.onload=this.onloadimage;
	this.loader.image.onerror=this.onloaderror;
	this.loader.image.onabort=this.onloaderror;
	if(this.gallery.nImgs>1&&this.gallery.enableThumbs=="true")this.showProgress();
	this.loader.image.src=bigImgUrl;
};
ShowMe.prototype.showProgress=function(){
	if(this.loader.index<this.gallery.nImgs){
		var str="progressLyr"+this.loader.index;
		var oProgressLyr=document.getElementById(str);
		oProgressLyr.style.top=window.toPixels(oProgressLyr.offsetTop+10);
		if(oProgressLyr.offsetHeight>10) oProgressLyr.style.height=window.toPixels(oProgressLyr.offsetHeight-10);
		if(oProgressLyr.offsetHeight>4) this.loader.ticker=window.setTimeout(this.onloadticker,this.loader.tick);
	}
};
ShowMe.prototype.onLoadImage=function(event){
	this.loaded=true;
	window.clearTimeout(this.loader.ticker);
	window.clearTimeout(this.loader.timeout);
	if(this.loader.index==0&&(this.gallery.nImgs==1||this.gallery.enableThumbs!="true")){
		var imgId=document.getElementById("imgBig");
		imgId.src=this.loader.image.src;this.onBigImgload();
	} else{
		if(this.loader.index<this.gallery.nImgs){
			var str="progressLyr"+this.loader.index;
			var oProgressLyr=document.getElementById(str);
			oProgressLyr.style.top=window.toPixels(64);
			oProgressLyr.style.height=window.toPixels(0);
			oProgressLyr.style.display="none";
			this.bigImages[this.loader.index]=this.loader.image.src;
			if(this.loader.index==0){
				var imgId=document.getElementById("imgBig");
				imgId.src=this.loader.image.src;
				this.onBigImgload();
			} else{
				this.onLoadDone();
			}	
		}
	}
};
ShowMe.prototype.onLoadDone=function(){
	this.loader.index=this.loader.index+1;
	this.loader.finish=new Date().getTime();
	this.loader.elapsed=Math.max(this.loader.finish-this.loader.start,1);
	if(this.loader.index<this.gallery.nImgs)return window.setTimeout(this.onload,1);
	else if(!this.loaded)this.setBigImgTxt(this.config.error);
};
ShowMe.prototype.onLoadError=function(){
	window.clearTimeout(this.loader.ticker);
	window.clearTimeout(this.loader.timeout);
	if((this.gallery.enableThumbs=="true")&&(this.gallery.nImgs>1)){
		var str="progressLyr"+this.loader.index;
		var oProgressLyr=document.getElementById(str);
		oProgressLyr.style.display="block";
		oProgressLyr.style.top=window.toPixels(0);oProgressLyr.style.left=window.toPixels(0);
		oProgressLyr.style.height=window.toPixels(64);
	}
	this.onLoadDone();
};
ShowMe.prototype.onClose=function(){};
ShowMe.prototype.SGContent=function(){
	this.setBigImgTxt(this.config.loading);
	if(this.gallery.enableThumbs=="true"&&this.gallery.nImgs>1){
		this.thumbs.style.display="";
		this.slider.innerHTML=this.getThumbLayerContent();
		if(this.gallery.nImgs<=4){
			this.paginationUp.style.display="none";
			this.paginationDown.style.display="none";
			this.thumblayer.style.marginTop=window.toPixels(41);
		} else {
			this.paginationUp.style.display="block";
			this.paginationDown.style.display="block";
			this.thumblayer.style.marginTop=window.toPixels(19);
		}
	this.images=this.slider.getElementsByTagName("div");
	this.images[0].className="outerThumbDiv selected";
	var setThumbOpacity="";
	var opacity=0.7;
	for(var i=0;i<this.gallery.nImgs;i++){
		setThumbOpacity=document.getElementById("progressLyr"+i);
		setThumbOpacity.style.filter="alpha(opacity="+parseInt(100*opacity)+")";
		setThumbOpacity.style.opacity=opacity;
	}
	this.selected=0;this.scrollEnable(0);this.dialogHandlers();
	} else{this.thumbs.style.display="none";}
	this.oBigImg=new AFFHTMLImage(this,'imgBig');
	this.oBigImg._registerEvent("onclick","parent.showViewItem");
	this.oBigImg.showViewItem=parent.showViewItem;
	this.oBigImg.bind();
};

ShowMe.prototype.scrollEnable=function(scrollIndex){
		this.scrollIndex=scrollIndex;
		var i=scrollIndex+4;this.sliderUp.disabled=(scrollIndex<=0);
		this.sliderUp.src=(this.sliderUp.disabled)?this.config.coreImgHost+"buttons/btnpreviousNA.gif":this.config.coreImgHost+"buttons/btnprevious.gif";
		this.paginationUp.style.cursor=(this.sliderUp.disabled)?"default":"pointer";
		this.sliderDown.disabled=(i>=this.gallery.nImgs);
		this.sliderDown.src=(this.sliderDown.disabled)?this.config.coreImgHost+"buttons/btnnextNA.gif":this.config.coreImgHost+"buttons/btnnext.gif";
		this.paginationDown.style.cursor=(this.sliderDown.disabled)?"default":"pointer";
		this.sliderTop=-this.images[scrollIndex*3].offsetTop;
};
ShowMe.prototype.dialogHandlers=function(){
	this.oDivThumbObj=new Array();
	for(var i=0;i<this.gallery.nImgs;i++){
		var divId="divThumb"+i;this.oDivThumbObj[i]=new AFFHTMLLayer(this,divId);
		this.oDivThumbObj[i].thumbClick=function(){
			if(this.selectedThumb!=this.parent.selected){
				this.parent.setBigImgTxt(this.parent.config.loading);
				var id=this.selectedThumb+1;
				var selThumbDiv=document.getElementById("divThumb"+this.selectedThumb);
				var prevSelThumbDiv=document.getElementById("divThumb"+this.parent.selected);
				selThumbDiv.className="outerThumbDiv selected";
				prevSelThumbDiv.className="outerThumbDiv";
				this.parent.selected=this.selectedThumb;
				var imgId=document.getElementById("imgBig");
				if(this.parent.bigImages[this.selectedThumb]==null){
					var bigImageUrl=this.parent.config.host+this.parent.gallery.id+"_"+id+"_"+this.parent.gallery.version+"_1.jpg";
					imgId.onload=this.parent.onBigImgload;imgId.onerror=this.parent.onBigImgloadError;
					imgId.onabort=this.parent.onBigImgloadError;
					imgId.src=bigImageUrl;
				} else {
					imgId.src=this.parent.bigImages[this.selectedThumb];//tjb mod - semicolon was missing! 
					this.parent.onBigImgload();
				}
					return false;
			}
		}
		this.oDivThumbObj[i].subscribeEvents("onclick");
		this.oDivThumbObj[i]._registerEvent("onclick","thumbClick");
		this.oDivThumbObj[i].selectedThumb=i;
		this.oDivThumbObj[i].bind();
	}
};
ShowMe.prototype.setBigImgTxt=function(text){
	var bImgDiv=document.getElementById("bImgDiv");
	bImgDiv.style.display="none";
	var imgId=document.getElementById("imgBig");
	imgId.style.width="";imgId.style.height="";
	var bImgTxt=document.getElementById("bImgTxt");
	bImgTxt.innerHTML=text;bImgTxt.style.display="block";
};
ShowMe.prototype.onBigImgload=function(){
	var bImgTxt=document.getElementById("bImgTxt");
	var bImgDiv=document.getElementById("bImgDiv");
	var bImg=document.getElementById("imgBig");
	var control=annsfabulousfinds.oDocument._getControl("ShowMe");
	if(control.gallery.isSuperSz==1){bImgDiv.className="hiddenimg";
		bImgTxt.style.display="block";
		bImgDiv.style.display="block";
		control.bTimer=window.setTimeout(control.onimgload,100);
	} else{bImgTxt.style.display="none";
	bImgDiv.style.display="block";
	if(this.selected==0) this.onLoadDone();
	}
};
ShowMe.prototype.shrinknShowSSImage=function(){
	window.clearTimeout(this.bTimer);
	var bImgTxt=document.getElementById("bImgTxt");
	var bImgDiv=document.getElementById("bImgDiv");
	var bImg=document.getElementById("imgBig");
	var imgW=bImg.width;
	var imgH=bImg.height;
	var scale=1.0;
	if((imgW>=imgH)&&(imgW>400)) scale=400/imgW;
	else if((imgH>400)&&(imgH>=imgW)) scale=400/imgH;
	bImg.style.width=window.toPixels(scale*imgW);
	bImg.style.height=window.toPixels(scale*imgH);
	bImgDiv.className="imgvisible";
	bImgTxt.style.display="none";
	bImgDiv.style.display="block";
	if(this.selected==0) this.onLoadDone();
}
ShowMe.prototype.onBigImgloadError=function(){
	var bImgTxt=document.getElementById("bImgTxt");
	var bImgDiv=document.getElementById("bImgDiv");
	bImgTxt.innerHTML="Error loading the image";
	bImgTxt.style.display="none";
	bImgDiv.style.display="block";
};
ShowMe.prototype.showViewItem=function(){
	document.location.href=this.parent.gallery.vItemlnk;
};
ShowMe.prototype.getThumbLayerContent=function(){
	var outPut="";
	var id=0;
	var thumbImg;
	for(var i=0;i<this.gallery.nImgs;i++){
		id=i+1;thumbImg=this.config.host+this.gallery.id+"_"+id+"_"+this.gallery.version+"_0.jpg";
		outPut=outPut+"<div class='outerThumbDiv' name='divThumb"+i+"' id='divThumb"+i+"' ><div class='thumbnail' ><img src='"+thumbImg+"' id='imgThumb"+i+"' name='imgThumb"+i+"'"+"onload='onShowMeThumb("+i+");'"+" /></div><div class='pLayer' id='progressLyr"+i+"'></div></div>";
	}
	return outPut;
};
ShowMe.prototype.onSlideNext=function(event){
	var i=Math.min(((this.scrollIndex)+4),(Math.max(this.gallery.nImgs-4,0)));
	this.scrollEnable(i);window.setTimeout(this.onscrolldown,this.config.timer);
};
ShowMe.prototype.onScrollDown=function(){
	this.slider.style.top=window.toPixels(Math.max(this.slider.offsetTop-this.config.pixels,this.sliderTop));
	if((this.slider.offsetTop-this.sliderTop)>this.config.pixels)window.setTimeout(this.onscrolldown,this.config.timer);
	else this.slider.style.top=window.toPixels(this.sliderTop);
};
ShowMe.prototype.onSlidePrev=function(){
	this.scrollEnable(Math.max(this.scrollIndex-4,0));
	window.setTimeout(this.onscrollup,this.config.timer);
};
ShowMe.prototype.onScrollUp=function(){
	this.slider.style.top=window.toPixels(Math.min(this.slider.offsetTop+this.config.pixels,this.sliderTop));
	if((this.sliderTop-this.slider.offsetTop)>this.config.pixels)window.setTimeout(this.onscrollup,this.config.timer);
	else this.slider.style.top=window.toPixels(this.sliderTop);
};
function onSlidePrev(event){
	var control=annsfabulousfinds.oDocument._getControl("ShowMe");
	return(control)?control.onSlidePrev(event):false;
};
function onSlideNext(event){
	var control=annsfabulousfinds.oDocument._getControl("ShowMe");
	return(control)?control.onSlideNext(event):false;
};

function onGalleryHover(event,itemId,nImgs,isSuperSz,version,enableThumbs,vItemlnk){
	event.cancelBubble=true;
	var control=annsfabulousfinds.oDocument._getControl("ShowMe");
	
	if((control==null)||(control.dialog.active))return false;
	var link=DHTMLEvent.currentTarget(event);
	while(link&&(link.onmouseover==null))link=link.parentNode;if(link==null)return false;
	if(link.active)return false;
	var control=annsfabulousfinds.oDocument._getControl("ShowMe");
	if(control==null)return false;
	var gallery=new Array();
	gallery.id=itemId;
	gallery.nImgs=nImgs;
	gallery.isSuperSz=isSuperSz;
	gallery.enableThumbs=enableThumbs;
	gallery.version=version;
	if(version=="")gallery.version=1;
	gallery.vItemlnk=vItemlnk;
	if(link.className=="galleryhover") control.setDelay(event,link,gallery,(link.height/2),(link.width/2));
	else control.setDelay(event,link,gallery,5,10);
	return false;
};
	
function onShowMeThumb(idx){
	var image=document.getElementById("imgThumb"+idx);
	if(image==null)return;
	if((image.width>64)&&(image.width>=image.height))image.width=(64/image.width)*image.width;
	else if((image.height>64)&&(image.height>=image.width))image.height=(64/image.height)*image.height;image.onload=null;image.style.position="relative";
	image.style.top=window.toPixels(Math.floor((64-image.height)/2));
	image.style.left=window.toPixels(Math.floor((64-image.width)/2));
};

	var cfg=annsfabulousfinds.oDocument.getConfig("ShowMe");
	if(cfg)new ShowMe(annsfabulousfinds.oDocument.oPage,cfg);



function AFFHTMLButton(pParent,pElemName,pDisabled,pCfg)
{if(!this.objType)
this.objType="AFFHTMLButton";this.base=AFFHTMLFormElem;this.base(pParent,pElemName,pDisabled,pCfg);this.subscribeEvents("onclick");}


function AFFHTMLForm(pParent,pName,pCfg)
{if(!this.objType)
this.objType="AFFHTMLForm";this.base=AFFHTML;this.base(pParent,pName,pName,false,pCfg);this.getElem=function(){return this.getDocElem(arguments[0],'forms');};this.enable=function(){};this.getElementValue=affHTMLFormGetElementValue;this.setElementValue=affHTMLFormSetElementValue;this.getElements=affHTMLFormGetElements;this.getElement=affHTMLFormGetElement;this.setAction=affHTMLFormSetAction;this.getAction=affHTMLFormGetAction;this.setTarget=affHTMLFormSetTarget;this.getTarget=affHTMLFormGetTarget;this.submit=affHTMLFormSubmit;this.clear=affHTMLFormClear;this.subscribeEvents("onsubmit");this.onBeforeSubmit=null;this.onAfterSubmit=null;}
function affHTMLFormGetElements()
{var e=this.eElem;return e?e.elements:new Array;}
function affHTMLFormGetElement(pName)
{var elems=this.getElements();return elems[pName]?elems[pName]:null;}
function affHTMLFormGetElementValue(pName)
{var elems=this.getElements();if(elems[pName]&&elems[pName].value)
return elems[pName].value;return"";}
function affHTMLFormSetElementValue(pName,pValue)
{var elems=this.getElements();if(elems[pName])
elems[pName].value=pValue;}
function affHTMLFormSetAction(pAction)
{var e=this.eElem;if(e)
e.action=pAction;}
function affHTMLFormGetAction()
{var e=this.eElem;if(e)
return e.action;}
function affHTMLFormSetTarget(pTarget)
{var e=this.eElem;if(e)
e.target=pTarget;}
function affHTMLFormGetTarget()
{var e=this.eElem;if(e)
return e.target;}
function affHTMLFormSubmit()
{if(this.onBeforeSubmit)
this.onBeforeSubmit();var e=this.eElem;if(e)
{e.submit();if(this.onAfterSubmit)
this.onAfterSubmit();}
else
this.throwError("Element '"+this.sElemName+"' does not exist on the page","submit");}
function affHTMLFormClear()
{var elems=this.getElements();for(i=0;i<elems.length;i++)
{var elem=elems[i];var type=elem.type;switch(type)
{case"text":case"textarea":elem.value="";break;case"checkbox":elem.checked=false;break;case"select-one":elem.selectedIndex=0;}}}

function AFFHTMLAnchor(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="AFFHTMLAnchor";this.base=AFFHTML;this.base(pParent,pName,pName,pDisabled,pCfg);this.getElem=affHTMLAnchorGetElem;this.enableBase=this.enable;this.enable=affHTMLAnchorEnable;this.subscribeEvents("onclick");}
function affHTMLAnchorGetElem(pName)
{var d=this.oDocument.doc,l=null;l=d.links[pName];if(l)return l;if(d.getElementById)
l=d.getElementById(pName);if(l)return l;if(d.all)
l=d.all[pName];if(l)return l;if(d.layers)
{var lyrs=d.layers;var len=lyrs.length;for(var i=0;i<len;i++)
{l=this.getElem(lyrs[i].document,pName);if(l)
return l;}}
for(var j=0;j<d.links.length;j++)
{l=d.links[j];if(typeof(l.name)=="undefined")
{if(l.onclick)
{var oc=l.onclick.toString();if(oc.indexOf("{#"+pName+"#}")!=-1)
return l;}}
else
{if(l.name==pName)
return l;}
l=null;}
return l;}
function affHTMLAnchorEnable(pEnable)
{var cur=(pEnable)?"hand":"default";var el=this.eElem;if(el&&el.style)
el.style.cursor=cur;this.enableBase(pEnable);}
function setAFFLink(pS)
{return true;}


function AFFHTMLText(pParent,pName,pDisabled,pCfg,bHidden)
{if(!this.objType)
this.objType="AFFHTMLText";this.base=AFFHTMLFormElem;this.base(pParent,pName,pDisabled,pCfg);this.value=affHTMLTextValue;this.getValue=affHTMLTextGetValue;this.setValue=affHTMLTextSetValue;this.select=affHTMLTextSelect;if(bHidden!=true)
this.subscribeEvents("onchange","onblur","onfocus","onkeydown","onkeyup");}
function affHTMLTextValue(pVal)
{var e=this.eElem;if(e)
{if(typeof(pVal)=="undefined")
return e.value;else
e.value=pVal;}}
function affHTMLTextGetValue()
{return this.value();}
function affHTMLTextSetValue(pVal)
{return this.value(pVal);}
function affHTMLTextSelect()
{var e=this.eElem;if(e)
e.select();}

annsfabulousfinds.oDocument.oPage.onBeforeLoad=function(pConfig)
{var oC=this.oGlobals.oClient;var oCfg=this.parent.getConfig("PDP.FormSubmit");if(oCfg)
{var oDiv=new AFFHTMLLayer(this,oCfg.sDivId);var oAnchor=new AFFHTMLAnchor(this,oCfg.sAnchorId);var oForm=new AFFHTMLForm(this,oCfg.sFormId);var oHF=new AFFHTMLText(this,oCfg.sHiddenFieldName);oAnchor.onclick=function()
{oHF.setValue(oDiv.getValue());oForm.submit();return false;}}
var c=this.parent.getConfig("Avalon.Review.HelpfullnessVote");if(oC.bNav&&oC.fVer<=7.01)
return;else if(oC.bOpera&&oC.fVer<=8.0)
return;if(c)
new AFFAvalonHelpfullnessVote(this,"helpfullness vote",c);var oCfg=this.parent.getConfig("Product.Wiki.CreateEdit");if(!oCfg)
return
var oCreateWiki=new AFFHTMLButton(this,oCfg.sCreateWikiBtn);var oEditWiki=new AFFHTMLButton(this,oCfg.sEditWikiBtn);oWin=this.parent.win;var sActionUrl=oCfg.sBaseURL+'&'+oCfg.sParamType+'&'+oCfg.sParamVscID+'&'+oCfg.sParamEntityId+'&'+oCfg.sParamAction;oCreateWiki.onclick=function()
{if(!oCreateWiki.eElem)
return;var sUrl=sActionUrl+oCfg.sCreateParamValue;oWin.location.href=sUrl;}
oEditWiki.onclick=function()
{if(!oEditWiki.eElem)
return;var sUrl=sActionUrl+oCfg.sEditParamValue+'&'+oCfg.sVersionId;oWin.location.href=sUrl;}}


var affAllowClick=true;function affDCKillCheckMousedown()
{if(affAllowClick)
{affAllowClick=false;setTimeout("affAllowClick=true;",1250);}}
document.onclick=affDCKillCheckMousedown;


function popWindow(pUrl,pName,pParams,pWidth,pHeight){var oD=annsfabulousfinds.oDocument,pop=new AFFHTMLPopup(this,pName,pName);pop.showEx(pUrl,pWidth,pHeight,0,0,0,1,1,0,"","",pParams);return false;}

annsfabulousfinds.oDocument.oPage.oConfig.bInlineMethod=true;

function AFFHTMLFrame(pParent,pName,pCfg)
{if(!this.objType)
this.objType="AFFHTMLFrame";this.base=AFFHTML;this.base(pParent,pName,pName,false,pCfg);this.eFrameElem=null;this.getElem=affHTMLFrameGetElem;this.bindHTML=affHTMLFrameBindHTML;this.bindEvents=this.enable=function(){};this.setSource=affHTMLFrameSetSource;this.cleanupMemoryBase=this.cleanupMemory;this.cleanupMemory=affHTMLFrameCleanupMemory;this.resize=affHTMLFrameResize;this.onBeforeResize=this.onAfterResize=null;}
function affHTMLFrameGetElem(pName)
{with(this)
{var f=null,oD=oDocument;var d=oD.doc,w=oD.win;if(w.frames)
f=eFrameElem=w.frames[pName];if(d.getElementById)
f=d.getElementById(pName);return f;}}
function affHTMLFrameBindHTML()
{with(this)
{eElem=getElem(sElemName);if(eElem)
assignJSObject(eElem);}}
function affHTMLFrameCleanupMemory()
{this.cleanupMemoryBase();this.eFrameElem=null;}
function affHTMLFrameSetSource(pURL)
{if(pURL==null||pURL.trim()==''){return;}
with(this)
{oDocument.setGlobalParent(this);if(pURL.has("ej2child=true"))
pURL+="&ej2parent="+name;if(eFrameElem)
eFrameElem.location.replace(pURL);else if(eElem)
eElem.src=pURL;}}
function affHTMLFrameResize(pMaxWidth)
{with(this)
{if(onBeforeResize)
onBeforeResize();var f=eFrameElem;if(!f||!(f.document||f.contentDocument))
f=getElem(sElemName);if(f&&typeof(f.document)!="unknown")
{var oDoc=f.document?f.document:f.contentDocument,db=oDoc.body,es=eElem.style,c=this.parent.oGlobals.oClient,w="100%",h=db.offsetHeight,oh;if(c.bSafari)
{oh=db.offsetHeight;w=oDoc.width;h=annsfabulousfinds.oDocument.doc.doctype!=null?oDoc.height+15:oDoc.height+1;}
else if(c.bFirefox)
{w=oDoc.width;h=oDoc.height}
else if(c.bWin||c.bOpera)
{w=db.scrollWidth;h=c.bNav&&annsfabulousfinds.oDocument.doc.doctype!=null?db.scrollHeight+30:db.scrollHeight;}
if(pMaxWidth&&c.bFirefox)
w="100%";if(this.oConfig)
{w=this.oConfig.iWidth||w;h=this.oConfig.iHeight||h;}
es.width=(w=="100%")?w:w+"px";es.height=h+"px";if(onAfterResize)
onAfterResize();}}}

function AFFAutoSizeFrame(pParent,pName,pElemId,pDisabled,pConfig)
{if(!this.objType)
this.objType="AFFAutoSizeFrame";this.base=AFFHTML;this.base(pParent,pName,pElemId,pDisabled,pConfig);this.AUTOSIZE_WIDTH_MAX_HEIGHT=0;this.AUTOSIZE_HEIGHT_MAX_WIDTH=1;this.AUTOSIZE_WIDTH_HEIGHT=2;this.sContentUrl=this.oConfig.contentUrl;this.sFrameId=pName+"ContentFrame";this.eContentFrame=null;this.eCopyDiv=null;this.frameDoc=null;this.frameWin=null;this.sContentWidth='0px';this.sContentHeight='0px';this.sSizingStrategy=this.oConfig.sizingStrategy||this.AUTOSIZE_WIDTH_HEIGHT;this.bPageLoaded=false;this.bFrameLoaded=false;this.bIssuedRequest=false;this.bCalcDimension=false;this.bProcessing=false;this.getElem=affAutoSizeFrameGetElem;this.bindHTMLBase=this.bindHTML;this.bindHTML=affAutoSizeFrameBindHTML;this.onAfterFrameLoad=affAutoSizeFrameOnAfterFrameLoad;this.onAfterPageLoad=affAutoSizeFrameOnAfterPageLoad;this.processLoad=affAutoSizeFrameProcessLoad;this.calcContentDimension=affAutoSizeFrameCalcContentDimension;this.copyDiv=affAutoSizeFrameCopyDiv;this.adjustSize=affAutoSizeFrameAdjustSize;this.writeHtml=affAutoSizeFrameWriteHtml;this.onBeforeWriteHtml=null;this.getElemHtml=affAutoSizeFrameGetElemHtml;this.onBeforeUnloadBase=this.onBeforeUnload;this.onBeforeUnload=affAutoSizeFrameOnBeforeUnload;this.onBeforeResize=null;this.onAfterResize=null;with(this)
_registerListener(oDocument._getEvent("load"),EVENT_AFTER,"onAfterPageLoad");var oC=this.oGlobals.oClient;if(!(oC.bIE&&oC.iVer>=5)&&!(oC.bNav&&oC.iVer>=7)&&!(oC.bSafari&&oC.iVer>=1)&&!(oC.bOpera&&oC.iVer>=7)&&navigator.userAgent.toLowerCase().indexOf("firefox")==-1)
{this.enable(false);}}
function affAutoSizeFrameOnBeforeUnload()
{this.onBeforeUnloadBase();if(this.eContentFrame)
this.eContentFrame.jsObj=null;if(this.frameWin)
this.frameWin.jsObj=null;}
function affAutoSizeFrameGetElem(pName)
{var el=null,d=this.oDocument.doc;if(d.getElementById)
{el=d.getElementById(pName);}
else if(d.all)
{el=d.all[pName];}
return el;}
function affAutoSizeFrameBindHTML()
{var oC=annsfabulousfinds.oGlobals.oClient;with(this)
{bindHTMLBase();if(oC.bIE&&oC.iVer==5)
{var self=this;var nTimerId=0;checkIfLoadedForIE50=function()
{var f=self.oDocument.win.frames[self.sFrameId];if(f&&f.document&&f.document.readyState=='complete')
{self.onAfterFrameLoad();self.oDocument.win.clearInterval(nTimerId);}};nTimerId=oDocument.win.setInterval(checkIfLoadedForIE50,30);}
oDocument.downgradeDomain();if(eElem&&!bDisabled&&!bIssuedRequest)
{var htmlStr=this.getElemHtml();if(onBeforeWriteHtml)onBeforeWriteHtml();eElem.innerHTML=htmlStr;eContentFrame=oDocument.doc.getElementById(sFrameId);eContentFrame.jsObj=this;if(eContentFrame.contentWindow)
{eContentFrame.contentWindow.location.href=sContentUrl;}}
if(oC.bOpera)
{if(oC.iVer==7&&oC.fMinorVer<0.5)
{var self=this;var nTimerId=0;var checkIfLoadedForOpera7x=function()
{var f=eContentFrame;if(f&&f.contentDocument&&f.contentDocument.readyState=='complete')
{self.onAfterFrameLoad();self.oDocument.win.clearInterval(nTimerId);}};nTimerId=oDocument.win.setInterval(checkIfLoadedForOpera7x,20);}}}}
function affAutoSizeFrameOnAfterFrameLoad()
{with(this)
{bFrameLoaded=true;if(bPageLoaded&&!bDisabled)
{this.processLoad();}}}
function affAutoSizeFrameOnAfterPageLoad()
{with(this)
{bPageLoaded=true;if(bFrameLoaded&&!bDisabled)
{this.processLoad();}}}
function affAutoSizeFrameProcessLoad()
{this.calcContentDimension();if(!this.bCalcDimension)
{var self=this;var tId;var oWin=this.oDocument.win;var checkCalc=function()
{if(self.bCalcDimension)
{oWin.clearInterval(tId);self.adjustSize();}};tId=oWin.setInterval(checkCalc,110);}
else
{this.adjustSize();}}
function affAutoSizeFrameCalcContentDimension()
{with(this)
{if(sSizingStrategy==AUTOSIZE_HEIGHT_MAX_WIDTH)
{sContentWidth="100%";}
else if(sSizingStrategy==AUTOSIZE_WIDTH_MAX_HEIGHT)
{sContentHeight="100%";}
bCalcDimension=true;}}
function affAutoSizeFrameCopyDiv()
{with(this)
{var eDiv=this.eCopyDiv=frameDoc.createElement('div');eDiv.innerHTML=frameDoc.body.innerHTML;;frameDoc.body.appendChild(eDiv);eDiv.style.overflow='scroll';if(sSizingStrategy==AUTOSIZE_HEIGHT_MAX_WIDTH)
{eDiv.style.width='100%';}
else if(sSizingStrategy==AUTOSIZE_WIDTH_MAX_HEIGHT)
{eDiv.style.height='100%';}}}
function affAutoSizeFrameAdjustSize()
{with(this)
{if(!bDisabled)
{if(onBeforeResize)this.onBeforeResize();if(eContentFrame)
eContentFrame.style.width=sContentWidth;if(sContentHeight!="100%")
{var oFrame=new AFFHTMLFrame(this,sFrameId);oFrame.bind();oFrame.resize(true);}
else
{if(eContentFrame)
eContentFrame.style.height=sContentHeight+"px";}
if(onAfterResize)this.onAfterResize();}}}
function affAutoSizeFrameWriteHtml()
{with(this)
{if(!bDisabled&&sContentUrl)
{var htmlStr=this.getElemHtml();if(onBeforeWriteHtml)onBeforeWriteHtml();this.oDocument.doc.write(htmlStr);eContentFrame=this.oDocument.doc.getElementById(sFrameId);if(eContentFrame&&eContentFrame.contentWindow)
{eContentFrame.jsObj=this;bIssuedRequest=true;}}}}
function affAutoSizeFrameGetElemHtml()
{var htmlStr='';with(this)
{var oC=this.oGlobals.oClient;htmlStr+='<iframe  name="'+sFrameId+'" id="'+sFrameId+'"  src="'+sContentUrl+'" marginwidth="0" marginheight="0" scrolling="no" scroll="no" framafforder="0" style="width:1px;height:1px;visibility:visible"></iframe>';}
return htmlStr;}

function AFFRVI(pParent,pName,pConfig)
{if(!this.objType)
this.objType="AFFRVI";this.base=AFFAutoSizeFrame;this.base(pParent,pName,pConfig.rviLayerId,false,pConfig);this.ORIENTATION_HORIZONTAL=0;this.ORIENTATION_VERTICAL=1;this.sSeparator='|';this.sCookieVal=null;this.sSourceCookie=null;this.iNumItems=0;if(!this.oConfig.orientation)
{this.oConfig.orientation=this.ORIENTATION_HORIZONTAL;}
this.sLvmCmdUrl=null;this.init=function()
{if(this.oConfig.orientation==this.ORIENTATION_HORIZONTAL)
{this.sSizingStrategy=this.AUTOSIZE_HEIGHT_MAX_WIDTH;}
var val;if((val=this.getCookieVal("dp1","vrvi",true))!=null&&val.length>0&&val.charAt(0)!='0')
{this.sSourceCookie="vrvi";}
else if((val=this.getCookieVal("annsfabulousfinds","lvmn"))!=null&&val.length>0&&val.charAt(0)!='0')
{this.sSourceCookie="lvmn";}
else if(!this.sSourceCookie&&(val=this.getCookieVal("LVM"))!=null&&val.length>0&&val.charAt(0)!='0')
{this.sSourceCookie="LVM";}
if(!this.sSourceCookie)this.enable(false);with(this)
{sCookieVal=val;parse();if(iNumItems==0)this.enable(false);if(!sContentUrl)genContentUrl();}};this.baseEnable=this.enable;this.enable=function(pEnable)
{with(this)
{baseEnable(pEnable);if(eContentFrame)
{if(bDisabled)
{eContentFrame.style.display='none';}
else
{eContentFrame.style.display='inline';}}}};this.getCookieVal=function(pCName,pClName,pDelimited)
{return pClName?readCookieletEx(pCName,pClName):readCookieEx(pCName);}
this.parse=function()
{var aVal=this.sCookieVal.split(this.sSeparator);this.iNumItems=parseInt(aVal[0]);}
this.genContentUrl=function()
{var lvmHost=this.oConfig.searchHost;if(lvmHost)lvmHost=lvmHost.replace(new RegExp('/*$'),'');var protocol=location.protocol;var targetHost=(lvmHost?lvmHost:protocol+'//'+"search-lvm"+annsfabulousfinds.oGlobals.oEnvironment.sCountryDomain);targetHost=targetHost.replace(new RegExp('/*$'),'');var randomNumber=Math.round(Math.random()*1000);var t=escape(new Date());var randomParam="&cb"+randomNumber+"="+t;var pgname=this.oConfig.rviPageName?'&pageName='+this.oConfig.rviPageName:'';var sCatID=this.oConfig.rviCatID?'&catId='+this.oConfig.rviCatID:'';var orient="horizontal";switch(this.oConfig.orientation)
{case 0:orient="horizontal";break;case 1:orient="vertical";break;}
var cmdUrl=targetHost+""+randomParam+pgname+sCatID+'&orientation='+orient;this.sContentUrl=cmdUrl;}
this.clear=function()
{with(this)
{if(!sSourceCookie)return;var oC;switch(sSourceCookie)
{case"vrvi":writeCookieletEx("dp1","vrvi","0"+this.sSeparator+"0");break;case"lvmn":writeCookieletEx("annsfabulousfinds","lvmn","0"+this.sSeparator+"0");break;case"LVM":writeCookieEx("annsfabulousfinds","0"+this.sSeparator+"0");break;}
if(annsfabulousfinds.oGlobals.oClient.bNav&&annsfabulousfinds.oGlobals.oClient.iVer>=7||navigator.userAgent.toLowerCase().indexOf("firefox")!=-1)
{var url=location.href;window.location.replace(url);}
else
{location.reload();}}}
this.onBeforeResize=function()
{with(this)
{if(frameWin&&frameWin.disableRvi&&frameWin.disableRvi())
{this.enable(false);}}}
this.init();this.baseWriteHtml=this.writeHtml;this.writeHtml=function()
{this.genContentUrl();this.baseWriteHtml();}
this.base1BindHTML=this.bindHTML;this.bindHTML=function()
{this.genContentUrl();this.base1BindHTML();}}

function affCreateConfigurations()
{var c=annsfabulousfinds.oDocument.addConfig(new AFFConfig("rviConfig"));c.rviLayerId="recentlyViewedItemsLayer";c.orientation=0;c.rviPageName="LVMPage_Visitor_Search";c.merchAdId="merchAd";c.sdcId="sdc";}
function affCreateControls()
{if(typeof(popWindow)=="undefined"&&typeof(popupWindow)!="undefined")
{popWindow=popupWindow;}
var cfg=annsfabulousfinds.oDocument.getConfig("rviConfig");if(!cfg)return;var oRvi=new AFFRVI(annsfabulousfinds.oDocument.oPage,"rvi",cfg);oRvi.onAfterResize=function()
{with(this)
{if(!bDisabled)
{var eMerchAd=oDocument.doc.getElementById(oConfig.merchAdId);if(eMerchAd)eMerchAd.innerHTML='';var eSDC=oDocument.doc.getElementById(oConfig.sdcId);if(eSDC)eSDC.innerHTML='';}}}
oRvi.aAdLayers=[];oRvi.writeMerchAdHtml=function(pDARTSite,pZone,pTile,pW,pH,pIFW,pIFH,pCustomParams,pCustomSets){var delayAdCall=false;var nItems=this.iNumItems;if(this.bDisabled)
{delayAdCall=false;}
else
{delayAdCall=true;}
if(!delayAdCall)
{writeAd(pDARTSite,pZone,pTile,pW,pH,pIFW,pIFH,pCustomParams,pCustomSets);return;}
var cfg=getStandardAdConfig("generic",pDARTSite,[pZone],pTile,pW,pH,pIFW,pIFH);setCustomAdParam(cfg,pCustomParams);if(typeof(pCustomSets)=="string")
pCustomSets=pCustomSets.parseSets();setCustomAdSet(cfg,pCustomSets);var str=getStandardAdHTML(cfg);var regex=new RegExp('<iframe[^>]+>(.*)</iframe>','i');var matches=regex.exec(str);if(matches==null)this.enable(false);var adHtml=matches[0];var adLyrId="adLayer"+pTile;this.oDocument.doc.write('<div id="'+adLyrId+'"></div>');var aAds=this.aAdLayers;var ad=aAds[aAds.length]=this.oDocument.doc.getElementById(adLyrId);ad.sHtml=adHtml;ad.iTile=pTile;return;}
oRvi.baseRviEnable=oRvi.enable;oRvi.enable=function(pEnable)
{this.baseRviEnable(pEnable);var oC=this.oGlobals.oClient;with(this)
{if(!pEnable&&aAdLayers)
{for(var i=0;i<aAdLayers.length;++i)
{aAdLayers[i].innerHTML=aAdLayers[i].sHtml;}}}}
oRvi.writeHtmlBase1=oRvi.writeHtml;oRvi.writeHtml=function()
{this.writeHtmlBase1();if(!oRvi.bDisabled&&(oRvi.iNumItems>0)&&(oRvi.sSourceCookie!=null))
annsfabulousfinds.oDocument.oPage.oConfig.disableRTM=true;}}
affCreateConfigurations();affCreateControls();


function AFFRTMFormConfig(pName)
{if(!this.objType)
this.objType="AFFRTMFormConfig";this.base=AFFConfig;this.base(pName);this.aRadioGroup=[];this.aCheckBoxGroup=[];this.aButtonGroup=[];this.sImageElem="";this.sUrl="";this.sStatusLayerElem="";}

function AFFHTMLBaseCheckboxRadio(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="AFFHTMLBaseCheckboxRadio";this.base=AFFHTMLFormElem;this.base(pParent,pName,pDisabled,pCfg);this.bGroup=false;this.bindHTML=affHTMLBaseCheckboxRadioBindHTML;this.bindEvents=affHTMLBaseCheckboxRadioBindEvents;this.check=affHTMLBaseCheckboxRadioCheck;this.selectByIndex=affHTMLBaseCheckboxRadioSelectByIndex;this.selectByValue=affHTMLBaseCheckboxRadioSelectByValue;this.isCheckedByValue=affHTMLBaseCheckboxRadioIsCheckedByValue;this.getValueByIndex=affHTMLBaseCheckboxRadioGetValueByIndex;this.getIndexByValue=affHTMLBaseCheckboxRadioGetIndexByValue;this.getValue=null;this.enableBase=this.enable;this.enable=affHTMLBaseCheckboxRadioEnable;this.onBeforeCheck=null;this.onAfterCheck=null;this.subscribeEvents("onclick");}
function affHTMLBaseCheckboxRadioBindHTML()
{with(this)
{eElem=getElem(sElemName);if(eElem)
{if(eElem.length)
{bGroup=true;for(var i=0;i<eElem.length;i++)
assignJSObject(eElem[i]);cleanupMemory=affHTMLBaseCheckboxRadioCleanupMemory;}
else
{bGroup=false;assignJSObject(eElem);}}
if(bDisabled)
enable(false);}}
function affHTMLBaseCheckboxRadioCleanupMemory()
{var e=this.eElem;if(e)
{for(var j=0;j<e.length;j++)
{for(var i in e[j].jsObjs)
{e[j].jsObjs[i]=null;}
e[j].jsObjs=null;}
this.eElem=null;}}
function affHTMLBaseCheckboxRadioBindEvents()
{with(this)
{if(!eElem)
return;var e=aBindEvents,len=e.length,fStr;for(var i in e)
{if(eElem.length&&eElem.length>0)
{for(var ii=0;ii<eElem.length;ii++)
eval("eElem[ii]."+e[i]+" = function(){"+this.bindEventString(e[i],ii)+"}");}
else
{eval("eElem."+e[i]+" = new Function(this.bindEventString(e[i],0))");}}}}
function affHTMLBaseCheckboxRadioCheck(pChecked,pIndex)
{if(pIndex<0)
return;with(this)
{if(eElem)
{if(bGroup&&typeof(pIndex)=='undefined')
{var len=eElem.length;for(var i=0;i<len;i++)
eElem[i].checked=pChecked;}
else if(bGroup&&eElem[pIndex])
eElem[pIndex].checked=pChecked;else if(!bGroup)
eElem.checked=pChecked;}}}
function affHTMLBaseCheckboxRadioSelectByIndex(pIdx,pCheck)
{var chx=pCheck?pCheck:true;with(this)
{if(onBeforeCheck)
onBeforeCheck();var e=bGroup?eElem[pIdx]:eElem;if(e)
{e.checked=chx;if(onAfterCheck)
onAfterCheck();}}}
function affHTMLBaseCheckboxRadioSelectByValue(pVal,pCheck)
{var chx=pCheck?pCheck:true;with(this)
{if(onBeforeCheck)
onBeforeCheck();var e=eElem;if(!e)
return;if(bGroup)
{for(var i=0;i<e.length;i++)
{if(e[i].value==pVal)
{e[i].checked=chx;if(onAfterCheck)
onAfterCheck();return;}}}
else
{if(e.value==pVal)
{e.checked=chx;if(onAfterCheck)
onAfterCheck();}}}}
function affHTMLBaseCheckboxRadioIsCheckedByValue(pValue)
{with(this)
{var e=eElem;if(e&&bGroup)
{var len=e.length;for(var i=0;i<len;i++)
{if(e[i].value==pValue)
return isChecked(i);}}}}
function affHTMLBaseCheckboxRadioGetValueByIndex(pIndex)
{with(this)
{var e=eElem;if(e&&bGroup)
return e[pIndex].value;return null;}}
function affHTMLBaseCheckboxRadioGetIndexByValue(pValue)
{with(this)
{var e=eElem;if(e&&bGroup)
{var len=e.length;for(var i=0;i<len;i++)
{if(e[i].value==pValue)
return i;}}
return-1;}}
function affHTMLBaseCheckboxRadioEnable(pEnable)
{with(this)
{enableBase(pEnable);if(bGroup)
{var v=pEnable?"true":"false",e=eElem,len=e.length;if(e)
{for(var i=0;i<len;i++)
{e[i].onfocus=new Function("return "+v+";");e[i].disabled=!pEnable;}}}}}

function AFFHTMLRadio(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="AFFHTMLRadio";this.base=AFFHTMLBaseCheckboxRadio;this.base(pParent,pName,pDisabled,pCfg);this.getElem=affHTMLRadioGetElem;this.getValue=affHTMLRadioGetValue;this.getSelectedIndex=affHTMLRadioGetSelectedIndex;}
function affHTMLRadioGetElem(pName)
{return this.oDocument.getFormElem(pName,"radio");}
function affHTMLRadioGetValue()
{var e=this.eElem;if(this.bGroup)
{for(var i=0;i<e.length;i++)
{if(e[i].checked)
return e[i].value;}}
else
{if(e.checked)
return e.value;}
return"";}
function affHTMLRadioGetSelectedIndex()
{var e=this.eElem;if(!this.bGroup)
return 0;else
{for(var i=0;i<e.length;i++)
{if(e[i].checked)
return i;}}
return-1;}

function AFFHTMLCheckbox(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="AFFHTMLCheckbox";this.base=AFFHTMLBaseCheckboxRadio;this.base(pParent,pName,pDisabled,pCfg);this.getElem=affHTMLCheckboxGetElem;this.isChecked=affHTMLCheckboxIsChecked;this.getValue=affHTMLCheckboxGetValue;this.setValue=this.selectByValue;}
function affHTMLCheckboxGetElem(pName)
{return this.oDocument.getFormElem(pName,"checkbox");}
function affHTMLCheckboxIsChecked(pIndex)
{with(this)
{if(eElem)
{if(bGroup&&eElem[pIndex])
return eElem[pIndex].checked;else if(!bGroup)
return eElem.checked;}}
return false;}
function affHTMLCheckboxGetValue()
{var e=this.eElem,rv="";if(this.bGroup)
{rv=[];for(var i=0;i<e.length;i++)
{if(e[i].checked)
rv[rv.length]=e[i].value;}
if(!rv.length)rv="";}
else
{if(e.checked)
return e.value;}
return rv;}

function AFFRTM(pParent,pId,pDefUrl,pW,pH,pType,pInd)
{if(!this.objType)
this.objType="AFFRTM";var sName="rtm_"+pId;this.base=AFFBaseControl;this.base(pParent,sName);this.name=sName;this.config=new affRTMConfig(pParent,pId,pDefUrl,pW,pH,pType,pInd);this.writeIFrame=affWriteRTMFrame;}
function affRTMConfig(pParent,pId,pDefUrl,pW,pH,pType,pInd)
{var sName="rtm_div_"+pId;sName+=pInd?pInd:"";this.divname=sName;this.base=AFFConfig;this.base(sName);this.id=pId;this.defUrl=pDefUrl;this.defAdUrl="";this.w=(pDefUrl==null?1:pW);if(this.w<=1)
this.w="100%";this.h=(pDefUrl==null?1:pH);this.type=pType||0;this.collapsed=pDefUrl==null||pW<=1||pH<=1?true:false;this.setIFContent=affSetIFRTMContent;this.getIFHTML=affGetIFRTMHTML;}
function affWriteRTMFrame()
{var cfg=this.config,f,d=this.oDocument,oGl=this.oGlobals,xsrc=oGl.oEnvironment.sPicsDir+'s.gif',oCl=oGl.oClient;f='<div id="'+cfg.divname+'"><img src="'+xsrc+'" height="'+cfg.h+'" width="'+cfg.w+'" border="0"></div>';if(oCl.bMac&&oCl.bIE)
f+='<img src="'+xsrc+'" height="1" width="1" border="0">';d.write(f);var l=new AFFHTMLLayer(this.parent,cfg.divname);l.bind();}
function affGetIFRTMHTML(pUrl)
{with(this)
{var f='<iframe framafforder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"'
+' id="'+name+'"'+' name="'+name+'"'+' src="'+pUrl+'"'
+' width="'+w+'" height="'+h+'"></iframe>';return f;}}
function affSetIFRTMContent(pUrl)
{var div=annsfabulousfinds.oDocument._getControl(this.divname),ifUrl="",cType=0;if(div)
{var aUrlType=affGetRTMUrlNType(pUrl);var ifUrl=aUrlType[0],cType=aUrlType[1];if(cType==0)
{div.setValue(this.getIFHTML(ifUrl));}
else if(cType==1)
{this.type=cType;oP.controls[this.divname].setValue(ifUrl);}}}
function affGetRTMUrlNType(pUrl)
{var retArray=new Array("",0);if(pUrl&&pUrl.indexOf('*t*')!=-1)
retArray=pUrl.split('*t*');else if(typeof(pUrl)!='undefined')
retArray[0]=pUrl;return retArray;}
function AFFRTMInfo(pParent,pId)
{if(!this.objType)
this.objType="AFFRTMInfo";this.name="rtminfo_"+pId;this.iId=pId;this.w=null;this.h=null;this.base=AFFBaseControl;this.base(pParent,this.name);this.isRtm=false;this.isDoubleClick=false;this.isDefaultPlacement=false;this.isContentPlaced=false;}

String.prototype.decodeBase64=function()
{var rv=this,len=rv.length,ret="",i=0;var chr1,chr2,chr3="";var enc1,enc2,enc3,enc4="";var aChar="ABCDEFGHIJKLMNOPQRSTUVWXYZ"+"abcdefghijklmnopqrstuvwxyz"+"0123456789+/=*";var test=new RegExp("[^A-Za-z0-9+/=*]");if(test.exec(rv)){return;}
do{enc1=aChar.indexOf(rv.charAt(i++));enc2=aChar.indexOf(rv.charAt(i++));enc3=aChar.indexOf(rv.charAt(i++));enc4=aChar.indexOf(rv.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;ret+=String.fromCharCode(chr1);if(!(enc3>=64))
ret+=String.fromCharCode(chr2);if(!(enc4>=64))
ret+=String.fromCharCode(chr3);chr1=chr2=chr3=enc1=enc2=enc3=enc4="";}while(i<len);return ret;}
String.prototype.decodeUTF8=function()
{var s=this,len=s.length;var rs="";var i=0;var c=c1=c2=0;while(i<len)
{c=s.charCodeAt(i);if(c<128)
{rs+=String.fromCharCode(c);i++;}
else if((c>191)&&(c<224))
{c2=s.charCodeAt(i+1);rs+=String.fromCharCode(((c&31)<<6)|(c2&63));i+=2;}
else
{c2=s.charCodeAt(i+1);c3=s.charCodeAt(i+2);rs+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}}
return rs;}

if(typeof(oAdManager)=="undefined")
var oAdManager=new AFFAdManager();function AFFRTMPlacement(pParent,pName)
{if(!this.objType)
this.objType="AFFRTMPlacement";this.base=AFFBaseControl;this.base(pParent,pName);this.rtms=new Array;this.rtminfos=new Array;this.bPlacementsLoaded=false;this.bOnAfterLoadExec=false;this.bDomainUnknown=false;this.register=affRegisterRTM;this.delimiter="*t*";this.timeoutID=0;this.rdUrl="";this.sIframeName="rtm";this.bFrameNonDowngraded=false;this.appendUrl=affAppendUrl;this.writePlacement=affWriteRTMPlacement;this.getRTMContent=affGetRTMContent;this.setRTMContent=affSetRTMContent;this.clearPlacements=affClearRTMPlacements;this.getAdUrl=affGetRTMAdUrl;this.getUserStr=affGetRTMUserString;this.loadPlacements=affLoadPlacements;this.execPageAfterLoad=affExecPageAfterLoad;this.setRTMInlineTimeout=affSetRTMInlineTimeout;this.writeInlinePlacement=affWriteRTMInlinePlacement;this.setRTMInlineContent=affSetRTMInlineContent;this.setLoadedDoubleClicks=affSetLoadedDoubleClicks;this.writeContent=affWriteContent;this.writeAllContents=affWriteAllContents;this.writeMultipleSameContents=affWriteMultipleSameContents;this.writeIframe=affAFFRTMPlacementWriteIframe;this.downgradeDomain=affRTMDowngradeDomain;this.initIframe=affRTMPlacementInitIframe;this.initIframe();this.createRTM=affCreateRTM;if(!this.bFrameNonDowngraded)
this.downgradeDomain();this.processRTMForm=affAFFRTMPlacementProcessRTMForm;this.collectPids=function()
{var ret="",len=this.rtms.length;if(len>0)
{ret="&p=";for(var i=0;i<len;i++)
ret+=this.rtms[i].id+(i<len-1?":":"");}
return ret;}
this.rdPage=function()
{if(!this.rdUrl.is(''))
document.location.replace(this.rdUrl)}}
function affWriteRTMPlacement(pId,pAdCfg,pDefUrl,pType,pInd)
{if(document.layers)
return;var oRTM=this.createRTM(pId,pAdCfg,pDefUrl,pType,pInd);oRTM.writeIFrame();}
function affCreateRTM(pId,pAdCfg,pDefUrl,pType,pInd)
{var c=pAdCfg||new AFFConfig(),defAdUrl='';if(c.objType.hasAny("AFFAdConfig","AFFAdTableConfig"))
defAdUrl=this.getAdUrl(c);pDefUrl=pDefUrl?pDefUrl:defAdUrl;var w=c.ifWidth||c.width;var h=c.ifHeight||c.height;var p=new AFFRTM(this,pId,pDefUrl,w,h,pType,pInd);p.config.defAdUrl=defAdUrl;p.adCfg=pAdCfg;this.register(p.config);return p;}
function affGetRTMAdUrl(pCfg)
{var defAd=new AFFAd(annsfabulousfinds,pCfg.name,pCfg,oAdManager);defAd.setCountryGlobals=setAdCountryGlobals;defAd.setCountryLocals=setAdCountryLocals;defAd.setCountryGlobals(defAd.globals);defAd.globals.resetGlobals();defAd.setCountryLocals(defAd.config);return defAd.globals.iframeUrl+pCfg.getAdParamString(defAd.globals,defAd.ord);}
function affSetRTMContent(pUrlArr,pSizeArr)
{var oC=this.oDocument.oPage.oConfig;if(oC.disableRTM)
return;window.clearTimeout(this.timeoutID);var aRTMs=this.rtms,un='undefined';if(aRTMs.length>0)
{for(i=0;i<aRTMs.length;i++)
{var isdc=(pUrlArr[i]!=-1&&pUrlArr[i].indexOf(';')==0)?true:false;if(pUrlArr[i]==-1&&!document.layers)
pUrlArr[i]=aRTMs[i].defUrl;else if(isdc)
{var sz=";sz";if(pUrlArr[i].length==1)
pUrlArr[i]=aRTMs[i].defAdUrl;else if(aRTMs[i].defAdUrl.indexOf(sz)!=-1)
pUrlArr[i]=aRTMs[i].defAdUrl.replace(sz,pUrlArr[i]+sz)}
if(!isdc&&typeof(pSizeArr[i])!=un&&pSizeArr[i]!=-1)
{if(pSizeArr[i].indexOf(":")!=-1)
{var rSize=pSizeArr[i].split(":");aRTMs[i].w=(rSize[0]==-1)?"100%":rSize[0];aRTMs[i].h=rSize[1];}}
aRTMs[i].setIFContent(pUrlArr[i]+'');}}}
function affClearRTMPlacements()
{with(this)
{if(rtms.length>0&&!document.layers)
for(var i=0;i<rtms.length;i++)
rtms[i].setIFContent('*t*1');}}
function affGetRTMContent(pCfg)
{if(document.layers)
return;var oC=annsfabulousfinds.oDocument.oPage.oConfig;if(oC.disableRTM)
{this.clearPlacements();return;}
if(pCfg)
{var path,rHost,id,u,timeout=0,un='undefined';if(!pCfg.rtmEngineHost)
return;if(this.rtms.length==0)
return;if(typeof(pCfg.timeout)!=un)
timeout=pCfg.timeout;path=pCfg.rtmEngineHost+this.collectPids();path+=(pCfg.params)?pCfg.params:"";path+=this.getUserStr(pCfg);var d=this.oDocument,g=this.oGlobals,u=this.oUtils;path+=this.appendUrl(pCfg);this.rdUrl=(typeof(pCfg.rdUrl)!=un)?pCfg.rdUrl:"";var sTimout="",timeout=1500;if(!this.rdUrl.is("")&&timeout>0)
sTimeout="document.location.replace('"+this.rdUrl+"')";else
{var rtmArr="";for(var i=0;i<this.rtms.length;i++)
rtmArr+="-1,";rtmArr=(rtmArr!="")?rtmArr.substr(0,rtmArr.length-1):"";sTimeout="annsfabulousfinds.oDocument._getControl('rtm').setRTMContent(["+
rtmArr+"],["+rtmArr+"])";}
this.timeoutID=window.setTimeout(sTimeout,timeout);d.write(u.scriptTag(path));}}
function affAppendUrl(pCfg)
{var path="",oCJ=this.oDocument.oCookieJar;if(pCfg.rtmContextData)
path+="&c="+pCfg.rtmContextData;path+=(pCfg.params)?pCfg.params:"";if(pCfg.guid&&pCfg.guid!="")
path+="&g="+pCfg.guid;else
{var sgj=oCJ.readCookielet("annsfabulousfinds","sgj");if(sgj)
{path+="&g="+sgj;oCJ.writeCookielet("annsfabulousfinds","sgj","");}}
var oCJ=annsfabulousfinds.oDocument.oCookieJar,sin=oCJ.readCookielet("annsfabulousfinds","sin"),kms=oCJ.readCookielet("dp1","kms");if(sin.has("in")||kms.has("in"))
path+="&uf=1";else
path+="&uf=0";var oF=annsfabulousfinds.oDocument._getControl("flash");if(oF)
{var iFlashVersion=oF.getVersion();path+="&z="+iFlashVersion;}
path+="&ord=";if(pCfg.ord&&pCfg.ord!="")
path+=pCfg.ord;else
{var rda=oCJ.readCookielet("annsfabulousfinds","rda").split('.')[0]||(new Date()).getTime();path+=rda;}
return path;}
function affGetRTMUserString(pCfg)
{var s='',qs=document.location.search,qi=qs.indexOf("&i=."),un='undefined',oCJ=this.oDocument.oCookieJar;if(!pCfg)
return s;with(pCfg)
{if(typeof userId!=un&&userId)
s='&i='+userId;else if(qi!=-1)
{var ci=qs.indexOf(";");if(ci!=-1)
s='&i='+qs.substring(qi+3,ci);else
s='&i='+qs.substring(qi+3);}
else if(typeof login!=un&&login)
s='&l='+login;else
{var u1pc=oCJ.readCookielet("dp1","u1p"),u1pd=(u1pc)?u1pc.decodeBase64().decodeUTF8():'';if(u1pd&&!u1pd.has('@@__@@__@@'))
s='&l='+u1pd;}}
return s;}
function affRegisterRTM(pRTM)
{if(pRTM)
{var r=this.rtms.length;this.rtms[r]=pRTM;}}
function affLoadPlacements(oC)
{if(document.layers)
return;if(!oC)
return;if(!oC.srtmEngineHost)
return;var i=0,aP=oC.aPids;for(i;i<aP.length;i++)
{var oRTMInfo=new AFFRTMInfo(this,aP[i]);this.rtminfos[i]=oRTMInfo;}
var sRtmUrl=oC.srtmEngineHost+"&p="+aP.join(":")+this.getUserStr(oC)+this.appendUrl(oC);var oIfrm=eval("this.oDocument.win.frames['"+this.sIframeName+"']"),bIfrm=(typeof(oIfrm)!="undefined"&&typeof(oIfrm.document)!="unknown");var u=this.oUtils;if(sRtmUrl.has("a=inline1"))
this.oDocument.write(u.scriptTag(sRtmUrl));else if(bIfrm&&oIfrm)
{if(this.bFrameNonDowngraded)
oIfrm.document.open();oIfrm.document.write(u.scriptTag(sRtmUrl));}
else
this.bDomainUnknown=true;if(bIfrm)
oIfrm.document.close();var sTimout="",timeout=1500;this.rdUrl=oC.rdUrl||"";if(oC.bMultipleSameIds)
this.writeAllContents=this.writeMultipleSameContents;if(!this.rdUrl.is("")&&timeout>0)
sTimeout="document.location.replace('"+this.rdUrl+"')";else
sTimeout="annsfabulousfinds.oDocument._getControl('rtm').setRTMInlineTimeout()";this.timeoutID=window.setTimeout(sTimeout,timeout);var oD=this.parent.oDocument,oP=oD.oPage;this._registerListener(oD._getEvent("load"),oP.EVENT_AFTER,"execPageAfterLoad");}
function affAFFRTMPlacementProcessRTMForm(pStatusLayer)
{var oStatus=new AFFHTMLLayer(this,pStatusLayer);oStatus.bind();oStatus.show(true);return true;}
function affSetRTMInlineTimeout()
{if(this.bOnAfterLoadExec)
{var rtmArr1=[],rtmArr2=[],s=(this.bDomainUnknown)?";":"-1";for(var i=0;i<this.rtminfos.length;i++)
{rtmArr1[i]=s;rtmArr2[i]="-1";}
this.setRTMInlineContent(rtmArr1,rtmArr2);}
else
{var sTimeout="annsfabulousfinds.oDocument._getControl('rtm').setRTMInlineTimeout()";var timeout=1500;this.timeoutID=window.setTimeout(sTimeout,timeout);}}
function affWriteRTMInlinePlacement(pId,pAdCfg,pDefUrl,pType,pInd)
{if(document.layers)
return;this.writePlacement(pId,pAdCfg,pDefUrl,pType,pInd);if(this.bPlacementsLoaded)
this.writeAllContents();}
function affExecPageAfterLoad()
{this.bOnAfterLoadExec=true;if(this.bPlacementsLoaded)
this.writeAllContents();}
function affWriteAllContents()
{var aRTMs=this.rtms,aRTMInfos=this.rtminfos,i=0;for(i;i<aRTMInfos.length;i++)
{if(!aRTMInfos[i].isContentPlaced)
{for(var j=0;j<aRTMs.length;j++)
{if(aRTMInfos[i].iId==aRTMs[j].id)
{var oDiv=this.controls[aRTMs[j].divname];if(oDiv&&oDiv.eElem)
{this.writeContent(aRTMs[j],aRTMInfos[i]);aRTMInfos[i].isContentPlaced=true;}
break;}}}}}
function affWriteMultipleSameContents()
{var aRTMs=this.rtms,aRTMInfos=this.rtminfos,i=0,iRILen=this.rtminfos.length,iRLen=aRTMs.length;for(i;i<iRILen;i++)
{for(var j=0;j<iRLen;j++)
{if((aRTMInfos[i].iId==aRTMs[j].id)&&!aRTMs[j].isContentPlaced)
{var oDiv=this.controls[aRTMs[j].divname];if(oDiv&&oDiv.eElem)
{this.writeContent(aRTMs[j],aRTMInfos[i]);aRTMs[j].isContentPlaced=true;}
break;}}}}
function affWriteContent(pRTM,pRTMInfo)
{if(pRTMInfo.isRtm)
{var oL=this.controls[pRTM.divname];if(pRTMInfo.w&&pRTMInfo.h)
{if(pRTMInfo.h=="-1"||pRTMInfo.h==-1)
pRTMInfo.h=pRTM.h;var oLStyle=oL.eElem.style,h,w;oLStyle.height=h=(pRTMInfo.h.has('%'))?pRTMInfo.h:pRTMInfo.h+"px";oLStyle.width=w=(pRTMInfo.w.has('%'))?pRTMInfo.w:pRTMInfo.w+"px";if(h!='100%'&&w!='100%')
oLStyle.overflow="hidden";}
oL.setValue(pRTMInfo.sContent);}
else
{if(pRTMInfo.w)
pRTM.w=pRTMInfo.w;if(pRTMInfo.h)
pRTM.h=pRTMInfo.h;if(pRTMInfo.isDoubleClick)
this.setLoadedDoubleClicks(pRTM,pRTMInfo);else
{pRTM.setIFContent(pRTM.defUrl+'');}}}
function affSetLoadedDoubleClicks(pRTM,pRTMInfo)
{var sz=";sz";if(pRTMInfo.sAdContent.length==1)
pRTM.defAdUrl=pRTM.defAdUrl;else if(pRTM.defAdUrl.indexOf(sz)!=-1)
pRTM.defAdUrl=pRTM.defAdUrl.replace(sz,pRTMInfo.sAdContent+sz);pRTM.setIFContent(pRTM.defAdUrl+'');}
function affSetRTMInlineContent(pContentArr,pSizeArr)
{var oC=this.oDocument.oPage.oConfig;if(oC.disableRTM)
return;window.clearTimeout(this.timeoutID);var aRTMs=this.rtms,aRTMInfos=this.rtminfos,un='undefined',i=0;if(aRTMInfos.length>0)
{for(i=0;i<aRTMInfos.length;i++)
{var isdc=(pContentArr[i]!=-1&&pContentArr[i].indexOf(';')==0)?true:false;if(pContentArr[i]==-1&&!document.layers)
{aRTMInfos[i].isDefaultPlacement=true;}
else if(isdc)
{aRTMInfos[i].isDoubleClick=true;aRTMInfos[i].sAdContent=pContentArr[i];}
else
{aRTMInfos[i].sContent=pContentArr[i];aRTMInfos[i].isRtm=true;}
if(!isdc&&typeof(pSizeArr[i])!=un&&pSizeArr[i]!=-1)
{if(pSizeArr[i].indexOf(":")!=-1)
{var rSize=pSizeArr[i].split(":");aRTMInfos[i].w=(rSize[0]==-1||rSize[0]=="9999")?"100%":rSize[0];aRTMInfos[i].h=(rSize[1]=="9999")?"100%":rSize[1];}}}}
this.bPlacementsLoaded=true;this.writeAllContents();var oIfrm=this.oDocument.getUIElem(this.sIframeName);if(annsfabulousfinds.oGlobals.oClient.bIE&&oIfrm)
oIfrm.outerHTML='';}
function affAFFRTMPlacementWriteIframe()
{var f='<iframe framafforder="no" border="0" marginwidth="0" marginheight="0" width="1" height="1" scrolling="no" id="'+this.sIframeName+'" name="'+this.sIframeName+'"></iframe>';this.oDocument.doc.write(f);}
function affRTMPlacementInitIframe()
{var oIfrm=this.oDocument.win.frames[this.sIframeName],b=this.oDocument.oPage.oConfig.bNoRTMDowngrade;if(b||typeof(oIfrm)=="undefined"||typeof(oIfrm.document)=="unknown")
this.bFrameNonDowngraded=true;if(!(this.oDocument.doc.location.toString().indexOf('https')==0))
{this.sIframeName="rtm_data_frame";this.writeIframe();}}
function affRTMDowngradeDomain()
{var oIfrm=this.oDocument.win.frames[this.sIframeName],dd=document.domain,i=dd.indexOf(".annsfabulousfinds."),dd=dd.substring(i+1),cl=this.oGlobals.oClient,sIfrm_downgrade_domain='<scr'+'ipt language=javascript>document.domain="'+dd+'";</scr'+'ipt>';if(cl.bOpera&&(!oIfrm||!oIfrm.document))
annsfabulousfinds.oDocument._getControl("rtm").downgradeDomain();else
{if(oIfrm&&oIfrm.document)
{oIfrm.document.open();oIfrm.document.write(sIfrm_downgrade_domain);}}}
new AFFRTMPlacement(annsfabulousfinds.oDocument.oPage,"rtm");

function AFFHTMLActiveX(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="AFFHTMLActiveX";this.base=AFFHTML;this.base(pParent,pName,pName,pDisabled,pCfg);this.getElem=affHTMLActiveXGetElem;}
function affHTMLActiveXGetElem(pName)
{return this.oDocument.doc.getElementById(pName);}

function AFFHTMLActiveXWriter(pParent,pName)
{if(!this.objType)
this.objType="AFFHTMLActiveXWriter";this.base=AFFHTMLActiveX;this.base(pParent,pName);this.sID="";this.sName="";this.iWidth=0;this.iHeight=0;this.sClassID="";this.sCodeBase="";this.sType="";this.sPluginsPage="";this.aParams=[];this.aNestedText=[];this.addParam=function(pName,pValue)
{this.aParams[pName]=pValue;}
this.addNestedText=function(pText)
{this.aNestedText[this.aNestedText.length]=pText;}
this.writeObject=function()
{var str="<object ";str+="id='"+this.sID+"' ";str+="name='"+this.sName+"' ";str+="width='"+this.iWidth+"' ";str+="height='"+this.iHeight+"' ";str+="codaffase='"+this.sCodeBase+"' ";str+="classid='"+this.sClassID+"' ";str+=">";for(var i in this.aParams)
{this.addNestedText("<param name='"+i+"' value='"+this.aParams[i]+"'>");}
for(var i=0;i<this.aNestedText.length;i++)
{str+=this.aNestedText[i];}
str+="</object>";return str;}
this.clearParam=function(pName)
{this.aParams[pName]=null;}
this.clearNestedText=function()
{this.aNestedText=[];}}

function AFFHTMLFlashWriter(pParent,pName)
{if(!this.objType)
this.objType="AFFHTMLFlashWriter";this.base=AFFHTMLActiveXWriter;this.base(pParent,pName);this.aFlashVars=[];this.addFlashVar=function(pName,pValue)
{this.aFlashVars[pName]=pValue;}
this.writeFlash=function()
{var fv="";for(var i in this.aFlashVars)
{fv+=i+"="+this.aFlashVars[i]+"&";}
this.addParam("flashvars",fv);var embed="<EMBED";embed+=" src='"+this.aParams["movie"]+"'";embed+=" width='"+this.iWidth+"'";embed+=" height='"+this.iHeight+"'";embed+=" flashvars='"+fv+"'";embed+=" scale='"+this.aParams["scale"]+"'";embed+=" salign='"+this.aParams["salign"]+"'";embed+=" menu='"+this.aParams["menu"]+"'";embed+=" type='"+this.sType+"'";embed+=" pluginspage='"+this.sPluginsPage+"'";embed+=" wmode='"+this.aParams["wmode"]+"'";embed+="></embed>";this.addNestedText(embed);var text=this.writeObject();this.clearParam("flashvars");this.clearNestedText();return text;}}

function AFFHTMLFlash(pParent,pName)
{if(!this.objType)
this.objType="AFFHTMLFlash";this.base=AFFBaseControl;this.base(pParent,pName);this.oFlashWriterConfig=[];this.oFlashModule=[];this.oRTM=null;this.bUseRTM=false;this.bRTMReady=false;this.aSeg=[];this.aConfigNames=[];this.addModule=function(pConfig)
{var unique=pConfig.sName+""+Math.ceil(Math.random()*1000000000);this.oFlashModule[pConfig.sName]=unique;pConfig.sUniqueName=unique;}
this.registerRTM=function()
{var o=this.oRTM=this.parent._getControl('rtm');if(o)
{o.setRTMInlineContentBase=this.oRTM.setRTMInlineContent;o.setRTMInlineContent=function(pContent,pSize)
{this.setRTMInlineContentBase(pContent,pSize);var o=this.oDocument._getControl('flash');o.bRTMReady=true;o.aSegs=pContent||[];o.loadAllOnDemand();}}}
this.write=function(pConfig)
{if(!this.oRTM)
this.registerRTM();var c=pConfig;this.addModule(c);if(c.objType=="AFFFlashModuleConfig")
{var dc=this.oDocument.getConfig("Common.Flash.DoubleClick.UrlData");if(typeof(dc)!="undefined")
{if(typeof(dc.iOrd)=="undefined")
dc.iOrd=Math.ceil(Math.random()*100000000);}
if(c.sExecuteOn=="rtm-response")
{if(this.bRTMReady)
{var aS=this.aSegs;if(aS.length)
{var seg=aS[this.aConfigNames.length];c.sSeg=(seg!=-1&&seg.indexOf(';')==0)?aS[this.aConfigNames.length]:"";}
c.sExecuteOn="inline";}
else
this.aConfigNames[this.aConfigNames.length]=c.sName;}
if(c.sExecuteOn=="inline")
{var str,f=this.getFlashWriter(c,dc);str=f.writeFlash();if(c.bWindowMode)
{str='<div style="height:'+c.iMinHeight+'px"><div style="position:absolute; z-index:1">'+str;str+="</div></div>";}
this.parent.write(str);}
else
{this.oFlashWriterConfig[c.sName]=c;this.parent.write("<div style='width:"+c.iWidth+"' id='"+c.sName+"_placeholder'></div>");}}}
this.loadAllOnDemand=function()
{var l=this.aConfigNames.length,name,aC=this.oFlashWriterConfig,bAllLoaded=true,slen=this.aSegs.length;for(var i=0;i<l;i++)
{name=this.aConfigNames[i];if(name&&aC[name])
{var seg=this.aSegs[i]||-1;aC[name].sSeg=(slen&&seg!=-1&&seg.indexOf(';')==0)?seg:"";this.loadOnDemand(name);}
else
bAllLoaded=false;}}
this.getFlashWriter=function(pConfig,pDc)
{var dc=pDc,f=new AFFHTMLFlashWriter(this,pConfig.sName);with(pConfig)
{f.sID=sName;f.sName=sName;f.iWidth=iWidth;f.iHeight=iHeight;if(bWindowMode&&!annsfabulousfinds.oGlobals.oClient.bIE)
{f.iHeight=iMinHeight;}
f.sClassID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";f.sCodeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab";f.sType="application/x-shockwave-flash";f.sPluginsPage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash";f.addParam("movie",sSWF);f.addParam("wmode",bWindowMode?"transparent":"");f.addParam("scale",sScale);f.addParam("salign",sSAlign);f.addParam("menu",false);f.addFlashVar("xmlFile",sXMLFile);f.addFlashVar("movieid",sName);f.addFlashVar("initialSize",iInitialSize);f.addFlashVar("config",sXMLFile);f.addFlashVar("name",sName);f.addFlashVar("uniqueName",sUniqueName);f.addFlashVar("width",iWidth);f.addFlashVar("height",iHeight);if(typeof(sRendererPath)!="undefined")
f.addFlashVar("fvRenderer",sRendererPath);f.addFlashVar("fvIncludePath",this.oGlobals.oEnvironment.sIncludeHost);f.addFlashVar("fvPicsPath",this.oGlobals.oEnvironment.sPicsDir);f.addFlashVar("fvComponentPath",this.oGlobals.oEnvironment.sIncludeHost+"aw/pics/flash/");f.addFlashVar("fvConfig",sXMLFile);f.addFlashVar("fvDataConfig",sXMLFile2);f.addFlashVar("fvName",sName);f.addFlashVar("fvUniqueName",sUniqueName);f.addFlashVar("fvWidth",iWidth);f.addFlashVar("fvHeight",iHeight);if(typeof(sCurrentSiteId)!="undefined")
f.addFlashVar("fvCurrentSiteId",sCurrentSiteId);if(typeof(sTargetSiteId)!="undefined")
f.addFlashVar("fvTargetSiteId",sTargetSiteId);if(dc)
{if(dc.sDomain.lastIndexOf("/")==dc.sDomain.length-1)
dc.sDomain=dc.sDomain.substring(0,dc.sDomain.length-1);f.addFlashVar("dclk_Domain",dc.sDomain);f.addFlashVar("dclk_DartSite",dc.sDartSite);f.addFlashVar("dclk_AdSize",sAdSize);f.addFlashVar("dclk_Tile",sTile);f.addFlashVar("dclk_Ord",dc.iOrd);f.addFlashVar("dclk_Seg",sSeg);f.addFlashVar("dclk_Zone",dc.sZone);}}
return f;}
this.loadOnDemand=function(pName)
{var c=this.oFlashWriterConfig[pName]
if(typeof(c)=='undefined')
return;var str,f=this.getFlashWriter(c,this.oDocument.getConfig("Common.Flash.DoubleClick.UrlData"));str=f.writeFlash();if(c.bWindowMode)
{str='<div style="height:'+c.iMinHeight+'px"><div style="position:absolute; z-index:1">'+str;str+="</div></div>";}
var placeholder=new AFFHTMLLayer(this,pName+"_placeholder");placeholder.bind();if(placeholder.eElem)
placeholder.setValue(str);}
this.notify=function(pMod,pFunc,pParam)
{var notifySrc=this.oGlobals.oEnvironment.sIncludeHost+'aw/pics/flash/global/notify/dist/notify.swf';var div=new AFFHTMLLayer(this,"AFFHTMLFlash_notify_div");div.bind();div.setValue("<embed src='"+notifySrc+"' FlashVars='mod="+pMod+"&func="+pFunc+"&param="+pParam+"' width='0' height='0' type='application/x-shockwave-flash'></embed>");}
this.getVersion=function()
{var fv=0,cl=this.oGlobals.oClient;if(cl.bIE&&cl.bWin&&!cl.bOpera)
{for(var i=3;i<10;i++)
{if(cl.activeXLibLoaded("ShockwaveFlash.ShockwaveFlash."+i))
fv=i;}}
else
{if(navigator.plugins["Shockwave Flash"])
{var pd=navigator.plugins["Shockwave Flash"].description;fv=parseInt(pd.charAt(pd.indexOf(".")-1));}
if(cl.bWaffTV)fv=3;}
return fv;}
this.init=function()
{var d=this.parent,cl=this.oGlobals.oClient;d.write("<div id='AFFHTMLFlash_notify_div'></div>");}
this.init();}
function AFFFlashModuleConfig(pName)
{this.objType="AFFFlashModuleConfig";this.sName=pName;this.sUniqueName="";this.sMod="";this.iWidth=0;this.iHeight=0;this.iMinHeight=0;this.sSWF="";this.sExecuteOn="inline";this.bWindowMode=false;this.sFlashVars="";this.sScale="noscale";this.sSAlign="lt";this.sXMLFile="";this.sXMLFile2="";this.iInitialSize=0;this.sAdSize="";this.sTile="";this.sSeg="";}
new AFFHTMLFlash(annsfabulousfinds.oDocument,"flash");


function AFFAdCtrlPlacement(pParent,pName)
{if(!this.objType)
this.objType="AFFAdCtrlPlacement";this.base=AFFBaseControl;this.base(pParent,pName);this.bSunshineDowngrade=(annsfabulousfinds.oDocument.oPage.oConfig.bSunshineDowngrade==true);this.bInlineMethod=(annsfabulousfinds.oDocument.oPage.oConfig.bInlineMethod==true);this.bFrameNonDowngraded=false;this.bOnAfterLoadExec=false;this.sCtrlName="adctrl";this.sIframeName="rtm";this.aContent=null;this.bPageLoaded=false;this.bPlacementLoaded=false;this.displayAd=affAdCtrlDisplayAd;this.appendUrl=function(pCfg)
{var path=pCfg.sAdCtrlEngineHost;var sAmpersand=path.indexOf('?')>0?'&':'?';var iWidth=document.body.clientWidth;if(!annsfabulousfinds.oGlobals.oClient.bIE)
iWidth=window.innerWidth;path+=sAmpersand+'browserwidth='+iWidth;var d=new Date();path+=sAmpersand+d.getTime();return path;}
this.loadPlacements=function(oC)
{var bDisplayAd=this.displayAd();if(!oC&&!oC.sAdCtrlEngineHost&&!bDisplayAd)
return;var sAdCtrlUrl=this.appendUrl(oC);if(!this.bInlineMethod)
{var oIfrm=eval("this.oDocument.win.frames['"+this.sIframeName+"']");bIfrm=(typeof(oIfrm)!="undefined"&&typeof(oIfrm.document)!="unknown");if(bIfrm)
{if(this.bFrameNonDowngraded)
oIfrm.document.open();this.writeCharset(oIfrm);oIfrm.document.write(this.oUtils.scriptTag(sAdCtrlUrl));}
if(bIfrm)
oIfrm.document.close();}
else
this.oDocument.write(this.oUtils.scriptTag(sAdCtrlUrl));}
this.writeCharset=function(pIfrm)
{try{if(pIfrm)
{var d=annsfabulousfinds.oDocument.doc;if(d.charset)
pIfrm.document.charset=d.charset;}}catch(err)
{}}
this.writeIframe=function()
{var f='<iframe framafforder="no" border="0" marginwidth="0" marginheight="0" width="1" height="1" scrolling="no" id="'+this.sIframeName+'" name="'+this.sIframeName+'"></iframe>';this.oDocument.doc.write(f);}
this.initIframe=function()
{if(!this.bInlineMethod)
{var oIfrm=this.oDocument.win.frames[this.sIframeName],b=this.oDocument.oPage.oConfig.bNoRTMDowngrade;if(!this.bSunshineDowngrade)
{if(b||typeof(oIfrm)=="undefined"||typeof(oIfrm.document)=="unknown")
this.bFrameNonDowngraded=true;}
if(!(this.oDocument.doc.location.toString().indexOf('https')==0))
{this.sIframeName=this.sCtrlName+"_data_frame";this.writeIframe();}}}
this.downgradeDomain=function()
{var oIfrm=this.oDocument.win.frames[this.sIframeName],dd=document.domain,i=dd.indexOf(".annsfabulousfinds."),dd=dd.substring(i+1),cl=this.oGlobals.oClient,sIfrm_downgrade_domain='<scr'+'ipt language=javascript>document.domain="'+dd+'";</scr'+'ipt>';if(cl.bOpera&&(!oIfrm||!oIfrm.document))
this.controls[this.sCtrlName].downgradeDomain();else
{if(oIfrm&&oIfrm.document)
{oIfrm.document.open();oIfrm.document.write(sIfrm_downgrade_domain);}}}
this.setContent=function(pContentArray)
{if(!pContentArray)
return;var oC=this.oDocument.oPage.oConfig;this.aContent=pContentArray;this.bPlacementLoaded=false;if(this.bPageLoaded)
this.renderAd();else
{var sTimeout="annsfabulousfinds.oDocument._getControl('adctrl').renderAdTimeout()";var timeout=1500;this.renderTimeoutID=window.setTimeout(sTimeout,timeout);}
var oIfrm=this.oDocument.getUIElem(this.sCtrlName);if(annsfabulousfinds.oGlobals.oClient.bIE&&oIfrm)
oIfrm.outerHTML='';}
this.renderAdTimeout=function()
{if(!this.bPlacementLoaded)
this.renderAd();else
window.clearTimeout(this.renderTimeoutID);}
this.renderAd=function()
{with(this)
{if(!aContent||bPlacementLoaded)
return;var oC=annsfabulousfinds.oDocument.getConfig("AdCtrl_Config"),ac=(oC&&oC.aLayerClass)?oC.aLayerClass:null;this.bPlacementLoaded=true;for(var i=0;i<aContent.length;i++)
{var ad=aContent[i];if(ad["type"]=="g")
this.bPlacementLoaded&=this.setUrl(ad,ac);else if(ad["type"]=="t")
this.bPlacementLoaded&=this.setInline(ad,ac);}}}
this.trackLoad=function()
{this.bPageLoaded=true;}
this.setUrl=function(pAd,pClass)
{var url=pAd["content"],w=pAd["width"],h=pAd["height"],m=pAd["method"],st=pAd["style"],div=annsfabulousfinds.oDocument._getControl(pAd["id"]);if(!div)
{div=new AFFHTMLLayer(this,pAd["id"]);div.bind();}
if(!div.eElem)
return false;var o;m=m&&m.length>0?m:"frame";if(m=="script")
{var fn=pAd["id"]+"_fm";var fm=annsfabulousfinds.oDocument._getControl(fn);if(!fm)
{o="<iframe id='"+fn+"' framafforder='no' border='0' marginwidth='0' marginheight='0' width='"+w+"' height='"+h+"' scrolling='no'></iframe>";div.setValue(o,false);fm=new AFFHTMLFrame(this,fn);fm.bindHTML();var frmElem=fm.eElem,eFrmWindow=frmElem.contentWindow,eFrmDocument=null;if(annsfabulousfinds.oDocument.oGlobals.oClient.bIE)
eFrmDocument=(typeof(eFrmWindow.document)!='unknown')?eFrmWindow.document:null
else
eFrmDocument=(typeof(frmElem.contentDocument)!='unknown')?frmElem.contentDocument:null;if(eFrmDocument)
eFrmDocument.write(this.oUtils.scriptTag(url));}}
else if(m=="frame")
{o="<iframe src='"+url+"' framafforder='no' border='0' marginwidth='0' marginheight='0' width='"+w+"' height='"+h+"' scrolling='no'></iframe>";div.setValue(o,false);}
if(pClass)
this.setLayerClass(pClass[pAd["id"]]);if(st)
this.setLayerClass(st);div.show(true);return true;}
this.setInline=function(pAd,pClass)
{var c=pAd["content"],st=pAd["style"],div=annsfabulousfinds.oDocument._getControl(pAd["id"]);if(!div)
{div=new AFFHTMLLayer(this,pAd["id"]);div.bind();}
if(!div.eElem)
return false;div.setValue(c,false);if(pClass)
this.setLayerClass(pClass[pAd["id"]]);if(st)
this.setLayerClass(st);div.show(true);return true;}
this.setLayerClass=function(pLayerArray)
{if(!pLayerArray)
return;for(var i=0;i<pLayerArray.length;i++)
{var l=pLayerArray[i],ln=l["id"],cs=l["show"],ls=l["style"],div=annsfabulousfinds.oDocument._getControl(ln);if(!div)
{div=new AFFHTMLLayer(this,ln);div.bind();}
if(div.eElem)
{div.setClass(cs);if(ls)
this.setLayerStyle(div,ls);}}}
this.setLayerStyle=function(pDiv,pStyle)
{if(!pDiv||!pDiv.eElem||!pStyle)
return;for(var i=0;i<pStyle.length;i++)
{var an=pStyle[i]["att"],at=pStyle[i]["type"],ac=pStyle[i]["content"];if(at=='script')
this.setLayerStyleScript(pDiv,an,ac);else if(ac=='text')
this.setLayerStyleText(pDiv,an,ac)}}
this.setLayerStyleScript=function(pDiv,pAttName,pScript)
{var nScript=pScript.replace(/#1#/g,"pDiv.eElem");eval("pDiv.eElem.style."+pAttName+"="+nScript);}
this.setLayerStyleText=function(pDiv,pAttName,pVal)
{pDiv.setStyle(pAttName,pVal);}
this.initIframe();if(!this.bFrameNonDowngraded)
this.downgradeDomain();this._registerListener(annsfabulousfinds.oDocument._getEvent("load"),annsfabulousfinds.oDocument.oPage.EVENT_AFTER,"trackLoad");}
function affAdCtrlDisplayAd()
{var oCookie=annsfabulousfinds.oDocument.oCookieJar;var sValue=oCookie.readCookielet("annsfabulousfinds","sbf");var iBit=0;if(sValue)
{iBit=oCookie.getBitFlag(sValue,13);}
return(iBit)?true:false;};if(affAdCtrlDisplayAd()&&annsfabulousfinds.oDocument.getConfig("AdCtrl_Config"))
new AFFAdCtrlPlacement(annsfabulousfinds.oDocument.oPage,"adctrl");


function AFFHTMLFrameAutoSize(pParent,pName,pCfg,pUrl)
{if(!this.objType)
this.objType="AFFHTMLFrameAutoSize";this.base=AFFHTML;this.base(pParent,pName,pName,false,pCfg);this.oFrame=this.sWidth=this.sHeight="";this.onAfterResize=null;this.ORIENTATION_HORIZONTAL="0";this.DEFAULT_FRAMEID="myAutoResizeFrame";this.sDefFrameWidth=(pCfg&&pCfg.sWidth)?pCfg.sWidth:"";this.sDefaultUrl=pUrl||"";this.sFrameName=pCfg&&pCfg.sFrameName&&pCfg.sFrameName.length>0?pCfg.sFrameName:this.DEFAULT_FRAMEID;this.bLoaded=false;this.bAutoResize=pCfg.bAutoResize?pCfg.bAutoResize:false;this.getHTML=function()
{with(this)
{var s,c=oConfig,w=c.sDefWidth,sSep=':',src=(sDefaultUrl)?' src="'+sDefaultUrl+'"':'';w=typeof(w)!='undefined'?w+'px;':'100%;';s='<iframe name="'+sFrameName+'" id="'+sFrameName+'" '+src+' marginwidth="0" marginheight='+((c.sOrientation==ORIENTATION_HORIZONTAL)?'"1"':'"0"')+' scrolling="no" framafforder="0" '+'style="width'+sSep+w+'height'+sSep+'1px;">'+'&nbsp;</iframe>';return s;}}
this.loadContent=function()
{if(this.oConfig.sContentUrl.has('downgradeDomain')&&!this.oConfig.bPageDowngraded)
this.parent.oDocument.downgradeDomain();this.oFrame.setSource(this.oConfig.sContentUrl);}
this.resize=function()
{with(this)
{if(oFrame)
{oFrame.resize();var st=oFrame.eElem.style;if(sDefFrameWidth)
st.width=(sDefFrameWidth.has('%')||sDefFrameWidth.has('px'))?sDefFrameWidth:sDefFrameWidth+"px";sWidth=st.width;sHeight=st.height;if(onAfterResize)
onAfterResize();if(!bLoaded)
{_registerListener(this.oDocument._getEvent("resize"),EVENT_AFTER,"resize");bLoaded=true;}}}}
this.writeContainer=function(pConfig)
{with(this)
{var b=pConfig.bShowContentAfterPageLoad,oP=parent,oD=oP.oDocument;oConfig=pConfig;sFrameName=pConfig&&pConfig.sFrameName&&pConfig.sFrameName.length>0?pConfig.sFrameName:DEFAULT_FRAMEID;if(sFrameName==DEFAULT_FRAMEID||bAutoResize)
oD.write(getHTML());oFrame=new AFFHTMLFrame(this,sFrameName,oConfig);oFrame.bind();b=(typeof(b)!='undefined')?b:true;if(b)
_registerListener(oD._getEvent("load"),EVENT_AFTER,"loadContent");else
loadContent();return oFrame;}}}


//  -->
