String.prototype.has=function(pStr){
return (this.indexOf(pStr)!=-1);
};
String.prototype.hasArg=function(pArg){
var a=pArg,rv=false;
if(typeof (a)=="string"){
rv=this.has(a);
}else{
var aL=a.length;
for(var j=0;j<aL&&!rv;j++){
rv=this.has(a[j]);
}
}
return rv;
};
String.prototype.hasAny=function(){
var a=arguments,l=a.length,rv=false;
for(var i=0;i<l&&!rv;i++){
rv=this.hasArg(a[i]);
}
return rv;
};
String.prototype.hasAll=function(){
var a=arguments,l=a.length;
for(var i=0;i<l;i++){
if(!this.hasArg(a[i])){
return false;
}
}
return true;
};
String.prototype.is=function(s){
return (this==s);
};
String.prototype.isAny=function(){
var a=arguments,l=a.length,rv=false,aL;
for(var i=0;i<l&&!rv;i++){
if(typeof (a[i])=="string"){
rv=(this==a[i]);
}else{
aL=a[i].length;
for(var j=0;j<aL&&!rv;j++){
rv=(this==a[i][j]);
}
}
}
return rv;
};
String.prototype.hex2Dec=function(){
return parseInt(this,16);
};
Number.prototype.dec2Hex=function(){
return parseInt(this,10).toString(16);
};
VjDateUtils={};
VjDateUtils.getTimeZoneDate=function(_d48,date){
_d48=_d48?_d48:0;
d=date?date:new Date();
var _d4a=d.getTime();
var _d4b=d.getTimezoneOffset()*60000;
var utc=_d4a+_d4b;
return new Date(utc+(3600000*_d48));
};
if(typeof VjCookieJar=="undefined"){
VjCookieJar={aCookies:{},sCookieDomain:".ebay.com"};
}
VjCookieJar.Default_Cookie_Format={"COOKIELET_DELIMITER":"^","NAME_VALUE_DELIMITER":"/","escapedValue":true};
VjCookieJar.DP_Cookie_Format={"COOKIELET_DELIMITER":"^","NAME_VALUE_DELIMITER":"/","bUseExp":true,"startDelim":"b"};
VjCookieJar.Session_Cookie_Format={"COOKIELET_DELIMITER":"^","NAME_VALUE_DELIMITER":"=","escapedValue":true,"startDelim":"^"};
VjCookieJar.DS_Cookie_Format={"COOKIELET_DELIMITER":"^","NAME_VALUE_DELIMITER":"/"};
VjCookieJar.sPath="/";
VjCookieJar.aConversionMap={"reg":["dp1","reg"],"recent_vi":["ebay","lvmn"],"ebaysignin":["ebay","sin"],"p":["dp1","p"],"etfc":["dp1","etfc"],"keepmesignin":["dp1","kms"],"ItemList":["ebay","wl"],"BackToList":["s","BIBO_BACK_TO_LIST"]};
VjCookieJar.aFormatMap={"r":VjCookieJar.Default_Cookie_Format,"dp1":VjCookieJar.DP_Cookie_Format,"npii":VjCookieJar.DP_Cookie_Format,"ebay":VjCookieJar.Session_Cookie_Format,"reg":VjCookieJar.Session_Cookie_Format,"apcCookies":VjCookieJar.Session_Cookie_Format,"ds2":VjCookieJar.DS_Cookie_Format};
VjCookieJar.sCOMPAT="10";
VjCookieJar.sCONVER="01";
VjCookieJar.sSTRICT="00";
VjCookieJar.sModesCookie="ebay";
VjCookieJar.sModesCookielet="cv";
VjCookieJar.readCookie=function(_d4d,_d4e){
var rv=this.readCookieObj(_d4d,_d4e).value;
return (rv)?unescape(rv):"";
};
VjCookieJar.createDefaultCookieBean=function(_d50,_d51){
var _d52={};
_d52.name=_d50;
_d52.cookieletname=_d51;
_d52.value="";
_d52.maxage=0;
_d52.rawcookievalue="";
_d52.mode="";
return _d52;
};
VjCookieJar.readCookieObj=function(_d53,_d54){
var _d55=this.createDefaultCookieBean(_d53,_d54);
this.update();
this.checkConversionMap(_d55);
_d55.rawcookievalue=this.aCookies[_d55.name];
if(!_d55.name||!_d55.rawcookievalue){
_d55.value="";
}else{
if(!_d55.cookieletname){
this.readCookieInternal(_d55);
}else{
this.readCookieletInternal(_d55);
}
}
return (typeof (_d55)!="undefined")?_d55:"";
};
VjCookieJar.checkConversionMap=function(_d56){
var cmap=this.aConversionMap[_d56.name];
if(cmap){
_d56.mode=this.getMode(_d56.name);
_d56.name=cmap[0];
_d56.cookieletname=cmap[1];
}
};
VjCookieJar.readCookieInternal=function(_d58){
_d58.value=_d58.rawcookievalue;
return _d58;
};
VjCookieJar.readCookieletInternal=function(_d59){
var clet=this.getCookielet(_d59.name,_d59.cookieletname,_d59.rawcookievalue);
var _d5b=this.getFormat(_d59.name);
if(clet&&_d5b.bUseExp){
clet=clet.substring(0,clet.length-8);
}
_d59.value=clet;
if(_d59.mode==this.sCOMPAT){
_d59.value=_d59.rawcookievalue;
}
return _d59;
};
VjCookieJar.readMultiLineCookie=function(_d5c,_d5d){
if(!_d5c||!_d5d){
return "";
}
var val,r="";
var cmap=this.aConversionMap[_d5c];
if(cmap){
val=this.readCookieObj(cmap[0],cmap[1]).value||"";
}
if(val){
r=this.getCookielet(_d5c,_d5d,val)||"";
}
return (typeof (r)!="undefined")?r:"";
};
VjCookieJar.writeCookie=function(_d60,_d61,_d62){
var cmap=this.aConversionMap[_d60];
if(cmap){
this.writeCookielet(cmap[0],cmap[1],_d61,_d62);
return;
}
var _d64=this.getFormat(_d60);
if(_d61&&_d64.escapedValue){
_d61=escape(_d61);
}
this.writeRawCookie(_d60,_d61,_d62);
};
VjCookieJar.writeRawCookie=function(_d65,_d66,_d67){
if(_d65&&(_d66!==undefined)){
if((isNaN(_d66)&&_d66.length<4000)||(_d66+"").length<4000){
if(typeof _d67=="number"){
_d67=this.getExpDate(_d67);
}
var _d68=_d67?new Date(_d67):new Date(this.getExpDate(730));
var _d69=this.getFormat(_d65);
var _d6a=this.sCookieDomain;
var dd=document.domain;
if(!dd.has(_d6a)){
var _d6c=dd.indexOf(".ebay.");
if(_d6c>0){
this.sCookieDomain=dd.substring(_d6c);
}
}
if(document.cookie){
document.cookie=_d65+"="+(_d66||"")+((_d67||_d69.bUseExp)?"; expires="+_d68.toGMTString():"")+"; domain="+this.sCookieDomain+"; path="+this.sPath;
}
}
}
};
VjCookieJar.writeCookieEx=function(_d6d,_d6e,_d6f){
this.writeCookie(_d6d,_d6e,this.getExpDate(_d6f));
};
VjCookieJar.writeCookielet=function(_d70,_d71,_d72,_d73,_d74){
if(_d70&&_d71){
this.update();
var _d75=this.getFormat(_d70);
if(_d75.bUseExp&&_d72){
if(typeof _d73=="number"){
_d73=this.getExpDate(_d73);
}
var _d76=_d73?new Date(_d73):new Date(this.getExpDate(730));
var _d77=Date.UTC(_d76.getUTCFullYear(),_d76.getUTCMonth(),_d76.getUTCDate());
_d77=Math.floor(_d77/1000);
_d72+=_d77.dec2Hex();
}
var val=this.createCookieValue(_d70,_d71,_d72);
this.writeRawCookie(_d70,val,_d74);
}
};
VjCookieJar.writeMultiLineCookie=function(_d79,_d7a,_d7b,_d7c,_d7d){
this.update();
var val=this.createCookieValue(_d79,_d7a,_d7b);
if(val){
var cmap=this.aConversionMap[_d79];
if(cmap){
this.writeCookielet(cmap[0],cmap[1],val,_d7c,_d7d);
}
}
};
VjCookieJar.getBitFlag=function(_d80,_d81){
_d80=parseInt(_d80,10);
var b=_d80.toString(2),r=_d80?b.charAt(b.length-_d81-1):"";
return (r=="1")?1:0;
};
VjCookieJar.setBitFlag=function(_d83,_d84,_d85){
var b="",p,i,e,l;
_d83=parseInt(_d83,10);
if(_d83){
b=_d83.toString(2);
}
l=b.length;
if(l<_d84){
e=_d84-l;
for(i=0;i<=e;i++){
b="0"+b;
}
}
p=b.length-_d84-1;
return parseInt(b.substring(0,p)+_d85+b.substring(p+1),2);
};
VjCookieJar.createCookieValue=function(_d87,_d88,_d89){
var cmap=this.aConversionMap[_d87],format=this.getFormat(_d87),mode=this.getMode(_d87),val;
if(cmap&&(mode==this.sSTRICT||mode==this.sCONVER)){
val=this.readCookieObj(cmap[0],cmap[1]).value||"";
}else{
val=this.aCookies[_d87]||"";
}
if(format){
var clts=this.getCookieletArray(val,format);
clts[_d88]=_d89;
var str="";
for(var i in clts){
if(clts[i]){
str+=i+format.NAME_VALUE_DELIMITER+clts[i]+format.COOKIELET_DELIMITER;
}
}
if(str&&format.startDelim){
str=format.startDelim+str;
}
val=str;
if(format.escapedValue){
val=escape(val);
}
}
return val;
};
VjCookieJar.update=function(){
var aC=document.cookie.split("; ");
this.aCookies={};
for(var i=0;i<aC.length;i++){
var sC=aC[i].split("=");
var _d91=this.getFormat(sC[0]),cv=sC[1],sd=_d91.startDelim;
if(sd&&cv&&cv.indexOf(sd)==0){
sC[1]=cv.substring(sd.length,cv.length);
}
this.aCookies[sC[0]]=sC[1];
}
};
VjCookieJar.getCookielet=function(_d92,_d93,_d94){
var _d95=this.getFormat(_d92);
var clts=this.getCookieletArray(_d94,_d95);
return clts[_d93]||"";
};
VjCookieJar.getFormat=function(_d97){
return this.aFormatMap[_d97]||VjCookieJar.Default_Cookie_Format;
};
VjCookieJar.getCookieletArray=function(_d98,_d99){
var rv=[],val=_d98||"";
if(_d99.escapedValue){
val=unescape(val);
}
var a=val.split(_d99.COOKIELET_DELIMITER);
for(var i=0;i<a.length;i++){
var idx=a[i].indexOf(_d99.NAME_VALUE_DELIMITER);
if(idx>0){
rv[a[i].substring(0,idx)]=a[i].substring(idx+1);
}
}
return rv;
};
VjCookieJar.getExpDate=function(_d9e){
var _d9f;
if(typeof _d9e=="number"&&_d9e>=0){
var d=new Date();
d.setTime(d.getTime()+(_d9e*24*60*60*1000));
_d9f=d.toGMTString();
}
return _d9f;
};
VjCookieJar.getMode=function(_da1){
var h=this.readCookieObj(this.sModesCookie,this.sModesCookielet).value,b;
if(!(_da1 in this.aConversionMap)){
return null;
}
if(!h){
return "";
}
if(h===0){
return this.sSTRICT;
}
if(h&&h!="0"){
if(h.has(".")){
var a=h.split(".");
for(i=0;i<a.length;i++){
b=a[i].hex2Dec().toString(2)+b;
}
}else{
b=h.hex2Dec().toString(2);
}
i=0;
var l=b.length,j;
for(o in this.aConversionMap){
j=l-(2*(i+1));
f=b.substring(j,j+2).toString(10);
f=(!f)?this.sSTRICT:f;
if(_da1==o){
return (f.length==1)?"0"+f:f;
}
i++;
}
return null;
}
};
VjUtils={};
VjUtils.isString=function(wh){
return (typeof wh=="string");
};
VjUtils.hitch=function(_da6,_da7){
var fcn;
if(VjUtils.isString(_da7)){
fcn=_da6[_da7];
}else{
fcn=_da7;
}
return function(){
return fcn.apply(_da6,arguments);
};
};
VjUtils.extend=function(_da9,_daa){
function inheritance(){
}
inheritance.prototype=_daa.prototype;
_da9.prototype=new inheritance();
_da9.prototype.constructor=_da9;
_da9.baseConstructor=_daa;
_da9.superClass=_daa.prototype;
};
VjWindowUtils={};
VjWindowUtils.getBrowserWindowHeight=function(){
var s=self;
var d=document;
var de=d.documentElement;
if(s.innerHeight){
return s.innerHeight;
}else{
if(de&&de.clientHeight){
return de.clientHeight;
}
}
return d.body.clientHeight;
};
VjWindowUtils.getBrowserWindowWidth=function(){
var s=self;
var d=document;
var de=d.documentElement;
if(s.innerWidth){
return s.innerWidth;
}else{
if(de&&de.clientWidth){
return de.clientWidth;
}
}
return d.body.clientWidth;
};
VjWindowUtils.getScrollXY=function(){
var _db1=0,scrOfY=0;
if(typeof (window.pageYOffset)=="number"){
scrOfY=window.pageYOffset;
_db1=window.pageXOffset;
}else{
if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){
scrOfY=document.body.scrollTop;
_db1=document.body.scrollLeft;
}else{
if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){
scrOfY=document.documentElement.scrollTop;
_db1=document.documentElement.scrollLeft;
}
}
}
return [_db1,scrOfY];
};
function ExpressHandler(){
}
ExpressHandler.prototype.handle=function(_db2){
oRegistry.get("expressCompId").init();
};
var VjClient={};
VjClient.getBrowserObj=function(){
this.bFirefox=this.bWebTV=this.bOpera=this.bNav=this.bIE=this.bSafari=this.bWin=this.bMac=this.bMacppc=this.bActiveXLibLoaded=this.bActiveXSupported=this.bWinXp=this.bXpSp2=this.bAOL=false;
this.init=function(){
var nv=navigator,agt=nv.userAgent.toLowerCase(),i=0,ver;
with(this){
if(agt.has("webtv")){
bWebTV=true;
i=agt.indexOf("webtv/")+6;
}else{
if(agt.has("firefox")){
bFirefox=true;
i=agt.lastIndexOf("firefox")+8;
}else{
if(agt.has("safari")){
bSafari=true;
i=agt.lastIndexOf("safari")+7;
}else{
if(typeof (window.opera)!="undefined"){
bOpera=true;
i=agt.lastIndexOf("opera")+6;
}else{
if(nv.appName.is("Netscape")){
bNav=true;
i=agt.lastIndexOf("/")+1;
}else{
if(agt.has("msie")){
bIE=true;
i=agt.indexOf("msie")+4;
if(agt.has("aol")||agt.has("america online")){
bAOL=true;
}
}
}
}
}
}
}
ver=agt.substring(i);
iVer=parseInt(ver);
fVer=parseFloat(ver);
fMinorVer=fVer-iVer;
bWin=agt.has("win");
bWinXp=(bWin&&agt.has("windows nt 5.1"));
bXpSp2=(bWinXp&&agt.has("sv1"));
bMac=agt.has("mac");
bMacppc=(bMac&&agt.hasAny("ppc","powerpc"));
bMactel=(bMac&&agt.has("intel"));
aMimeTypes=nv.mimeTypes;
bActiveXSupported=(!bMac&&(typeof (ActiveXObject)=="function"));
}
};
this.init();
return this;
};
function BtaHandler(){
}
BtaHandler.prototype.handle=function(_db4){
oRegistry.get("bta").onRefresh();
};
function DynamicMenu(_db5,_db6,_db7,_db8,_db9,_dba,_dbb,_dbc,_dbd,_dbe,_dbf,_dc0,_dc1,_dc2,_dc3,_dc4,_dc5,_dc6,_dc7,_dc8){
this.iMouseOutTimer=null;
this.iMouseOverTimer=null;
this.iLeftPadding=_dbf;
this.iTopPadding=_dc0;
this.iRightPadding=_dc1;
this.sAnchorId=_db5;
this.sContainerLayerId=_db6;
this.sContentLayerId=_db7;
this.iMouseOutDelay=_db8;
this.iMouseOverDelay=_db9;
this.iHighResDocWidth=_dba;
this.iLowResDocWidth=_dbb;
this.iHighResColumns=_dbc;
this.iMediumResColumns=_dbd;
this.iLowResColumns=_dbe;
this.sHandler=_dc2;
this.sCollName=_dc3;
this.sWidth=_dc4;
this.sAnchorMouseOverClass=_dc5;
this.sAnchorMouseOutClass=_dc6;
this.iframeShim=null;
this.sHTML=null;
this.oAnchor=null;
this.sTemplate=null;
this.sAnchorText=_dc7;
this.sDomain=_dc8;
this.getAnchor=function(){
with(this){
if(oAnchor==null){
var oCl=VjClient.getBrowserObj(),a=getElementById(sAnchorId),t=sAnchorText;
if(t){
(oCl.bFirefox)?a.textContent=t:a.innerText=t;
}
oAnchor=a;
}
return oAnchor;
}
};
if(this.sAnchorId=="Help"){
this.iLeftPadding-=5;
}
}
DynamicMenu.prototype.showDynamicMenu=function(){
var oL,oA,iL,iT,iWW,noc,iAL,iAW,iLW,op,oSI,bF=false,t,lh=window.location.href,agt=navigator.userAgent.toLowerCase();
with(this){
clearMouseOutTimer();
if(sTemplate==null){
t=getElementById(sContentLayerId);
if(t){
sTemplate=t.innerHTML;
}
}
oL=getElementById(sContainerLayerId);
op=oL.offsetParent;
oA=getAnchor();
iAL=DynamicMenuGetOffsetLeft(oA);
iAW=oA.offsetWidth;
iT=getOffsetTop(oA)+(oA.offsetHeight)+iTopPadding;
iWW=VjWindowUtils.getBrowserWindowWidth();
if(iWW>iHighResDocWidth){
noc=iHighResColumns;
}else{
if(iWW>iLowResDocWidth&&iWW<=iHighResDocWidth){
noc=iMediumResColumns;
}else{
if(iWW<=iLowResDocWidth){
noc=iLowResColumns;
}else{
noc=5;
}
}
}
if(sHTML==null){
bF=true;
sHTML=getMenuHtml(noc);
if(sHTML==null){
return;
}
oL.innerHTML=sHTML;
}
iLW=oL.offsetWidth;
var oCon=GetContainerDiv(),cw,bRA=false;
if(sAnchorId=="Help"){
bRA=true;
}
if(oCon&&document.all&&!lh.hasAny("community","education")){
cw=oCon.offsetWidth;
if((iAL+iLW)>cw){
bRA=true;
}
}
if(lh.has("securitycenter")&&lh.has(".hk")){
iAL=getOffsetLeft(oA);
}else{
if(lh.has("wantitnow")&&lh.has(".in")&&document.all){
iAL=getOffsetLeft(oA);
}else{
if(lh.hasAny("feedback.","announce.")&&document.all){
iAL=getOffsetLeft(oA);
}
}
}
var _dcc=getElementById("2tabPopularProducts");
if(_dcc&&document.all){
iAL=getOffsetLeft(oA);
}
if((((iWW-iAL-iLW)<=10)&&iWW>iLW)||(iWW<(getOffsetLeft(oA)+iAW+iLW))||bRA){
iL=iAL+iAW-iLW;
}else{
iL=iAL;
}
if(sAnchorId=="Buy"||sAnchorId=="Sell"){
iL=iAL;
}
iL+=iLeftPadding;
if(lh.has("securitycentre")&&lh.has(".sg")&&document.all){
iL+=10;
}else{
if(lh.has("my.")&&agt.has("firefox")){
iL-=7;
}
}
if(iL>=0){
oL.style.left=(iL-1)+"px";
}
oL.style.top=(iT)+"px";
oL.style.zIndex="1000";
if(bF){
if(lh.has("motors")){
iframeShim=addLayerShim(oL,12);
}else{
iframeShim=addLayerShim(oL);
}
}else{
if(agt.hasAny("msie","firefox")){
oL.appendChild(iframeShim);
}
}
oSI=getElementById(sContainerLayerId+"-spacer");
if(oSI&&bF){
oSI.width=iLW;
}
iMouseOverTimer=setTimeout(VjUtils.hitch(this,"show"),iMouseOverDelay);
}
};
DynamicMenu.prototype.show=function(){
var oA;
with(this){
oA=getAnchor();
if(oA){
oA.className=sAnchorMouseOverClass;
}
toggleVisibility(sContainerLayerId,true);
}
};
DynamicMenu.prototype.startMouseOutTimer=function(){
with(this){
clearTimeout(iMouseOverTimer);
iMouseOutTimer=setTimeout(VjUtils.hitch(this,"close"),iMouseOutDelay);
}
};
DynamicMenu.prototype.close=function(){
var oA;
with(this){
oA=getAnchor();
if(oA){
oA.className=sAnchorMouseOutClass;
}
toggleVisibility(sContainerLayerId,false);
if(iframeShim){
removeLayerShim(getElementById(sContainerLayerId),iframeShim);
}
}
};
DynamicMenu.prototype.clearMouseOutTimer=function(){
clearTimeout(this.iMouseOutTimer);
};
DynamicMenu.prototype.getMenuHtml=function(_dcf){
with(this){
var i,j,c,n,h,ipc,html,img="",si,sTemp=".paradise.qa.ebay.com";
si="<img src='http://pics.ebaystatic.com/aw/pics/s.gif' height='1' width='1'  border='0' ";
var _dd1=window[sHandler];
if(!_dd1){
return;
}
var data=_dd1(),items=data[sCollName],l=items.length;
ipc=Math.ceil(l/_dcf);
h="<table bgcolor='white' border='0' cellpadding='0' cellspacing='0'";
if(this.sWidth!=""){
h+=" width='"+sWidth+"'";
}
h+=">";
for(i=0;i<ipc;i++){
h+="<tr>";
for(j=0;j<_dcf;j++){
h+="<td nowrap>";
if(i==0){
h+=si+"><br/>";
img=si+" id='"+sContainerLayerId+"-spacer'>";
}
n=i+(j)*ipc;
c=items[n];
if(c){
if(typeof (c.url)!="undefined"){
h+="<a href='"+(sDomain?c.url.replace(sTemp,sDomain):c.url)+"'>";
h+=c.value;
h+="</a>";
}else{
h+=c.value;
}
}else{
h+="&nbsp;";
}
h+="</td>";
}
h+="</tr>";
}
h+="</table>";
html=h;
if(sTemplate){
html=sTemplate.replace("##1##",h).replace("##2##",img);
}
return html;
}
};
function DynamicMenuMouseOutHandler(psId){
this.id=psId;
}
DynamicMenuMouseOutHandler.prototype.handle=function(_dd4){
oRegistry.get(this.id).startMouseOutTimer();
};
function DynamicMenuClearMouseOutHandler(psId){
this.id=psId;
}
DynamicMenuClearMouseOutHandler.prototype.handle=function(_dd6){
oRegistry.get(this.id).clearMouseOutTimer();
};
function DynamicShowMenuHandler(psId){
this.id=psId;
}
DynamicShowMenuHandler.prototype.handle=function(_dd8){
oRegistry.get(this.id).showDynamicMenu();
};
function DynamicMenuGetOffsetLeft(e){
var l=0,oCl=VjClient.getBrowserObj(),ex=(oCl.bIE||oCl.bSafari),lh=window.location.href;
var bH=(typeof (isHomepage)!="undefined")?isHomepage:false;
if(e.offsetParent){
l=e.offsetLeft;
while(e=e.offsetParent){
if(!e.id.toLowerCase().has("maincontent")&&!e.className.has("pagecontainer")){
l+=e.offsetLeft;
}
if(((e.className.is("pnav")||e.innerHTML.has("snav"))&&ex)&&e.offsetLeft!=0&&(!lh.hasAny("community","sitemap","/help/","/education/"))){
return l;
}else{
if((e.className.is("pnav")||e.innerHTML.has("snav"))&&e.offsetLeft!=0&&oCl.bFirefox&&lh.has(".hk")&&(!lh.has("community")&&!bH)){
return l;
}else{
if((e.className.is("pnav")||e.innerHTML.has("snav"))&&e.offsetLeft!=0&&oCl.bIE&&lh.has(".au")&&lh.hasAny("/help/")){
return l;
}
}
}
}
}
return l;
}
function GetContainerDiv(){
var d=document,aa,i,l;
if(d.getElementsByTagName){
aa=d.getElementsByTagName("div");
}else{
if(d.all){
aa=d.all;
}
}
l=aa.length;
for(i=0;i<l;i++){
if(aa[i].className=="gbhdr"){
return aa[i];
}
}
}
DynamicMenu.prototype.addLayerShim=function(node,_dde,_ddf){
var agt=navigator.userAgent.toLowerCase();
if(agt.indexOf("msie")==-1&&agt.indexOf("firefox")==-1){
return;
}
var w=node.offsetWidth,h=node.offsetHeight;
w+=_dde?_dde:0;
h+=_ddf?_ddf:0;
var _de2=document.createElement("IFRAME");
_de2.style.width=w+"px";
_de2.style.height=h+"px";
_de2.style.filter="chroma(color='white')";
_de2.frameBorder=0;
_de2.style.position="absolute";
_de2.style.left="0px";
_de2.style.top="0px";
_de2.style.zIndex="-1";
_de2.style.filter="Alpha(Opacity=\"0\")";
node.appendChild(_de2);
return _de2;
};
DynamicMenu.prototype.removeLayerShim=function(_de3,_de4){
var agt=navigator.userAgent.toLowerCase();
if(agt.indexOf("msie")==-1&&agt.indexOf("firefox")==-1){
return;
}
if(_de4&&_de4.parentElement){
_de3.removeChild(_de4);
}
};
function getOffsetTop(elm){
var _de7=elm.offsetTop;
var _de8=elm.offsetParent;
while(_de8!==null){
_de7+=_de8.offsetTop;
_de8=_de8.offsetParent;
}
return _de7;
}
function getOffsetLeft(elm){
var _dea=elm.offsetLeft;
var _deb=elm.offsetParent;
while(_deb!==null){
_dea+=_deb.offsetLeft;
_deb=_deb.offsetParent;
}
return _dea;
}
var VjLayerUtils={};
VjLayerUtils.matchColumnHeight=function(_dec,_ded,_dee){
var px="px";
var _df0=document.getElementById(_dec);
var _df1=_df0.offsetHeight;
var _df2=Math.max(_df1,_ded);
for(var i=0;i<_dee.length;i++){
document.getElementById(_dee[i]).style.height=_df2+px;
}
};
VjLayerUtils.addLayerShim=function(node){
var agt=navigator.userAgent.toLowerCase();
if(agt.indexOf("msie")==-1&&agt.indexOf("firefox")==-1){
return;
}
var _df6=document.createElement("IFRAME");
_df6.style.width=node.offsetWidth+"px";
_df6.style.height=node.offsetHeight+"px";
_df6.style.filter="chroma(color='white')";
_df6.frameBorder=0;
_df6.style.position="absolute";
_df6.style.left="0px";
_df6.style.top="0px";
_df6.style.zIndex="-1";
_df6.style.filter="Alpha(Opacity=\"0\")";
node.appendChild(_df6);
return _df6;
};
VjLayerUtils.removeLayerShim=function(_df7,_df8){
var agt=navigator.userAgent.toLowerCase();
if(agt.indexOf("msie")==-1&&agt.indexOf("firefox")==-1){
return;
}
if(_df8&&_df8.parentElement){
_df7.removeChild(_df8);
}
};
String.prototype.has=function(pStr){
return (this.indexOf(pStr)!=-1);
};
String.prototype.hasArg=function(pArg){
var a=pArg,rv=false;
if(typeof (a)=="string"){
rv=this.has(a);
}else{
var aL=a.length;
for(var j=0;j<aL&&!rv;j++){
rv=this.has(a[j]);
}
}
return rv;
};
String.prototype.hasAny=function(){
var a=arguments,l=a.length,rv=false;
for(var i=0;i<l&&!rv;i++){
rv=this.hasArg(a[i]);
}
return rv;
};
String.prototype.hasAll=function(){
var a=arguments,l=a.length;
for(var i=0;i<l;i++){
if(!this.hasArg(a[i])){
return false;
}
}
return true;
};
String.prototype.is=function(s){
return (this==s);
};
String.prototype.isAny=function(){
var a=arguments,l=a.length,rv=false,aL;
for(var i=0;i<l&&!rv;i++){
if(typeof (a[i])=="string"){
rv=(this==a[i]);
}else{
aL=a[i].length;
for(var j=0;j<aL&&!rv;j++){
rv=(this==a[i][j]);
}
}
}
return rv;
};
VjURL={};
VjURL.addArg=function(_e07,_e08,_e09){
if(_e07==null||_e07==undefined){
return null;
}
if(_e07.indexOf("?")<0){
_e07+="?"+_e08+"="+_e09;
return _e07;
}
var _e0a=this.getArgPairIfExists(_e07,_e08);
if(_e0a!==null){
_e07.replace(_e0a,_e08+"="+_e09);
}else{
_e07+="&"+_e08+"="+_e09;
}
return _e07;
};
VjURL.getArg=function(_e0b,_e0c){
if(_e0b==null||_e0b==undefined){
return null;
}
if(_e0b.indexOf("?")<0){
return null;
}
var _e0d=this.getArgPairIfExists(_e0b,_e0c);
if(_e0d!==null){
return _e0d.substring(_e0d.indexOf("=")+1);
}
return null;
};
VjURL.getArgPairIfExists=function(_e0e,_e0f){
var _e10=_e0e.indexOf("?");
if(_e10<0){
return null;
}
var _e11=_e0e;
var _e12,argName;
while(_e10>=0){
_e11=_e11.substring(_e10+1);
_e12=_e11;
_e10=_e11.indexOf("&");
if(_e10>=0){
_e12=_e11.substring(0,_e10);
}
argName=_e12.substring(0,_e12.indexOf("="));
if(argName==_e0f){
return _e12;
}
}
return null;
};
function TrackingModuleEnabler(_e13,_e14){
this.sCid=_e13;
this.sCidParms=_e14;
}
TrackingModuleEnabler.prototype.rewriteUrl=function(_e15){
if(_e15.nativeEvent==null||_e15.nativeEvent==undefined){
return;
}
var elem=_e15.nativeEvent.srcElement||_e15.nativeEvent.target;
if(elem==null||elem==undefined){
return;
}
elem=this.getAnchor(elem);
if(this.sCidParms&&elem){
elem.href=VjURL.addArg(elem.href,this.sCid,this.sCidParms);
}
};
TrackingModuleEnabler.prototype.handle=function(_e17){
this.rewriteUrl(_e17);
};
TrackingModuleEnabler.prototype.getAnchor=function(_e18){
var e=_e18;
if(e&&e.tagName){
if(!e.tagName.is("A")){
e=this.getAnchor(e.parentNode);
}
return e;
}
};
var dsf_debug=true;
function dsf_EventDispatcher(){
this.eventHandlers=Object();
this.fCustomLoad={};
}
dsf_EventDispatcher.prototype.process=function(_e1a,_e1b){
var _e1c=this.eventHandlers[_e1a];
if(!_e1c){
return true;
}
var _e1d=_e1c[_e1b.eventType];
if(!_e1d){
return true;
}
var _e1e=true;
for(var i=0;i<_e1d.length;i++){
var _e20=_e1d[i].handle(_e1b);
if(_e20&&_e20.objType=="dsf_Message"){
if(typeof (svcEngine)!="undefined"&&svcEngine.handleRequest(_e20)===false){
_e1e=false;
}
}else{
if(_e20===false){
_e1e=false;
}
}
}
return _e1e;
};
dsf_EventDispatcher.prototype.register=function(id,_e22,_e23){
var _e24=id;
if(!this.eventHandlers[_e24]){
this.eventHandlers[_e24]=[];
}
var _e25=this.eventHandlers[_e24];
if(!_e25[_e22]){
_e25[_e22]=[];
}
var _e26=_e25[_e22];
_e26[_e26.length]=_e23;
};
dsf_EventDispatcher.prototype.attachHandlerToElement=function(id,_e28,_e29){
eventDispatcher.register(id,_e28,_e29);
var _e2a=document.getElementById(id);
if(id=="body"){
_e2a=document.body;
if(_e28=="onload"||_e28=="onunload"){
var _e2b=window[_e28]||"",str=_e2b.toString();
if(str.length>0&&str.indexOf("eventDispatcher")==-1){
this.fCustomLoad[_e28]=_e2b;
}
window[_e28]=function(){
if(typeof eventDispatcher.fCustomLoad[_e28]=="function"){
eventDispatcher.fCustomLoad[_e28]();
}
eventDispatcher[_e28](_e2a);
};
return this;
}
}
if(_e2a){
_e2a[_e28]=function(_e2c){
return eventDispatcher[_e28](this,_e2c||window.event);
};
}
return this;
};
dsf_EventDispatcher.prototype.detachHandlers=function(id,_e2e){
var _e2f=id;
if(!this.eventHandlers[_e2f]){
return;
}
var _e30=this.eventHandlers[_e2f];
if(_e30[_e2e]){
_e30[_e2e]=[];
}
var _e31=document.getElementById(id);
if(id=="body"){
_e31=document.body;
if(_e2e=="onload"||_e2e=="onunload"||_e2e=="onclick"){
window[_e2e]=null;
}
}
if(_e31){
_e31[_e2e]=null;
}
};
function dsf_Event(src,_e33,_e34){
this.src=src;
this.eventType=_e33;
this.nativeEvent=_e34;
}
function dsf_SvcConfig(_e35,url){
this.url=url;
this.method=_e35;
this.reqtMarshalling="raw";
this.respMarshalling="raw";
}
function dsf_Message(_e37){
this.objType="dsf_Message";
this.svcId=_e37;
this.request;
this.response;
this.clientContext;
this.trspType="InProc";
this.status;
this.svcConfig;
this.returnData=true;
this.trace="";
}
dsf_EventDispatcher.prototype.getId=function(src,id){
var _e3a=id;
if(_e3a===null||!_e3a){
_e3a=src.id;
}
return _e3a;
};
dsf_EventDispatcher.prototype.getBodyId=function(src,id){
var _e3d=this.getId(src,id);
if(!_e3d){
_e3d="body";
}
return _e3d;
};
dsf_EventDispatcher.prototype.onload=function(src,_e3f){
return this.process(this.getBodyId(src),new dsf_Event(src,"onload",_e3f));
};
dsf_EventDispatcher.prototype.onunload=function(src,_e41){
return this.process(this.getBodyId(src),new dsf_Event(src,"onunload",_e41));
};
dsf_EventDispatcher.prototype.onchange=function(src,_e43){
return this.process(this.getId(src),new dsf_Event(src,"onchange",_e43));
};
dsf_EventDispatcher.prototype.onsubmit=function(src,_e45){
return this.process(this.getId(src),new dsf_Event(src,"onsubmit",_e45));
};
dsf_EventDispatcher.prototype.onreset=function(src,_e47){
return this.process(this.getId(src),new dsf_Event(src,"onreset",_e47));
};
dsf_EventDispatcher.prototype.onselect=function(src,_e49){
return this.process(this.getId(src),new dsf_Event(src,"onselect",_e49));
};
dsf_EventDispatcher.prototype.onblur=function(src,_e4b){
return this.process(this.getId(src),new dsf_Event(src,"onblur",_e4b));
};
dsf_EventDispatcher.prototype.onfocus=function(src,_e4d){
return this.process(this.getId(src),new dsf_Event(src,"onfocus",_e4d));
};
dsf_EventDispatcher.prototype.onkeydown=function(src,_e4f){
return this.process(this.getBodyId(src),new dsf_Event(src,"onkeydown",_e4f));
};
dsf_EventDispatcher.prototype.onkeypress=function(src,_e51){
return this.process(this.getBodyId(src),new dsf_Event(src,"onkeypress",_e51));
};
dsf_EventDispatcher.prototype.onkeyup=function(src,_e53){
return this.process(this.getBodyId(src),new dsf_Event(src,"onkeyup",_e53));
};
dsf_EventDispatcher.prototype.onclick=function(src,_e55){
return this.process(this.getBodyId(src),new dsf_Event(src,"onclick",_e55));
};
dsf_EventDispatcher.prototype.ondblclick=function(src,_e57){
return this.process(this.getBodyId(src),new dsf_Event(src,"ondblclick",_e57));
};
dsf_EventDispatcher.prototype.onmousedown=function(src,_e59){
return this.process(this.getBodyId(src),new dsf_Event(src,"onmousedown",_e59));
};
dsf_EventDispatcher.prototype.onmousemove=function(src,_e5b){
return this.process(this.getBodyId(src),new dsf_Event(src,"onmousemove",_e5b));
};
dsf_EventDispatcher.prototype.onmouseout=function(src,_e5d){
return this.process(this.getBodyId(src),new dsf_Event(src,"onmouseout",_e5d));
};
dsf_EventDispatcher.prototype.onmouseover=function(src,_e5f){
return this.process(this.getBodyId(src),new dsf_Event(src,"onmouseover",_e5f));
};
dsf_EventDispatcher.prototype.onmouseup=function(src,_e61){
return this.process(this.getBodyId(src),new dsf_Event(src,"onmouseup",_e61));
};
function dsf_EventHandler(_e62){
this.eventTypes=_e62;
this.srcId="";
}
dsf_EventHandler.prototype.handle=function(_e63){
if(this.handleEvent===null){
alert("all derived event handlers need to have a handleEvent method");
}
var _e64=this.handleEvent(_e63);
if(_e64===null){
return true;
}
};
dsf_EventHandler.prototype.attachTo=function(id){
eventDispatcher.register(this,id);
var _e66=this.eventTypes;
var _e67=document.getElementById(id);
for(var i=0;i<_e66.length;i++){
var _e69=_e66[i];
if(_e67[_e69]!==null){
continue;
}
_e67[_e69]=function(){
return eventDispatcher[_e69](this);
};
}
return this;
};
var eventDispatcher=new dsf_EventDispatcher();
function FooterTrk(){
}
FooterTrk.prototype.handle=function(_e6a){
eventDispatcher.attachHandlerToElement("glbfooter","onclick",new TrackingModuleEnabler("_trksid","m40"));
};
function VjComponentRegistry(){
this.controls=[];
}
VjComponentRegistry.prototype.put=function(_e6b,_e6c){
this.controls[_e6b]=_e6c;
};
VjComponentRegistry.prototype.get=function(_e6d){
return this.controls[_e6d];
};
VjComponentRegistry.prototype.dump=function(){
var _e6e=this.controls;
var _e6f="controls on page:\n";
for(var i in _e6e){
_e6f+="key = "+i;
_e6f+="controlName = "+_e6e[i].objtype;
_e6f+="\n";
}
return _e6f;
};
var oRegistry=new VjComponentRegistry();
function get_Buy_menu(){
return {"items":[{"value":"<a href=\"http://hub.ebay.com/buy\">Browse Categories</a>"},{"value":"<a href=\"http://www.ebayuniversity.com/gotraining/First_Time_Bidding_And_Buying\">Help with bidding &amp; buying</a>"},{"value":"<a href=\"http://pages.ebay.com/buy/tools.html\">Buyer Tools</a>"},{"value":"<a href=\"http://reviews.ebay.com/\">Reviews &amp; Guides</a>"}]};
}
function get_Sell_menu(){
return {"items":[{"value":"<a href=\"http://sell.ebay.com/sell\">Sell an item</a>"},{"value":"<a href=\"http://pages.ebay.com/sellercentral/newsellers.html\">Getting started</a>"},{"value":"<a href=\"http://pages.ebay.com/sellercentral/whatwouldyousell/what_to_sell_house.html\">What to sell</a>"},{"value":"<a href=\"http://pages.ebay.com/sell/tools.html\">Seller tools &amp; eBay Stores</a>"},{"value":"<a href=\"http://pages.ebay.com/services/buyandsell/shipping.html\">Shipping center</a>"}]};
}
function get_MyEbay_menu(){
return {"items":[{"value":"<a href=\"http://my.ebay.com/ws/eBayISAPI.dll?MyEbay&amp;smGHR=true\">Summary</a>"},{"value":"<a href=\"http://my.ebay.com/ws/eBayISAPI.dll?MyEbay&amp;CurrentPage=MyeBayWatching\">Watching</a>"},{"value":"<a href=\"http://my.ebay.com/ws/eBayISAPI.dll?MyEbay&amp;CurrentPage=MyeBayBidding\">Bidding</a>"},{"value":"<a href=\"http://my.ebay.com/ws/eBayISAPI.dll?MyEbay&amp;CurrentPage=MyeBaySelling&amp;smGHR=true\">Selling</a>"},{"value":"<a href=\"http://my.ebay.com/ws/eBayISAPI.dll?MyEbay&amp;CurrentPage=MyeBayAllFavorites\">Favorites</a>"}]};
}
function get_Community_menu(){
return {"items":[{"value":"<a href=\"http://www2.ebay.com/aw/marketing.shtml\">Announcements</a>"},{"value":"<a href=\"http://pages.ebay.com/community/answercenter/index.html\">Answer Center</a>"},{"value":"<a href=\"http://pages.ebay.com/community/boards/index.html\">Discussion Forums</a>"},{"value":"<a href=\"http://blogs.ebay.com/\">eBay Blogs</a>"},{"value":"<a href=\"http://groups.ebay.com/index.jspa?categoryID=1&amp;redirected=1\">Groups</a>"}]};
}
function get_Help_menu(){
return {"items":[{"value":"<a href=\"http://pages.ebay.com/help/index.html\">Help Topics</a>"},{"value":"<a href=\"http://pages.ebay.com/education/index.html\">Learning Center</a>"},{"value":"<a href=\"http://pages.ebay.com/securitycenter/index.html\">Security &amp; Resolution Center</a>"},{"value":"<a href=\"http://pages.ebay.com/university/index.html\">eBay University</a>"},{"value":"<a href=\"http://pages.ebay.com/help/contact_us/_base/index.html\">Contact Us</a>"}]};
}
function NavMenuBind(){
}
NavMenuBind.prototype.handle=function(_e71){
eventDispatcher.attachHandlerToElement("Buy-menu","onmouseout",new DynamicMenuMouseOutHandler("BuyMenu"));
eventDispatcher.attachHandlerToElement("Buy-menu","onmouseover",new DynamicMenuClearMouseOutHandler("BuyMenu"));
eventDispatcher.attachHandlerToElement("Buy","onmouseover",new DynamicShowMenuHandler("BuyMenu"));
eventDispatcher.attachHandlerToElement("Buy","onmouseout",new DynamicMenuMouseOutHandler("BuyMenu"));
eventDispatcher.attachHandlerToElement("Sell-menu","onmouseout",new DynamicMenuMouseOutHandler("SellMenu"));
eventDispatcher.attachHandlerToElement("Sell-menu","onmouseover",new DynamicMenuClearMouseOutHandler("SellMenu"));
eventDispatcher.attachHandlerToElement("Sell","onmouseover",new DynamicShowMenuHandler("SellMenu"));
eventDispatcher.attachHandlerToElement("Sell","onmouseout",new DynamicMenuMouseOutHandler("SellMenu"));
eventDispatcher.attachHandlerToElement("MyEbay-menu","onmouseout",new DynamicMenuMouseOutHandler("MyEbayMenu"));
eventDispatcher.attachHandlerToElement("MyEbay-menu","onmouseover",new DynamicMenuClearMouseOutHandler("MyEbayMenu"));
eventDispatcher.attachHandlerToElement("MyEbay","onmouseover",new DynamicShowMenuHandler("MyEbayMenu"));
eventDispatcher.attachHandlerToElement("MyEbay","onmouseout",new DynamicMenuMouseOutHandler("MyEbayMenu"));
eventDispatcher.attachHandlerToElement("Community-menu","onmouseout",new DynamicMenuMouseOutHandler("CommunityMenu"));
eventDispatcher.attachHandlerToElement("Community-menu","onmouseover",new DynamicMenuClearMouseOutHandler("CommunityMenu"));
eventDispatcher.attachHandlerToElement("Community","onmouseover",new DynamicShowMenuHandler("CommunityMenu"));
eventDispatcher.attachHandlerToElement("Community","onmouseout",new DynamicMenuMouseOutHandler("CommunityMenu"));
eventDispatcher.attachHandlerToElement("Help-menu","onmouseout",new DynamicMenuMouseOutHandler("HelpMenu"));
eventDispatcher.attachHandlerToElement("Help-menu","onmouseover",new DynamicMenuClearMouseOutHandler("HelpMenu"));
eventDispatcher.attachHandlerToElement("Help","onmouseover",new DynamicShowMenuHandler("HelpMenu"));
eventDispatcher.attachHandlerToElement("Help","onmouseout",new DynamicMenuMouseOutHandler("HelpMenu"));
};
function SecNavMenuBind(){
}
SecNavMenuBind.prototype.handle=function(_e72){
eventDispatcher.attachHandlerToElement("BrowseCategories-menu","onmouseout",new DynamicMenuMouseOutHandler("BrowseCategoriesMenu"));
eventDispatcher.attachHandlerToElement("BrowseCategories-menu","onmouseover",new DynamicMenuClearMouseOutHandler("BrowseCategoriesMenu"));
eventDispatcher.attachHandlerToElement("BrowseCategories","onmouseover",new DynamicShowMenuHandler("BrowseCategoriesMenu"));
eventDispatcher.attachHandlerToElement("BrowseCategories","onmouseout",new DynamicMenuMouseOutHandler("BrowseCategoriesMenu"));
};
function DynamicDropdown(_e73,_e74,_e75,_e76){
this.sDropdownId=_e73;
this.sHandler=_e74;
this.sCollName=_e75;
this.iCondNo=_e76;
}
DynamicDropdown.prototype.fill=function(){
var e,h,d,col,i,l,c,b=false;
with(this){
e=getElementById(sDropdownId);
if(e){
if(iCondNo==-1||e.options.length<=iCondNo){
h=window[sHandler];
if(!h){
return;
}
d=h(),col=d[sCollName],l=col.length;
for(i=0;i<l;i++){
c=col[i];
createOption(e,c.id,c.value);
}
}
}
}
};
DynamicDropdown.prototype.createOption=function(_e78,_e79,_e7a){
var e=_e78;
if(e){
var o=new Option(_e7a,_e79,false,false),os;
os=e.options;
os[os.length]=o;
}
};
function DynDropHandler_category0(){
}
DynDropHandler_category0.prototype.handle=function(_e7d){
oRegistry.get("category0").fill();
};
eventDispatcher.attachHandlerToElement("body","onload",new DynDropHandler_category0());
function HeaderTrk(){
}
HeaderTrk.prototype.handle=function(_e7e){
eventDispatcher.attachHandlerToElement("gnheader","onclick",new TrackingModuleEnabler("_trksid","m37"));
};
String.prototype.decodeBase64=function(){
var rv=this,len=rv.length,ret="",i=0;
var chr1,chr2,chr3="";
var enc1,enc2,enc3,enc4="";
var _e82="ABCDEFGHIJKLMNOPQRSTUVWXYZ"+"abcdefghijklmnopqrstuvwxyz"+"0123456789+/=*";
var test=new RegExp("[^A-Za-z0-9+/=*]");
if(test.exec(rv)){
return;
}
do{
enc1=_e82.indexOf(rv.charAt(i++));
enc2=_e82.indexOf(rv.charAt(i++));
enc3=_e82.indexOf(rv.charAt(i++));
enc4=_e82.indexOf(rv.charAt(i++));
chr1=(enc1<<2)|(enc2>>4);
chr2=((enc2&15)<<4)|(enc3>>2);
chr3=((enc3&3)<<6)|enc4;
ret+=String.fromCharCode(chr1);
if(!(enc3>=64)){
ret+=String.fromCharCode(chr2);
}
if(!(enc4>=64)){
ret+=String.fromCharCode(chr3);
}
chr1=chr2=chr3=enc1=enc2=enc3=enc4="";
}while(i<len);
return ret;
};
String.prototype.decodeUTF8=function(){
var s=this,len=s.length;
var rs="";
var i=0;
var c=0,c1=0,c2=0;
while(i<len){
c=s.charCodeAt(i);
if(c<128){
rs+=String.fromCharCode(c);
i++;
}else{
if((c>191)&&(c<224)){
c2=s.charCodeAt(i+1);
rs+=String.fromCharCode(((c&31)<<6)|(c2&63));
i+=2;
}else{
c2=s.charCodeAt(i+1);
c3=s.charCodeAt(i+2);
rs+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));
i+=3;
}
}
}
return rs;
};
String.prototype.replaceToken=function(pStr,_e89,_e8a){
var rv=pStr;
while(rv.has(_e89)){
rv=rv.replace(_e89,_e8a);
}
return rv;
};
String.prototype.replaceTokens=function(){
var rv=this,re,tkn,a=arguments,l=a.length;
for(var i=0;i<l;i++){
rv=this.replaceToken(rv,"<#"+(i+1)+"#>",a[i]);
}
return rv;
};
String.prototype.replaceTokensEx=function(_e8e){
var rv=this,re,tkn,a=arguments,l=a.length;
for(var i=1;i<l+1;i++){
rv=this.replaceToken(rv,_e8e.replace("n",(i)),a[i]);
}
return rv;
};
VjGreetings={};
VjGreetings.writePersonalHeader=function(_e91,_e92,_e93,_e94,_e95,_e96,_e97,_e98,_e99,_e9a,_e9b,_e9c,_e9d,_e9e,pRU,_ea0){
var u1p=VjCookieJar.readCookie("dp1","u1p"),s="",sinLink="",soutLink="",regLink="",un="undefined";
if(!u1p||typeof (u1p)==un){
s=typeof (_e9a)!=un?_e9a:"";
document.write(s);
return;
}
var _ea2=u1p.decodeBase64().decodeUTF8(),v1=VjCookieJar.readCookie("ebay","sin"),v2=VjCookieJar.readCookie("dp1","kms");
if(typeof (_ea2)==un){
return;
}
if(parseInt(pRU,0)===1){
_e92=VjURL.addArg(_e92,"ru",_ea0?_ea0:escape(document.location.href));
}
var a=VjCookieJar.readCookie("dp1","a1p"),ba,bp;
ba=a&&a>0;
bp=VjGreetings.isUserPersonalized();
var sA="";
if(ba){
if(a==1){
sA=_e9d;
}else{
sA=_e9e;
}
sA=sA.replaceTokensEx("##n##",a);
}
_e9c=_e9c.replaceTokensEx("##n##",sA);
if(_ea2.has("@@__@@__@@")){
s+=typeof (_e97)!=un?_e97:"";
sinLink="<a tabindex=\"-1\" href=\""+_e92+"\" >"+_e91+"</a>";
regLink="<a tabindex=\"-1\" href=\""+_e94+"\" >"+_e93+"</a>";
s=s.replaceTokensEx("##n##",sinLink,regLink);
}else{
if((v1&&v1.is("in"))||(v2&&v2.is("in"))){
if(bp){
if(ba){
s=_e9b+"&nbsp;";
}
s+=typeof (_e98)!=un?_e98:"";
soutLink="<a tabindex=\"-1\" href=\""+_e96+"\" >"+_e95+"</a>";
s=s.replaceTokensEx("##n##",_ea2,soutLink);
s+=_e9c;
}else{
s=_e9a;
}
}else{
if(ba){
s=_e9b+"&nbsp;";
}
s+=typeof (_e99)!=un?_e99:"";
sinLink="<a tabindex=\"-1\" href=\""+_e92+"\" >"+_e91+"</a>";
s=s.replaceTokensEx("##n##",_ea2,sinLink);
s+=_e9c;
}
}
document.write(s);
};
VjGreetings.isUserPersonalized=function(){
var cId=VjCookieJar.readCookie("cid");
var pCd=VjCookieJar.readCookie("dp1","pcid");
if(pCd){
if(cId){
cId=unescape(cId);
var hCd=cId;
var Inx=cId.indexOf("#");
if(Inx===-1&&cId.length>8){
return false;
}
if(Inx!==-1){
hCd=cId.substring(Inx+1,cId.length);
}
if(hCd===pCd){
VjCookieJar.writeCookie("cid",cId,365);
return true;
}else{
return false;
}
}
return false;
}
return true;
};
function getElementById(pId){
var elem=null;
var doc=window.document;
if(doc.getElementById){
elem=doc.getElementById(pId);
}else{
if(doc.all){
elem=doc.all(pId);
}
}
return elem;
}
String.prototype.replaceToken=function(pStr,_ead,_eae){
var rv=pStr;
while(rv.has(_ead)){
rv=rv.replace(_ead,_eae);
}
return rv;
};
String.prototype.replaceTokens=function(){
var rv=this,re,tkn,a=arguments,l=a.length;
for(var i=0;i<l;i++){
rv=this.replaceToken(rv,"<#"+(i+1)+"#>",a[i]);
}
return rv;
};
String.prototype.replaceTokensEx=function(_eb2){
var rv=this,re,tkn,a=arguments,l=a.length;
for(var i=1;i<l+1;i++){
rv=this.replaceToken(rv,_eb2.replace("n",(i)),a[i]);
}
return rv;
};
String.prototype.has=function(pStr){
return (this.indexOf(pStr)!=-1);
};
String.prototype.hasArg=function(pArg){
var a=pArg,rv=false;
if(typeof (a)=="string"){
rv=this.has(a);
}else{
var aL=a.length;
for(var j=0;j<aL&&!rv;j++){
rv=this.has(a[j]);
}
}
return rv;
};
String.prototype.hasAny=function(){
var a=arguments,l=a.length,rv=false;
for(var i=0;i<l&&!rv;i++){
rv=this.hasArg(a[i]);
}
return rv;
};
String.prototype.hasAll=function(){
var a=arguments,l=a.length;
for(var i=0;i<l;i++){
if(!this.hasArg(a[i])){
return false;
}
}
return true;
};
String.prototype.is=function(s){
return (this==s);
};
String.prototype.isAny=function(){
var a=arguments,l=a.length,rv=false,aL;
for(var i=0;i<l&&!rv;i++){
if(typeof (a[i])=="string"){
rv=(this==a[i]);
}else{
aL=a[i].length;
for(var j=0;j<aL&&!rv;j++){
rv=(this==a[i][j]);
}
}
}
return rv;
};
function toggleHideShow(_ec2,show){
var elem=getElementById(_ec2);
if(elem===null){
return;
}
var vis=elem.style.display;
if(show===undefined){
elem.style.display=(vis==="")?"none":"block";
}else{
elem.style.display=(show)?"block":"none";
}
}
function ExpressCrossLinking(_ec6,_ec7,_ec8,_ec9,_eca,_ecb,_ecc){
this.sLayerId=_ec6;
this.sCloseAnchorId=_ec7;
this.sCartCountText=_ec8;
this.aHostCoutryId=_ec9;
this.aHostCountryDomain=_eca;
this.aHideOnParams=_ecb;
this.sHtml=_ecc;
}
ExpressCrossLinking.prototype.getHost=function(){
var oCJ=VjCookieJar,df=document.referrer,sid=oCJ.readCookie("ebay","ecs")||"",rv="",i;
if(sid=="-1"){
return rv;
}
if(sid){
rv=this.getHostById(sid);
}else{
if((i=df.indexOf(".express."))!=-1){
df=df.substring(i+9).toLowerCase();
var f=df.indexOf("/");
if(f>0){
df=df.substring(0,f);
}
for(i in this.aHostCountryDomain){
if(this.compareHost(this.aHostCountryDomain[i],df)){
rv=this.aHostCountryDomain[i];
oCJ.writeCookielet("ebay","ecs",this.aHostCoutryId[i]);
break;
}
}
}
}
return rv.toLowerCase();
};
ExpressCrossLinking.prototype.compareHost=function(_ecf,_ed0){
var sh1=_ecf.toLowerCase(),sh2=_ed0.toLowerCase();
if(sh1.indexOf(".")==0){
sh1=sh1.substring(1);
}
if(sh2.indexOf(".")==0){
sh2=sh2.substring(1);
}
sh1=sh1.replace("/","");
sh2=sh2.replace("/","");
return (sh1==sh2);
};
ExpressCrossLinking.prototype.hideOnParams=function(){
if(this.aHideOnParams){
var _ed2=this.aHideOnParams;
var iLen=_ed2.length;
for(var i=0;i<iLen;i++){
if(document.location.href.has(_ed2[i])){
return true;
}
}
}
return false;
};
ExpressCrossLinking.prototype.init=function(){
if(this.hideOnParams()){
return;
}
var oD=document,oCJ=VjCookieJar,sh="",l=this.sLayerId;
if(sh=this.getHost()){
var oL=getElementById(l),ct=oCJ.readCookie("dp1","exc")||"",sc="",lh=oD.location.host;
ct=ct.split(".")[2];
lh=lh.substring(lh.indexOf(".")+1);
if(ct&&ct!="0"&&this.compareHost(lh,sh)){
sc=this.sCartCountText.replaceTokensEx("##n##",ct);
}
if(oL){
oL.innerHTML=this.sHtml.replaceTokensEx("##n##",sh,sc);
toggleHideShow(l,true);
var oCL=getElementById(this.sCloseAnchorId);
if(oCL){
oCL.onclick=VjUtils.hitch(this,"close");
}
}
}
};
ExpressCrossLinking.prototype.getHostById=function(psId){
var ids=this.aHostCoutryId,i,ind=-1,o="";
for(i=0;i<ids.length;i++){
if(psId==ids[i]){
ind=i;
break;
}
}
if(ind!=-1){
o=this.aHostCountryDomain[ind];
}
return o;
};
ExpressCrossLinking.prototype.close=function(){
toggleHideShow(this.sLayerId,false);
VjCookieJar.writeCookielet("ebay","ecs","-1");
return false;
};
oRegistry.put("expressCompId",new ExpressCrossLinking("divCrossLink","b_close","(##1##)",new Array("0","1","77","3"),new Array("ebay.com","ebay.com","ebay.de","ebay.co.uk"),new Array("from=R44","fromZR44"),"<table class=\"clTable\" align=\"center\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#EDF9FF\"><tr valign=\"middle\"><td width=\"36\" class=\"clCell\"><img src=\"http://pics.ebaystatic.com/aw/pics/icon/iconInfo_16x16.gif\" height=\"16\" width=\"16\" align=\"middle\"></td><td width=\"80%\" nowrap=\"nowrap\" class=\"clMsg\">You've left eBay Express.</td><td align=\"left\" nowrap=\"nowrap\"><a href=\"http://www.express.##1##/\">Shop again on eBay Express</a><span class=\"clSep\">|</span><img src=\"http://pics.ebaystatic.com/aw/pics/express/icons/iconCart_15x10.gif\" height=\"10\" width=\"15\" align=\"bottom\" alt=\"\"><a href=\"http://cart.express.##1##/ws/eBayISAPI.dll?ExpressCart&amp;action.view=&amp;from=Header\">Shopping Cart##2##</a></td><td width=\"135\" nowrap=\"nowrap\" class=\"clLogo\"><img src=\"http://pics.ebaystatic.com/aw/pics/express/logos/logoExpress_95x39.gif\" height=\"39\" width=\"95\" align=\"top\" alt=\"\"></td><td nowrap=\"nowrap\" width=\"26\" align=\"left\"><a href=\"#1\" id=\"b_close\"><img src=\"http://pics.ebaystatic.com/aw/pics/buttons/btnExpressClose.gif\" height=\"16\" width=\"16\" align=\"middle\" border=\"0\" alt=\"\"></a></td></tr></table>"));
eventDispatcher.attachHandlerToElement("body","onload",new ExpressHandler());
var VjActiveX={};
VjActiveX.init=function(){
var oC=VjClient.getBrowserObj();
if(oC.bIE){
var d=document;
dw=function(s){
d.writeln(s);
};
dw("<scr"+"ipt language=\"vbscript\" type=\"text/vbscript\">");
dw("\tFunction vbCheckActiveXControl (pActXName)");
dw("\t\taX = false");
dw("\t\ton error resume next");
dw("\t\taX = IsObject(CreateObject(pActXName))");
dw("\t\tvbCheckActiveXControl = aX");
dw("End Function");
dw("</scr"+"ipt>");
}
};
VjActiveX.isLibLoaded=function(_edd){
var oC=VjClient.getBrowserObj();
return oC.bIE&&!oC.bMac&&vbCheckActiveXControl(_edd);
};
VjActiveX.init();
var VjEbayToolbarDetect={};
VjEbayToolbarDetect.isEnabled=function(){
var V1="eBayToolbar.Helper",V2="eBayToolbarCommLib.IWebEvent.1";
with(this){
var oC=VjClient.getBrowserObj(),oAx=VjActiveX;
return (!(oC.bMac||oC.bMacppc)||!oC.bIE)&&(oAx.isLibLoaded(V1)||oAx.isLibLoaded(V2));
}
};
VjUtils={};
VjUtils.isString=function(wh){
return (typeof wh=="string");
};
VjUtils.hitch=function(_ee2,_ee3){
var fcn;
if(VjUtils.isString(_ee3)){
fcn=_ee2[_ee3];
}else{
fcn=_ee3;
}
return function(){
return fcn.apply(_ee2,arguments);
};
};
VjUtils.extend=function(_ee5,_ee6){
function inheritance(){
}
inheritance.prototype=_ee6.prototype;
_ee5.prototype=new inheritance();
_ee5.prototype.constructor=_ee5;
_ee5.baseConstructor=_ee6;
_ee5.superClass=_ee6.prototype;
};
function BuyerTransactionAlert(pId,_ee8,_ee9,_eea,_eeb,_eec,_eed,_eee,_eef,_ef0,_ef1){
this.sId=pId;
this.iPollingInterval=_ee8;
this.iMaxHits=_ee9;
this.iHitTimeout=_eea;
this.iServerHits=0;
this.sLastCookieletValue="";
this.sServerUrl=_eeb;
this.sImgServer=_eec+"/";
this.sViewItemUrl=_eed;
this.aAlertInfo=[["h:h:alt:2",_eef,"icon/iconOutbid_16x16.gif"],["h:h:alt:3",_eee,"icon/iconWatchB_16x16.gif"],["h:h:alt:4",_eef,"icon/iconOutbid_16x16.gif"],["h:h:alt:5",_ef0,"icon/iconchanceBlu_16x16.gif"],["h:h:alt:tcr",_ef1,"icon/iconMailBlue_16x16.gif"]];
var c,oC=VjClient.getBrowserObj();
if((oC.bNav&&oC.iVer<7)||(oC.bOpera&&(oC.iVer+oC.fMinorVer)<0.5)||(oC.bIE&&oC.iVer<5)){
return;
}
c=VjCookieJar.readCookie("ebaysignin");
if(!c||!c.is("in")){
return;
}
c=VjCookieJar.readCookie("dp1","a1p");
if(c&&c.length>0&&parseInt(c)>0){
return;
}
if(VjEbayToolbarDetect.isEnabled()){
return;
}
}
BuyerTransactionAlert.prototype.setValue=function(pVal,_ef4){
var oL=this.oL;
if(oL){
if(pVal.is("")&&!oL.ctrld){
return;
}
if(_ef4){
if(VjClient.getBrowserObj().bFirefox){
oL.textContent=pVal;
}else{
oL.innerText=pVal;
}
}else{
oL.innerHTML=pVal;
}
oL.ctrld=1;
}
};
BuyerTransactionAlert.prototype.onRefresh=function(){
if(!this.oL){
this.oL=getElementById(this.sId);
}
if(!this.oL){
return;
}
var c=VjCookieJar.readCookie("ebay","a2p");
if(!c){
this.onCookieExpire();
return;
}
var at=parseInt(c.charAt(8));
if(isNaN(at)){
return;
}
if(at==0){
this.setValue("");
return;
}
var nrt=parseInt(c.substring(0,8),16)*1000;
if(isNaN(nrt)){
return;
}
var ct=new Date();
ct=ct.getTime();
if(at==6||at==9){
if(!c.is(this.sLastCookieletValue)){
this.iServerHits=0;
}
this.setValue("");
this.sLastCookieletValue=c;
var t=(nrt>ct)?parseInt((nrt-ct)/1000):this.iPollingInterval;
window.setTimeout(VjUtils.hitch(this,this.onCookieExpire),t*1000);
return;
}
if(ct>=nrt){
this.onCookieExpire();
return;
}
this.iServerHits=0;
var cfg=this.aAlertInfo;
if(at<0&&at>=cfg.length){
return;
}
var ii=c.substring(9,c.lastIndexOf("."));
if(!c.is(this.sLastCookieletValue)){
var _efd=cfg[at-1],imgSrv=this.sImgServer;
var _efe=imgSrv+"s.gif";
var _eff="<img src=\""+_efe+"\" width=\"10\" height=\"16\" style=\"vertical-align:middle\">|<img src=\""+_efe+"\" width=\"10\" height=\"16\" style=\"vertical-align:middle\">";
_eff+="<img src=\""+imgSrv+_efd[2]+"?t\" style=\"vertical-align:middle\"><img src=\""+_efe+"\" width=\"5\" height=\"16\" style=\"vertical-align:middle\">";
var url=this.sViewItemUrl+"&item="+ii;
_eff+="<a href=\""+url+"&ssPageName="+_efd[0]+"\">"+_efd[1]+"</a>";
this.setValue(_eff);
this.sLastCookieletValue=c;
}
this.fireRefreshEvent();
};
BuyerTransactionAlert.prototype.fireRefreshEvent=function(_f01){
if(!_f01){
_f01=this.iPollingInterval;
}
window.setTimeout(VjUtils.hitch(this,this.onRefresh),_f01*1000);
};
BuyerTransactionAlert.prototype.onCookieExpire=function(){
var _f02=VjCookieJar.readCookie("ebaysignin");
if(!_f02.has("in")){
return;
}
if(document.location.href.has("https:")){
return;
}
if(this.iServerHits<this.iMaxHits){
this.iServerHits++;
var ct=new Date();
ct=ct.getTime();
this.setValue("<img height=\"1\" width=\"1\" src=\""+this.sServerUrl+"&clientTime="+ct+"\" style=\"visibility:hidden;vertical-align:middle\">");
this.fireRefreshEvent(this.iHitTimeout);
}else{
this.setValue("");
VjCookieJar.writeCookielet("ebay","a2p","1111111101111111111.");
}
};
oRegistry.put("bta",new BuyerTransactionAlert("bta",60,2,2,"http://bmsgs.ebay.com/ws/eBayISAPI.dll?GetBuyerTransactionAlerts","http://pics.ebaystatic.com/aw/pics","http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem","Watched Item ending soon!","You've been outbid!","You've received a Second Chance Offer","You've received a Transaction Confirmation Request."));
function toggleVisibility(_f04,show){
var elem=getElementById(_f04);
if(elem===null){
return;
}
var vis=elem.style.visibility;
if(show===undefined){
elem.style.visibility=(vis==="")?"hidden":"";
}else{
elem.style.visibility=(show)?"":"hidden";
}
}
eventDispatcher.attachHandlerToElement("body","onload",new FooterTrk());
oRegistry.put("BuyMenu",new DynamicMenu("Buy","Buy-menu","dynMenuCtr",75,250,900,800,1,1,1,5,1,0,"get_Buy_menu","items","","","","",""));
oRegistry.put("SellMenu",new DynamicMenu("Sell","Sell-menu","dynMenuCtr",75,250,900,800,1,1,1,1,1,0,"get_Sell_menu","items","","","","",""));
oRegistry.put("MyEbayMenu",new DynamicMenu("MyEbay","MyEbay-menu","dynMenuCtr",75,250,900,800,1,1,1,1,1,0,"get_MyEbay_menu","items","","","","",""));
oRegistry.put("CommunityMenu",new DynamicMenu("Community","Community-menu","dynMenuCtr",75,250,900,800,1,1,1,1,1,0,"get_Community_menu","items","","","","",""));
oRegistry.put("HelpMenu",new DynamicMenu("Help","Help-menu","dynMenuCtr",75,250,900,800,1,1,1,1,1,0,"get_Help_menu","items","","","","",""));
eventDispatcher.attachHandlerToElement("body","onload",new NavMenuBind());
oRegistry.put("BrowseCategoriesMenu",new DynamicMenu("BrowseCategories","BrowseCategories-menu","dynMenuCtr",75,250,900,800,3,3,3,-10,7,0,"getBrowseCategoriesData","items","100%","","","",".ebay.com"));
eventDispatcher.attachHandlerToElement("body","onload",new SecNavMenuBind());
oRegistry.put("category0",new DynamicDropdown("category0","getBrowseCategoriesData","items",1));
eventDispatcher.attachHandlerToElement("body","onload",new HeaderTrk());

// en_US_MAIN/e513/GlobalNav_EbayStatic_e5134658490_1_en_US_MAIN
// b=4658490