//<!--
// \include\lib\_global\_ui\_base\anchor.js@@\main\7 

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;this.enableBase(pEnable);}
function setEbayLink(pS)
{return true;}

// \include\lib\_global\_ui\_ex\textEx.js@@\main\e411_caboose\e411_intl_caboose\1 

function EbayHTMLTextEx(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="EbayHTMLText";this.base=EbayHTML;this.base(pParent,pName,pName,pDisabled,pCfg);this.getElem=ebHTMLTextGetElem;this.c=pCfg?pCfg:null;if(this.c!=null)
{this.elemIndex=this.c.elemIndex?this.c.elemIndex:0;}
else
{this.elemIndex=0;}
this.bindHTML=ebHTMLTextBindHTML;this.bindEvents=ebHTMLTextBindEvents;this.value=ebHTMLTextValue;this.clear=ebHTMLTextClear;this.subscribeEvents("onchange","onblur","onfocus","onkeydown","onkeyup","oncut","onpaste","onclick","onmouseup","onmousedown","onmouseover","onmouseout","onafterupdate","oncontextmenu","onpropertychange","onkeypress");}
function ebHTMLTextValue(pVal)
{var e=this.eElem;if(e)
{if(typeof(pVal)=="undefined")
return e.value;else
e.value=pVal;}}
function ebHTMLTextClear()
{this.eElem.value="";}
function ebHTMLTextGetElem(pName)
{var temp=this.oDocument.getFormElem(pName,"text");if(typeof(temp)!="undefined")
{if(temp!=null)
return temp;}
temp=this.oDocument.getFormElem(pName,"textarea");if(typeof(temp)!="undefined")
{if(temp!=null)
return temp;}}
function ebHTMLTextBindHTML()
{with(this)
{var lElem=getElem(sElemName);if(lElem)
{if(lElem.length&&lElem.length>0)
{this.isGroup=true;for(var i=0;i<lElem.length;i++)
{if(i==elemIndex)
{eElem=lElem[i];assignJSObject(eElem);}}}
else
{eElem=lElem;this.isGroup=false;assignJSObject(eElem);}}
if(bDisabled)
this.enable(false);}}
function ebHTMLTextBindEvents()
{with(this)
{if(!eElem)
return;var e=aBindEvents,len=e.length,fStr;for(var i in e)
{if(eElem.length&&eElem.length>0)
{for(var ii=0;ii<eElem.length;ii++)
{if(i==elemIndex)
{eval("eElem[ii]."+e[i]+" = new Function( this.bindEventString(e[i]) )");}}}
else
{eval("eElem."+e[i]+" = new Function(this.bindEventString(e[i]))");}}}}

// \include\lib\_global\_ui\_base\layer.js@@\main\5 

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)
return this.eElem.innerText;else
return this.eElem.innerHTML;}
else
return"";}
function ebHTMLLayerSetValue(pVal,pIsText)
{if(this.eElem)
{if(pIsText)
this.eElem.innerText=pVal;else
this.eElem.innerHTML=pVal;}}

// \include\lib\_global\_ui\_ex\charcounter.js@@\main\e411_caboose\1 

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.active=false;this.on=ebCharCounterOn;this.off=ebCharCounterOff;this.updateDivEx=ebCharCounterUpdateDivEx;this.init=function()
{var c=this.oConfig;this.oInput=new EbayHTMLTextEx(this,c.inputFieldId,false,c);var e1=this.oInput._registerEvent("onblur","ebCharCounterOff");var e2=this.oInput._registerEvent("onfocus","ebCharCounterOn");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","ebCharCounterOnAutoClear");this.oInput.autoClear=this.autoClear;}
this._registerListener(this.oDocument._getEvent("load"),this.EVENT_AFTER,"updateDivEx");this._registerListener(this.oDocument._getEvent("load"),this.EVENT_AFTER,"checkCounter");}
this.init();}
function ebCharCounterOn()
{this.parent.active=true;}
function ebCharCounterOff()
{this.parent.updateDiv();this.parent.active=false;}
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.clear();this.parent.updateDiv();this.alreadyCleared=true;}}
function ebCharCounterCheckMax()
{var v=this.value();var l=ebDetermineLength(v);var max=this.parent.oConfig.maxChars;if(l>max)
{var c=max+ebCharCounterGetNoofCRs(v);if(v.substr(c)!="\r\n")
c=c+1;this.value(v.substr(0,c));}}
function ebCharCounteronChangeDiv()
{this.parent.updateDiv();}
function ebCheckCounter()
{window.setInterval("ebay._getControl(\""+this.name+"\")._exec(\"updateDiv\")",2000);}
function ebCharCounterUpdateDiv()
{if(!this.active)
return;var v=this.oInput.value();var l=ebDetermineLength(v);var chrRemain=this.oConfig.maxChars-l;var max=this.oConfig.maxChars;if(l>max)
{var c=max+ebCharCounterGetNoofCRs(v);if(v.substr(c)!="\r\n")
c=c+1;this.oInput.value(v.substr(0,c));}
if(chrRemain<=0)
{this.oLayer.setValue(this.oConfig.noCharLeft.replaceTokensEx("##n##",chrRemain));}
else if(chrRemain==1)
{this.oLayer.setValue(this.oConfig.singleCharLeft.replaceTokensEx("##n##",chrRemain));}
else
{this.oLayer.setValue(this.oConfig.localizeText.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;}}
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;}
function ebCharCounterUpdateDivEx()
{this.active=true;this.updateDiv();this.active=false;}

