//<!--
//1@@m10

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;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 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;}

//2@@m10

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;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();}

//3@@m5

function EbayHTMLTextIndexed(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="EbayHTMLTextIndexed";this.base=EbayHTMLText;this.base(pParent,pName,pDisabled,pCfg);this.getElem=ebHTMLTextIndexedGetElem;this.iIndex=pCfg.iElemIndex?pCfg.iElemIndex:0;}
function ebHTMLTextIndexedGetElem(pName)
{var oD=this.oDocument,t=oD.getFormElem(pName,"text");t=t?t:oD.getFormElem(pName,"textarea");t=t?t:oD.getFormElem(pName);if(t)
{if(typeof(t.length)!="undefined")
{if(t.length>0)
t=t[this.iIndex];}}
return t;}

//4@@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;}}

//5@@m17

function EbayCharCounterManager(pParent,pName,pCfg)
{if(!this.objType)
this.objType="EbayCharCounterManager";this.baseObject=EbayBaseControl;this.baseObject(pParent,pName);this.createControls=ebCharCounterCreateControls;this.createControls();}
function EbayCharCounter(pParent,pName,pCfg)
{if(!this.objType)
this.objType="EbayCharCounter";this.baseObject=EbayBaseControl;this.baseObject(pParent,pName);this.oConfig=pCfg?pCfg:null;this.oConfig.elemIndex=this.oConfig.elemIndex?this.oConfig.elemIndex-1:0;this.updateDiv=ebCharCounterUpdateDiv;this.dLength=ebDetermineLength;this.checkCounter=ebCheckCounter;this.autoClear=ebCharCounterOnAutoClear;this.alreadyCleared=false;this.clearCounter=ebCharCounterClearCounter;this.oCounter=null;this.init=function()
{var c=this.oConfig;var inp=this.oInput=new EbayHTMLTextIndexed(this,c.inputFieldId,false,c);this.oInput.iIndex=c.elemIndex;inp.subscribeEvents("onclick");if(this.oInput.length>0)
this.oInput=this.oInput[this.elemIndex];this.oLayer=new EbayHTMLLayer(this,c.divForTextId,false,c);if(c.autoClear)
{var autoclear=this.oInput._registerEvent("onclick","autoClear");this.oInput.autoClear=this.autoClear;}
this._registerListener(this.oDocument._getEvent("load"),this.EVENT_AFTER,"updateDiv");var e1=this.oInput._registerEvent("onblur","");var e2=this.oInput._registerEvent("onfocus","");this._registerListener(e1,this.EVENT_AFTER,"clearCounter");this._registerListener(e2,this.EVENT_AFTER,"checkCounter");}
this.init();}
function ebCharCounterCreateControls()
{var aConfigs=ebay.oDocument.aConfigs;var c;for(var oc in aConfigs)
{c=aConfigs[oc];if(c.objType=="EBayCharCounterConfig")
{if(c.inputFieldId&&c.divForTextId)
{new EbayCharCounter(this,oc,c);}}}}
function ebCharCounterOnAutoClear()
{if(this.eElem.defaultValue!=this.eElem.value)
{return;}
if(!this.alreadyCleared)
{this.value("");this.parent.updateDiv();this.alreadyCleared=true;}}
function ebCharCounteronChangeDiv()
{this.parent.updateDiv();}
function ebCheckCounter()
{var iDelay=((this.oConfig)?this.oConfig.iCounterDelay:false)||1000;if(this.oCounter)
window.clearInterval(this.oCounter);this.oCounter=window.setInterval("ebay._getControl(\""+this.name+"\").updateDiv()",iDelay);}
function ebCharCounterClearCounter()
{if(this.oCounter)
window.clearInterval(this.oCounter);}
function ebCharCounterUpdateDiv()
{var v=this.oInput.value(),c=this.oConfig;var l=ebDetermineLength(v);var chrRemain=c.maxChars-l;var max=c.maxChars;if(l>max)
{var i=parseInt(max)+ebCharCounterGetNoofCRs(v);var cl=this.oGlobals.oClient;if(v.substr(i)!="\r\n")
i++;if(cl.bFirefox)
var iPos=this.oInput.eElem.scrollTop
this.oInput.value(v.substr(0,max));if(cl.bFirefox)
this.oInput.eElem.scrollTop=iPos;}
var str='';if(chrRemain<=0)
str=c.noCharLeft;else if(chrRemain==1)
str=c.singleCharLeft;else
str=c.localizeText;this.oLayer.setValue(str.replaceTokensEx("##n##",chrRemain));}
function ebDetermineLength(v)
{if(typeof(v)=="string")
{var regexp=new RegExp("\r\n","g");var lines=v.match(regexp);v=v.replace(regexp,"");var l=0;if(lines!=null)
{var lineCount=lines.length;if(lineCount>=1)
{l=lineCount*2;}}
l=l+v.length;return l;}
else
{return 0;}}
function EBayCharCounterConfig(name)
{if(!this.objType)
this.objType="EBayCharCounterConfig";this.base=EbayConfig;this.base(name);this.elemIndex=0;this.formname="";this.inputFieldId="";this.divForTextId="";this.localizeText="";this.singleCharLeft="";this.noCharLeft="";this.maxChars=0;this.autoClear=false;this.anchorId="";}
function Localize(a)
{return a;}
function ebCharCounterGetNoofCRs(v)
{var regexp=new RegExp("\r\n","g");var lines=v.match(regexp);var l=0;if(lines!=null)
{var lineCount=lines.length;if(lineCount>=1)
{l=lineCount;}}
return l-1;}

