//<!--
// \include\lib\_global\features\site_catalyst\_base\ssObjs.js@@\main\8 

function EbaySiteCatalystFiles(pParent,pName)
{if(!this.objType)
this.objType="EbaySiteCatalystFiles";this.base=EbayBaseControl;this.base(pParent,pName);var env=this.oGlobals.oEnvironment;this.aFiles=new Array;var sd=this.sSourceDir=includeHost+"aw/pics/lib/_global/features/site_catalyst/";var pd=this.sPackageDir=env.sIncludeHost+"js/v/"+
env.sCountry+"/site_catalyst/";this.sBaseDir=sd+"_base/";this.sPageNamesDir=pd+"pagenames/";this.sPropertyReportsDir=pd+"property_reports/";this.sEventsDir=pd+"events/";this.sCookiesDir=pd+"cookies/";this.add=function()
{var args=arguments,aLen=args.length,fs=this.aFiles;for(var i=0;i<aLen;i++)
{var found=false,len=fs.length;for(var j=0;j<len&&!found;j++)
found=(fs[j]==args[i]);if(!found)
fs[len]=args[i];}}}
function EbaySiteCatalyst(pParent,pName)
{if(!this.objType)
this.objType="EbaySiteCatalyst";this.base=EbayBaseControl;this.base(pParent,pName);var env=this.oGlobals.oEnvironment;this.oFiles=new EbaySiteCatalystFiles(this,"files");this.aAccounts=new Array;this.sCookieDom=env.sThisPagePath.has(env.sQADomain)?".ebay.com":env.sCountryDomain.substring(0,env.sCountryDomain.length-1);this.sCookieName="ebay";this.sCountry=this.sQA=this.sSample=this.sPage=this.sHost=this.sPageName=this.sChannel="";this.sUser="Nonreg";this.bL10Sample=this.bLoadBaseCode=false;this.bDebugMode=env.sThisPageQuery.has("ebscdebug=on");this.dExpires=new Date();this.writeCookie=function(pName,pVal)
{writeMultiCookie(this.sCookieName,pName,pVal,this.sCookieDom,"/");}
this.readCookie=function(pName)
{return readMultiCookie(this.sCookieName,pName);}
this.addAccount=function(pAccount)
{this.aAccounts[this.aAccounts.length]=pAccount;}
this.setCountry=function()
{with(this)
{var env=oGlobals.oEnvironment;var c=env.sCountry.toUpperCase(),tp=sPage;c=c.substring(0,2);if(env.sCountry.is("tw")&&bL10Sample)
addAccount("ebaytaiwan10"+sQA);if(tp.has('.com/nz/'))c="NZ";else if(tp.has('ebaysweden'))c="SE";else if(tp.has('.com.sg/'))c="SG";sCountry=c+";;";}}
this.getOrDropLuckyCookie=function()
{with(this)
{var l9="lucky9",v=oDocument.getCookie(l9);if(v.is(""))
v=new String(Math.floor(Math.random()*1000000));WriteCookie(l9,v,sCookieDom,"/",dExpires);sSample=v;return v;}}
this.checkRegCookie=function()
{with(this)
{if((readMultiCookie("reg","flagReg")=="1")||(ReadCookie("ebaysignin")=="in")||(ReadCookie("reg")=="1"))
{sUser="Reg";writeMultiCookie("reg","flagReg","1",sCookieDom,"/",dExpires);}}}
this.determineAccounts=function()
{with(this)
{var l9=getOrDropLuckyCookie(),len=(l9.length>0);var doc=oDocument;sChannel=oGlobals.oEnvironment.sCountryDesc;if(len)
{if(l9%10==6)
bL10Sample=true;if(l9%100==6)
{addAccount("ebay1"+sQA);}
else
{if(isTrackSearchAd())
{var mod=l9%3000,acc=["a","b","c","d","e","f","g"];if(mod>=51&&mod<=57)
{addAccount("ebaysearchadseg"+acc[mod%50-1]+sQA);}}}
if(l9%1000==6)
{var reg=(sUser=="Reg")?"":"non";addAccount("ebay"+reg+"reg"+sQA);}
if((l9%1000==6)&&sQA.is(''))
addAccount("ebay"+sChannel);if(typeof(is)!="undefined")
{if(l9%1000==7&&env.sCountry.is("us")&&!is.safari)
addAccount("ebayfindingexper"+sQA);}}}}
this.isTrackSearchAd=ebSiteCatalystIsTrackSearchAd;this.loadFiles=function()
{with(this)
{var fs=oFiles.aFiles,len=fs.length;for(var i=0;i<len;i++)
oDocument.write(oGlobals.scriptTag(fs[i]+".js"));}}
this.init=function()
{with(this)
{var yr=dExpires.getYear();if(yr<1900)
yr=yr+1900;dExpires.setYear(yr+5);var doc=oDocument;doc.write('<img name="s_i_ebay" width=1 height=1 border=0>');var env=oGlobals.oEnvironment,tp=env.sThisPage;sPage=tp.toLowerCase();sHost=env.sThisPageHost.toLowerCase();sQA=env.sThisPagePath.has(env.sQADomain)?"qa":"";checkRegCookie();determineAccounts();setCountry();bLoadBaseCode=(aAccounts.length||bDebugMode);}}
this.init();}
function ebSiteCatalystIsTrackSearchAd()
{return false;}
new EbaySiteCatalyst(ebay.oDocument,"siteCatalyst");

// \include\lib\us\features\site_catalyst\track_searchad.js@@\main\2 

function ebSiteCatalystIsTrackSearchAd()
{return false;}

