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(_2bf3,date){
_2bf3=_2bf3?_2bf3:0;
d=date?date:new Date();
var _2bf5=d.getTime();
var _2bf6=d.getTimezoneOffset()*60000;
var utc=_2bf5+_2bf6;
return new Date(utc+(3600000*_2bf3));
};
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(_2bf8,_2bf9){
var rv=this.readCookieObj(_2bf8,_2bf9).value;
return (rv)?unescape(rv):"";
};
VjCookieJar.createDefaultCookieBean=function(_2bfb,_2bfc){
var _2bfd={};
_2bfd.name=_2bfb;
_2bfd.cookieletname=_2bfc;
_2bfd.value="";
_2bfd.maxage=0;
_2bfd.rawcookievalue="";
_2bfd.mode="";
return _2bfd;
};
VjCookieJar.readCookieObj=function(_2bfe,_2bff){
var _2c00=this.createDefaultCookieBean(_2bfe,_2bff);
this.update();
this.checkConversionMap(_2c00);
_2c00.rawcookievalue=this.aCookies[_2c00.name];
if(!_2c00.name||!_2c00.rawcookievalue){
_2c00.value="";
}else{
if(!_2c00.cookieletname){
this.readCookieInternal(_2c00);
}else{
this.readCookieletInternal(_2c00);
}
}
return (typeof (_2c00)!="undefined")?_2c00:"";
};
VjCookieJar.checkConversionMap=function(_2c01){
var cmap=this.aConversionMap[_2c01.name];
if(cmap){
_2c01.mode=this.getMode(_2c01.name);
_2c01.name=cmap[0];
_2c01.cookieletname=cmap[1];
}
};
VjCookieJar.readCookieInternal=function(_2c03){
_2c03.value=_2c03.rawcookievalue;
return _2c03;
};
VjCookieJar.readCookieletInternal=function(_2c04){
var clet=this.getCookielet(_2c04.name,_2c04.cookieletname,_2c04.rawcookievalue);
var _2c06=this.getFormat(_2c04.name);
if(clet&&_2c06.bUseExp){
clet=clet.substring(0,clet.length-8);
}
_2c04.value=clet;
if(_2c04.mode==this.sCOMPAT){
_2c04.value=_2c04.rawcookievalue;
}
return _2c04;
};
VjCookieJar.readMultiLineCookie=function(_2c07,_2c08){
if(!_2c07||!_2c08){
return "";
}
var val,r="";
var cmap=this.aConversionMap[_2c07];
if(cmap){
val=this.readCookieObj(cmap[0],cmap[1]).value||"";
}
if(val){
r=this.getCookielet(_2c07,_2c08,val)||"";
}
return (typeof (r)!="undefined")?r:"";
};
VjCookieJar.writeCookie=function(_2c0b,psVal,psExp){
var cmap=this.aConversionMap[_2c0b];
if(cmap){
this.writeCookielet(cmap[0],cmap[1],psVal,psExp);
return;
}
var _2c0f=this.getFormat(_2c0b);
if(psVal&&_2c0f.escapedValue){
psVal=escape(psVal);
}
this.writeRawCookie(_2c0b,psVal,psExp);
};
VjCookieJar.writeRawCookie=function(_2c10,psVal,psExp){
if(_2c10&&(psVal!==undefined)){
if((isNaN(psVal)&&psVal.length<4000)||(psVal+"").length<4000){
if(typeof psExp=="number"){
psExp=this.getExpDate(psExp);
}
var _2c13=psExp?new Date(psExp):new Date(this.getExpDate(730));
var _2c14=this.getFormat(_2c10);
var sHost=this.sCookieDomain;
var dd=document.domain;
if(!dd.has(sHost)){
var index=dd.indexOf(".ebay.");
if(index>0){
this.sCookieDomain=dd.substring(index);
}
}
if(document.cookie){
document.cookie=_2c10+"="+(psVal||"")+((psExp||_2c14.bUseExp)?"; expires="+_2c13.toGMTString():"")+"; domain="+this.sCookieDomain+"; path="+this.sPath;
}
}
}
};
VjCookieJar.writeCookieEx=function(_2c18,psVal,_2c1a){
this.writeCookie(_2c18,psVal,this.getExpDate(_2c1a));
};
VjCookieJar.writeCookielet=function(_2c1b,_2c1c,psVal,psExp,_2c1f){
if(_2c1b&&_2c1c){
this.update();
var _2c20=this.getFormat(_2c1b);
if(_2c20.bUseExp&&psVal){
if(typeof psExp=="number"){
psExp=this.getExpDate(psExp);
}
var _2c21=psExp?new Date(psExp):new Date(this.getExpDate(730));
var _2c22=Date.UTC(_2c21.getUTCFullYear(),_2c21.getUTCMonth(),_2c21.getUTCDate());
_2c22=Math.floor(_2c22/1000);
psVal+=_2c22.dec2Hex();
}
var val=this.createCookieValue(_2c1b,_2c1c,psVal);
this.writeRawCookie(_2c1b,val,_2c1f);
}
};
VjCookieJar.writeMultiLineCookie=function(_2c24,_2c25,psVal,psExp,_2c28){
this.update();
var val=this.createCookieValue(_2c24,_2c25,psVal);
if(val){
var cmap=this.aConversionMap[_2c24];
if(cmap){
this.writeCookielet(cmap[0],cmap[1],val,psExp,_2c28);
}
}
};
VjCookieJar.getBitFlag=function(piDec,piPos){
piDec=parseInt(piDec,10);
var b=piDec.toString(2),r=piDec?b.charAt(b.length-piPos-1):"";
return (r=="1")?1:0;
};
VjCookieJar.setBitFlag=function(piDec,piPos,piVal){
var b="",p,i,e,l;
piDec=parseInt(piDec,10);
if(piDec){
b=piDec.toString(2);
}
l=b.length;
if(l<piPos){
e=piPos-l;
for(i=0;i<=e;i++){
b="0"+b;
}
}
p=b.length-piPos-1;
return parseInt(b.substring(0,p)+piVal+b.substring(p+1),2);
};
VjCookieJar.createCookieValue=function(_2c32,psKey,psVal){
var cmap=this.aConversionMap[_2c32],format=this.getFormat(_2c32),mode=this.getMode(_2c32),val;
if(cmap&&(mode==this.sSTRICT||mode==this.sCONVER)){
val=this.readCookieObj(cmap[0],cmap[1]).value||"";
}else{
val=this.aCookies[_2c32]||"";
}
if(format){
var clts=this.getCookieletArray(val,format);
clts[psKey]=psVal;
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 _2c3c=this.getFormat(sC[0]),cv=sC[1],sd=_2c3c.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(_2c3d,_2c3e,psVal){
var _2c40=this.getFormat(_2c3d);
var clts=this.getCookieletArray(psVal,_2c40);
return clts[_2c3e]||"";
};
VjCookieJar.getFormat=function(_2c42){
return this.aFormatMap[_2c42]||VjCookieJar.Default_Cookie_Format;
};
VjCookieJar.getCookieletArray=function(psVal,_2c44){
var rv=[],val=psVal||"";
if(_2c44.escapedValue){
val=unescape(val);
}
var a=val.split(_2c44.COOKIELET_DELIMITER);
for(var i=0;i<a.length;i++){
var idx=a[i].indexOf(_2c44.NAME_VALUE_DELIMITER);
if(idx>0){
rv[a[i].substring(0,idx)]=a[i].substring(idx+1);
}
}
return rv;
};
VjCookieJar.getExpDate=function(_2c49){
var _2c4a;
if(typeof _2c49=="number"&&_2c49>=0){
var d=new Date();
d.setTime(d.getTime()+(_2c49*24*60*60*1000));
_2c4a=d.toGMTString();
}
return _2c4a;
};
VjCookieJar.getMode=function(_2c4c){
var h=this.readCookieObj(this.sModesCookie,this.sModesCookielet).value,b;
if(!(_2c4c 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(_2c4c==o){
return (f.length==1)?"0"+f:f;
}
i++;
}
return null;
}
};
VjUtils={};
VjUtils.isString=function(wh){
return (typeof wh=="string");
};
VjUtils.hitch=function(_2c51,_2c52){
var fcn;
if(VjUtils.isString(_2c52)){
fcn=_2c51[_2c52];
}else{
fcn=_2c52;
}
return function(){
return fcn.apply(_2c51,arguments);
};
};
VjUtils.extend=function(_2c54,_2c55){
function inheritance(){
}
inheritance.prototype=_2c55.prototype;
_2c54.prototype=new inheritance();
_2c54.prototype.constructor=_2c54;
_2c54.baseConstructor=_2c55;
_2c54.superClass=_2c55.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 _2c5c=0,scrOfY=0;
if(typeof (window.pageYOffset)=="number"){
scrOfY=window.pageYOffset;
_2c5c=window.pageXOffset;
}else{
if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){
scrOfY=document.body.scrollTop;
_2c5c=document.body.scrollLeft;
}else{
if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){
scrOfY=document.documentElement.scrollTop;
_2c5c=document.documentElement.scrollLeft;
}
}
}
return [_2c5c,scrOfY];
};
function ExpressHandler(){
}
ExpressHandler.prototype.handle=function(event){
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=bOpera?window.opera.version():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(event){
oRegistry.get("bta").onRefresh();
};
function DynamicMenu(_2c60,_2c61,_2c62,_2c63,_2c64,_2c65,_2c66,_2c67,_2c68,_2c69,_2c6a,_2c6b,_2c6c,_2c6d,_2c6e,_2c6f,_2c70,_2c71,_2c72,_2c73){
this.iMouseOutTimer=null;
this.iMouseOverTimer=null;
this.iLeftPadding=_2c6a;
this.iTopPadding=_2c6b;
this.iRightPadding=_2c6c;
this.sAnchorId=_2c60;
this.sContainerLayerId=_2c61;
this.sContentLayerId=_2c62;
this.iMouseOutDelay=_2c63;
this.iMouseOverDelay=_2c64;
this.iHighResDocWidth=_2c65;
this.iLowResDocWidth=_2c66;
this.iHighResColumns=_2c67;
this.iMediumResColumns=_2c68;
this.iLowResColumns=_2c69;
this.sHandler=_2c6d;
this.sCollName=_2c6e;
this.sWidth=_2c6f;
this.sAnchorMouseOverClass=_2c70;
this.sAnchorMouseOutClass=_2c71;
this.iframeShim=null;
this.sHTML=null;
this.oAnchor=null;
this.sTemplate=null;
this.sAnchorText=_2c72;
this.sDomain=_2c73;
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);
if(oL){
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.hasAny("securitycentre","contact_ebay")&&lh.has(".au")){
iAL=getOffsetLeft(oA);
}else{
if((typeof (pageName)!="undefined")?pageName.has("CCHP_"):false){
iAL=getOffsetLeft(oA);
}else{
if(lh.hasAny("/buy/")){
iAL=getOffsetLeft(oA);
}else{
if(lh.hasAny("pages.",".html",".shtml")){
iAL=getOffsetLeft(oA);
}
}
}
}
}
var oTemp=getElementById("2tabPopularProducts");
if(oTemp&&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"||sAnchorId=="MyEbay"||sAnchorId=="OV"){
iL=iAL;
}
iL+=iLeftPadding;
if(lh.has("securitycentre")&&lh.has(".sg")&&document.all){
iL+=10;
}else{
if(lh.has("feedback")&&lh.has(".hk")&&agt.has("firefox")){
iL+=7;
}else{
if(lh.has("my.")&&agt.has("firefox")){
iL-=7;
}else{
if(lh.has("myworld")&&document.all){
iL+=10;
}
}
}
}
if(iL>=0){
oL.style.left=(iL-1)+"px";
}
oL.style.top=(iT)+"px";
oL.style.zIndex="1000";
if(bF){
if(lh.has("motors")||sAnchorId=="BrowseCategories"&&!lh.has("myworld")){
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-12;
}
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(_2c7a){
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 _2c7c=window[sHandler];
if(!_2c7c){
return;
}
var data=_2c7c(),items=data[sCollName],l=items.length;
ipc=Math.ceil(l/_2c7a);
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<_2c7a;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(event){
oRegistry.get(this.id).startMouseOutTimer();
};
function DynamicMenuClearMouseOutHandler(psId){
this.id=psId;
}
DynamicMenuClearMouseOutHandler.prototype.handle=function(event){
oRegistry.get(this.id).clearMouseOutTimer();
};
function DynamicShowMenuHandler(psId){
this.id=psId;
}
DynamicShowMenuHandler.prototype.handle=function(event){
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/","blogs","feedback"))){
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,_2c89,_2c8a){
var agt=navigator.userAgent.toLowerCase();
if(agt.indexOf("msie")==-1&&agt.indexOf("firefox")==-1){
return;
}
var w=node.offsetWidth,h=node.offsetHeight;
w+=_2c89?_2c89:0;
h+=_2c8a?_2c8a:0;
var _2c8d=document.createElement("IFRAME");
_2c8d.style.width=w+"px";
_2c8d.style.height=h+"px";
_2c8d.style.filter="chroma(color='white')";
_2c8d.frameBorder=0;
_2c8d.style.position="absolute";
_2c8d.style.left="0px";
_2c8d.style.top="0px";
_2c8d.style.zIndex="-1";
_2c8d.style.filter="Alpha(Opacity=\"0\")";
node.appendChild(_2c8d);
return _2c8d;
};
DynamicMenu.prototype.removeLayerShim=function(_2c8e,_2c8f){
var agt=navigator.userAgent.toLowerCase();
if(agt.indexOf("msie")==-1&&agt.indexOf("firefox")==-1){
return;
}
if(_2c8f&&_2c8f.parentElement){
_2c8e.removeChild(_2c8f);
}
};
function getOffsetTop(elm){
var _2c92=elm.offsetTop;
var _2c93=elm.offsetParent;
while(_2c93!==null){
_2c92+=_2c93.offsetTop;
_2c93=_2c93.offsetParent;
}
return _2c92;
}
function getOffsetLeft(elm){
var _2c95=elm.offsetLeft;
var _2c96=elm.offsetParent;
while(_2c96!==null){
_2c95+=_2c96.offsetLeft;
_2c96=_2c96.offsetParent;
}
return _2c95;
}
var VjLayerUtils={};
VjLayerUtils.matchColumnHeight=function(_2c97,_2c98,aDivs){
var px="px";
var _2c9b=document.getElementById(_2c97);
var _2c9c=_2c9b.offsetHeight;
var _2c9d=Math.max(_2c9c,_2c98);
for(var i=0;i<aDivs.length;i++){
document.getElementById(aDivs[i]).style.height=_2c9d+px;
}
};
VjLayerUtils.addLayerShim=function(node){
var agt=navigator.userAgent.toLowerCase();
if(agt.indexOf("msie")==-1&&agt.indexOf("firefox")==-1){
return;
}
var _2ca1=document.createElement("IFRAME");
_2ca1.style.width=node.offsetWidth+"px";
_2ca1.style.height=node.offsetHeight+"px";
_2ca1.style.filter="chroma(color='white')";
_2ca1.frameBorder=0;
_2ca1.style.position="absolute";
_2ca1.style.left="0px";
_2ca1.style.top="0px";
_2ca1.style.zIndex="-1";
_2ca1.style.filter="Alpha(Opacity=\"0\")";
node.appendChild(_2ca1);
return _2ca1;
};
VjLayerUtils.removeLayerShim=function(_2ca2,_2ca3){
var agt=navigator.userAgent.toLowerCase();
if(agt.indexOf("msie")==-1&&agt.indexOf("firefox")==-1){
return;
}
if(_2ca3&&_2ca3.parentElement){
_2ca2.removeChild(_2ca3);
}
};
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 Playground(_2cb2,_2cb3){
this.sLayerId=_2cb2;
this.sHandle=_2cb3;
}
Playground.prototype.show=function(){
var oCJ=VjCookieJar,sbf=oCJ.readCookie("ebay","sbf"),pcon=oCJ.getBitFlag(sbf,24),l,h;
var lid=this.sLayerId;
if(pcon){
l=getElementById(lid);
h=window[this.sHandle];
if(h&&l){
l.innerHTML=h();
toggleHideShow(lid,true);
}
}else{
toggleHideShow(lid,false);
}
};
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;
}
function toggleHideShow(_2cb9,show){
var elem=getElementById(_2cb9);
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";
}
}
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(_2cbd,_2cbe){
var rv=this.readCookieObj(_2cbd,_2cbe).value;
return (rv)?unescape(rv):"";
};
VjCookieJar.createDefaultCookieBean=function(_2cc0,_2cc1){
var _2cc2={};
_2cc2.name=_2cc0;
_2cc2.cookieletname=_2cc1;
_2cc2.value="";
_2cc2.maxage=0;
_2cc2.rawcookievalue="";
_2cc2.mode="";
return _2cc2;
};
VjCookieJar.readCookieObj=function(_2cc3,_2cc4){
var _2cc5=this.createDefaultCookieBean(_2cc3,_2cc4);
this.update();
this.checkConversionMap(_2cc5);
_2cc5.rawcookievalue=this.aCookies[_2cc5.name];
if(!_2cc5.name||!_2cc5.rawcookievalue){
_2cc5.value="";
}else{
if(!_2cc5.cookieletname){
this.readCookieInternal(_2cc5);
}else{
this.readCookieletInternal(_2cc5);
}
}
return (typeof (_2cc5)!="undefined")?_2cc5:"";
};
VjCookieJar.checkConversionMap=function(_2cc6){
var cmap=this.aConversionMap[_2cc6.name];
if(cmap){
_2cc6.mode=this.getMode(_2cc6.name);
_2cc6.name=cmap[0];
_2cc6.cookieletname=cmap[1];
}
};
VjCookieJar.readCookieInternal=function(_2cc8){
_2cc8.value=_2cc8.rawcookievalue;
return _2cc8;
};
VjCookieJar.readCookieletInternal=function(_2cc9){
var clet=this.getCookielet(_2cc9.name,_2cc9.cookieletname,_2cc9.rawcookievalue);
var _2ccb=this.getFormat(_2cc9.name);
if(clet&&_2ccb.bUseExp){
clet=clet.substring(0,clet.length-8);
}
_2cc9.value=clet;
if(_2cc9.mode==this.sCOMPAT){
_2cc9.value=_2cc9.rawcookievalue;
}
return _2cc9;
};
VjCookieJar.readMultiLineCookie=function(_2ccc,_2ccd){
if(!_2ccc||!_2ccd){
return "";
}
var val,r="";
var cmap=this.aConversionMap[_2ccc];
if(cmap){
val=this.readCookieObj(cmap[0],cmap[1]).value||"";
}
if(val){
r=this.getCookielet(_2ccc,_2ccd,val)||"";
}
return (typeof (r)!="undefined")?r:"";
};
VjCookieJar.writeCookie=function(_2cd0,psVal,psExp){
var cmap=this.aConversionMap[_2cd0];
if(cmap){
this.writeCookielet(cmap[0],cmap[1],psVal,psExp);
return;
}
var _2cd4=this.getFormat(_2cd0);
if(psVal&&_2cd4.escapedValue){
psVal=escape(psVal);
}
this.writeRawCookie(_2cd0,psVal,psExp);
};
VjCookieJar.writeRawCookie=function(_2cd5,psVal,psExp){
if(_2cd5&&(psVal!==undefined)){
if((isNaN(psVal)&&psVal.length<4000)||(psVal+"").length<4000){
if(typeof psExp=="number"){
psExp=this.getExpDate(psExp);
}
var _2cd8=psExp?new Date(psExp):new Date(this.getExpDate(730));
var _2cd9=this.getFormat(_2cd5);
var sHost=this.sCookieDomain;
var dd=document.domain;
if(!dd.has(sHost)){
var index=dd.indexOf(".ebay.");
if(index>0){
this.sCookieDomain=dd.substring(index);
}
}
if(document.cookie){
document.cookie=_2cd5+"="+(psVal||"")+((psExp||_2cd9.bUseExp)?"; expires="+_2cd8.toGMTString():"")+"; domain="+this.sCookieDomain+"; path="+this.sPath;
}
}
}
};
VjCookieJar.writeCookieEx=function(_2cdd,psVal,_2cdf){
this.writeCookie(_2cdd,psVal,this.getExpDate(_2cdf));
};
VjCookieJar.writeCookielet=function(_2ce0,_2ce1,psVal,psExp,_2ce4){
if(_2ce0&&_2ce1){
this.update();
var _2ce5=this.getFormat(_2ce0);
if(_2ce5.bUseExp&&psVal){
if(typeof psExp=="number"){
psExp=this.getExpDate(psExp);
}
var _2ce6=psExp?new Date(psExp):new Date(this.getExpDate(730));
var _2ce7=Date.UTC(_2ce6.getUTCFullYear(),_2ce6.getUTCMonth(),_2ce6.getUTCDate());
_2ce7=Math.floor(_2ce7/1000);
psVal+=_2ce7.dec2Hex();
}
var val=this.createCookieValue(_2ce0,_2ce1,psVal);
this.writeRawCookie(_2ce0,val,_2ce4);
}
};
VjCookieJar.writeMultiLineCookie=function(_2ce9,_2cea,psVal,psExp,_2ced){
this.update();
var val=this.createCookieValue(_2ce9,_2cea,psVal);
if(val){
var cmap=this.aConversionMap[_2ce9];
if(cmap){
this.writeCookielet(cmap[0],cmap[1],val,psExp,_2ced);
}
}
};
VjCookieJar.getBitFlag=function(piDec,piPos){
piDec=parseInt(piDec,10);
var b=piDec.toString(2),r=piDec?b.charAt(b.length-piPos-1):"";
return (r=="1")?1:0;
};
VjCookieJar.setBitFlag=function(piDec,piPos,piVal){
var b="",p,i,e,l;
piDec=parseInt(piDec,10);
if(piDec){
b=piDec.toString(2);
}
l=b.length;
if(l<piPos){
e=piPos-l;
for(i=0;i<=e;i++){
b="0"+b;
}
}
p=b.length-piPos-1;
return parseInt(b.substring(0,p)+piVal+b.substring(p+1),2);
};
VjCookieJar.createCookieValue=function(_2cf7,psKey,psVal){
var cmap=this.aConversionMap[_2cf7],format=this.getFormat(_2cf7),mode=this.getMode(_2cf7),val;
if(cmap&&(mode==this.sSTRICT||mode==this.sCONVER)){
val=this.readCookieObj(cmap[0],cmap[1]).value||"";
}else{
val=this.aCookies[_2cf7]||"";
}
if(format){
var clts=this.getCookieletArray(val,format);
clts[psKey]=psVal;
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 _2d01=this.getFormat(sC[0]),cv=sC[1],sd=_2d01.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(_2d02,_2d03,psVal){
var _2d05=this.getFormat(_2d02);
var clts=this.getCookieletArray(psVal,_2d05);
return clts[_2d03]||"";
};
VjCookieJar.getFormat=function(_2d07){
return this.aFormatMap[_2d07]||VjCookieJar.Default_Cookie_Format;
};
VjCookieJar.getCookieletArray=function(psVal,_2d09){
var rv=[],val=psVal||"";
if(_2d09.escapedValue){
val=unescape(val);
}
var a=val.split(_2d09.COOKIELET_DELIMITER);
for(var i=0;i<a.length;i++){
var idx=a[i].indexOf(_2d09.NAME_VALUE_DELIMITER);
if(idx>0){
rv[a[i].substring(0,idx)]=a[i].substring(idx+1);
}
}
return rv;
};
VjCookieJar.getExpDate=function(_2d0e){
var _2d0f;
if(typeof _2d0e=="number"&&_2d0e>=0){
var d=new Date();
d.setTime(d.getTime()+(_2d0e*24*60*60*1000));
_2d0f=d.toGMTString();
}
return _2d0f;
};
VjCookieJar.getMode=function(_2d11){
var h=this.readCookieObj(this.sModesCookie,this.sModesCookielet).value,b;
if(!(_2d11 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(_2d11==o){
return (f.length==1)?"0"+f:f;
}
i++;
}
return null;
}
};
VjURL={};
VjURL.addArg=function(psUrl,_2d16,_2d17){
if(psUrl==null||psUrl==undefined){
return null;
}
if(psUrl.indexOf("?")<0){
psUrl+="?"+_2d16+"="+_2d17;
return psUrl;
}
var _2d18=this.getArgPairIfExists(psUrl,_2d16);
if(_2d18!==null){
psUrl.replace(_2d18,_2d16+"="+_2d17);
}else{
psUrl+="&"+_2d16+"="+_2d17;
}
return psUrl;
};
VjURL.getArg=function(psUrl,_2d1a){
if(psUrl==null||psUrl==undefined){
return null;
}
if(psUrl.indexOf("?")<0){
return null;
}
var _2d1b=this.getArgPairIfExists(psUrl,_2d1a);
if(_2d1b!==null){
return _2d1b.substring(_2d1b.indexOf("=")+1);
}
return null;
};
VjURL.getArgPairIfExists=function(psUrl,_2d1d){
var _2d1e=psUrl.indexOf("?");
if(_2d1e<0){
return null;
}
var _2d1f=psUrl;
var _2d20,argName;
while(_2d1e>=0){
_2d1f=_2d1f.substring(_2d1e+1);
_2d20=_2d1f;
_2d1e=_2d1f.indexOf("&");
if(_2d1e>=0){
_2d20=_2d1f.substring(0,_2d1e);
}
argName=_2d20.substring(0,_2d20.indexOf("="));
if(argName==_2d1d){
return _2d20;
}
}
return null;
};
function TrackingModuleEnabler(psCid,_2d22){
this.sCid=psCid;
this.sCidParms=_2d22;
}
TrackingModuleEnabler.prototype.rewriteUrl=function(_2d23){
if(_2d23.nativeEvent==null||_2d23.nativeEvent==undefined){
return;
}
var elem=_2d23.nativeEvent.srcElement||_2d23.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(_2d25){
this.rewriteUrl(_2d25);
};
TrackingModuleEnabler.prototype.getAnchor=function(pElem){
var e=pElem;
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(srcId,event){
var _2d2a=this.eventHandlers[srcId];
if(!_2d2a){
return true;
}
var _2d2b=_2d2a[event.eventType];
if(!_2d2b){
return true;
}
var _2d2c=true;
for(var i=0;i<_2d2b.length;i++){
var _2d2e=_2d2b[i].handle(event);
if(_2d2e&&_2d2e.objType=="dsf_Message"){
if(typeof (svcEngine)!="undefined"&&svcEngine.handleRequest(_2d2e)===false){
_2d2c=false;
}
}else{
if(_2d2e===false){
_2d2c=false;
}
}
}
return _2d2c;
};
dsf_EventDispatcher.prototype.register=function(id,_2d30,_2d31){
var srcId=id;
if(!this.eventHandlers[srcId]){
this.eventHandlers[srcId]=[];
}
var _2d33=this.eventHandlers[srcId];
if(!_2d33[_2d30]){
_2d33[_2d30]=[];
}
var _2d34=_2d33[_2d30];
_2d34[_2d34.length]=_2d31;
};
dsf_EventDispatcher.prototype.attachHandlerToElement=function(id,_2d36,_2d37){
eventDispatcher.register(id,_2d36,_2d37);
var _2d38=document.getElementById(id);
if(id=="body"){
_2d38=document.body;
if(_2d36=="onload"||_2d36=="onunload"){
if(_2d38.vjLoadSet){
return this;
}else{
_2d38.vjLoadSet=true;
var _2d39=window[_2d36]||"";
if(_2d39){
this.fCustomLoad[_2d36]=_2d39;
}
}
window[_2d36]=function(){
if(typeof eventDispatcher.fCustomLoad[_2d36]=="function"){
eventDispatcher.fCustomLoad[_2d36]();
}
eventDispatcher[_2d36](document.body);
eventDispatcher.fCustomLoad={};
};
return this;
}
}
if(_2d38){
_2d38[_2d36]=function(event){
return eventDispatcher[_2d36](this,event||window.event);
};
}
return this;
};
dsf_EventDispatcher.prototype.detachHandlers=function(id,_2d3c){
var srcId=id;
if(!this.eventHandlers[srcId]){
return;
}
var _2d3e=this.eventHandlers[srcId];
if(_2d3e[_2d3c]){
_2d3e[_2d3c]=[];
}
var _2d3f=document.getElementById(id);
if(id=="body"){
_2d3f=document.body;
if(_2d3c=="onload"||_2d3c=="onunload"||_2d3c=="onclick"){
window[_2d3c]=null;
}
}
if(_2d3f){
_2d3f[_2d3c]=null;
}
};
function dsf_Event(src,_2d41,_2d42){
this.src=src;
this.eventType=_2d41;
this.nativeEvent=_2d42;
}
function dsf_SvcConfig(_2d43,url){
this.url=url;
this.method=_2d43;
this.reqtMarshalling="raw";
this.respMarshalling="raw";
}
function dsf_Message(svcId){
this.objType="dsf_Message";
this.svcId=svcId;
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 srcId=id;
if(srcId===null||!srcId){
srcId=src.id;
}
return srcId;
};
dsf_EventDispatcher.prototype.getBodyId=function(src,id){
var srcId=this.getId(src,id);
if(!srcId){
srcId="body";
}
return srcId;
};
dsf_EventDispatcher.prototype.onload=function(src,_2d4d){
return this.process(this.getBodyId(src),new dsf_Event(src,"onload",_2d4d));
};
dsf_EventDispatcher.prototype.onunload=function(src,_2d4f){
return this.process(this.getBodyId(src),new dsf_Event(src,"onunload",_2d4f));
};
dsf_EventDispatcher.prototype.onchange=function(src,_2d51){
return this.process(this.getId(src),new dsf_Event(src,"onchange",_2d51));
};
dsf_EventDispatcher.prototype.onsubmit=function(src,_2d53){
return this.process(this.getId(src),new dsf_Event(src,"onsubmit",_2d53));
};
dsf_EventDispatcher.prototype.onreset=function(src,_2d55){
return this.process(this.getId(src),new dsf_Event(src,"onreset",_2d55));
};
dsf_EventDispatcher.prototype.onselect=function(src,_2d57){
return this.process(this.getId(src),new dsf_Event(src,"onselect",_2d57));
};
dsf_EventDispatcher.prototype.onblur=function(src,_2d59){
return this.process(this.getId(src),new dsf_Event(src,"onblur",_2d59));
};
dsf_EventDispatcher.prototype.onfocus=function(src,_2d5b){
return this.process(this.getId(src),new dsf_Event(src,"onfocus",_2d5b));
};
dsf_EventDispatcher.prototype.onkeydown=function(src,_2d5d){
return this.process(this.getBodyId(src),new dsf_Event(src,"onkeydown",_2d5d));
};
dsf_EventDispatcher.prototype.onkeypress=function(src,_2d5f){
return this.process(this.getBodyId(src),new dsf_Event(src,"onkeypress",_2d5f));
};
dsf_EventDispatcher.prototype.onkeyup=function(src,_2d61){
return this.process(this.getBodyId(src),new dsf_Event(src,"onkeyup",_2d61));
};
dsf_EventDispatcher.prototype.onclick=function(src,_2d63){
return this.process(this.getBodyId(src),new dsf_Event(src,"onclick",_2d63));
};
dsf_EventDispatcher.prototype.ondblclick=function(src,_2d65){
return this.process(this.getBodyId(src),new dsf_Event(src,"ondblclick",_2d65));
};
dsf_EventDispatcher.prototype.onmousedown=function(src,_2d67){
return this.process(this.getBodyId(src),new dsf_Event(src,"onmousedown",_2d67));
};
dsf_EventDispatcher.prototype.onmousemove=function(src,_2d69){
return this.process(this.getBodyId(src),new dsf_Event(src,"onmousemove",_2d69));
};
dsf_EventDispatcher.prototype.onmouseout=function(src,_2d6b){
return this.process(this.getBodyId(src),new dsf_Event(src,"onmouseout",_2d6b));
};
dsf_EventDispatcher.prototype.onmouseover=function(src,_2d6d){
return this.process(this.getBodyId(src),new dsf_Event(src,"onmouseover",_2d6d));
};
dsf_EventDispatcher.prototype.onmouseup=function(src,_2d6f){
return this.process(this.getBodyId(src),new dsf_Event(src,"onmouseup",_2d6f));
};
function dsf_EventHandler(_2d70){
this.eventTypes=_2d70;
this.srcId="";
}
dsf_EventHandler.prototype.handle=function(event){
if(this.handleEvent===null){
alert("all derived event handlers need to have a handleEvent method");
}
var _2d72=this.handleEvent(event);
if(_2d72===null){
return true;
}
};
dsf_EventHandler.prototype.attachTo=function(id){
eventDispatcher.register(this,id);
var _2d74=this.eventTypes;
var _2d75=document.getElementById(id);
for(var i=0;i<_2d74.length;i++){
var _2d77=_2d74[i];
if(_2d75[_2d77]!==null){
continue;
}
_2d75[_2d77]=function(){
return eventDispatcher[_2d77](this);
};
}
return this;
};
var eventDispatcher;
if(typeof (eventDispatcher)=="undefined"){
eventDispatcher=new dsf_EventDispatcher();
}
function FooterTrk(){
}
FooterTrk.prototype.handle=function(event){
eventDispatcher.attachHandlerToElement("glbfooter","onclick",new TrackingModuleEnabler("_trksid","m40"));
};
function VjComponentRegistry(){
this.controls=[];
}
VjComponentRegistry.prototype.put=function(psKey,_2d7a){
this.controls[psKey]=_2d7a;
};
VjComponentRegistry.prototype.get=function(psKey){
return this.controls[psKey];
};
VjComponentRegistry.prototype.dump=function(){
var _2d7c=this.controls;
var _2d7d="controls on page:\n";
for(var i in _2d7c){
_2d7d+="key = "+i;
_2d7d+="controlName = "+_2d7c[i].objtype;
_2d7d+="\n";
}
return _2d7d;
};
var oRegistry;
if(typeof (oRegistry)=="undefined"){
oRegistry=new VjComponentRegistry();
}
function get_Buy_menu(){
return {"items":[{"value":"<a href=\"http://pages.motors.ebay.com/buy/buying-services-resources/index.html\">Buying Services</a>"},{"value":"<a href=\"http://pages.motors.ebay.com/buy/howto/index.html\">How to Buy a Vehicle</a>"},{"value":"<a href=\"http://pages.motors.ebay.com/buy/purchase-protection/index.html\">Vehicle Purchase Protection</a>"}]};
}
function get_Sell_menu(){
return {"items":[{"value":"<a href=\"http://pages.motors.ebay.com/sell/howto/index.html\">How to Sell a Vehicle</a>"},{"value":"<a href=\"http://hub.motors.ebay.com/sell\">Sell Your Item</a>"},{"value":"<a href=\"http://pages.ebay.com/ebaymotors/services/dealers.html\">Dealer Center</a>"}]};
}
function get_MyEbay_menu(){
return {"items":[{"value":"<a href=\"http://my.ebay.com/ebaymotors/ws/eBayISAPI.dll?MyEbay&amp;CurrentPage=MyeBayAllSelling\">All Selling</a>"},{"value":"<a href=\"http://my.ebay.com/ebaymotors/ws/eBayISAPI.dll?MyEbay&amp;CurrentPage=MyeBayAllBuying\">All Buying</a>"},{"value":"<a href=\"http://my.ebay.com/ebaymotors/ws/eBayISAPI.dll?MyEbay&amp;CurrentPage=MyeBayMyAccounts\">My Account</a>"},{"value":"<a href=\"http://my.ebay.com/ebaymotors/ws/eBayISAPI.dll?MyEbay&amp;CurrentPage=MyeBayMyMessages\">My Messages</a>"},{"value":"<a href=\"http://my.ebay.com/ebaymotors/ws/eBayISAPI.dll?MyEbay&amp;CurrentPage=MyeBayAllFavorites\">Favorites</a>"},{"value":"<a href=\"http://my.ebay.com/ebaymotors/ws/eBayISAPI.dll?MyEbay&amp;CurrentPage=MyReviewsAndGuides&amp;LogUID=\">My Reviews &amp; Guides</a>"}]};
}
function NavMenuBind(){
}
NavMenuBind.prototype.handle=function(event){
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"));
};
function get_CT_menu(){
return {"items":[{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZAcura3c2bde2\">Acura</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZAudi1f4fd9\">Audi</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZBMW1016c\">BMW</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZBuick3d8d53e\">Buick</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZCadillacebca2da5\">Cadillac</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZChevroletb00f1088\">Chevrolet</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZChrysler76de4c52\">Chrysler</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZDodge3f237b7\">Dodge</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZFord2180db\">Ford</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZGMC1141d\">GMC</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZHonda42abae4\">Honda</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZHummer8180dcfa\">Hummer</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZInfinitie2cce38\">Infiniti</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZJeep232b46\">Jeep</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZLandRover3bbee9d1\">Land Rover</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZLexus45eb4dd\">Lexus</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZLincoln6dc338df\">Lincoln</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZMazda46b0043\">Mazda</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZMitsubishiecdaf8b3\">Mitsubishi</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZMercedesBenz455f39e6\">Mercedes-Benz</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZNissan8b17a6e8\">Nissan</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZPontiac4ba0dc06\">Pontiac</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZPorsche4bd8b000\">Porsche</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZToyota95abf51e\">Toyota</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks___W0QQMake247a0eZVolkswagen1489b7cb\">Volkswagen</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Cars-Trucks__\"><i>See all Cars &amp; Trucks...</i></a>"},{"value":"<b>Themes</b>"},{"value":"<a href=\"http://hub.motors.ebay.com/alternative_fuel\">Alternative Fuel Vehicle</a>"},{"value":"<a href=\"http://hub.motors.ebay.com/collector_car\">Collector Car</a>"},{"value":"<a href=\"http://hub.motors.ebay.com/convertible\">Convertible</a>"},{"value":"<a href=\"http://hub.motors.ebay.com/corvette\">Corvette</a>"},{"value":"<a href=\"http://hub.motors.ebay.com/coupe\">Coupe</a>"},{"value":"<a href=\"http://hub.motors.ebay.com/minivan\">Minivan</a>"},{"value":"<a href=\"http://hub.motors.ebay.com/muscle_car\">Muscle Car</a>"},{"value":"<a href=\"http://hub.motors.ebay.com/mustang\">Mustang</a>"},{"value":"<a href=\"http://hub.motors.ebay.com/sedan\">Sedan</a>"},{"value":"<a href=\"http://hub.motors.ebay.com/suv\">SUV</a>"},{"value":"<a href=\"http://hub.motors.ebay.com/truck\">Truck</a>"},{"value":"<a href=\"http://hub.motors.ebay.com/wagon\">Wagon</a>"}]};
}
function get_PA_menu(){
return {"items":[{"value":"<a href=\"http://motors.shop.ebay.com/Parts-Accessories_Car-Truck-Apparel-Merchandise__\">Apparel &amp; Merchandise</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Parts-Accessories_ATV-Parts-Accessories__\">ATV Parts</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Parts-Accessories_Aviation-Parts-Gear__\">Aviation Parts</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Parts-Accessories_Boat-Parts-Accessories-Gear__\">Boat Parts</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Parts-Accessories_Car-Truck-Parts-Accessories__\">Car &amp; Truck Parts</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Parts-Accessories_Car-Audio-Video__\">Car Audio &amp; Electronics</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Parts-Accessories_Manuals-Literature__\">Manuals &amp; Literature</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Parts-Accessories_Motorcycle-Powersports-Apparel-Gear__\">Motorcycle Apparel &amp; Gear</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Parts-Accessories_Motorcycle-Parts-Accessories__\">Motorcycle Parts</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Parts-Accessories_Other-Vehicle-Parts__\">Other Vehicle Parts</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Parts-Accessories_Automotive-Tools__\">Tools</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Parts-Accessories_Vintage-Car-Truck-Parts-Accessories_\">Vintage Car &amp; Truck Parts</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Parts-Accessories__\"><i>See all Parts &amp; Accessories...</i></a>"}]};
}
function get_MC_menu(){
return {"items":[{"value":"<a href=\"http://motors.shop.ebay.com/Motorcycles___W0QQMake247a0eZBMW1016c\">BMW</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Motorcycles___W0QQMake247a0eZDucati7aa8c384\">Ducati</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Motorcycles___W0QQMake247a0eZHarleyDavidson76180c4\">Harley-Davidson</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Motorcycles___W0QQMake247a0eZHonda42abae4\">Honda</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Motorcycles___W0QQMake247a0eZKawasaki4ad1f2ec\">Kawasaki</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Motorcycles___W0QQMake247a0eZKTM12404\">KTM</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Motorcycles___W0QQMake247a0eZSuzuki944c335b\">Suzuki</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Motorcycles___W0QQMake247a0eZTriumph2412629b\">Triumph</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Motorcycles___W0QQMake247a0eZYamaha9d693cb5\">Yamaha</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Motorcycles__\"><i>See all Motorcycles...</i></a>"},{"value":"<b>Themes</b>"},{"value":"<a href=\"http://hub.motors.ebay.com/harley_davidson\">Harley-Davidson</a>"}]};
}
function get_PS_menu(){
return {"items":[{"value":"<a href=\"http://motors.shop.ebay.com/Powersports_ATVs__\">ATVs</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Powersports_Dune-Buggies-Sand-Rails__\">Dune Buggies/Sand Rails</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Powersports_Go-Karts-High-Performance___\">Go Karts</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Powersports_Personal-Watercraft__\">Personal Watercraft</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Powersports_Powersports-Vehicles-Under-50cc__\">Powersports Under 50cc</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Powersports_Scooters-Mopeds__\">Scooters &amp; Mopeds</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Powersports_Snowmobiles__\">Snowmobiles</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Powersports_Powersports-Everything-Else__\">Other Powersports</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Powersports__\"><i>See all Powersports...</i></a>"}]};
}
function get_BT_menu(){
return {"items":[{"value":"<a href=\"http://motors.shop.ebay.com/Boats_Fishing-Boats__\">Fishing Boats</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Boats_Power-Motorboats__\">Powerboats &amp; Motorboats</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Boats_Sailboats__\">Sailboats</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Boats_Other-Boats__\">Other Boats</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Boats__\"><i>See all Boats...</i></a>"}]};
}
function get_OV_menu(){
return {"items":[{"value":"<a href=\"http://motors.shop.ebay.com/Other-Vehicles-Trailers_Aircraft__\">Aircraft</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Other-Vehicles-Trailers_Buses__\">Buses</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Other-Vehicles-Trailers_Commercial-Trucks__\">Commercial Trucks</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Other-Vehicles-Trailers_Military-Vehicles__\">Military Vehicles</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Other-Vehicles-Trailers_Race-Cars-Not-Street-Legal__\">Race Cars</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Other-Vehicles-Trailers_RVs-Campers__\">RVs &amp; Campers</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Other-Vehicles-Trailers_Trailers__\">Trailers</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Other-Vehicles-Trailers_Other-Vehicles-Everything-Else__\">Other</a>"},{"value":"<a href=\"http://motors.shop.ebay.com/Other-Vehicles-Trailers__\"><i>See all Other Vehicles...</i></a>"}]};
}
function SecNavMenuBind(){
}
SecNavMenuBind.prototype.handle=function(event){
eventDispatcher.attachHandlerToElement("CT-menu","onmouseout",new DynamicMenuMouseOutHandler("CTMenu"));
eventDispatcher.attachHandlerToElement("CT-menu","onmouseover",new DynamicMenuClearMouseOutHandler("CTMenu"));
eventDispatcher.attachHandlerToElement("CT","onmouseover",new DynamicShowMenuHandler("CTMenu"));
eventDispatcher.attachHandlerToElement("CT","onmouseout",new DynamicMenuMouseOutHandler("CTMenu"));
eventDispatcher.attachHandlerToElement("PA-menu","onmouseout",new DynamicMenuMouseOutHandler("PAMenu"));
eventDispatcher.attachHandlerToElement("PA-menu","onmouseover",new DynamicMenuClearMouseOutHandler("PAMenu"));
eventDispatcher.attachHandlerToElement("PA","onmouseover",new DynamicShowMenuHandler("PAMenu"));
eventDispatcher.attachHandlerToElement("PA","onmouseout",new DynamicMenuMouseOutHandler("PAMenu"));
eventDispatcher.attachHandlerToElement("MC-menu","onmouseout",new DynamicMenuMouseOutHandler("MCMenu"));
eventDispatcher.attachHandlerToElement("MC-menu","onmouseover",new DynamicMenuClearMouseOutHandler("MCMenu"));
eventDispatcher.attachHandlerToElement("MC","onmouseover",new DynamicShowMenuHandler("MCMenu"));
eventDispatcher.attachHandlerToElement("MC","onmouseout",new DynamicMenuMouseOutHandler("MCMenu"));
eventDispatcher.attachHandlerToElement("PS-menu","onmouseout",new DynamicMenuMouseOutHandler("PSMenu"));
eventDispatcher.attachHandlerToElement("PS-menu","onmouseover",new DynamicMenuClearMouseOutHandler("PSMenu"));
eventDispatcher.attachHandlerToElement("PS","onmouseover",new DynamicShowMenuHandler("PSMenu"));
eventDispatcher.attachHandlerToElement("PS","onmouseout",new DynamicMenuMouseOutHandler("PSMenu"));
eventDispatcher.attachHandlerToElement("BT-menu","onmouseout",new DynamicMenuMouseOutHandler("BTMenu"));
eventDispatcher.attachHandlerToElement("BT-menu","onmouseover",new DynamicMenuClearMouseOutHandler("BTMenu"));
eventDispatcher.attachHandlerToElement("BT","onmouseover",new DynamicShowMenuHandler("BTMenu"));
eventDispatcher.attachHandlerToElement("BT","onmouseout",new DynamicMenuMouseOutHandler("BTMenu"));
eventDispatcher.attachHandlerToElement("OV-menu","onmouseout",new DynamicMenuMouseOutHandler("OVMenu"));
eventDispatcher.attachHandlerToElement("OV-menu","onmouseover",new DynamicMenuClearMouseOutHandler("OVMenu"));
eventDispatcher.attachHandlerToElement("OV","onmouseover",new DynamicShowMenuHandler("OVMenu"));
eventDispatcher.attachHandlerToElement("OV","onmouseout",new DynamicMenuMouseOutHandler("OVMenu"));
};
function HeaderTrk(){
}
HeaderTrk.prototype.handle=function(event){
eventDispatcher.attachHandlerToElement("BrowseCategories-menu","onclick",new TrackingModuleEnabler("_trksid","m39"));
eventDispatcher.attachHandlerToElement("gnheader","onclick",new TrackingModuleEnabler("_trksid","m39"));
};
function VjGreetingsServerOnClick(pUrl,_2d83){
var elem=_2d83.srcElement||_2d83.target;
if(elem){
elem.href=VjURL.addArg(pUrl,"ru",escape(document.location.href));
}
}
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,_2d89,pRepl){
var rv=pStr;
while(rv.has(_2d89)){
rv=rv.replace(_2d89,pRepl);
}
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(_2d8e){
var rv=this,re,tkn,a=arguments,l=a.length;
for(var i=1;i<l+1;i++){
rv=this.replaceToken(rv,_2d8e.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(_2d9e,show){
var elem=getElementById(_2d9e);
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(_2da2,_2da3,_2da4,_2da5,_2da6,_2da7,_2da8){
this.sLayerId=_2da2;
this.sCloseAnchorId=_2da3;
this.sCartCountText=_2da4;
this.aHostCoutryId=_2da5;
this.aHostCountryDomain=_2da6;
this.aHideOnParams=_2da7;
this.sHtmlProvider=_2da8;
}
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(pStr1,pStr2){
var sh1=pStr1.toLowerCase(),sh2=pStr2.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 _2dae=this.aHideOnParams;
var iLen=_2dae.length;
for(var i=0;i<iLen;i++){
if(document.location.href.has(_2dae[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){
var _2db3=window[this.sHtmlProvider];
if(!_2db3){
return;
}
oL.innerHTML=_2db3().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"),"get_expCrossLink_data"));
eventDispatcher.attachHandlerToElement("body","onload",new ExpressHandler());
function get_expCrossLink_data(){
return "<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>";
}
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(pName){
var oC=VjClient.getBrowserObj();
return oC.bIE&&!oC.bMac&&vbCheckActiveXControl(pName);
};
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(_2dbf,_2dc0){
var fcn;
if(VjUtils.isString(_2dc0)){
fcn=_2dbf[_2dc0];
}else{
fcn=_2dc0;
}
return function(){
return fcn.apply(_2dbf,arguments);
};
};
VjUtils.extend=function(_2dc2,_2dc3){
function inheritance(){
}
inheritance.prototype=_2dc3.prototype;
_2dc2.prototype=new inheritance();
_2dc2.prototype.constructor=_2dc2;
_2dc2.baseConstructor=_2dc3;
_2dc2.superClass=_2dc3.prototype;
};
function BuyerTransactionAlert(pId,_2dc5,_2dc6,_2dc7,_2dc8,_2dc9,_2dca,_2dcb,_2dcc,_2dcd,_2dce){
this.sId=pId;
this.iPollingInterval=_2dc5;
this.iMaxHits=_2dc6;
this.iHitTimeout=_2dc7;
this.iServerHits=0;
this.sLastCookieletValue="";
this.sServerUrl=_2dc8;
if(document.location.protocol.has("https")){
_2dc9=_2dc9.replace("http://pics.","https://securepics.");
}
this.sImgServer=_2dc9+"/";
this.sViewItemUrl=_2dca;
this.aAlertInfo=[["h:h:alt:2",_2dcc,"icon/iconOutbid_16x16.gif"],["h:h:alt:3",_2dcb,"icon/iconWatchB_16x16.gif"],["h:h:alt:4",_2dcc,"icon/iconOutbid_16x16.gif"],["h:h:alt:5",_2dcd,"icon/iconchanceBlu_16x16.gif"],["h:h:alt:tcr",_2dce,"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,_2dd1){
var oL=this.oL;
if(oL){
if(pVal.is("")&&!oL.ctrld){
return;
}
if(_2dd1){
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 _2dda=cfg[at-1],imgSrv=this.sImgServer;
var _2ddb=imgSrv+"s.gif";
var sHTML="<img src=\""+_2ddb+"\" width=\"10\" height=\"16\" style=\"vertical-align:middle\">|<img src=\""+_2ddb+"\" width=\"10\" height=\"16\" style=\"vertical-align:middle\">";
sHTML+="<img src=\""+imgSrv+_2dda[2]+"?t\" style=\"vertical-align:middle\"><img src=\""+_2ddb+"\" width=\"5\" height=\"16\" style=\"vertical-align:middle\">";
var url=this.sViewItemUrl+"&item="+ii;
sHTML+="<a href=\""+url+"&ssPageName="+_2dda[0]+"\">"+_2dda[1]+"</a>";
this.setValue(sHTML);
this.sLastCookieletValue=c;
}
this.fireRefreshEvent();
};
BuyerTransactionAlert.prototype.fireRefreshEvent=function(_2dde){
if(!_2dde){
_2dde=this.iPollingInterval;
}
window.setTimeout(VjUtils.hitch(this,this.onRefresh),_2dde*1000);
};
BuyerTransactionAlert.prototype.onCookieExpire=function(){
var _2ddf=VjCookieJar.readCookie("ebaysignin");
if(!_2ddf.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.");
}
};
function toggleVisibility(_2de1,show){
var elem=getElementById(_2de1);
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,0,-1,0,"get_Sell_menu","items","","","","",""));
oRegistry.put("MyEbayMenu",new DynamicMenu("MyEbay","MyEbay-menu","dynMenuCtr",75,250,900,800,1,1,1,0,-1,0,"get_MyEbay_menu","items","","","","",""));
eventDispatcher.attachHandlerToElement("body","onload",new NavMenuBind());
oRegistry.put("CTMenu",new DynamicMenu("CT","CT-menu","dynMenuCtr",75,250,900,800,3,3,3,0,-1,0,"get_CT_menu","items","","","","",""));
oRegistry.put("PAMenu",new DynamicMenu("PA","PA-menu","dynMenuCtr",75,250,900,800,1,1,1,0,-1,0,"get_PA_menu","items","","","","",""));
oRegistry.put("MCMenu",new DynamicMenu("MC","MC-menu","dynMenuCtr",75,250,900,800,1,1,1,0,-1,0,"get_MC_menu","items","","","","",""));
oRegistry.put("PSMenu",new DynamicMenu("PS","PS-menu","dynMenuCtr",75,250,900,800,1,1,1,0,-1,0,"get_PS_menu","items","","","","",""));
oRegistry.put("BTMenu",new DynamicMenu("BT","BT-menu","dynMenuCtr",75,250,900,800,1,1,1,0,-1,0,"get_BT_menu","items","","","","",""));
oRegistry.put("OVMenu",new DynamicMenu("OV","OV-menu","dynMenuCtr",75,250,900,800,1,1,1,0,-1,0,"get_OV_menu","items","","","","",""));
eventDispatcher.attachHandlerToElement("body","onload",new SecNavMenuBind());
eventDispatcher.attachHandlerToElement("body","onload",new HeaderTrk());

// en_US_AUTOS/v/GlobalNav_Motors_v_1_en_US_AUTOS
// b=4945786