//6@@m2

ebay.oDocument.oPage.createCharCounterMgr=function()
{with(this)
{var oD=parent;_registerListener(oD._getEvent("load"),EVENT_BEFORE,"createCCMgr");this.createCCMgr=function()
{new EbayCharCounterManager(oD.parent,"ccManager");}}}
ebay.oDocument.oPage.createCharCounterMgr();

//7@@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);}

//8@@m6

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();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;}}}

//9@@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();}}}

//10@@m4

function EbayOverlayMask(pParent,pName,pCfg)
{if(!this.objType)
this.objType="EbayOverlayMask";this.base=EbayHTMLLayer;this.base(pParent,pName,pCfg);this.bodyLoc=ebay.oDocument.doc.getElementsByTagName("body")[0];this._registerListener(ebay.oDocument._getEvent('resize'),this.EVENT_AFTER,'resize');this.aSelElems=this.oDocument.doc.getElementsByTagName('SELECT');this.baseShow=this.show;this.show=function(pShow)
{with(this)
{for(index=0;index<aSelElems.length;index++)
{aSelElems[index].disabled=pShow;}
var st=(pShow)?'block':'',db=document.body,bsel=(pShow)?true:false,bShown=false;top(0);left(0);width(ebay.oDocument.doc.body.scrollWidth+'px');height(ebay.oDocument.doc.body.scrollHeight+'px');with(eElem.style)
{bShown=display!='none';display=st;opacity=0.35;filter='alpha(Opacity=35)';}
baseShow(pShow,true);}}
this.resize=function()
{if(this.eElem&&this.eElem.style.display=='block')
{this.width(ebay.oDocument.doc.body.scrollWidth+'px');this.height(ebay.oDocument.doc.body.scrollHeight+'px');}}
this._createElement=function()
{with(this)
{if(this.getElem())
return;var mask=oDocument.doc.createElement('DIV');mask.setAttribute('id',name);with(mask.style)
{position='absolute';display='none';top='0px';left='0px';zIndex=2;}
bodyLoc.appendChild(mask);bind();}}
this._createElement();}

//11@@m2

