                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(!window.__td){window.__MT=100;window.__ti=0;window.__td=[];window.__td.length=window.__MT;window.__noTrace=false;

}




if(typeof vp=="undefined")
{
var vp={};
}





if(typeof vp.bundlesandmatching=="undefined")
{
vp.bundlesandmatching=function(){};
}






vp.bundlesandmatching.ProductSelectionResponder=function $vpfn_j$53VEMydNKlNxXaZLoBnA27$50()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}



this.productRadioSelected=new vp.events.CustomEvent(this,"productRadioSelected");





this.envelopeSelected=new vp.events.CustomEvent(this,"envelopeSelected");
};

vp.bundlesandmatching.TopResponder=new vp.bundlesandmatching.ProductSelectionResponder();


vp.bundlesandmatching.ProductSelectorRegistrant=function $vpfn_CFg10r$S87V9RFhuwU0htA44$50(elementID,memberID)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var element=vp.ui.get(elementID);


this.clickHandler=function $vpfn_FPj068rMblSqrWrFMDAung49$24(evt)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
vp.events.setEventData(evt,"selectedMemberId",memberID);
vp.bundlesandmatching.TopResponder.productRadioSelected.fire(evt);
var image=vp.ui.get('productImage');
if(image)
{
var lp=vp.bundlesandmatching.PreviewURLs[memberID];
if(lp)
{
image.style.backgroundImage='url('+lp+')';
}
}

var kitProductInfo=vp.ui.get('kitProductInfo');
if(kitProductInfo)
{
if(memberID==='0')
{
if(image)
{
image.style.display='none';
}
kitProductInfo.style.display='block';
}
else
{
if(image)
{
image.style.display='block';
}
kitProductInfo.style.display='none';
}
}

vp.bundlesandmatching.PerformProductPreviewLayout(memberID);
};


this.galleryViewLargerClickHandler=function $vpfn_Cu7CD3PnaR8UCLTwFAhwVg88$41(evt)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var productSelector=vp.ui.get("productSelector"+memberID);
if(productSelector)
{
productSelector.checked=true;
}
};

vp.events.add(element,'click',this.clickHandler);
vp.events.add(element,'click',this.galleryViewLargerClickHandler);
};


vp.bundlesandmatching.DocIds=new Array();


vp.bundlesandmatching.DocPreviewProductSelectorResponse=function $vpfn_AGmiEH63o7A_TZtujXjEkw105$58(evt)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var memberId=vp.events.getEventData(evt,"selectedMemberId");
var currentMember=vp.ui.get("currentMemberId");

if(!currentMember||memberId!=currentMember.value)
{
var url=new vp.web.URL(window.location);

if(vp.bundlesandmatching.DocIds[memberId])
{
var docId=vp.bundlesandmatching.DocIds[memberId];
url.setItem("doc_id",docId);
}

url.setItem("member_id",memberId);
window.location=url.toString();
}
};

vp.bundlesandmatching.Pfids=new Array();


vp.bundlesandmatching.DetailsAndPricingProductSelectorResponse=function $vpfn_OmKJH74kfEF19q2_GZ$Now128$65(evt){if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var memberId=vp.events.getEventData(evt,"selectedMemberId");

var url=new vp.web.URL(window.location);

if(vp.bundlesandmatching.Pfids[memberId]){
var pfid=vp.bundlesandmatching.Pfids[memberId];
url.setItem("ap",pfid);
url.setItem("memberId",memberId);
}


window.location=url.toString();
};


vp.bundlesandmatching.AspectRatios=new Array();

vp.bundlesandmatching.PerformProductPreviewLayout=function $vpfn_uP5gT8T5WAGAtv2RhDZ0Dg146$52(memberId)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var image=vp.ui.get('productImage');
if(image&&vp.bundlesandmatching.AspectRatios)
{
var aspectRatio=vp.bundlesandmatching.AspectRatios[memberId];
if(aspectRatio)
{
image.style.height=(vp.ui.getRect(image).width/aspectRatio)+"px";
}
}
};

vp.bundlesandmatching.PerformProductSelectorLayout=function $vpfn_khp2tIMIB0Qo4fbAt2chHw159$53()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var index=0;
var maxWidth=0;
var oProductDiv;


while(oProductDiv=vp.ui.get("divProduct_"+index++))
{
maxWidth=Math.max(maxWidth,vp.ui.getRect(oProductDiv).width);
}

maxWidth+=5;
index=0;


while(oProductDiv=vp.ui.get("divProduct_"+index++))
{
oProductDiv.style.width=maxWidth+"px";
oProductDiv.style.minWidth=maxWidth+"px";
}
};