// \include\lib\_global\features\site_catalyst\_base\ssPageType.js@@\main\6 

ebay.oDocument._getControl("siteCatalyst").attachFunctionality=function()
{this.sPageNameCountrySite="";this.ssADMEC=this.sSBR=this.sFND2=this.sDomValue=this.aBibo=this.aSegF="";this.aCustomFunctions=new Array;this.sCookieNames=new Array;this.debug=new Function("");this.registerFunction=function(pName)
{this.aCustomFunctions[this.aCustomFunctions.length]=pName;}
this.addCookieName=function(pName,pInSSCookie)
{this.sCookieNames[pName]=pInSSCookie;}
this.getAndSetPageName=function()
{with(this)
{var pn=oDocument.doc.title,un="undefined";if((typeof(pageName)!=un)&&(pageName!="document.title"))
pn=pageName;sPageNameCountrySite=sCountry+pn;with(oFiles)
{var p=parent,pnl=pn.toLowerCase(),pg=p.sPage.toLowerCase(),ed=sEventsDir;var pnd=sPageNamesDir,prd=sPropertyReportsDir,cd=sCookiesDir;var pkdir=sPackageDir;add(pkdir+"common");if((typeof(keyword)!=un)&&keyword)
add(cd+"keyword");p.addCookieName("ssSBR",true);if(typeof(SBR)!=un)
add(cd+"sbrWrite");p.addCookieName("ssFND2",true);if(typeof(FND2)!=un)
add(cd+"fnd2Write");p.addCookieName("ADME",true);if(pg.has("adme:"))
add(cd+"admeWrite");if(pg.has("sspagename="))
{if(pg.has("mops"))
add(pkdir+"mops");add(cd+"ssPagename");writeLL=true;}
p.addCookieName("lastList",true);if(pnl.hasAny('viewsUsersPage','aboutmystore','storefrontlistings','sPagestorefrontlistings','storeinternalsearchresults','storebinitemsearchresults')||(typeof(writeLL)!=un))
add(cd+"lastListWrite");if(pnl.has('viewitem'))
add(pkdir+"viewitem");if(pnl.hasAny('search','listings'))
{p.addSBRPropReportFiles();add(pkdir+"search_listings");}
if(pnl.hasAny('productpage','storesearch','pageviewsellersotheritems'))
p.addSBRPropReportFiles();if(pnl.hasAny('bincongrats','acceptbid'))
{var f=pnl.has('bincongrats')?"n":"d";add(pkdir+"bid_bin/bi"+f);p.ssADMEC="B";p.addFND2PropReportFiles();}
if(pnl.isAny('pagemakebid','pagebinverify'))
{var f=pnl.is('sPagebinverify')?"n":"d";add(pkdir+"bid_bin/attempt_bi"+f);}
if(pnl.has('watchconfirm'))
{add(prd+"CommonSBRFND2");add(pkdir+"watch_confirm");p.addFND2PropReportFiles();}
if(pnl.hasAny('pageaddnewitem','pagesyi_confirm'))
{p.ssADMEC="L";add(pkdir+"listing_confirm");}
if(pnl.hasAny('registersuccess','registercongrats','registeraolcongrats'))
{p.ssADMEC="R";add(ed+"registerSuccess");}
if(!p.ssADMEC.is(""))
add(cd+"admeRead");if(pnl.has('pageregisterenterinfo'))
add(ed+"registerEnter");if(pnl.has('pageregisterconfirmemail'))
add(ed+"registerConfirm");pn=p.setOtherPagenames(pnl,pn);if((typeof(pfType)!=un)&&pfType)
add(prd+"productFinder");if((typeof(relatedStores)!=un)&&(relatedStores==1))
add(prd+"relatedStores");if(pnl.hasAny('checkoutreview','checkout_challenge')&&sCountry.isAny("us","uk"))
add(ed+"checkout");}
sPageName=sCountry+pn;}}
this.addSBRPropReportFiles=function()
{with(this.oFiles)
add(sPropertyReportsDir+"sbr");}
this.addFND2PropReportFiles=function()
{with(this.oFiles)
add(sPropertyReportsDir+"fnd2");}
this.setOtherPagenames=function(pPnl,pPn)
{var tp=this.sPage,rv=pPn;if(pPnl.is("sPagesignin")&&(this.oDocument.getCookie("ebaysignin")=="in"))
rv="PageSignOut";if(tp.has('liveauctions.'))rv="LiveAuctions:"+rv;if(tp.hasAny("searchcat","&pilot"))rv+=":CIS";if(tp.has("&allcats"))rv+=":AllCats";if(tp.has("&mocat"))rv+=":MoreCats";if(tp.has("&top10"))rv+=":Top10";return rv;}}
ebay.oDocument._getControl("siteCatalyst")._exec("attachFunctionality");

// \include\lib\_global\features\site_catalyst\_base\ssLoad.js@@\main\2 

ebay.oDocument._getControl("siteCatalyst").load=function()
{with(this)
{var stores=((typeof(eBayTREiasId)!="undefined")&&(typeof(eBayTRPageName)!="undefined"));if(bLoadBaseCode||stores)
{if(typeof(getAndSetPageName)=="function")
getAndSetPageName();with(oFiles)
{var pd=sPackageDir;if(bDebugMode&&oGlobals.oClient.bIE)
add(pd+"debug");add(pd+"omniture/base");if(stores)add(pd+"omniture/stores");if(parent.bLoadBaseCode)add(pd+"base");}
loadFiles();}}}
ebay.oDocument._getControl("siteCatalyst")._exec("load");
//-->