function VibrantOverlay(pCfg)
{if(!this.objType)
this.objType="VibrantOverlay";this.base=EbayHTMLLayer;this.base(ebay.oDocument.oPage,"VibrantOverlay",pCfg);this.cfg=pCfg;with(this)
{oMask=new EbayOverlayMask(ebay.oDocument.oPage,'Coupon_Overlay');oPopLayer=new EbayHTMLOverlayContent(this,'overlayPop',pCfg);if(!oPopLayer.eElem)
oPopLayer.bind();oFrame=this.oFrame=new EbayHTMLFrame(this,cfg.sCheckoutIframe);if(!oFrame.eElem)
oFrame.bind();oOverlayAnchor=[];for(i=0;i<cfg.aOverlayAnchor.length;i++)
{oOverlayAnchor[i]=new EbayHTMLAnchor(this,cfg.aOverlayAnchor[i]);oOverlayAnchor[i]._registerEvent("onclick","parent.onClick");if(!oOverlayAnchor[i].eElem)
oOverlayAnchor[i].bind();oOverlayAnchor[i].eElem.href="javascript:;";oOverlayAnchor[i].eElem.target="";}
oOverlayPop=new EbayHTMLLayer(this,cfg.sOverlayPop);if(!oOverlayPop.eElem)
oOverlayPop.bind();oCloseBtn=new EbayHTMLImage(this,cfg.sCloseBtn);if(!oCloseBtn.eElem)
oCloseBtn.bind();oCloseBtn._registerEvent("onclick","onClick");_registerListener(ebay.oDocument._getEvent('resize'),this.EVENT_AFTER,'resize');this.resize=function()
{oOverlayPop.eElem.style.top=((ebay.oDocument.doc.body.clientHeight-oOverlayPop.eElem.offsetHeight)/2)+ebay.oGlobals.oClient.getScrollTop();oOverlayPop.eElem.style.left=((ebay.oDocument.doc.body.clientWidth-oOverlayPop.eElem.offsetWidth)/2)+ebay.oGlobals.oClient.getScrollLeft();}
oCloseBtn.onClick=function()
{oOverlayPop.show(false);oMask.show(false);}
this.onClick=function()
{for(i=0;i<cfg.aOverlayAnchor.length;i++)
{if(this.name==cfg.aOverlayAnchor[i])
oFrame.eElem.src=cfg.aIframeAnchor[i];}
oOverlayPop.show(true);oMask.show(true);oPopLayer.setIframeShim();oOverlayPop.eElem.style.left=((ebay.oDocument.doc.body.clientWidth-oOverlayPop.eElem.offsetWidth)/2)+ebay.oGlobals.oClient.getScrollLeft();oOverlayPop.eElem.style.top=((ebay.oDocument.doc.body.clientHeight-oOverlayPop.eElem.offsetHeight)/2)+ebay.oGlobals.oClient.getScrollTop()+30;}}}

//12@@m10

ebay.oDocument.oPage.onBeforeLoad=function()
{var cc=new EbayCharCounterManager(ebay,"ccManager");var oCfg=this.parent.getConfig("Vibrant.Phase2.Overlay");if(oCfg)
{new VibrantOverlay(oCfg);}
var cfg=this.parent.getConfig("watchingCfg");if(cfg)
{var frm=new EbayHTMLForm(ebay,cfg.formName,cfg);var submitCntrl=new EbayHTMLButton(ebay,cfg.emailtoFriendCntrlName,false,cfg);var evt=submitCntrl._registerEvent("onclick","checkItemsLimit");var submitCntrl2=new EbayHTMLButton(ebay,cfg.emailtoFriendCntrlName2,false,cfg);evt=submitCntrl2._registerEvent("onclick","checkItemsLimit");}
var oC=this.oDocument.getConfig("MyEbay.Watching.MerIframe");if(oC){this.oSimFrame=new EbayHTMLFrame(this,oC.sIfrName);this.oWtchIfrCfg=oC;}}
ebay.oDocument.oPage.onAfterLoad=function()
{var oF=this.oSimFrame;if(oF)
oF.setSource(this.oWtchIfrCfg.sSrc);}
function checkItemsLimit()
{var frm=this.parent.controls[this.oConfig.formName];var curCount=0;var frmAction=this.oConfig.emailtoFriendAction+"&"+this.oConfig.itemsIdParamName+"=";var itemsQry="";if(frm)
{var chkCntrls=frm.getElement(this.oConfig.lineItemCntrlID);if(chkCntrls&&chkCntrls.length)
{for(var i=0;i<chkCntrls.length;i++){var chkCntrl=chkCntrls[i];if(chkCntrl.checked)
{curCount++;if(itemsQry.length>0)
itemsQry+=",";itemsQry+=chkCntrl.value;}}}
else
{if(chkCntrls.checked)
{curCount++;itemsQry+=chkCntrls.value;}}
if(curCount>this.oConfig.itemsMaxLimit)
{if(ebay.oDocument.messageBox)
ebay.oDocument.messageBox(this.oConfig.itemsMaxExceedMessage);else
alert(this.oConfig.itemsMaxExceedMessage);return false;}
else if(curCount==0)
{if(ebay.oDocument.messageBox)
ebay.oDocument.messageBox(this.oConfig.itemsNotSelectedMessage);else
alert(this.oConfig.itemsNotSelectedMessage);return false;}
else
{frm.setAction(frmAction+itemsQry);return true;}}}

//13@@m5

function ebDowngradeDomainTo()
{var dd=document.domain,i=dd.indexOf(".ebay."),qs;if(i!=-1)
{dd=dd.substr(i+1);qs=decodeURI(document.location.search);if((i=qs.indexOf("downgradeDomainTo="))>-1)
dd=qs.substring(i+18,qs.indexOf(dd)+dd.length);if(document.domain!=dd||!document.all)
document.domain=new String(dd);}}
ebDowngradeDomainTo();
// b=10296359 -->