                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                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.ppso=="undefined")
{
vp.ppso=function(){};
};


vp.ppso.pfidToUrl={};


vp.ppso.pfidsToTooltip={};





vp.ppso.EventManager=function $vpfn_FkdZ4ALqlgKAx7$lpRa5KA31$23()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var me=this;


var currentPfId="";
var currentUrl="";
var allPfIds=[];
var allColorValues=[];
var allLayoutValues=[];
var currentColor="";
var currentLayout="";

this.responder=new vp.ppso.Responder();


this.galleryRedirect=function $vpfn_nZ1KXHcBOGo_TKwEUPS4Cg47$24()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var url="";


if(manager.currentColor)
{
url=vp.ppso.pfidToUrl[manager.currentPfId]
+"&color="+manager.currentColor
+"&preid="+vp.ppso.getLayoutPresetId();
}
else
{
document.location=manager.currentUrl;
return false;
}

document.location=url;
return false;
};
};




vp.ppso.Responder=function $vpfn_t_qXBpLmUYzdc3rQ_U0Srg72$20()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var me=this;

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

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

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

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

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

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

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


var manager=new vp.ppso.EventManager();



vp.ppso.SizeSelectorRegistrant=function $vpfn_aUyrpjU7yNLB7c_y8ADrdg96$33(defaultPfId,pfIdList)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var me=this;

var lastPfId=0;

var currentSizePfId=defaultPfId;

manager.allPfIds=pfIdList.split(",");

manager.currentPfId=defaultPfId;


this.changeSize=function $vpfn_YW06M3IcDv5q6KS6Ak3RZg109$19(evt)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var newPfId=vp.events.getEventData(evt,"newPfId");
if(newPfId!=currentSizePfId)
{
switchActivePfid(newPfId);

lastPfId=currentSizePfId;
currentSizePfId=newPfId;
}


if(manager.currentColor!=="")
{
manager.currentPfId=newPfId;
}
};

manager.responder.sizeChanged.addHandler(this.changeSize);


this.selectorClicked=function $vpfn_6d8rXfUZmp3naxcm7ER8Hw130$24(evt)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var identifier;
if(evt.srcElement)
{
identifier=evt.srcElement.id.split("_")[1];
}
else if(evt.target)
{
identifier=evt.target.id.split("_")[1];
}
else
{
identifier=this.id.split("_")[1];
}
vp.events.setEventData(evt,"newPfId",identifier);

manager.responder.sizeChanged.fire(evt);

vp.ppso.showColorsForPfid();
};


for(var i=0;i<manager.allPfIds.length;i++)
{
vp.events.add("selectSize_"+manager.allPfIds[i],'click',this.selectorClicked);

if(vp.ui.get("selectSize_"+manager.allPfIds[i]+"_image"))
{
vp.events.add("selectSize_"+manager.allPfIds[i]+"_image",'click',this.selectorClicked);
}
}
};




vp.ppso.SelectSizeChanged=function $vpfn_TVIVSQJAobrWQbbGFtEl8g167$28(pfid)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}

if(manager.currentColor!=="")
{
manager.currentPfId=pfid;
vp.ppso.showColorsForPfid();
}
};

vp.ppso.colorSelectorRegistrant=function $vpfn_zStNaKeBrlE$ZIHwuI03Pg177$34(allColorValues)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var me=this;

var radioBtnIdPrefix="selectColor";

manager.allColorValues=allColorValues.split(",");
vp.ppso.showColorsForPfid();


this.changeColor=function $vpfn_cJnB3Suu4GuUcgYNonna$Q187$20(evt)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
manager.currentColor=vp.events.getEventData(evt,"newColor");
};

manager.responder.colorChanged.addHandler(this.changeColor);


this.selectorClicked=function $vpfn_6d8rXfUZmp3naxcm7ER8Hw195$24(evt)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var identifier;
if(evt.srcElement)
{
identifier=evt.srcElement.id.split("_")[1];
}
else if(evt.target)
{
identifier=evt.target.id.split("_")[1];
}
else
{
identifier=this.id.split("_")[1];
}
vp.events.setEventData(evt,"newColor",identifier);