// \include\lib\_global\_ui\_base\select.js@@\main\e411_intl_caboose\1 

function EbayHTMLSelect(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="EbayHTMLSelect";this.base=EbayHTML;this.base(pParent,pName,pName,pDisabled,pCfg);this.iSelIndex=-1;this.createOption=ebHTMLSelectCreateOption;this.clearOptions=ebHTMLSelectClearOptions;this.getValueByIndex=ebHTMLSelectGetValueByIndex;this.getSelectedValue=ebHTMLSelectGetSelectedValue;this.getSelectedText=ebHTMLSelectGetSelectedText;this.setOption=ebHTMLSelectSetOption;this.insertOption=ebHTMLSelectInsertOption;this.deleteOption=ebHTMLSelectDeleteOption;this.selectByIndex=ebHTMLSelectSelectByIndex;this.selectByValue=ebHTMLSelectSelectByValue;this.subscribeEvents("onchange");}
function ebHTMLSelectClearOptions()
{if(this.eElem)
{var opts=this.eElem.options;while(opts.length>0)
opts[opts.length-1]=null;}}
function ebHTMLSelectCreateOption(pName,pText)
{if(this.eElem)
{var nOpt=new Option(pText,pName,false,false);var opts=this.eElem.options;opts[opts.length]=nOpt;nOpt=new Option(pText,pName,false,false);nOpt.selected=false;opts[opts.length-1]=nOpt;}}
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");}
function ebHTMLSelectGetSelectedValue()
{return this.getValueByIndex(this.eElem.selectedIndex);}
function ebHTMLSelectGetSelectedText()
{return this.getValueByIndex(this.eElem.selectedIndex,true);}
function ebHTMLSelectSelectByIndex(pIndex)
{this.eElem.selectedIndex=this.iSelIndex=pIndex;}
function ebHTMLSelectSelectByValue(pVal)
{if(this.eElem)
{var e=this.eElem,o;var opts=e.options,len=opts.length;for(var i=0;i<len;i++)
{o=opts[i];if((o.value==pVal)||(o.value==""&&o.text==pVal))
{e.selectedIndex=this.iSelIndex=i;break;}}}
else
this.throwWarning("HTML element '"+this.name+"' not found","selectByValue");}
function ebHTMLSelectSetOption(pVal,pText,pInd)
{if(this.eElem)
{if(pInd!=null)
{var o=this.eElem.options[pInd];o.value=pVal;o.text=pText;}
else
this.createOption(pVal,pText);}
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;}}

// \include\lib\_global\features\charcounter\asksellerquestion.js@@\main\4 

ebay.oDocument.oPage.onBeforeLoad=function()
{var cfg=this.parent._exec("getConfig","simpleConfig");if(cfg!=null)
{var selectVar=new EbayHTMLSelect(this,cfg.selectId);var formVar=new EbayHTMLForm(this,cfg.formId);formVar._registerEvent("onsubmit","isDefaultMessage");selectVar._registerEvent("onchange","onChange");selectVar.onChange=function()
{var selValue=selectVar.getSelectedValue();if(selValue==5)
{formVar.setAction(cfg.path);formVar.submit();}}}
var cc=new EbayCharCounterManager(ebay,"ccManager");}
function isDefaultMessage(){if(document.contactform.message.value==document.contactform.defaultText.value){document.contactform.message.value='';}
if(typeof(document.contactform.Submit.disabled)!='undefined')
document.contactform.Submit.disabled=true;}

// \include\lib\_global\_ui\_base\form.js@@\main\2 

function EbayHTMLForm(pParent,pName,pCfg)
{if(!this.objType)
this.objType="EbayHTMLForm";this.base=EbayHTML;this.base(pParent,pName,pName,false,pCfg);this.getElem=new Function("return this.getDocElem(arguments[0],'forms');");this.enable=new Function("");this.getElementValue=ebHTMLFormGetElementValue;this.setElementValue=ebHTMLFormSetElementValue;this.getElements=ebHTMLFormGetElements;this.getElement=ebHTMLFormGetElement;this.setAction=ebHTMLFormSetAction;this.setTarget=ebHTMLFormSetTarget;this.submit=ebHTMLFormSubmit;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();if(elems[pName])
elems[pName].value=pValue;}
function ebHTMLFormSetAction(pAction)
{var e=this.eElem;if(e)
e.action=pAction;}
function ebHTMLFormSetTarget(pTarget)
{var e=this.eElem;if(e)
e.target=pTarget;}
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");}
// b=1440105 -->
