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(_1288,date){
_1288=_1288?_1288:0;
d=date?date:new Date();
var _128a=d.getTime();
var _128b=d.getTimezoneOffset()*60000;
var utc=_128a+_128b;
return new Date(utc+(3600000*_1288));
};
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(_128d,_128e){
var rv=this.readCookieObj(_128d,_128e).value;
return (rv)?unescape(rv):"";
};
VjCookieJar.createDefaultCookieBean=function(_1290,_1291){
var _1292={};
_1292.name=_1290;
_1292.cookieletname=_1291;
_1292.value="";
_1292.maxage=0;
_1292.rawcookievalue="";
_1292.mode="";
return _1292;
};
VjCookieJar.readCookieObj=function(_1293,_1294){
var _1295=this.createDefaultCookieBean(_1293,_1294);
this.update();
this.checkConversionMap(_1295);
_1295.rawcookievalue=this.aCookies[_1295.name];
if(!_1295.name||!_1295.rawcookievalue){
_1295.value="";
}else{
if(!_1295.cookieletname){
this.readCookieInternal(_1295);
}else{
this.readCookieletInternal(_1295);
}
}
return (typeof (_1295)!="undefined")?_1295:"";
};
VjCookieJar.checkConversionMap=function(_1296){
var cmap=this.aConversionMap[_1296.name];
if(cmap){
_1296.mode=this.getMode(_1296.name);
_1296.name=cmap[0];
_1296.cookieletname=cmap[1];
}
};
VjCookieJar.readCookieInternal=function(_1298){
_1298.value=_1298.rawcookievalue;
return _1298;
};
VjCookieJar.readCookieletInternal=function(_1299){
var clet=this.getCookielet(_1299.name,_1299.cookieletname,_1299.rawcookievalue);
var _129b=this.getFormat(_1299.name);
if(clet&&_129b.bUseExp){
clet=clet.substring(0,clet.length-8);
}
_1299.value=clet;
if(_1299.mode==this.sCOMPAT){
_1299.value=_1299.rawcookievalue;
}
return _1299;
};
VjCookieJar.readMultiLineCookie=function(_129c,_129d){
if(!_129c||!_129d){
return "";
}
var val,r="";
var cmap=this.aConversionMap[_129c];
if(cmap){
val=this.readCookieObj(cmap[0],cmap[1]).value||"";
}
if(val){
r=this.getCookielet(_129c,_129d,val)||"";
}
return (typeof (r)!="undefined")?r:"";
};
VjCookieJar.writeCookie=function(_12a0,psVal,psExp){
var cmap=this.aConversionMap[_12a0];
if(cmap){
this.writeCookielet(cmap[0],cmap[1],psVal,psExp);
return;
}
var _12a4=this.getFormat(_12a0);
if(psVal&&_12a4.escapedValue){
psVal=escape(psVal);
}
this.writeRawCookie(_12a0,psVal,psExp);
};
VjCookieJar.writeRawCookie=function(_12a5,psVal,psExp){
if(_12a5&&(psVal!==undefined)){
if((isNaN(psVal)&&psVal.length<4000)||(psVal+"").length<4000){
if(typeof psExp=="number"){
psExp=this.getExpDate(psExp);
}
var _12a8=psExp?new Date(psExp):new Date(this.getExpDate(730));
var _12a9=this.getFormat(_12a5);
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=_12a5+"="+(psVal||"")+((psExp||_12a9.bUseExp)?"; expires="+_12a8.toGMTString():"")+"; domain="+this.sCookieDomain+"; path="+this.sPath;
}
}
}
};
VjCookieJar.writeCookieEx=function(_12ad,psVal,_12af){
this.writeCookie(_12ad,psVal,this.getExpDate(_12af));
};
VjCookieJar.writeCookielet=function(_12b0,_12b1,psVal,psExp,_12b4){
if(_12b0&&_12b1){
this.update();
var _12b5=this.getFormat(_12b0);
if(_12b5.bUseExp&&psVal){
if(typeof psExp=="number"){
psExp=this.getExpDate(psExp);
}
var _12b6=psExp?new Date(psExp):new Date(this.getExpDate(730));
var _12b7=Date.UTC(_12b6.getUTCFullYear(),_12b6.getUTCMonth(),_12b6.getUTCDate());
_12b7=Math.floor(_12b7/1000);
psVal+=_12b7.dec2Hex();
}
var val=this.createCookieValue(_12b0,_12b1,psVal);
this.writeRawCookie(_12b0,val,_12b4);
}
};
VjCookieJar.writeMultiLineCookie=function(_12b9,_12ba,psVal,psExp,_12bd){
this.update();
var val=this.createCookieValue(_12b9,_12ba,psVal);
if(val){
var cmap=this.aConversionMap[_12b9];
if(cmap){
this.writeCookielet(cmap[0],cmap[1],val,psExp,_12bd);
}
}
};
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(_12c7,psKey,psVal){
var cmap=this.aConversionMap[_12c7],format=this.getFormat(_12c7),mode=this.getMode(_12c7),val;
if(cmap&&(mode==this.sSTRICT||mode==this.sCONVER)){
val=this.readCookieObj(cmap[0],cmap[1]).value||"";
}else{
val=this.aCookies[_12c7]||"";
}
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 _12d1=this.getFormat(sC[0]),cv=sC[1],sd=_12d1.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(_12d2,_12d3,psVal){
var _12d5=this.getFormat(_12d2);
var clts=this.getCookieletArray(psVal,_12d5);
return clts[_12d3]||"";
};
VjCookieJar.getFormat=function(_12d7){
return this.aFormatMap[_12d7]||VjCookieJar.Default_Cookie_Format;
};
VjCookieJar.getCookieletArray=function(psVal,_12d9){
var rv=[],val=psVal||"";
if(_12d9.escapedValue){
val=unescape(val);
}
var a=val.split(_12d9.COOKIELET_DELIMITER);
for(var i=0;i<a.length;i++){
var idx=a[i].indexOf(_12d9.NAME_VALUE_DELIMITER);
if(idx>0){
rv[a[i].substring(0,idx)]=a[i].substring(idx+1);
}
}
return rv;
};
VjCookieJar.getExpDate=function(_12de){
var _12df;
if(typeof _12de=="number"&&_12de>=0){
var d=new Date();
d.setTime(d.getTime()+(_12de*24*60*60*1000));
_12df=d.toGMTString();
}
return _12df;
};
VjCookieJar.getMode=function(_12e1){
var h=this.readCookieObj(this.sModesCookie,this.sModesCookielet).value,b;
if(!(_12e1 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(_12e1==o){
return (f.length==1)?"0"+f:f;
}
i++;
}
return null;
}
};
VjUtils={};
VjUtils.isString=function(wh){
return (typeof wh=="string");
};
VjUtils.hitch=function(_12e6,_12e7){
var fcn;
if(VjUtils.isString(_12e7)){
fcn=_12e6[_12e7];
}else{
fcn=_12e7;
}
return function(){
return fcn.apply(_12e6,arguments);
};
};
VjUtils.extend=function(_12e9,_12ea){
function inheritance(){
}
inheritance.prototype=_12ea.prototype;
_12e9.prototype=new inheritance();
_12e9.prototype.constructor=_12e9;
_12e9.baseConstructor=_12ea;
_12e9.superClass=_12ea.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 _12f1=0,scrOfY=0;
if(typeof (window.pageYOffset)=="number"){
scrOfY=window.pageYOffset;
_12f1=window.pageXOffset;
}else{
if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){
scrOfY=document.body.scrollTop;
_12f1=document.body.scrollLeft;
}else{
if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){
scrOfY=document.documentElement.scrollTop;
_12f1=document.documentElement.scrollLeft;
}
}
}
return [_12f1,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=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(_12f5,_12f6,_12f7,_12f8,_12f9,_12fa,_12fb,_12fc,_12fd,_12fe,_12ff,_1300,_1301,_1302,_1303,_1304,_1305,_1306,_1307,_1308){
this.iMouseOutTimer=null;
this.iMouseOverTimer=null;
this.iLeftPadding=_12ff;
this.iTopPadding=_1300;
this.iRightPadding=_1301;
this.sAnchorId=_12f5;
this.sContainerLayerId=_12f6;
this.sContentLayerId=_12f7;
this.iMouseOutDelay=_12f8;
this.iMouseOverDelay=_12f9;
this.iHighResDocWidth=_12fa;
this.iLowResDocWidth=_12fb;
this.iHighResColumns=_12fc;
this.iMediumResColumns=_12fd;
this.iLowResColumns=_12fe;
this.sHandler=_1302;
this.sCollName=_1303;
this.sWidth=_1304;
this.sAnchorMouseOverClass=_1305;
this.sAnchorMouseOutClass=_1306;
this.iframeShim=null;
this.sHTML=null;
this.oAnchor=null;
this.sTemplate=null;
this.sAnchorText=_1307;
this.sDomain=_1308;
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 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"){
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(_130f){
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 _1311=window[sHandler];
if(!_1311){
return;
}
var data=_1311(),items=data[sCollName],l=items.length;
ipc=Math.ceil(l/_130f);
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<_130f;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/"))){
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,_131e,_131f){
var agt=navigator.userAgent.toLowerCase();
if(agt.indexOf("msie")==-1&&agt.indexOf("firefox")==-1){
return;
}
var w=node.offsetWidth,h=node.offsetHeight;
w+=_131e?_131e:0;
h+=_131f?_131f:0;
var _1322=document.createElement("IFRAME");
_1322.style.width=w+"px";
_1322.style.height=h+"px";
_1322.style.filter="chroma(color='white')";
_1322.frameBorder=0;
_1322.style.position="absolute";
_1322.style.left="0px";
_1322.style.top="0px";
_1322.style.zIndex="-1";
_1322.style.filter="Alpha(Opacity=\"0\")";
node.appendChild(_1322);
return _1322;
};
DynamicMenu.prototype.removeLayerShim=function(_1323,_1324){
var agt=navigator.userAgent.toLowerCase();
if(agt.indexOf("msie")==-1&&agt.indexOf("firefox")==-1){
return;
}
if(_1324&&_1324.parentElement){
_1323.removeChild(_1324);
}
};
function getOffsetTop(elm){
var _1327=elm.offsetTop;
var _1328=elm.offsetParent;
while(_1328!==null){
_1327+=_1328.offsetTop;
_1328=_1328.offsetParent;
}
return _1327;
}
function getOffsetLeft(elm){
var _132a=elm.offsetLeft;
var _132b=elm.offsetParent;
while(_132b!==null){
_132a+=_132b.offsetLeft;
_132b=_132b.offsetParent;
}
return _132a;
}
var VjLayerUtils={};
VjLayerUtils.matchColumnHeight=function(_132c,_132d,aDivs){
var px="px";
var _1330=document.getElementById(_132c);
var _1331=_1330.offsetHeight;
var _1332=Math.max(_1331,_132d);
for(var i=0;i<aDivs.length;i++){
document.getElementById(aDivs[i]).style.height=_1332+px;
}
};
VjLayerUtils.addLayerShim=function(node){
var agt=navigator.userAgent.toLowerCase();
if(agt.indexOf("msie")==-1&&agt.indexOf("firefox")==-1){
return;
}
var _1336=document.createElement("IFRAME");
_1336.style.width=node.offsetWidth+"px";
_1336.style.height=node.offsetHeight+"px";
_1336.style.filter="chroma(color='white')";
_1336.frameBorder=0;
_1336.style.position="absolute";
_1336.style.left="0px";
_1336.style.top="0px";
_1336.style.zIndex="-1";
_1336.style.filter="Alpha(Opacity=\"0\")";
node.appendChild(_1336);
return _1336;
};
VjLayerUtils.removeLayerShim=function(_1337,_1338){
var agt=navigator.userAgent.toLowerCase();
if(agt.indexOf("msie")==-1&&agt.indexOf("firefox")==-1){
return;
}
if(_1338&&_1338.parentElement){
_1337.removeChild(_1338);
}
};
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(psUrl,_1348,_1349){
if(psUrl==null||psUrl==undefined){
return null;
}
if(psUrl.indexOf("?")<0){
psUrl+="?"+_1348+"="+_1349;
return psUrl;
}
var _134a=this.getArgPairIfExists(psUrl,_1348);
if(_134a!==null){
psUrl.replace(_134a,_1348+"="+_1349);
}else{
psUrl+="&"+_1348+"="+_1349;
}
return psUrl;
};
VjURL.getArg=function(psUrl,_134c){
if(psUrl==null||psUrl==undefined){
return null;
}
if(psUrl.indexOf("?")<0){
return null;
}
var _134d=this.getArgPairIfExists(psUrl,_134c);
if(_134d!==null){
return _134d.substring(_134d.indexOf("=")+1);
}
return null;
};
VjURL.getArgPairIfExists=function(psUrl,_134f){
var _1350=psUrl.indexOf("?");
if(_1350<0){
return null;
}
var _1351=psUrl;
var _1352,argName;
while(_1350>=0){
_1351=_1351.substring(_1350+1);
_1352=_1351;
_1350=_1351.indexOf("&");
if(_1350>=0){
_1352=_1351.substring(0,_1350);
}
argName=_1352.substring(0,_1352.indexOf("="));
if(argName==_134f){
return _1352;
}
}
return null;
};
function TrackingModuleEnabler(psCid,_1354){
this.sCid=psCid;
this.sCidParms=_1354;
}
TrackingModuleEnabler.prototype.rewriteUrl=function(_1355){
if(_1355.nativeEvent==null||_1355.nativeEvent==undefined){
return;
}
var elem=_1355.nativeEvent.srcElement||_1355.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(_1357){
this.rewriteUrl(_1357);
};
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 _135c=this.eventHandlers[srcId];
if(!_135c){
return true;
}
var _135d=_135c[event.eventType];
if(!_135d){
return true;
}
var _135e=true;
for(var i=0;i<_135d.length;i++){
var _1360=_135d[i].handle(event);
if(_1360&&_1360.objType=="dsf_Message"){
if(typeof (svcEngine)!="undefined"&&svcEngine.handleRequest(_1360)===false){
_135e=false;
}
}else{
if(_1360===false){
_135e=false;
}
}
}
return _135e;
};
dsf_EventDispatcher.prototype.register=function(id,_1362,_1363){
var srcId=id;
if(!this.eventHandlers[srcId]){
this.eventHandlers[srcId]=[];
}
var _1365=this.eventHandlers[srcId];
if(!_1365[_1362]){
_1365[_1362]=[];
}
var _1366=_1365[_1362];
_1366[_1366.length]=_1363;
};
dsf_EventDispatcher.prototype.attachHandlerToElement=function(id,_1368,_1369){
eventDispatcher.register(id,_1368,_1369);
var _136a=document.getElementById(id);
if(id=="body"){
_136a=document.body;
if(_1368=="onload"||_1368=="onunload"){
var _136b=window[_1368]||"",str=_136b.toString();
if(str.length>0&&str.indexOf("eventDispatcher")==-1){
this.fCustomLoad[_1368]=_136b;
}
window[_1368]=function(){
if(typeof eventDispatcher.fCustomLoad[_1368]=="function"){
eventDispatcher.fCustomLoad[_1368]();
}
eventDispatcher[_1368](_136a);
};
return this;
}
}
if(_136a){
_136a[_1368]=function(event){
return eventDispatcher[_1368](this,event||window.event);
};
}
return this;
};
dsf_EventDispatcher.prototype.detachHandlers=function(id,_136e){
var srcId=id;
if(!this.eventHandlers[srcId]){
return;
}
var _1370=this.eventHandlers[srcId];
if(_1370[_136e]){
_1370[_136e]=[];
}
var _1371=document.getElementById(id);
if(id=="body"){
_1371=document.body;
if(_136e=="onload"||_136e=="onunload"||_136e=="onclick"){
window[_136e]=null;
}
}
if(_1371){
_1371[_136e]=null;
}
};
function dsf_Event(src,_1373,_1374){
this.src=src;
this.eventType=_1373;
this.nativeEvent=_1374;
}
function dsf_SvcConfig(_1375,url){
this.url=url;
this.method=_1375;
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,_137f){
return this.process(this.getBodyId(src),new dsf_Event(src,"onload",_137f));
};
dsf_EventDispatcher.prototype.onunload=function(src,_1381){
return this.process(this.getBodyId(src),new dsf_Event(src,"onunload",_1381));
};
dsf_EventDispatcher.prototype.onchange=function(src,_1383){
return this.process(this.getId(src),new dsf_Event(src,"onchange",_1383));
};
dsf_EventDispatcher.prototype.onsubmit=function(src,_1385){
return this.process(this.getId(src),new dsf_Event(src,"onsubmit",_1385));
};
dsf_EventDispatcher.prototype.onreset=function(src,_1387){
return this.process(this.getId(src),new dsf_Event(src,"onreset",_1387));
};
dsf_EventDispatcher.prototype.onselect=function(src,_1389){
return this.process(this.getId(src),new dsf_Event(src,"onselect",_1389));
};
dsf_EventDispatcher.prototype.onblur=function(src,_138b){
return this.process(this.getId(src),new dsf_Event(src,"onblur",_138b));
};
dsf_EventDispatcher.prototype.onfocus=function(src,_138d){
return this.process(this.getId(src),new dsf_Event(src,"onfocus",_138d));
};
dsf_EventDispatcher.prototype.onkeydown=function(src,_138f){
return this.process(this.getBodyId(src),new dsf_Event(src,"onkeydown",_138f));
};
dsf_EventDispatcher.prototype.onkeypress=function(src,_1391){
return this.process(this.getBodyId(src),new dsf_Event(src,"onkeypress",_1391));
};
dsf_EventDispatcher.prototype.onkeyup=function(src,_1393){
return this.process(this.getBodyId(src),new dsf_Event(src,"onkeyup",_1393));
};
dsf_EventDispatcher.prototype.onclick=function(src,_1395){
return this.process(this.getBodyId(src),new dsf_Event(src,"onclick",_1395));
};
dsf_EventDispatcher.prototype.ondblclick=function(src,_1397){
return this.process(this.getBodyId(src),new dsf_Event(src,"ondblclick",_1397));
};
dsf_EventDispatcher.prototype.onmousedown=function(src,_1399){
return this.process(this.getBodyId(src),new dsf_Event(src,"onmousedown",_1399));
};
dsf_EventDispatcher.prototype.onmousemove=function(src,_139b){
return this.process(this.getBodyId(src),new dsf_Event(src,"onmousemove",_139b));
};
dsf_EventDispatcher.prototype.onmouseout=function(src,_139d){
return this.process(this.getBodyId(src),new dsf_Event(src,"onmouseout",_139d));
};
dsf_EventDispatcher.prototype.onmouseover=function(src,_139f){
return this.process(this.getBodyId(src),new dsf_Event(src,"onmouseover",_139f));
};
dsf_EventDispatcher.prototype.onmouseup=function(src,_13a1){
return this.process(this.getBodyId(src),new dsf_Event(src,"onmouseup",_13a1));
};
function dsf_EventHandler(_13a2){
this.eventTypes=_13a2;
this.srcId="";
}
dsf_EventHandler.prototype.handle=function(event){
if(this.handleEvent===null){
alert("all derived event handlers need to have a handleEvent method");
}
var _13a4=this.handleEvent(event);
if(_13a4===null){
return true;
}
};
dsf_EventHandler.prototype.attachTo=function(id){
eventDispatcher.register(this,id);
var _13a6=this.eventTypes;
var _13a7=document.getElementById(id);
for(var i=0;i<_13a6.length;i++){
var _13a9=_13a6[i];
if(_13a7[_13a9]!==null){
continue;
}
_13a7[_13a9]=function(){
return eventDispatcher[_13a9](this);
};
}
return this;
};
var 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,_13ac){
this.controls[psKey]=_13ac;
};
VjComponentRegistry.prototype.get=function(psKey){
return this.controls[psKey];
};
VjComponentRegistry.prototype.dump=function(){
var _13ae=this.controls;
var _13af="controls on page:\n";
for(var i in _13ae){
_13af+="key = "+i;
_13af+="controlName = "+_13ae[i].objtype;
_13af+="\n";
}
return _13af;
};
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(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"));
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(event){
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(_13b3,_13b4,_13b5,_13b6){
this.sDropdownId=_13b3;
this.sHandler=_13b4;
this.sCollName=_13b5;
this.iCondNo=_13b6;
}
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(_13b8,_13b9,_13ba){
var e=_13b8;
if(e){
var o=new Option(_13ba,_13b9,false,false),os;
os=e.options;
os[os.length]=o;
}
};
function DynDropHandler_category0(){
}
DynDropHandler_category0.prototype.handle=function(event){
oRegistry.get("category0").fill();
};
eventDispatcher.attachHandlerToElement("body","onload",new DynDropHandler_category0());
function HeaderTrk(){
}
HeaderTrk.prototype.handle=function(event){
eventDispatcher.attachHandlerToElement("gnheader","onclick",new TrackingModuleEnabler("_trksid","m37"));
};
function VjGreetingsServerOnClick(pUrl,_13c0){
var elem=_13c0.srcElement||_13c0.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,_13c6,pRepl){
var rv=pStr;
while(rv.has(_13c6)){
rv=rv.replace(_13c6,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(_13cb){
var rv=this,re,tkn,a=arguments,l=a.length;
for(var i=1;i<l+1;i++){
rv=this.replaceToken(rv,_13cb.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(_13db,show){
var elem=getElementById(_13db);
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(_13df,_13e0,_13e1,_13e2,_13e3,_13e4,_13e5){
this.sLayerId=_13df;
this.sCloseAnchorId=_13e0;
this.sCartCountText=_13e1;
this.aHostCoutryId=_13e2;
this.aHostCountryDomain=_13e3;
this.aHideOnParams=_13e4;
this.sHtml=_13e5;
}
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 _13eb=this.aHideOnParams;
var iLen=_13eb.length;
for(var i=0;i<iLen;i++){
if(document.location.href.has(_13eb[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(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(_13fb,_13fc){
var fcn;
if(VjUtils.isString(_13fc)){
fcn=_13fb[_13fc];
}else{
fcn=_13fc;
}
return function(){
return fcn.apply(_13fb,arguments);
};
};
VjUtils.extend=function(_13fe,_13ff){
function inheritance(){
}
inheritance.prototype=_13ff.prototype;
_13fe.prototype=new inheritance();
_13fe.prototype.constructor=_13fe;
_13fe.baseConstructor=_13ff;
_13fe.superClass=_13ff.prototype;
};
function BuyerTransactionAlert(pId,_1401,_1402,_1403,_1404,_1405,_1406,_1407,_1408,_1409,_140a){
this.sId=pId;
this.iPollingInterval=_1401;
this.iMaxHits=_1402;
this.iHitTimeout=_1403;
this.iServerHits=0;
this.sLastCookieletValue="";
this.sServerUrl=_1404;
this.sImgServer=_1405+"/";
this.sViewItemUrl=_1406;
this.aAlertInfo=[["h:h:alt:2",_1408,"icon/iconOutbid_16x16.gif"],["h:h:alt:3",_1407,"icon/iconWatchB_16x16.gif"],["h:h:alt:4",_1408,"icon/iconOutbid_16x16.gif"],["h:h:alt:5",_1409,"icon/iconchanceBlu_16x16.gif"],["h:h:alt:tcr",_140a,"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,_140d){
var oL=this.oL;
if(oL){
if(pVal.is("")&&!oL.ctrld){
return;
}
if(_140d){
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 _1416=cfg[at-1],imgSrv=this.sImgServer;
var _1417=imgSrv+"s.gif";
var sHTML="<img src=\""+_1417+"\" width=\"10\" height=\"16\" style=\"vertical-align:middle\">|<img src=\""+_1417+"\" width=\"10\" height=\"16\" style=\"vertical-align:middle\">";
sHTML+="<img src=\""+imgSrv+_1416[2]+"?t\" style=\"vertical-align:middle\"><img src=\""+_1417+"\" width=\"5\" height=\"16\" style=\"vertical-align:middle\">";
var url=this.sViewItemUrl+"&item="+ii;
sHTML+="<a href=\""+url+"&ssPageName="+_1416[0]+"\">"+_1416[1]+"</a>";
this.setValue(sHTML);
this.sLastCookieletValue=c;
}
this.fireRefreshEvent();
};
BuyerTransactionAlert.prototype.fireRefreshEvent=function(_141a){
if(!_141a){
_141a=this.iPollingInterval;
}
window.setTimeout(VjUtils.hitch(this,this.onRefresh),_141a*1000);
};
BuyerTransactionAlert.prototype.onCookieExpire=function(){
var _141b=VjCookieJar.readCookie("ebaysignin");
if(!_141b.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(_141d,show){
var elem=getElementById(_141d);
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_Ebay_e5134658490_1_en_US_MAIN
// b=4658490