manager.responder.colorChanged.fire(evt);
};

var pfidCount=manager.allPfIds.length;
var colorCount=manager.allColorValues.length;

var anyNotSelected=true;


for(var i=0;i<pfidCount;i++)
{
for(var j=0;j<colorCount;j++)
{
var radioElement=document.getElementById(radioBtnIdPrefix+manager.allPfIds[i]+'_'+manager.allColorValues[j]);


if(radioElement)
{
vp.events.add(radioElement,'click',this.selectorClicked);
if(radioElement.checked)
{
anyNotSelected=false;
}
}
}
}


if(anyNotSelected)
{
document.getElementById(radioBtnIdPrefix+manager.allPfIds[0]+'_'+manager.allColorValues[0]).checked=true;
manager.currentColor=manager.allColorValues[0];
}
};

vp.ppso.layoutSelectorRegistrant=function $vpfn_cGSOTQN8bkZQHatk4DQPRg247$35(allLayout)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var me=this;

var radioBtnIdPrefix="selectLayout";

manager.allLayoutValues=allLayout.split(",");


if(!manager.currentLayout)
{
manager.currentLayout=manager.allLayoutValues[0];
}


this.changeLayout=function $vpfn_JqQrhUdK$8rW7lymynIEdw262$21(evt)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
manager.currentLayout=vp.events.getEventData(evt,"newLayout");
};


manager.responder.layoutChanged.addHandler(this.changeLayout);


this.selectorClicked=function $vpfn_6d8rXfUZmp3naxcm7ER8Hw271$24(evt)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var identifier;
if(evt.srcElement)
{
identifier=evt.srcElement.id.split("_")[1];
}
else if(evt.target)
{
identifier=evt.target.id.split("_")[1];
}
else
{
identifier=this.id.split("_")[1];
}
vp.events.setEventData(evt,"newLayout",identifier);

manager.responder.layoutChanged.fire(evt);
};

var layoutCount=manager.allLayoutValues.length;


for(var i=0;i<layoutCount;i++)
{
vp.events.add(radioBtnIdPrefix+'_'+manager.allLayoutValues[i],'click',this.selectorClicked);
}
};




vp.ppso.restorePreviousSelections=function $vpfn_nb0p1UrPcXwzE6LgNpYTGg303$36()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}

$.each(manager.allPfIds,function $vpfn_ukVDi6EiH$8wTylbFriHPQ306$29(index,pfid)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var radioBtn=document.getElementById("selectSize_"+pfid);

if(radioBtn&&radioBtn.checked)
{
manager.currentPfId=pfid;
vp.ppso.showColorsForPfid();
return;
}
});


$.each(manager.allLayoutValues,function $vpfn_ukVDi6EiH$8wTylbFriHPQ319$36(index,layout)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var radioBtn=document.getElementById("selectLayout_"+layout);
if(radioBtn&&radioBtn.checked)
{
manager.currentLayout=layout;
return;
}
});
};




vp.ppso.showColorsForPfid=function $vpfn__eA5f5e_sruIU2HMbuuzOg333$28()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var colorClassPrefix=".color_for_";


if($('.select-style').length>1)
{
if(manager.currentPfId==="AGC")
{
$('.select-style')[1].style.display="none";
}
else
{
$('.select-style')[1].style.display="";
}
}


$.each(manager.allPfIds,function $vpfn_ukVDi6EiH$8wTylbFriHPQ351$29(index,pfid)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}

var colorOptionsCB=$(colorClassPrefix+pfid);
$.each(colorOptionsCB,function $vpfn_ukVDi6EiH$8wTylbFriHPQ355$31(index,cell)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
vp.ui.collapse(cell.parentNode);


var radioBtn=$(cell).find(".radioButton")[0];
radioBtn.checked=false;
});
});


