//<!--
//1@@m1

ebay.oUtils.bustFrame=function()
{if(top.location!=self.location)
top.location.replace(ebay.oDocument.doc.location.href);}
ebay.oUtils.bustFrame();

//2@@m1

ebay.oD=ebay.oDocument;ebay.oP=ebay.oDocument.oPage;

//3@@m23

function EbayHTMLFrame(pParent,pName,pCfg)
{if(!this.objType)
this.objType="EbayHTMLFrame";this.base=EbayHTML;this.base(pParent,pName,pName,false,pCfg);this.eFrameElem=null;this.getElem=ebHTMLFrameGetElem;this.bindHTML=ebHTMLFrameBindHTML;this.bindEvents=this.enable=function(){};this.setSource=ebHTMLFrameSetSource;this.cleanupMemoryBase=this.cleanupMemory;this.cleanupMemory=ebHTMLFrameCleanupMemory;this.resize=ebHTMLFrameResize;this.onBeforeResize=this.onAfterResize=null;}
function ebHTMLFrameGetElem(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 ebHTMLFrameBindHTML()
{with(this)
{eElem=getElem(sElemName);if(eElem)
assignJSObject(eElem);}}
function ebHTMLFrameCleanupMemory()
{this.cleanupMemoryBase();this.eFrameElem=null;}
function ebHTMLFrameSetSource(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 ebHTMLFrameResize(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=ebay.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&&ebay.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();}}}

//4@@m11