var colorOptionsCB=$(colorClassPrefix+manager.currentPfId);
$.each(colorOptionsCB,function $vpfn_ukVDi6EiH$8wTylbFriHPQ367$27(index,cell)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
vp.ui.expand(cell.parentNode);


if(index===0)
{
var radioBtn=$(cell).find(".radioButton")[0];
radioBtn.checked=true;

manager.currentColor=radioBtn.value;
}
});
};




vp.ppso.createToolTipForPfid=function $vpfn_PX0Nifni87R8ptjdhcErzg385$31(pfid,tooltipMsg)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}

var oTooltip=new vp.widget.RichTooltip("selectSize_"+pfid,"<p>"+tooltipMsg+"</p>");
oTooltip.skin=vp.widget.RichTooltip.skins.Message;
oTooltip.setBehavior(TOOLTIP_BEHAVIOR_SHOW_ON_CLICK);
oTooltip.renderingStrategy=vp.widget.RichTooltip.renderingStrategies.Above;
oTooltip.width=165;
};





vp.ppso.getLayoutPresetId=function $vpfn_IYEJtYRcNdUSUlRo4bdG_Q399$28()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
switch(manager.currentPfId)
{

case"372":

case"A8V":
switch(manager.currentLayout)
{
case"1":
return"160";
case"2":
return"161";
default:
return"";
}
break;
case"048":
switch(manager.currentLayout)
{
case"1":
return"162";
case"2":
return"163";
default:
return"";
}
break;
default:
return"";
}

return"";
};

vp.ppso.OptionSelectorRegistrant=function $vpfn_XB3xW0qWGIbvnf_ICgeV3w435$35(pfId,activeOption,optionList)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var me=this;

var currentPfId=pfId;

var originalOption=activeOption;
var currentOption=activeOption;

var allOptions=optionList.split(",");

this.changeOption=function $vpfn_5NHj9N7Q$knj8CUpGXJpmg446$24(evt)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var url,success;
var newOptionValue=vp.events.getEventData(evt,"newVal");
if(newOptionValue&&newOptionValue!=originalOption)
{
currentOption=newOptionValue;
var d=new Date();


if(manager.currentPfId)
{
url="/product-config-switcher.aspx?option_val="+newOptionValue+"&pf_id="+manager.currentPfId+"&time="+d.getTime();
}
else
{
url="/product-config-switcher.aspx?option_val="+newOptionValue+"&pf_id="+currentPfId+"&time="+d.getTime();
}
success=vp.http.get(url);
}
else if(newOptionValue&&newOptionValue==originalOption)
{
if(manager.currentPfId)
{
url="/product-config-switcher.aspx?r=1&pf_id="+manager.currentPfId+"&time="+d.getTime();
}
else
{
url="/product-config-switcher.aspx?r=1&pf_id="+currentPfId+"&time="+d.getTime();
}
success=vp.http.get(url);
}
};

manager.responder.addNewConfiguration.addHandler(this.changeOption);

this.productChanged=function $vpfn_IjtJ0CAlfcA_1B1JSVGhtQ482$26(evt)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var newPfId=vp.events.getEventData(evt,"newPfId");
var d=new Date();
if(newPfId)
{

var url="/product-config-switcher.aspx?option_val="+currentOption+"&pf_id="+newPfId+"&time="+d.getTime();
var success=vp.http.get(url);


manager.currentPfId=newPfId;
}
};

manager.responder.pfIdChanged.addHandler(this.productChanged);


this.selectorClicked=function $vpfn_6d8rXfUZmp3naxcm7ER8Hw500$27(evt)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var identifier;
if(evt.srcElement)
{
identifier=evt.srcElement.id.split("_")[1];
}
else if(evt.target)
{
identifier=evt.target.id.split("_")[1];
}
else
{
identifier=this.id.split("_")[1];
}
vp.events.setEventData(evt,"newVal",identifier);

manager.responder.addNewConfiguration.fire(evt);
};

for(var i=0;i<allOptions.length;i++)
{
vp.events.add("selectOption_"+allOptions[i],'click',this.selectorClicked);
}
};

vp.ppso.OrientationSelectorRegistrant=function $vpfn_PNYW5DlzGhrZ$DKD9RuZHQ526$40(sizePfId,orientationList,defaultGalleryUrlList)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var me=this;


var currentOrientIndex;
var currentSizeIndex;


var pfIdsByOrientation=orientationList.split(";");
var urlListsByOrientation=defaultGalleryUrlList.split(";");

var orientationCount=pfIdsByOrientation.length;
var pfIdCount;

var orientationThenSizeArr=new Array(orientationCount);
var urlsByOrientThenSizeArr=new Array(orientationCount);

for(var i=0;i<orientationCount;i++)
{
var pfIdsBySize=pfIdsByOrientation[i].split(",");
var urlsBySize=urlListsByOrientation[i].split(",");


orientationThenSizeArr[i]=pfIdsBySize;
urlsByOrientThenSizeArr[i]=urlsBySize;

if(!pfIdCount)
{
pfIdCount=pfIdsBySize.length;
}


if(!currentSizeIndex)
{
for(var j=0;j<pfIdCount;j++)
{
if(pfIdsBySize[j]==sizePfId)
{
currentSizeIndex=j;
if(!currentOrientIndex)
{
currentOrientIndex=i;
}
}
}
}
}


manager.currentPfId=orientationThenSizeArr[currentOrientIndex][currentSizeIndex];
manager.currentUrl=urlsByOrientThenSizeArr[currentOrientIndex][currentSizeIndex];



this.changeSize=function $vpfn_YW06M3IcDv5q6KS6Ak3RZg581$22(evt)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var newPfId=vp.events.getEventData(evt,"newPfId");
var d=new Date();

var sizingOrientation=orientationThenSizeArr[0];
for(var i=0;i<pfIdCount;i++)
{
if(sizingOrientation[i]==newPfId)
{
currentSizeIndex=i;
}
}

if(manager.currentPfId)
{
var url="/product-config-switcher.aspx?r=1&pf_id="+manager.currentPfId+"&time="+d.getTime();
var success=vp.http.get(url);
}

manager.currentUrl=urlsByOrientThenSizeArr[currentOrientIndex][currentSizeIndex];

vp.events.setEventData(evt,"newPfId",orientationThenSizeArr[currentOrientIndex][currentSizeIndex]);
manager.responder.pfIdChanged.fire(evt);
};

manager.responder.sizeChanged.addHandler(this.changeSize);



this.changeOrientation=function $vpfn_BC1xIAt3bBAr$_iGmiGUkQ611$29(evt)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var newOrientIndex=vp.events.getEventData(evt,"orientId");
var d=new Date();

if(newOrientIndex!=currentOrientIndex)
{
currentOrientIndex=newOrientIndex;

if(manager.currentPfId)
{
var url="/product-config-switcher.aspx?r=1&pf_id="+manager.currentPfId+"&time="+d.getTime();
var success=vp.http.get(url);
}

manager.currentUrl=urlsByOrientThenSizeArr[currentOrientIndex][currentSizeIndex];

vp.events.setEventData(evt,"newPfId",orientationThenSizeArr[currentOrientIndex][currentSizeIndex]);

manager.responder.pfIdChanged.fire(evt);
}
};

manager.responder.orientationChanged.addHandler(this.changeOrientation);

this.selectorClicked=function $vpfn_6d8rXfUZmp3naxcm7ER8Hw636$27(evt)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var identifier;
if(evt.srcElement)
{
identifier=evt.srcElement.id.split("_")[1];
}
else if(evt.target)
{
identifier=evt.target.id.split("_")[1];
}
else
{
identifier=this.id.split("_")[1];
}
vp.events.setEventData(evt,"orientId",identifier);

manager.responder.orientationChanged.fire(evt);
};

for(i=0;i<orientationThenSizeArr.length;i++)
{
vp.events.add("selectOrient_"+i,'click',this.selectorClicked);
}
};