function EbayHTMLAnchor(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="EbayHTMLAnchor";this.base=EbayHTML;this.base(pParent,pName,pName,pDisabled,pCfg);this.getElem=ebHTMLAnchorGetElem;this.enableBase=this.enable;this.enable=ebHTMLAnchorEnable;this.subscribeEvents("onclick");}
function ebHTMLAnchorGetElem(pName)
{var d=this.oDocument.doc,l=null,len=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;len=lyrs.length;for(var i=0;i<len;i++)
{l=this.getElem(lyrs[i].document,pName);if(l)
return l;}}
len=d.links.length;for(var j=0;j<len;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 ebHTMLAnchorEnable(pEnable)
{var cur=(pEnable)?"hand":"default";var el=this.eElem;if(el&&el.style)
{el.style.cursor=cur;el.style.color=pEnable?"":"gray";}
this.enableBase(pEnable);}
function setEbayLink(pS)
{return true;}

//5@@m6

function EbayHTMLLayer(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="EbayHTMLLayer";this.base=EbayHTML;this.base(pParent,pName,pName,pDisabled,pCfg);this.aBindEvents=new Array;this.getElem=ebHTMLLayerGetElem;this.getValue=ebHTMLLayerGetValue;this.setValue=ebHTMLLayerSetValue;}
function ebHTMLLayerGetElem(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 ebHTMLLayerGetValue(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 ebHTMLLayerSetValue(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;}}

//6@@m11

function EbayHTMLText(pParent,pName,pDisabled,pCfg,bHidden)
{if(!this.objType)
this.objType="EbayHTMLText";this.base=EbayHTMLFormElem;this.base(pParent,pName,pDisabled,pCfg);this.value=ebHTMLTextValue;this.getValue=ebHTMLTextGetValue;this.setValue=ebHTMLTextSetValue;this.select=ebHTMLTextSelect;this.enableBase=this.enable;this.enable=ebHTMLTextEnable;if(bHidden!=true)
this.subscribeEvents("onchange","onblur","onfocus","onkeydown","onkeyup");}
function ebHTMLTextValue(pVal)
{var e=this.eElem;if(e)
{if(typeof(pVal)=="undefined")
return e.value;else
e.value=pVal;}}
function ebHTMLTextGetValue()
{return this.value();}
function ebHTMLTextSetValue(pVal)
{return this.value(pVal);}
function ebHTMLTextSelect()
{var e=this.eElem;if(e)
e.select();}
function ebHTMLTextEnable(pEnable)
{this.enableBase(pEnable);this.setStyle('backgroundColor',!pEnable?'#ccc':'#fff');}

//7@@m39

function EbayHelpAssistant(pParent,pName,pCfg,pBindOnInitialize)
{if(!this.objType)
this.objType="EbayHelpAssistant";this.base=EbayHTMLFrame;this.base(pParent,pCfg.sFrameName);this.oConfig=pCfg;this.bIsShowing=false;this.bOverflowSet=false;this.oMainLayer=new EbayHTMLLayer(this,pCfg.sMainLayerName);this.oHeaderLayer=new EbayHTMLLayer(this,pCfg.sHeaderLayerName);this.oHeaderCloseLink=new EbayHTMLAnchor(this,pCfg.sCloseLinkElemName);this.oSrchTxt=new EbayHTMLText(this,pCfg.sSearchTxtBox);this.oSrchBtn=new EbayHTMLButton(this,pCfg.sSearchBtn);this.oCSSErrorLayer=new EbayHTMLLayer(this,pCfg.sCSSErrorDiv);this.oStateText=new EbayHTMLText(this,pCfg.sHelpElemName);this.oCurrentElem=null;this.oLayer=new EbayHTMLLayer(this,pCfg.sFrameName+"_div");this.oLiveHlpLayer=null;if(pCfg.sLiveHelpHeaderLayerName)
this.oLiveHlpLayer=new EbayHTMLLayer(this,pCfg.sLiveHelpHeaderLayerName);with(this)
{var bIE6=oGlobals.oClient.bIE&&oGlobals.oClient.iVer==6;if(!oConfig.bDisableWinResize&&!bIE6)
_registerListener(oDocument._getEvent("resize"),EVENT_AFTER,"updateStyles");if(oConfig.bShowOnLoad)
_registerListener(oDocument._getEvent("load"),EVENT_AFTER,"onAfterLoad");}
this.init=function(pBind)
{with(this)
{if(pBind)
{var es=oConfig.aElemNames,len=es.length,e;for(var i=0;i<len;i++)
{e=new EbayHTML(this,es[i],es[i]);subscribeElemEvents(e,oConfig.aURL[es[i]]);}}
oHeaderCloseLink._registerEvent("onclick","onCloseHelp");oHeaderCloseLink.onCloseHelp=function()
{this.parent.setHelpStat(false);this.parent.hideFrame();return false;}}}
this.onAfterLoad=function()
{with(this)
{if(!bOverflowSet)
setOverflow();updateStyles();var cp=oUtils.controlPath(this);setTimeout(cp+".showFrame(null,"+cp+".oConfig.sDefaultURL)",500);}}
this.setOverflow=function()
{with(this)
{if(!oMainLayer.eElem)
oMainLayer.bind();var oCSS=oCSSErrorLayer;if(!oCSS.eElem)
oCSS.bind();if(!oCSS.eElem||oCSS.height()==0)
{var de=document.documentElement?document.documentElement:null,oBody=this.oDocument.doc.body,sST=0;if(de)
{if(de.scrollTop>0)
sST=de.scrollTop;de.scrollTop=0;de.style.overflow='hidden';}
else if(oBody.scrollTop>0)
sST=oBody.scrollTop;oBody.scrollTop=0;oBody.style.overflow="hidden";oMainLayer.setStyle("overflow","auto");oMainLayer.eElem.scrollTop=sST;}
bOverflowSet=true;}}
this.createHTMLObject=function(pElem)
{with(this)
{var n=pElem.name||pElem.id,e=new EbayHTML(this,n,n);subscribeElemEvents(e,oConfig.aURL[n]);e.bind();}}
this.subscribeElemEvents=function(pElem,pURL)
{var el=pElem.eElem,evt=(el&&el.type)?"onfocus":"onclick";pElem.elemFocus=this.elemFocus;pElem.subscribeEvents(evt);pElem._registerEvent(evt,"elemFocus");pElem.sURL=pURL;}
this.processAnchorClick=function(pAnchor)
{with(this)
{if(bIsShowing&&((pAnchor==oCurrentElem)||pAnchor.name.isAny(oConfig.aMainLinkNames)))
hideFrame();else
showFrame(pAnchor,pAnchor.eElem.href);}}
this.elemFocus=function()
{var p=this.parent,isAnchor=this.eElem.type?false:true;if(isAnchor)
p.processAnchorClick(this);else if(p.bIsShowing)
p.processElemFocus(this);return!isAnchor;}
this.processElemFocus=function(pAnchor)
{this.showFrame(pAnchor);}
this.updateStyles=function()
{with(this)
{var d=oDocument,w=d.win.innerWidth||d.doc.body.clientWidth;if(bIsShowing)
w-=width();if(w<50)
return;if(bIsShowing)
{var h=d.win.innerHeight||d.doc.body.clientHeight;height((h-oHeaderLayer.height()-100)+'px');oLayer.height((h-oHeaderLayer.height()-100)+'px');oLayer.left(w+'px');oHeaderLayer.left(w+'px');if(oLiveHlpLayer)
oLiveHlpLayer.left(w+'px');}
w-=30;oMainLayer.width(w+'px');if(((d.win.innerHeight||d.doc.body.clientHeight)-30)>0)
oMainLayer.height(((d.win.innerHeight||d.doc.body.clientHeight)-30)+'px');}}
this.showFrame=function(pAnchor,pURL)
{with(this)
{if(!bOverflowSet)
setOverflow();if(!eElem)
bind();bIsShowing=true;oCurrentElem=pAnchor;setSource(pURL||pAnchor.sURL);show(true);if(!oHeaderLayer.eElem)
oHeaderLayer.bind();oHeaderLayer.show(true);if(oLiveHlpLayer)
{if(!oLiveHlpLayer.eElem)
oLiveHlpLayer.bind();oLiveHlpLayer.show(true);}
if(!oLayer.eElem)
oLayer.bind();oLayer.show(true);if(!oSrchTxt.eElem)
oSrchTxt.bind();oSrchTxt.show(true);oSrchTxt.focus(true);oSrchBtn.bind();oSrchBtn._registerEvent("onclick","searchOnclick");oSrchBtn.searchOnclick=function()
{setSource(this.parent.oConfig.sSearchUrl+encodeURIComponent(oSrchTxt.value()));return false;}
oSrchTxt.bind();oSrchTxt._registerEvent("onfocus","searchtext");oSrchTxt.searchtext=function()
{oSrchBtn.enable(oSrchTxt.value()!="");}
oSrchTxt._registerEvent("onkeyup","searchtextkeyup");oSrchTxt.searchtextkeyup=function()
{oSrchBtn.enable(oSrchTxt.value()!="");if((typeof(oConfig.bSearchEnabled))!="undefined")
{oDocument.getUIElem("myForm").onsubmit=function()
{oSrchBtn.searchOnclick();return false;}}}
updateStyles();oStateText.setValue("true");}}
this.hideFrame=function()
{with(this)
{bIsShowing=false;oCurrentElem=null;show();oHeaderLayer.show(false);oLayer.show(false);if(oLiveHlpLayer)
oLiveHlpLayer.show(false);updateStyles();oStateText.setValue("false");}}
this.setHelpStat=function(bValue)
{try
{var hlpStat=this.parent.parent._getControl("helpStat");if(typeof(hlpStat)!="undefined")
hlpStat.setText(bValue);}
catch(e){}}
this.init(pBindOnInitialize);}

//8@@m1

function EbaySYI3HelpPopup(pParent,pName,pCfg)
{if(!this.objType)
this.objType="EbaySYI3HelpPopup";var c={};c.iWidth=parseInt(pCfg.iWidth);c.iHeight=parseInt(pCfg.iHeight);c.iLeft=screen.availWidth-c.iWidth;c.iTop=0;c.bToolbar=false;c.bLocation=false;c.bStatus=false;c.bScrollbars=true;c.bResizable=false;c.bMenubar=false;this.base=EbayHTMLPopup;this.base(pParent,pName,c);}

//9@@m11

function EbaySYI3HelpAssistant(pParent,pName,pCfg)
{if(!this.objType)
this.objType="EbaySYI3HelpAssistant";this.base=EbayHelpAssistant;this.base(pParent,pName,pCfg);this.showFrameBase=this.showFrame;this.oPopup=new EbayHTMLPopup(this,"live_help_popup");this.init=function()
{var c=this.oConfig,ac=c.aMainLinkNames;for(var i in ac)
{var e=new EbayHTMLAnchor(this,ac[i]);e.onclick=function()
{this.parent.setHelpStat(true);this.parent.processAnchorClick(this);return false;}}
if(c.sLiveHlpLnk)
{var lnk=new EbayHTMLAnchor(this,c.sLiveHlpLnk);lnk.onclick=function()
{this.parent.oPopup.showEx(this.eElem.href,c.sLiveHlpWidth,c.sLiveHlpHeight,false,false,false,false,false,false);}}}
this.showFrame=function(pAnchor,pURL)
{with(this)
{if((oCurrentElem==null)||((typeof(pAnchor.sURL)!="undefined")&&(oCurrentElem.sURL!=pAnchor.sURL))||((typeof(pURL)!="undefined")&&(oCurrentElem.sURL!=pURL)))
{showFrameBase(pAnchor,pURL);var ol=ebay.oDocument.oPage.oDisplayedOverlay;if(ol)
{ol.iLeftPadding=-(width()/2);ol.setPosition();}}}}
this.hideFrameBase=this.hideFrame;this.hideFrame=function()
{with(this)
{hideFrameBase();parent.sCurrentMoreHelp=parent.sMoreHelpPage=null;var ol=ebay.oDocument.oPage.oDisplayedOverlay;if(ol)
{ol.iLeftPadding=0;ol.setPosition();}}}
this.display=function(pUrl)
{with(this)
{var u=pUrl;if(parent.bForceHelpPane)
{if(bIsShowing)
setSource(u);else
showFrame(null,u);}
else if(bIsShowing)
setSource(u);}}
this.init();}

//10@@m45

function EbaySYI3HelpBubble(pParent,pName,pCfg)
{if(!this.objType)
this.objType="EbaySYI3HelpBubble";this.base=EbayHTMLOverlayContent;this.base(pParent,pCfg.sLayerHTMLName,pCfg);this.oConfig=pCfg;this.sDefaultOverlayHTML="";this.iEventX=this.iEventY=null;this.iLocX=this.iLocY=null;this.sTopRgtHTML=pCfg.sTopTableHTML+pCfg.sTopRgtBtmRow+pCfg.sBtmTableHTML;this.sTopLftHTML=pCfg.sTopTableHTML+pCfg.sTopLftBtmRow+pCfg.sBtmTableHTML;this.bLeftBubble=false;this.setDefaultHTML=function()
{with(this)
{var p=parent,haCtl=p.oHelpAssistant,x=iLocX>0?iLocX:iEventX,w=p.bIsOverlay?x+200:x+280,b=w>(document.body.clientWidth-((haCtl&&haCtl.bIsShowing)?haCtl.width():0));bLeftBubble=b?false:true;sDefaultOverlayHTML=!b?sTopLftHTML:sTopRgtHTML;if(p.bIsOverlay)
width(200+"px");setValue(sDefaultOverlayHTML);}}
this.positionOverlay=function(pLeft,pTop,pNoOffsetHeight)
{with(this)
{var l=pLeft?pLeft:parent.bIsOverlay?iEventX:iLocX,t=pTop?pTop:parent.bIsOverlay?iEventY:iLocY,c=oConfig,p=parent,cl,oh=pNoOffsetHeight?0:height(),hb="-5",wb="20",bTopBubble=(iEventY-oh)>0?true:false;if(bTopBubble)
{cl=!bLeftBubble?c.sTopRightClass:c.sTopLeftClass;sTop=t-oh;}
else
{cl=!bLeftBubble?c.sBottomRightClass:c.sBottomLeftClass;sTop=t-hb;}
setClass(cl);sLeft=l;sLeft-=!bLeftBubble?this.eElem.offsetWidth:0;sTop=!sTop.toString().has("px")?sTop+"px":sTop;sLeft=!sLeft.toString().has("px")?sLeft+"px":sLeft;setPosition();if(c.useIfShim)
{setIframeShim();var ifShimElem=eElem.getElementsByTagName("IFRAME")[0];if(ifShimElem)
{var st=ifShimElem.style;st.height=ifShimElem.offsetHeight-10;if(!bTopBubble)
st.top=10;else
st.top=1;ifShimElem.title=" ";}}}}
this.displayContent=function(pId,pText,pEvent)
{with(this)
{if(!eElem)
bind();if(!eElem)
return;var p=parent,c=oConfig,evts,e,oPos=oUtils.oPositioning,offLoc;var evt=oDocument.win.event||pEvent;var cCfg=ebay.oDocument.getConfig('Selling.Common');c.bOnFocus=cCfg.bOnFocus;c.sStartLyrName=cCfg.sStartLyrName;if(evt)
{iEventX=evt.clientX;iEventY=evt.clientY;}
e=oDocument.getUIElem(pId);offLoc=oPos.getOffsetLeftTop(e);iLocX=offLoc[0];iLocY=offLoc[1];setDefaultHTML();if(!c.bDialog&&p.sMoreHelpPage)
{pText+='<p class="'+c.sBubFooterClass+'">'+c.sMoreHelpHTML+"</p>";}
sContent=pText?sDefaultOverlayHTML.replaceTokens(pText):null;this.bUseIfShim=false;var div1=document.createElement('div');div1.style.position="absolute";div1.style.width="300px";div1.style.height="300px";div1.style.top="0px";div1.style.left="0px";var div2=document.createElement('div');div2.style.position="absolute";div2.style.top="0px";div2.style.left="0px";div2.innerHTML=sContent;div1.appendChild(div2);document.body.appendChild(div1);var tH=div2.offsetHeight+20,tW=div2.offsetWidth;var l=parent.bIsOverlay?iEventX:iLocX,t=parent.bIsOverlay?iEventY:iLocY,c=oConfig,p=parent,cl,oh=tH,hb="-5",wb="20",bTopBubble=(iEventY-tH)>0?true:false;if(bTopBubble){cl=!bLeftBubble?c.sTopRightClass:c.sTopLeftClass;sTop=t-tH;}
else{cl=!bLeftBubble?c.sBottomRightClass:c.sBottomLeftClass;sTop=t-hb;}
sLeft=l;sLeft-=!bLeftBubble?tW:0;sTop=!sTop.toString().has("px")?sTop+"px":sTop;sLeft=!sLeft.toString().has("px")?sLeft+"px":sLeft;document.body.removeChild(div1);display();positionOverlay();bindLinks();}}
this.bindLinks=function()
{with(this)
{var e,c=oConfig;e=new EbayHTMLAnchor(this,c.sCloseBubbleLink);e.subscribeEvents("onblur");e.onblur=function()
{if(this.parent.eElem.firstChild)
this.parent.eElem.firstChild.focus(true);}
e.onclick=function()
{p=this.parent;p.closeBubble();if(p.oSelectedElem)
p.oSelectedElem.focus(true);return false;;}
e=new EbayHTMLAnchor(this,c.sMoreHelpLink);e.onclick=function()
{var p=this.parent;if(p.oSelectedElem)
p.oSelectedElem.focus(true);var hs=p.parent,oHA=hs.oHelpAssistant,l=hs.sMoreHelpPage,oHP=hs.oHelpPopup
if(hs.sCurrentMoreHelp!=l)
{hs.sCurrentMoreHelp=l;if(l.has(":1"))
l=l.replaceTokensEx(":1","_"+p.oConfig.sMetaId);if(!l.has(".html"))
l=hs.oHAConfig.sHelpUrlPrefix+l+".html";if(hs.bHelpInPopup)
{hs.sCurrentMoreHelp=null;oHP.sUrl=l;oHP.show();}
else
{if(oHA.bIsShowing)
oHA.setSource(l);else
{if(c.bPopup)
{oHA.oPopup.sUrl=l;oHA.oPopup.bResizable=true;hs.sCurrentMoreHelp=null;oHA.oPopup.show();}
else
oHA.showFrame(null,l);}}}
p.closeBubble();return false;}
for(var i in controls)
controls[i].bind();}}
this.closeBubble=function()
{for(var i in this.controls)
this.controls[i].cleanupMemory();this.hide();}}

//11@@m4

function EbaySYI3LearnMorePopup(pParent,pName,pCfg)
{if(!this.objType)
this.objType="EbaySYI3LearnMorePopup";this.base=EbayBaseControl;this.base(pParent,pName);var c=pCfg;if(c.aLearnMores)
{var aL=c.aLearnMores,len=aL.length;for(var i=0;i<len;i++)
{var lnks=aL[i],lnk,aDims=[],oA;if(lnks.has(':'))
{var a=lnks.split(':');lnk=a[0];aDims=typeof a[1]=='string'?eval(a[1]):a[1];}
else
lnk=lnks;oA=new EbayHTMLAnchor(this,lnk,false,c);oA.aDims=aDims;oA.onclick=function()
{var c=this.oConfig,oPop=this.parent.controls['help_popup'];oPop.sUrl=this.eElem.href;if(this.aDims.length>0)
{oPop.iWidth=this.aDims[0];oPop.iHeight=this.aDims[1];oPop.iLeft=screen.availWidth-this.aDims[0];}
else
{oPop.iWidth=c.iWidth;oPop.iHeight=c.iHeight;oPop.iLeft=screen.availWidth-c.iWidth;}
oPop.show();return false;}}
new EbaySYI3HelpPopup(this,'help_popup',c);}}

//12@@m8

function EbayUtilsPositioning(pParent,pName)
{if(!this.objType)
this.objType="EbayUtilsPositioning";this.base=EbayObject;this.base(pParent,pName);this.getScrollLeftTop=function()
{var d=this.oDocument.doc,rv=[0,0],db=d.body,de=d.documentElement;if(db)
{rv[0]+=db.scrollLeft;rv[1]+=db.scrollTop;}
if(de)
{rv[0]+=de.scrollLeft;rv[1]+=de.scrollTop;}
return rv;}
this.getClientWidthHeight=function()
{var d=this.oDocument.doc,de=d.documentElement?d.documentElement:d.body;return[de.clientWidth,de.clientHeight];}
this.getOffsetLeftTop=function(pElem)
{var e=pElem,rv=[0,0];while(e)
{rv[0]+=e.offsetLeft;rv[1]+=e.offsetTop;e=e.offsetParent;}
return rv;}
this.getEventLeftTop=function(pEvent)
{var evt=this.parent.parent.oDocument.win.event||pEvent,xOff=(typeof(screenLeft)!="undefined")?screenLeft:screenX,yOff=(typeof(screenTop)!="undefined")?screenTop:(screenY+(outerHeight-innerHeight)-25);return[evt.screenX-xOff,evt.screenY-yOff];}
this.getPageSize=function()
{var x,y,oD=this.parent.parent.oDocument,win=oD.win,doc=oD.doc,bd=doc.body;if(win.innerHeight&&win.scrollMaxY)
{x=bd.scrollWidth;y=win.innerHeight+win.scrollMaxY;}
else if(doc.documentElement)
{x=doc.documentElement.scrollWidth;y=doc.documentElement.scrollHeight;}
else if(bd.scrollHeight>bd.offsetHeight)
{x=bd.scrollWidth;y=bd.scrollHeight;}
else
{x=bd.offsetWidth;y=bd.offsetHeight;}
return[x,y];}}
ebay.oUtils.oPositioning=new EbayUtilsPositioning(ebay.oUtils,"Positioning Functions");

//13@@m24

function EbayHTMLOverlay(pParent,pName,pCfg,pDisabled)
{if(!this.objType)
this.objType="EbayHTMLOverlay";this.base=EbayHTMLLayer;this.base(pParent,pName,pDisabled,pCfg);this.isSupported=ebIsBrowserSupported;if(!this.isSupported())
return;this.sPosStyle=pCfg.posStyle||'absolute';this.sTop=pCfg.top;this.iTopPadding=0;this.iLeftPadding=0;this.sLeft=pCfg.left;this.sWidth=pCfg.width?parseInt(pCfg.width):0;this.sHeight=pCfg.height?parseInt(pCfg.height):0;this.sLayerHTML=pCfg.layerHTML||"";this.sContentDiv=pCfg.contentDiv||"";this.bForceReposition=pCfg.bForceReposition||false;this.bNoSetContent=pCfg.bNoSetContent;this.bClearValueOnClose=typeof(pCfg.bClearValueOnClose)!='undefined'?pCfg.bClearValueOnClose:true;this.bCustomHTML=pCfg.customHTML||false;this.bTransparent=pCfg.transparent||false;this.setPosition=ebHTMLOverlaySetPosition;this.centerTop=ebHTMLOverlayCenterTop;this.centerLeft=ebHTMLOverlayCenterLeft;this.setContent=ebHTMLOverlaySetContent;this.closeOverlay=this.close=ebHTMLOverlayCloseOverlay;this.display=ebHTMLOverlayDisplay;}
function ebHTMLOverlayDisplay(pContent)
{with(this)
{if(!eElem)
bind();if(!bNoSetContent)
setContent(pContent);setPosition();show(true);if(this.oConfig.bOnFocus&&(!(oGlobals.oClient.bIE&&oGlobals.oClient.iVer<7)))
{var sFirstInsElem="sFirstInsElem";var oFirstEle=this.eElem.firstChild;if(oFirstEle.id!=sFirstInsElem)
{var anchorTag=document.createElement('a');anchorTag.href="javascript:void(0);";anchorTag.id=sFirstInsElem;anchorTag.style.outline="0px solid #FFFFFF";anchorTag.style.position="absolute";anchorTag.style.left="-10000em";anchorTag.style.opacity=0;anchorTag.style.width="1px";anchorTag.style.height="1px";var sLyrName=this.oConfig.sStartLyrName;if(sLyrName)
anchorTag.innerHTML="<b class='g-hdn'>"+sLyrName+"</b>";this.eElem.insertBefore(anchorTag,oFirstEle);anchorTag.focus();}
else
oFirstEle.focus(true);}}}
function ebHTMLOverlaySetPosition()
{with(this)
{if(sPosStyle.is('absolute'))
{if(!sTop||bForceReposition)
centerTop();if(!sLeft||bForceReposition)
centerLeft();top(sTop);left(sLeft);}}}
function ebHTMLOverlayCenterTop()
{with(this)
{var oD=oDocument,winHeight=oD.doc.body.clientHeight,cL=oGlobals.oClient;if(!cL.bIE)
winHeight=oD.win.innerHeight;else if(typeof(winHeight)=='undefined'&&cL.iVer>=6)
winHeight=oD.doc.documentElement.clientHeight;var s=oD.doc.body.scrollTop+(winHeight-sHeight)/2;if(document.documentElement)
s+=document.documentElement.scrollTop;sTop=(parseInt(s)+iTopPadding)+'px';return s;}}
function ebHTMLOverlayCenterLeft()
{with(this)
{var winWidth=document.body.clientWidth,cL=oGlobals.oClient;if(!cL.bIE)
winWidth=window.innerWidth;var s=winWidth/2-sWidth/2;sLeft=(parseInt(s)+iLeftPadding)+'px';return s;}}
function ebHTMLOverlaySetContent(pContent)
{with(this)
{if(sContentDiv!='')
{var oL=new EbayHTMLLayer(this,sContentDiv);oL.bind();oL.setValue(pContent);}
else
setValue(pContent);}}
function ebHTMLOverlayCloseOverlay()
{with(this)
{if(bClearValueOnClose)
{var cts=this.controls;if(sContentDiv!=''&&cts[sContentDiv])
{cts[sContentDiv].setValue('&nbsp;');}
else
{setValue('&nbsp;');if(this.oConfig.bOnFocus&&this.oSelectedElem)
{ele=this.controls[this.oSelectedElem.name];if(ele)
ele.focus(true);}}}
show();if(!this.oGlobals.oClient.bFirefox)
cleanupMemory();}}
function ebIsBrowserSupported()
{var cL=this.oGlobals.oClient,bNS4=document.layers;if(bNS4||(cL.bMac&&!cL.bMacppc&&!cL.bMactel))
return false;return true;}

//14@@m11

function EbayHTMLOverlayContent(pParent,pName,pCfg)
{if(!this.objType)
this.objType="EbayHTMLOverlayContent";this.base=EbayHTMLOverlay;this.base(pParent,pName,pCfg);if(!this.isSupported())
return null;this.bUseIfShim=pCfg.useIfShim||false;this.sContent=pCfg.contentHTML;this.sLayerUI=pCfg.layerHTML;this.iBorderWidth=pCfg.iBorderWidth||0;this.hide=this.closeOverlay;this.setIframeShim=ebHTMLOverlayContentSetIframeShim;this.displayBase=this.display;this.display=ebHTMLOverlayContentDisplay;this.closeBase=this.close;this.closeOverlay=this.close=ebHTMLOverlayContentClose;var cl=this.oGlobals.oClient;this.bUseIfShim=(pCfg.useIfShim&&(cl.bIE&&!cl.bMac));this.eIframeShim=null;this.setContentBase=this.setContent;this.setContent=ebHTMLOverlayContentSetContent;}
function ebHTMLOverlayContentDisplay(pContent)
{with(this)
{displayBase(sContent||pContent);if(bUseIfShim)
setIframeShim();}}
function ebHTMLOverlayContentSetIframeShim()
{with(this)
{if(eElem)
{var d=oDocument,isRel=sPosStyle=='relative',e=isRel?e.firstChild:eElem;var w=width(),h=height(),f=eIframeShim=d.createElement('IFRAME'),bw=iBorderWidth;with(f.style)
{position='absolute';top=isRel?'20px':(0-bw)+'px';left=isRel?'20px':(0-bw)+'px';zIndex='-1';width=(w+bw)+'px';height=(h+bw)+'px';}
f.frameBorder='0';f.title=' ';f.src=oGlobals.oEnvironment.sPicsDir+'s.gif';e.appendChild(f);}}}
function ebHTMLOverlayContentSetContent(pContent)
{this.sContent=pContent;this.setContentBase(pContent);}
function ebHTMLOverlayContentClose()
{with(this)
{if(bUseIfShim&&eIframeShim&&eElem)
eElem.removeChild(eIframeShim);closeBase();}}

//15@@m51

function EbaySYIHelpSystem(pParent,pName,pOverlay)
{if(!this.objType)
this.objType="EbaySYIHelpSystem";this.base=EbayBaseControl;this.base(pParent,pName);this.aElemsData=[];this.iBUBBLE_HELP=1;this.iHELP_ASSISTANT=2;this.sMoreHelpPage=this.sCustomizeForm=this.sCurrentMoreHelp=null;this.oReq=null;this.bIsOverlay=pOverlay?pOverlay:false;this.bForceHelpPane=false;this.bWaitForAjaxCall=false;this.bHelpInPopup=false;this.sHelpUrlPrefix=null;this.oHelpAssistant=this.oBubbleHelp=this.oHelpPopup=this.oBubbleConfig=this.oHAConfig=null;this.bShowCustomizeForm=true;with(this)
{_registerListener(oDocument._getEvent("unload"),EVENT_AFTER,"onBeforeUnload");_registerListener(oDocument._getEvent("load"),EVENT_AFTER,"onAfterLoad");}
this.init=function()
{var ed=pParent.parent,haCfg=ed.getConfig("Selling.HelpAssistant");var bhCfg=ed.getConfig("Selling.BubbleHelp"),ac=ed.aConfigs,en=[],n,a;this.oBubbleConfig=bhCfg;this.oHAConfig=haCfg;this.sHelpUrlPrefix=haCfg.sHelpUrlPrefix;if(bhCfg)
{if(typeof(bhCfg.bHelpInPopup)!='undefined')
this.bHelpInPopup=bhCfg.bHelpInPopup;if(typeof(bhCfg.bShowCustomizeForm)!="undefined")
this.bShowCustomizeForm=bhCfg.bShowCustomizeForm;if(!this.bIsOverlay)
{if(!this.bHelpInPopup)
this.oHelpAssistant=new EbaySYI3HelpAssistant(this,"help assistant",haCfg);else
this.oHelpPopup=new EbaySYI3HelpPopup(this,'help_popup',bhCfg);}
this.oBubbleHelp=new EbaySYI3HelpBubble(this,"bubble help",bhCfg);}}
this.getHTMLElem=ebHTMLGetElem;this.onAfterLoad=function()
{if(!this.oBubbleHelp)
return;if(this.oBubbleHelp.oConfig.sBlock=="SellHub")
this.setSellHubBubble();else
{var cp=this.oUtils.controlPath(this);setTimeout(cp+".getHelpData()",1000);}}
this.onBeforeUnload=function()
{var an=this.aElemsData;for(var i in an)
{an[i]=null;var e=document.getElementById(i);if(e)
{e.onclick=null;e.onfocus=null;}}
this.aElemsData=null;var ctl=this.controls;for(var i in ctl)
{ctl[i].eElem=null;ctl[i]=null;}
if(ebay.oServer)
{var aR=ebay.oServer.aRequests;for(var i in aR)
aR[i]=null;ebay.oServer.lastRequest=null;g_oXmlHttp=null;}}
this.getHelpData=function()
{var c=this.oBubbleHelp.oConfig,oHead=document.getElementsByTagName("head")[0],oScript=this.oDocument.createElement("script");this.parent.oHelpDataListner=this;oScript.setAttribute("type","text/javascript");oScript.setAttribute("src",c.sBubbleHelpJSUrl);oScript.setAttribute("id","bh_tag");oHead.appendChild(oScript);}
this.processDataResponse=function()
{with(this)
{var p=parent,aBD=p.aBubbleData,oD,bc=this.oBubbleHelp.oConfig,block=bc.sBlock;if(!block)
block=bc.sPage;oD=aBD[block];for(var i in oD)
{var d=oD[i];aElemsData[i]={"bt":d["bt"],"hp":d["hp"],"cf":d["cf"],"gh":d["gh"]};createHelpLinks(i);}
p.aBubbleData=[];p.oHelpDataListner=null;}}
this.createHelpLinks=function(pId)
{var e=this.oDocument.getUIElem(pId);if(e)
{var ed=this.aElemsData[pId];if(ed)
{var bt=ed["bt"],hp=ed["hp"],gh=ed["gh"];if(bt)
{e.onclick=this.loadHelpBubble;if(!this.bIsOverlay&&!this.bHelpInPopup)
this.createHelpAssistant(pId,hp);}
else if(gh&&!this.bIsOverlay)
this.createGetHelpLink(pId,gh);else if(hp&&!this.bIsOverlay&&!this.bHelpInPopup)
this.createHelpAssistantLinks(e);}}}
this.createHelpAssistant=function(pId,pHP)
{var e=pId.substr(0,pId.indexOf('_'));var eElem=this.oDocument.getUIElem(e);if(eElem)
{this.aElemsData[e]={"bt":"","hp":pHP,"cf":""};if(pHP!="")
this.createHelpAssistantLinks(eElem);}}
this.createHelpAssistantLinks=function(pElem)
{var e=pElem,et=e.type;if(e.id!="addfescatlink"&&(e.tagName.toUpperCase()=="A"||e.tagName.toUpperCase()=='DIV'||et=="hidden"))
return;var type=et?'focus':'click';if(e.addEventListener)
e.addEventListener(type,this.loadHelpAssistant,false);else if(e.attachEvent)
e.attachEvent('on'+type,this.loadHelpAssistant);}
this.createGetHelpLink=function(pId,pGH)
{var e=this.oDocument.getUIElem(pId);if(e)
{this.aElemsData[pId]={"bt":"","hp":pGH,"cf":""};e.onclick=function()
{var hs=ebay.oDocument.oPage.controls["help system"];hs.bForceHelpPane=true;hs.loadHelpAssistant(this.id);hs.bForceHelpPane=false;return false;}}}
this.setSellHubBubble=function()
{var i,sBT,len=this.oBubbleHelp.oConfig.sElemIdBubbleText.length;for(i=0;i<len;i++)
{sBT=this.oBubbleHelp.oConfig.sElemIdBubbleText[i];var a=[];if(sBT)
{a=sBT.split(':');var id=a[0],bt=a[1];this.aElemsData[id]={"bt":bt,"hp":null,"cf":null};var e=this.oDocument.getUIElem(id);if(e)
e.onclick=this.loadHelpBubble;}}}
this.loadHelpBubble=function(pEvent)
{var id=this.id,p=ebay.oDocument.oPage,hs=p._getControl("help system");if(typeof(hs.aElemsData[id])!="undefined")
{with(hs)
{var e=aElemsData[id],elem=oDocument.getUIElem(id);sMoreHelpPage=e["hp"]?e["hp"]:(typeof e["hp"]=="undefined"||e["hp"]=="")?elem.href.has("http://")&&!elem.href.has("http://cgi")&!elem.href.has("http://ext-syi")?elem.href:null:null;sCustomizeForm=bShowCustomizeForm?(e["cf"]?e["cf"]:null):null;oBubbleHelp.oSelectedElem=this;if(e["bt"])
oBubbleHelp.displayContent(id,e["bt"],pEvent);}}
return false;}
this.loadHelpAssistant=function(pId)
{var id=this.id?this.id:typeof pId=="object"&&pId.srcElement?pId.srcElement.id:pId,hs=ebay.oDocument.oPage._getControl("help system"),oHP=hs.oHelpPopup;if(typeof(hs.aElemsData[id])!="undefined")
{with(hs)
{var p=aElemsData[id]["hp"],oHA=oHelpAssistant;if(p==sMoreHelpPage)
return false;sMoreHelpPage=p;if(p.has(":1"))
p=p.replaceTokensEx(":1","_"+oBubbleHelp.oConfig.sMetaId);var l=sHelpUrlPrefix+p+".html";if(hs.bHelpInPopup)
{sMoreHelpPage=null;oHP.sUrl=l;oHP.show();}
else
oHA.display(l);}}
return false;}
this.init();}

//16@@m6

function EbayHTMLButton(pParent,pElemName,pDisabled,pCfg)
{if(!this.objType)
this.objType="EbayHTMLButton";this.base=EbayHTMLFormElem;this.base(pParent,pElemName,pDisabled,pCfg);this.getValue=ebHTMLButtonGetValue;this.setValue=ebHTMLButtonSetValue;this.enableBase=this.enable
this.enable=ebHTMLButtonEnable;this.subscribeEvents("onclick");}
function ebHTMLButtonGetValue()
{return this.eElem.value;}
function ebHTMLButtonSetValue(pValue)
{var e=this.eElem;if(e)
e.value=pValue;}
function ebHTMLButtonEnable(pEnable,pYukonize)
{if(typeof(pYukonize)!=='undefined'&&pYukonize)
{var e=this.eElem;e.style.opacity=!pEnable?".5":"";e.style.filter=!pEnable?"alpha(opacity=50)":"";this.bBtnDisabled=!pEnable;}
else
this.enableBase(pEnable);}

//17@@m16

function EbayHTMLBaseCheckboxRadio(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="EbayHTMLBaseCheckboxRadio";this.base=EbayHTMLFormElem;this.base(pParent,pName,pDisabled,pCfg);this.bGroup=false;this.bindHTML=ebHTMLBaseCheckboxRadioBindHTML;this.bindEvents=ebHTMLBaseCheckboxRadioBindEvents;this.check=ebHTMLBaseCheckboxRadioCheck;this.selectByIndex=ebHTMLBaseCheckboxRadioSelectByIndex;this.selectByValue=ebHTMLBaseCheckboxRadioSelectByValue;this.isCheckedByValue=ebHTMLBaseCheckboxRadioIsCheckedByValue;this.getValueByIndex=ebHTMLBaseCheckboxRadioGetValueByIndex;this.getIndexByValue=ebHTMLBaseCheckboxRadioGetIndexByValue;this.getValue=null;this.enableBase=this.enable;this.enable=ebHTMLBaseCheckboxRadioEnable;this.setValue=this.selectByValue;this.onBeforeCheck=null;this.onAfterCheck=null;this.subscribeEvents("onclick");}
function ebHTMLBaseCheckboxRadioBindHTML()
{with(this)
{eElem=getElem(sElemName);if(eElem)
{if(eElem.length)
{bGroup=true;var len=eElem.length;for(var i=0;i<len;i++)
assignJSObject(eElem[i]);cleanupMemory=ebHTMLBaseCheckboxRadioCleanupMemory;}
else
{bGroup=false;assignJSObject(eElem);}}
if(bDisabled)
enable(false);}}
function ebHTMLBaseCheckboxRadioCleanupMemory()
{var e=this.eElem;if(e)
{var len=e.length;for(var j=0;j<len;j++)
{for(var i in e[j].jsObjs)
{e[j].jsObjs[i]=null;}
e[j].jsObjs=null;}
this.eElem=null;}}
function ebHTMLBaseCheckboxRadioBindEvents()
{with(this)
{if(!eElem)
return;var e=aBindEvents,len=e.length,fStr;for(var i in e)
{var len2=eElem.length;if(len2&&len2>0)
{for(var ii=0;ii<len2;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 ebHTMLBaseCheckboxRadioCheck(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 ebHTMLBaseCheckboxRadioSelectByIndex(pIdx,pCheck)
{var chx=typeof pCheck!='undefined'?pCheck:true;with(this)
{if(onBeforeCheck)
onBeforeCheck();var e=bGroup?eElem[pIdx]:eElem;if(e)
{e.checked=chx;if(onAfterCheck)
onAfterCheck();}}}
function ebHTMLBaseCheckboxRadioSelectByValue(pVal,pCheck)
{var chx=typeof pCheck!='undefined'?pCheck:true;with(this)
{if(onBeforeCheck)
onBeforeCheck();var e=eElem;if(!e)
return;if(bGroup)
{var len=e.length;for(var i=0;i<len;i++)
{if(e[i].value==pVal)
{e[i].checked=chx;if(onAfterCheck)
onAfterCheck();}}}
else
{if(e.value==pVal)
{e.checked=chx;if(onAfterCheck)
onAfterCheck();}}}}
function ebHTMLBaseCheckboxRadioIsCheckedByValue(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 ebHTMLBaseCheckboxRadioGetValueByIndex(pIndex)
{with(this)
{var e=eElem;if(e&&bGroup)
return e[pIndex].value;return null;}}
function ebHTMLBaseCheckboxRadioGetIndexByValue(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 ebHTMLBaseCheckboxRadioEnable(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;}}}}}

//18@@m8

function EbayHTMLCheckbox(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="EbayHTMLCheckbox";this.base=EbayHTMLBaseCheckboxRadio;this.base(pParent,pName,pDisabled,pCfg);this.getElem=ebHTMLCheckboxGetElem;this.isChecked=ebHTMLCheckboxIsChecked;this.getValue=ebHTMLCheckboxGetValue;this.setValue=this.selectByValue;}
function ebHTMLCheckboxGetElem(pName)
{return this.oDocument.getFormElem(pName,"checkbox");}
function ebHTMLCheckboxIsChecked(pIndex)
{with(this)
{if(eElem)
{if(bGroup&&eElem[pIndex])
return eElem[pIndex].checked;else if(!bGroup)
return eElem.checked;}}
return false;}
function ebHTMLCheckboxGetValue(pUnCheckedValue)
{var e=this.eElem,rv="";if(this.bGroup)
{rv=[];var len=e.length;for(var i=0;i<len;i++)
{if(e[i].checked)
rv[rv.length]=e[i].value;}
if(!rv.length)rv="";}
else
{if(pUnCheckedValue)
return e.value;if(e.checked)
return e.value;}
return rv;}

//19@@m7

function EbayHTMLForm(pParent,pName,pCfg)
{if(!this.objType)
this.objType="EbayHTMLForm";this.base=EbayHTML;this.base(pParent,pName,pName,false,pCfg);this.getElem=function(){return this.getDocElem(arguments[0],'forms');};this.enable=function(){};this.getElementValue=ebHTMLFormGetElementValue;this.setElementValue=ebHTMLFormSetElementValue;this.getElements=ebHTMLFormGetElements;this.getElement=ebHTMLFormGetElement;this.setAction=ebHTMLFormSetAction;this.getAction=ebHTMLFormGetAction;this.setTarget=ebHTMLFormSetTarget;this.getTarget=ebHTMLFormGetTarget;this.submit=ebHTMLFormSubmit;this.clear=ebHTMLFormClear;this.subscribeEvents("onsubmit");this.onBeforeSubmit=null;this.onAfterSubmit=null;}
function ebHTMLFormGetElements()
{var e=this.eElem;return e?e.elements:new Array;}
function ebHTMLFormGetElement(pName)
{var elems=this.getElements();return elems[pName]?elems[pName]:null;}
function ebHTMLFormGetElementValue(pName)
{var elems=this.getElements();if(elems[pName]&&elems[pName].value)
return elems[pName].value;return"";}
function ebHTMLFormSetElementValue(pName,pValue)
{var elems=this.getElements(),elem=elems[pName];if(elem)
{if(elem.length)
{for(var i=0,len=elem.length;i<len;i++)
elem[i].value=pValue;}
else
elem.value=pValue;}}
function ebHTMLFormSetAction(pAction)
{var e=this.eElem;if(e)
e.action=pAction;}
function ebHTMLFormGetAction()
{var e=this.eElem;if(e)
return e.action;}
function ebHTMLFormSetTarget(pTarget)
{var e=this.eElem;if(e)
e.target=pTarget;}
function ebHTMLFormGetTarget()
{var e=this.eElem;if(e)
return e.target;}
function ebHTMLFormSubmit()
{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 ebHTMLFormClear()
{var elems=this.getElements(),len=elems.length;for(i=0;i<len;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;}}}

//20@@m8

function EbayHTMLRadio(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="EbayHTMLRadio";this.base=EbayHTMLBaseCheckboxRadio;this.base(pParent,pName,pDisabled,pCfg);this.getElem=ebHTMLRadioGetElem;this.getValue=ebHTMLRadioGetValue;this.getSelectedIndex=ebHTMLRadioGetSelectedIndex;}
function ebHTMLRadioGetElem(pName)
{return this.oDocument.getFormElem(pName,"radio");}
function ebHTMLRadioGetValue()
{var e=this.eElem;if(!e){return"";}
if(this.bGroup)
{var len=e.length;for(var i=0;i<len;i++)
{if(e[i].checked)
return e[i].value;}}
else
{if(e.checked)
return e.value;}
return"";}
function ebHTMLRadioGetSelectedIndex()
{var e=this.eElem;if(!this.bGroup)
return 0;else
{var len=e.length;for(var i=0;i<len;i++)
{if(e[i].checked)
return i;}}
return-1;}

//21@@m24

function EbayHTMLSelect(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="EbayHTMLSelect";this.base=EbayHTMLFormElem;this.base(pParent,pName,pDisabled,pCfg);this.iSelIndex=-1;this.createOption=ebHTMLSelectCreateOption;this.clearOptions=ebHTMLSelectClearOptions;this.getValueByIndex=ebHTMLSelectGetValueByIndex;this.getSelectedIndex=ebHTMLSelectGetSelectedIndex;this.getSelectedValue=ebHTMLSelectGetSelectedValue;this.getSelectedText=ebHTMLSelectGetSelectedText;this.getOptionsLength=ebHTMLSelectGetOptionsLength;this.setOption=ebHTMLSelectSetOption;this.insertOption=ebHTMLSelectInsertOption;this.deleteOption=ebHTMLSelectDeleteOption;this.selectByIndex=ebHTMLSelectSelectByIndex;this.selectByValue=ebHTMLSelectSelectByValue;this.selectByText=ebHTMLSelectSelectByText;this.doSelect=ebHTMLSelectDoSelect;this.getIndexByValue=ebHTMLSelectGetIndexByValue;this.getValue=this.getSelectedValue;this.setValue=this.selectByValue;this.subscribeEvents("onchange");}
function ebHTMLSelectClearOptions()
{var e=this.eElem;if(e)
{var opts=e.options;while(opts.length>0)
opts[opts.length-1]=null;}}
function ebHTMLSelectCreateOption(pName,pText,pClass,pDisabled)
{if(this.eElem)
{var nOpt=new Option(pText,pName,false,false),opts,lo,oC=ebay.oGlobals.oClient;if(typeof(pClass)!="undefined")
nOpt.className=pClass;if(typeof(pDisabled)!="undefined")
nOpt.disabled=pDisabled;opts=this.eElem.options;opts[opts.length]=nOpt;idx=opts.length-1;return idx;}}
function ebHTMLSelectGetValueByIndex(pIdx,pTextOnly)
{if(pIdx>-1)
{opt=this.eElem.options[pIdx];if(opt)
return pTextOnly?opt.text:opt.value;}
this.throwError("Invalid index","get");return"";}
function ebHTMLSelectGetSelectedIndex()
{return this.eElem.selectedIndex;}
function ebHTMLSelectGetSelectedValue()
{return this.getValueByIndex(this.eElem.selectedIndex);}
function ebHTMLSelectGetSelectedText()
{return this.getValueByIndex(this.eElem.selectedIndex,true);}
function ebHTMLSelectGetOptionsLength()
{return this.eElem.options.length;}
function ebHTMLSelectSelectByIndex(pIndex)
{this.eElem.selectedIndex=this.iSelIndex=pIndex;}
function ebHTMLSelectDoSelect(pVal,pIsText)
{if(this.eElem)
{var e=this.eElem,o,rv=false,opts=e.options,len=opts.length;for(var i=0;i<len&&!rv;i++)
{o=opts[i];if(((pIsText||(o.value==""))&&(pVal==o.text))||(!pIsText&&(o.value==pVal)))
{e.selectedIndex=this.iSelIndex=i;rv=true;}}}
else
this.throwWarning("HTML element '"+this.name+"' not found","selectByValue");return rv;}
function ebHTMLSelectSelectByValue(pVal)
{return this.doSelect(pVal);}
function ebHTMLSelectSelectByText(pVal)
{return this.doSelect(pVal,true);}
function ebHTMLSelectSetOption(pVal,pText,pInd,pClass,pDisabled)
{if(this.eElem)
{if((pInd!=null)&&(pInd>-1))
{var o=this.eElem.options[pInd];o.value=pVal;o.text=pText;}
else
this.createOption(pVal,pText,pClass,pDisabled);}
else
this.throwWarning("HTML element '"+this.name+"' not found","selectByValue");}
function ebHTMLSelectInsertOption(pVal,pText,pInd)
{with(this)
{var e=eElem,opts=e.options,len=opts.length;var inOpt=new Array(pText,pVal),tmpOpt=new Array(2);var sel=getSelectedValue();len++;if(pInd>=len)
return;for(i=pInd;i<len;i++)
{if(i<len-1)
tmpOpt=[e.options[i].text,e.options[i].value];opts[i]=new Option(inOpt[0],inOpt[1]);inOpt=tmpOpt;}
selectByValue(sel);}}
function ebHTMLSelectDeleteOption(pInd)
{if(typeof(pInd)!='undefined')
{var opts=this.eElem.options;if(opts[pInd])
opts[pInd]=null;}}
function ebHTMLSelectGetIndexByValue(pVal,pIsText)
{var opts=this.eElem.options,len=opts.length,i=0;for(;i<len;i++)
{o=opts[i];if((o.value==pVal)||(pIsText&&(o.text==pVal)))
return i;}
return-1;}

//22@@m1

function EbayHTMLSelectMulti(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="EbayHTMLSelectMulti";this.base=EbayHTMLSelect;this.base(pParent,pName,pDisabled,pCfg);this.getSelectedIndices=ebHTMLSelectMultiGetSelectedIndices;this.getSelectedValues=ebHTMLSelectMutliGetSelectedValues;this.getSelectedValuesAndText=ebHTMLSelectMultiGetSelectedValuesAndText;this.getAllValuesAndText=ebHTMLSelectMultiGetAllValuesAndText;this.clearSelections=ebHTMLSelectMultiClearSelections;}
function ebHTMLSelectMultiGetSelectedIndices(pVals,pValsAndText,pAll)
{var e=this.eElem,rv=[];if(e)
{var opts=e.options,len=opts.length,o,v;for(var i=0;i<len;i++)
{o=opts[i];if(o.selected||pAll)
{v=i;if(pValsAndText)
v=[o.value,o.text];else if(pVals)
v=o.value;rv[rv.length]=v;}}}
return rv;}
function ebHTMLSelectMutliGetSelectedValues()
{return this.getSelectedIndices(true);}
function ebHTMLSelectMultiGetSelectedValuesAndText()
{return this.getSelectedIndices(false,true);}
function ebHTMLSelectMultiGetAllValuesAndText()
{return this.getSelectedIndices(false,true,true);}
function ebHTMLSelectMultiClearSelections()
{var e=this.eElem;if(e)
{var opts=e.options,len=opts.length;for(var i=0;i<len;i++)
opts[i].selected=false;}}

//23@@m8

function EbaySYI3Grayout(pParent,pName)
{if(!this.objType)
this.objType="EbaySYI3Grayout";this.base=EbayBaseControl;this.base(pParent,pName);this.oLayer=new EbayHTMLLayer(this,'lyrGrayout_sec');this.aSelElems=this.oDocument.doc.getElementsByTagName('SELECT');this.aExcludeSelElems=[];this.bDisableSelElems=true;this.display=function(pWidth,pHeight,pPosArray)
{var oL=this.oLayer,pos=pPosArray;if(!oL.eElem)
oL.bind();oL.width(pWidth+'px');oL.height(pHeight+'px');oL.show(true);oL.left((pos?pos[0]:0)+'px');oL.top((pos?pos[1]:0)+'px');oL.setValue("");if(this.bDisableSelElems)
this.disableSelElems(true);}
this.hide=function()
{var oL=this.oLayer;oL.show(false);if(this.bDisableSelElems)
this.disableSelElems(false);}
this.disableSelElems=function(pDisable)
{if(pDisable)
this.aExcludeSelElems=[];var aS=this.aSelElems,l=aS.length;for(var i=0;i<l;i++)
{if(pDisable&&aS[i].disabled)
this.aExcludeSelElems[this.aExcludeSelElems.length]=aS[i].name;if(!pDisable&&this.oUtils.isInArray(this.aExcludeSelElems,aS[i].name))
continue;aS[i].disabled=pDisable;}}}

//24@@m4

function EbayUtilsArray(pParent,pName)
{if(!this.objType)
this.objType="EbayUtilsArray";this.base=EbayObject;this.base(pParent,pName);this.copyArray=function(pSrcArr)
{var ra=[];for(var i in pSrcArr)
ra[i]=pSrcArr[i];return ra;}
this.getArrayIndex=function(pSrcArr,pValue)
{var ri=-1,a=pSrcArr,l=a.length;for(i=0;i<l;i++)
{if(a[i]==pValue)
{ri=i;break;}}
return ri;}
this.removeFromArray=function(pSrcArr,pIndex,pValue)
{var ra=[];for(var i in pSrcArr)
{if(pValue!=null)
{if(pSrcArr[i]!=pValue)
ra[i]=pSrcArr[i];}
else if(i!=pIndex)
ra[i]=pSrcArr[i];}
return ra;}
this.insertIntoArray=function(pSrcArr,pIndex,pValue)
{var ra=pSrcArr.splice(pIndex,0,pValue);return ra;}
this.shift=function(pSrcArr,pIndex)
{if(!pIndex)
return pSrcArr.shift()
else
{var i=0,len=pSrcArr.length,ra=[];for(i;i<len;i++)
{if(i!=pIndex)
ra[ra.length]=pSrcArr[i];}
return ra;}}}
ebay.oUtils.oArray=new EbayUtilsArray(ebay.oUtils,"Array Functions");

//25@@m2

function EbayBizObject(pName)
{if(!this.objType)
this.objType="EbayBizObject";this.name=pName;this.createError=ebObjectCreateErrorWrapper;this.throwDebug=ebObjectThrowDebugWrapper;this.throwWarning=ebObjectThrowWarningWrapper;this.throwError=ebObjectThrowErrorWrapper;}

//26@@m6

function EbayServer()
{if(!this.objType)
this.objType="EbayServer";this.base=EbayBizObject;this.base("biz_server");this.aRequests=new Array;this.lastRequest=null;this.bReqInprogress=false;this.createRequest=ebServerCreateRequest;this.requestAll=ebServerRequestAll;this.getResponse=ebServerGetResponse;this.oXmlHTTP=null;this.oDataReciever=null;}
if(typeof(ebay)!="undefined")
ebay.oServer=new EbayServer();function ebServerCreateRequest(pName,pUrl,pIsGet)
{this.aRequests[pName]=new EbayServerRequest(pName,this,pUrl,pIsGet);this.lastRequest=this.aRequests[pName];return this.aRequests[pName];}
function ebServerRequestAll()
{}
function ebServerGetResponse(pReqName,pUseCache)
{}
function EbayServerRequest(pName,pParent,pUrl,pIsGet)
{if(!this.objType)
this.objType="EbayServerRequest";this.base=EbayBizObject;this.base(pName);this.parent=pParent;this.sUrl=pUrl;this.sMethod=(pIsGet)?"GET":"POST";this.sPostData="";this.bAsync=true;this.aDataListeners=new Array;this.oResponse=null;this.oResponseXml=null;this.bResponseReady=false;this.iResponseType=0;this.send=ebServerRequestSend;this.registerAsDataListener=ebServerRequestRegisterAsDataListener;this.requestProcess=ebServerRequestProcess;this.RESPONSE_JS=0;this.RESPONSE_HTML=1;this.RESPONSE_TEXT=2;this.RESPONSE_JSON=3;}
function ebServerRequestRegisterAsDataListener(pObj)
{this.aDataListeners[this.aDataListeners.length]=pObj;}
var g_oXmlHttp;function ebServerRequestSend()
{this.parent.bReqInprogress=true;if(typeof(window.XMLHttpRequest)!="undefined")
{g_oXmlHttp=new XMLHttpRequest();}
else if(typeof(ActiveXObject)!="undefined")
{var lib="Microsoft.XMLHTTP";g_oXmlHttp=new ActiveXObject(lib);}
else
{this.throwError("XML HTTP not supported","createRequest");return;}
g_oXmlHttp.open(this.sMethod,this.sUrl,this.bAsync);if(this.sMethod=='POST')
g_oXmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var req=this;g_oXmlHttp.onreadystatechange=function()
{req.requestProcess(g_oXmlHttp);}
g_oXmlHttp.send(this.sPostData);}
function ebServerRequestProcess(pHTTP)
{if(pHTTP.readyState==4)
{var st=pHTTP.status;if(st==200)
{this.bResponseReady=true;this.oResponseXml=pHTTP.responseXML;var oRe=this.oResponse=new EbayServerResponse(this.name,this);oRe.sResponseText=""+pHTTP.responseText;oRe.sHeaderText=""+pHTTP.getAllResponseHeaders();oRe.process();oRe.notifyAll();}
else
{var msg="Error: "+pHTTP.statusText;if(st==404)
msg="Invalid URL: '"+this.sUrl+"' [System Error: "+pHTTP.statusText+"]";this.error=msg;this.throwError(msg,"requestProcess");}
pHTTP=null;this.parent.oXmlHTTP=null;this.parent.bReqInprogress=false;}}
function EbayServerResponse(pName,pParent)
{if(!this.objType)
this.objType="EbayServerResponse";this.base=EbayBizObject;this.base(pName);this.parent=pParent;this.sResponseText="";this.sHeaderText="";this.oData=null;this.oJSON=null
this.process=ebServerResponseProcess;this.notifyAll=ebServerResponseNotifyAll;}
function ebServerResponseProcess()
{var s=this.sResponseText,p=this.parent;if(s.length>0)
{if(s.hasAny("<html","<body","<script","<?xml "))
p.iResponseType=p.RESPONSE_HTML;if(p.iResponseType==p.RESPONSE_JS)
{eval(s);this.oData=ebay.oServer.oDataReciever;}
if(p.iResponseType==p.RESPONSE_JSON)
{try
{this.oJSON=eval('('+s+')');}
catch(e)
{}}
p.bResponseReady=true;}
else
this.throwWarning("Empty response","process")}
function ebServerResponseNotifyAll()
{var oLrs=this.parent.aDataListeners,len=oLrs.length;for(var i=0;i<len;i++)
{if(oLrs[i].processDataResponse)
oLrs[i].processDataResponse(this);}}

//27@@m4

function EbayDataNode(pParent,pName)
{if(!this.objType)
this.objType="EbayDataNode";this.name=pName;this.parent=pParent||this;this.aAttribs=new Array;this.aChildNodes=new Array;this.addLeaves=ebDataNodeAddLeaves;this.addChild=ebDataNodeAddChild;this.addAttrib=ebDataNodeAddAttrib;this.getNode=ebDataNodeGetNode;this.getNodeByPath=ebDataNodeGetNodeByPath;this._adL=this.addLeaves;this._adC=this.addChild;this._adA=this.addAttrib;if(pParent!=null)
this.parent.addChild(this);}
window.__ENd=EbayDataNode;function ebDataNodeAddChild(pNode)
{if(pNode)
this.aChildNodes[this.aChildNodes.length]=pNode;}
function ebDataNodeAddAttrib(pKey,pValue)
{this.aAttribs[pKey]=pValue;}
function ebDataNodeAddLeaves()
{var args=arguments,s="",len=args.length;for(var i=0;i<len;i++)
{s+="this."+args[i][0]+" = decodeURIComponent(\""+encodeURIComponent(args[i][1])+"\");";}
if(s.length>0)
eval(s);}
function ebDataNodeGetNode(pName,pKey,pVal)
{if(this.name==pName&&this.aAttribs[pKey]==pVal)
return this;var cns=this.aChildNodes,len=cns.length;for(var i=0;i<len;i++)
{if(cns[i].name==pName&&cns[i].aAttribs[pKey]==pVal)
return cns[i];}
for(var i=0;i<len;i++)
{var tmp=cns[i].getNode(pName,pKey,pVal);if(tmp)
return tmp;}
return null;}
function ebDataNodeGetNodeByPath(pPath)
{var delim="/";var aA=pPath.split(delim);var cns=this.aChildNodes;var res,len=aA.length;for(var i=0;i<len;i++)
{res=null;var len2=cns.length;for(var ii=0;ii<len2;ii++)
{if(cns[ii].name==aA[i])
{res=cns[ii];cns=cns[ii].aChildNodes;break;}}}
return res;}

//28@@m2

function EbayXmlHelper(pParent,pName)
{if(!this.objType)
this.objType="EbayXmlHelper";this.getValue=function(pXml,pXPath)
{var aX=pXPath.split('/');var nd=this.getNodeByXpath(pXml,pXPath),rv;rv=nd?this.getNodeValue(nd):'';return rv;}
this.getNode=function(pXml,pName,pIndex)
{var nodes=pXml.getElementsByTagName(pName);if(nodes)
{if(pIndex>=0)
{if(nodes.length>=pIndex)
return nodes[pIndex];}
else
{if(nodes[0])
return nodes[0];}}
return null;}
this.getNodes=function(pXml,pName)
{return pXml.getElementsByTagName(pName);}
this.getNodeByXpath=function(pXml,pXPath)
{var aX=pXPath.split('/');var nd=null,idx,nm='',len=aX.length;for(var i=0;i<len;i++)
{idx=0;nm=aX[i];if(nm.indexOf(']')==nm.length-1)
{idx=nm.substr(nm.indexOf('[')+1,nm.indexOf(']')-nm.indexOf('[')-1);nm=nm.substr(0,nm.indexOf('['));}
nd=this.getNode((nd==null)?pXml:nd,nm,parseInt(idx));if(nd==null)
break;}
return nd;}
this.getNodeValue=function(pNode)
{var rv,pn=pNode;if(pn.childNodes.length>1)
rv=pn.childNodes[1].nodeValue;else
rv=pn.firstChild?pn.firstChild.nodeValue:null;return rv;}
this.getAttribValue=function(pXml,pXPath,pId)
{var nd=this.getNodeByXpath(pXml,pXPath);if(nd)
{var aA=nd.attributes,len=aA.length;for(var i=0;i<len;i++)
{if(aA[i].name==pId)
return aA[i].value;}}
return"";}}
ebay.oUtils.oXmlHelper=new EbayXmlHelper(ebay.oUtils,'XmlHelper');

//29@@m12

function EbayHTMLPopup(pParent,pName,pCfg)
{if(!this.objType)
this.objType="EbayHTMLPopup";this.base=EbayBaseControl;this.base(pParent,pName);this.oConfig=pCfg||null;if(!pCfg)
{this.sUrl="";this.iWidth=this.iHeight=this.iLeft=this.iTop=null;this.bToolbar=this.bLocation=this.bStatus=this.bScrollbars=this.bResizable=this.bMenubar=true;}
else
{var u="undefined";this.sUrl=typeof(pCfg.sUrl)!=u?pCfg.sUrl:"";this.iWidth=typeof(pCfg.iWidth)!=u?pCfg.iWidth:null;this.iHeight=typeof(pCfg.iHeight)!=u?pCfg.iHeight:null;this.iLeft=typeof(pCfg.iLeft)!=u?pCfg.iLeft:null;this.iTop=typeof(pCfg.iTop)!=u?pCfg.iTop:null;this.bToolbar=typeof(pCfg.bToolbar)!=u?pCfg.bToolbar:true;this.bLocation=typeof(pCfg.bLocation)!=u?pCfg.bLocation:true;this.bStatus=typeof(pCfg.bStatus)!=u?pCfg.bStatus:true;this.bScrollbars=typeof(pCfg.bScrollbars)!=u?pCfg.bScrollbars:true;this.bResizable=typeof(pCfg.bResizable)!=u?pCfg.bResizable:true;this.bMenubar=typeof(pCfg.bMenubar)!=u?pCfg.bMenubar:true;}
this.oWin=null;this.sProps=this.sCustomProps="";this.bModal=false;this.sSavedFocusFunction=null;this.iHBuffer=this.iWBuffer=0;this.show=ebHTMLPopupShow;this.getParamString=ebHTMLGetParamString;this.modality=ebHTMLModality
this.showEx=ebHTMLPopupShowEx;this.resizeParent=ebHTMLPopupResizeParent;this.close=ebHTMLPopupClose;this.focus=ebHTMLPopupFocus;this.sizeToContent=ebHTMLPopupSizeToContent;this.clearControls=ebHTMLPopupClearControls;}
function ebHTMLPopupShow(pIsPopUnder)
{var bPopUnder=(typeof(pIsPopUnder)!="undefined"&&pIsPopUnder)?true:false;with(this)
{if(sUrl.length==0)
return null;var sP=getParamString();var oD=oDocument,tWin=oD.win;oD.setGlobalParent(this);modality(tWin);if(sUrl.has("ej2child=true")&&!sUrl.has("ej2parent="))
sUrl+="&ej2parent="+name;var w=tWin.open(sUrl,name,sP);if(bPopUnder)
w.blur();if(w&&!bPopUnder)
w.focus();oWin=w;return w;}}
function ebHTMLGetParamString()
{with(this)
{sP=(iWidth!=null)?",width="+iWidth:"";sP+=(iHeight!=null)?",height="+iHeight:"";sP+=(iLeft!=null)?",screenX="+iLeft+",left="+iLeft:"";sP+=(iTop!=null)?",screenY="+iTop+",top="+iTop:"";sP+=",toolbar="+((bToolbar)?"1":"0");sP+=",location="+((bLocation)?"1":"0");sP+=",status="+((bStatus)?"1":"0");sP+=",scrollbars="+((bScrollbars)?"1":"0");sP+=",resizable="+((bResizable)?"1":"0");sP+=",menubar="+((bMenubar)?"1":"0");sP+=",modal="+((bModal)?"1":"0");sP+=(sCustomProps.length>0)?","+sCustomProps:"";if(sP.length>0)
sP=sP.substring(1);sProps=sP;return sP;}}
function ebHTMLModality(pWin)
{if(pWin)
{with(this)
{if(bModal)
{pWin.g_ebPopupObject=this;sSavedFocusFunction=pWin.onfocus;pWin.onfocus=function()
{try
{g_ebPopupObject.focus();}
catch(e)
{}}}}}}
function ebHTMLPopupShowEx(pUrl,pWidth,pHeight,pToolbar,pLocation,pStatus,pScrollbars,pResizable,pMenubar,pLeft,pTop,pCustomsProps,pModal,pWBuffer,pHBuffer)
{with(this)
{if(pUrl)
sUrl=pUrl;iWidth=pWidth;iHeight=pHeight;iLeft=pLeft;iTop=pTop;bToolbar=pToolbar;bLocation=pLocation;bStatus=pStatus;bScrollbars=pScrollbars;bResizable=pResizable;bMenubar=pMenubar;if(pCustomsProps)
sCustomProps=pCustomsProps;bModal=pModal;iHBuffer=pHBuffer;iWBuffer=pWBuffer;return show();}}
function ebHTMLPopupResizeParent(pX,pY,pW,pH)
{var p=this.parent;if(p)
{if(!isNaN(pX)&&!isNaN(pY))
p.moveTo(pX,pY);if(!isNaN(pW)&&!isNaN(pH))
p.resizeTo(pW,pH);}}
function ebHTMLPopupClose()
{with(this)
{if(bModal)
oDocument.win.onfocus=sSavedFocusFunction;oDocument.closeWindow(oWin);}
this.clearControls();}
function ebHTMLPopupClearControls()
{this.controls=[];}
function ebHTMLPopupFocus()
{var w=this.oWin;if(w&&!w.closed)
w.focus();else
this.close();}
function ebHTMLPopupSizeToContent()
{with(this)
{var c=oGlobals.oClient;if(!(c.bNav&&(c.iVer<5)))
{var ims=oWin.document.images,len=ims.length;var bottom=0,right=0,cB,cR;for(var i=0;i<len;i++)
{cB=ims[i].offsetTop+ims[i].offsetHeight;cR=ims[i].offsetLeft+ims[i].offsetWidth;if(cB>bottom)bottom=cB;if(cR>right)right=cR;}
oWin.resizeTo(right+iWBuffer,bottom+iHBuffer);}}}

//30@@m2

function EbaySYICatalogAutoComplete(pParent,pName,pCfg)
{var t=this,c=t.oConfig=pCfg;if(!t.objType)
t.objType="EbaySYICatalogAutoComplete";t.base=EbayBaseControl;t.base(pParent,pName);t.setRequestTimer=ebAutoCompleteSetRequestTimer;t.getResults=ebAutoCompleteGetResults;t.showResults=ebAutoCompleteShowResults;t.resetLayers=ebAutoCompleteResetLayers;t.processToken=ebAutoCompleteProcessToken;t.processResults=ebAutoCompleteProcessResults;t.getRowHtml=ebAutoCompleteGetRowHtml;t.getPID=ebAutoCompleteGetPID;t.results=[];t.bIsHoverACLyr=false;t.bMetaGrouping=typeof c.sMetaUrl!='undefined';t.sCurTxtVal="";t.iACVal=1;t.iTimer=c.iTimer||250;t.oTimer=null;t.oTxt=new EbayHTMLText(t,c.sTxtName,false,c);t.oSel=new EbayHTMLSelect(t,c.sSelName,false,c);t.oLyr=new EbayHTMLLayer(t,c.sLyrName,false,c);t.oRes=new EbayHTMLLayer(t,c.sResultsName,false,c);t.oResSet=new EbayHTMLLayer(t,c.sResultSetName,false,c);t.oNav=new EbayHTMLLayer(t,c.sNavName,false,c);t.oSeeMoreLnk=new EbayHTMLAnchor(this,c.sSeeMoreProdLnk,false,c);if(c.sShowBasicFlowElemName)
t.oRad=new EbayHTMLRadio(t,c.sShowBasicFlowElemName,false,c);t.oTxt._registerEvent("onkeyup","parent.setRequestTimer");t.oSel._registerEvent("onchange","parent.setRequestTimer");t.oLyr.subscribeEvents("onmouseover","onmouseout");t.oLyr.onmouseover=function(){this.parent.bIsHoverACLyr=true;}
t.oLyr.onmouseout=function(){this.parent.bIsHoverACLyr=false;}
t.callbackToken=null;t.rand=function(){return(new Date).getTime();}
var evtTxtBlur=t.oTxt._registerEvent("onblur");t.oLyr.hide=function()
{with(this)
if(!parent.bIsHoverACLyr)
show();}
t.oLyr._registerListener(evtTxtBlur,t.oLyr.EVENT_AFTER,"hide");}
ebay.oDocument.doc.onmousedown=function(pEvent)
{var oAC=ebay.oDocument.oPage.controls["clgautocmpl"];if(oAC&&!oAC.bIsHoverACLyr)
oAC.oLyr.show();}
function ebAutoCompleteSetRequestTimer()
{var p=this.parent;clearTimeout(p.oTimer);p.oTimer=setTimeout(p.oUtils.controlPath(p)+'.getResults()',p.iTimer);}
function ebAutoCompleteGetResults()
{var t=this,c=t.oConfig,sKeywords=encodeURIComponent(t.oTxt.value()),sCatName=encodeURIComponent(t.oSel.getValue());var filterStr;if(sKeywords==t.sCurTxtVal)
return;t.sCurTxtVal=sKeywords;if(sKeywords!="")
{t.callbackToken=t.rand();window['jsonp'+t.callbackToken]=Function("resp","ebay.oDocument.oPage.controls['clgautocmpl'].processToken(resp,"+t.callbackToken+");");filterStr="&filter(0).propertyName=METACATAGORYID&filter(0).operator=eq&filter(0).operand=";if((sCatName.indexOf("video-games")!=-1)){filterStr=filterStr+100845;}
else if(sCatName.indexOf("game-systems")!=-1){filterStr=filterStr+100846;}
else if(sCatName.indexOf("books")!=-1){filterStr=filterStr+100847;}
else if(sCatName.indexOf("movies")!=-1){filterStr=filterStr+100844;}
else if(sCatName.indexOf("music")!=-1){filterStr=filterStr+100843;}
else{filterStr="";}
var sUrl=c.sAJAXUrl+sKeywords+filterStr+"&callback=jsonp"+t.callbackToken;t.oScript=document.createElement("script");t.oScript.setAttribute("type","text/javascript");t.oScript.setAttribute("charset","utf-8");t.oScript.setAttribute("src",sUrl);t.oScript.setAttribute("id","acSOA");document.getElementsByTagName("head")[0].appendChild(t.oScript);}
else
t.oLyr.show();}
function ebAutoCompleteProcessToken(pResp,pToken)
{if(pToken==this.callbackToken)
this.processResults(pResp);}
function ebAutoCompleteProcessResults(pResp)
{var oAC=this;oAC.results=[];if(pResp.queryDictionaryResponse.resultSize!="0")
{var f=pResp.queryDictionaryResponse.format.name,fl=f.length,iNameIdx=0,iEPIDIdx=-1,iPIDIdx=0,iPhotoIdx=0,iMetaCatId=-1,iMetaCatName=-1;r=pResp.queryDictionaryResponse.result,rl=r.length,i=0,bMG=oAC.bMetaGrouping,un="undefined";for(i=0;i<fl;i++)
{switch(f[i])
{case"LABEL":iNameIdx=i;break;case"EBPRODUCTID":iEPIDIdx=i;break;case"PRODUCTID":iPIDIdx=i;break;case"PHOTO":iPhotoIdx=i;break;case"METACATAGORYID":iMetaCatId=i;break;case"METACATAGORYNM":iMetaCatName=i;break;}}
if(iEPIDIdx==-1){iEPIDIdx=iPIDIdx;}
var sz=(oAC.oConfig.iNumFetchSize<rl)?oAC.oConfig.iNumFetchSize:rl;var index=0,temp,i1=0,temp1,isFound=false;for(index=0;index<sz;index++){temp=r[index].value;if(typeof temp[iMetaCatName]!=un&&temp[iMetaCatName].toString().trim()=="Books"){isFound=true;break;}}
if(isFound==true){temp=r[index].value;for(i1=0;i1<=index;i1++){temp1=r[i1].value;r[i1].value=temp;temp=temp1;}}
for(i=0;i<sz;i++)
{var v=r[i].value,dataRow={"name":typeof v[iNameIdx]!=un?v[iNameIdx]:"","epid":typeof v[iEPIDIdx]!=un?v[iEPIDIdx]:"","pid":typeof v[iPIDIdx]!=un?v[iPIDIdx]:"","pic":typeof v[iPhotoIdx]!=un?v[iPhotoIdx]:"","mcat":typeof v[iMetaCatName]!=un?v[iMetaCatName]:"","acdo":(i+1)};if(bMG)
{oAC.results.length=rl;if(!oAC.results['mc'+v[iMetaCatId]])
oAC.results['mc'+v[iMetaCatId]]=new Array();oAC.results['mc'+v[iMetaCatId]][oAC.results['mc'+v[iMetaCatId]].length]=dataRow;}
else
oAC.results[oAC.results.length]=dataRow;}
document.getElementsByTagName("head")[0].removeChild(oAC.oScript);oAC.showResults();}
else
oAC.oLyr.show();}
function ebAutoCompleteShowResults()
{var t=this,l=t.results.length,c=t.oConfig,bData=false;var catKwdArr,catStr;var s=c.sBegHTML,sImg="",sProdUrl="",kwd=encodeURIComponent(t.oTxt.value()),iTopMetaCat="";t.iACVal=1;if(t.bMetaGrouping)
{for(var i in t.results)
{bData=true;if(t.results[i][0].mcat=="Games"){t.results[i][0].mcat="Video Games";}
catStr=t.results[i][0].mcat;catKwdArr=catStr.split(" ");catStr="";for(var j in catKwdArr){if(j<(catKwdArr.length-1)){catStr=catStr+catKwdArr[j].trim().toLowerCase()+"Q2d";}
else{catStr=catStr+catKwdArr[j].trim().toLowerCase();}}
var u=c.sMetaUrl.replaceTokens(kwd,catStr);s+=c.sMetaHTML.replaceTokens(u,t.results[i][0].mcat);s+=t.getRowHtml(t.results[i]);s+=c.sMoreProdHTML.replaceTokens(u);if(iTopMetaCat=="")
iTopMetaCat=i.substr(2);}}
else
{bData=l>0;s+=t.getRowHtml(t.results);}
s+=c.sEndHTML;if(bData)
{t.oResSet.setValue(s);if(l>c.iNumResForScroll)
{t.oLyr.height("325px");t.oRes.height("315px");}
else
t.resetLayers();t.oLyr.left(t.oTxt.left());t.oLyr.top(t.oTxt.top()+21);t.oLyr.show(true);}
else
{t.oResSet.setValue("");t.oLyr.show();t.resetLayers();}
if(t.oNav.eElem&&t.oSeeMoreLnk.eElem)
{t.oSeeMoreLnk.eElem.href=c.sSeeMoreProdUrl.replaceTokens(kwd,iTopMetaCat);t.oNav.show(l>(c.iNumFetchSize-1));}}
function ebAutoCompleteGetRowHtml(pResults)
{var t=this,c=t.oConfig,res=pResults,l=res.length,s="",catNoImgURL=c.sCatNoImageUrl,mcat="";for(i=0;i<l;i++)
{if(c.sShowBasicFlowElemName&&(t.oRad.getValue()==c.sShowBasicFlowELFlowVal))
sProdUrl=c.sELProductUrl.replaceTokens(t.getPID(res[i]),t.iACVal++,res[i].acdo);else
sProdUrl=c.sProductUrl.replaceTokens(t.getPID(res[i]),t.iACVal++,res[i].acdo);mcat=res[i].mcat.trim().toLowerCase();mcat=mcat.replace(" ","-");catNoImgURL=catNoImgURL.replaceTokens(mcat);if(c.bWithPhotos)
{if(res[i].pic!=null&&res[i].pic.trim()!="")
sImg=c.sImgHTML.replaceTokens(res[i].pic);else
sImg=c.sImgHTML.replaceTokens(catNoImgURL);var n=res[i].name.length>175?(res[i].name.substr(0,175)+"..."):res[i].name;s+=c.sCtnHTML.replaceTokens(sProdUrl,sImg,n);}
else
s+=c.sCtnHTML.replaceTokens(sProdUrl,res[i].name);}
return s;}
function ebAutoCompleteResetLayers()
{var t=this;t.oLyr.setStyle("height","auto");t.oRes.setStyle("height","auto");}
function ebAutoCompleteGetPID(pData)
{var s="";s=(pData.epid!="")?pData.epid:pData.pid;return s;}
// b=14354584 -->
