//<!--
//\include\js\cobrand\cobrand_functionality.js@@\main\4

function ebayCBGetURLException(){var exObj=this.findExceptionObj("getURLException");if(!exObj||(exObj.values.length<2)||(!exObj.conditions))
return;this.siteLogic=exObj.values[0]+this.siteLogic+')&&'+
exObj.getConditions()+exObj.values[1];}
function ebayCBDetectCobrand(pSetID){if(pSetID)
{var preStr='cbThisPageURLContains("';var midStr='")||cbLastPageURLContains("';var postStr='")';for(var j=0;j<this.cbURLIdentifiers.length;j++)
{this.siteLogic+=preStr+this.cbURLIdentifiers[j]+
midStr+this.cbURLIdentifiers[j]+postStr+or;}
preStr='cbThisPageURIContains("';midStr='")||cbLastPageURIContains("';for(var j=0;j<this.cbURIIdentifiers.length;j++)
{this.siteLogic+=preStr+this.cbURIIdentifiers[j]+
midStr+this.cbURIIdentifiers[j]+postStr+or;}
this.siteLogic=this.siteLogic.substring(0,this.siteLogic.length-2);if(this.getURLException)
this.getURLException();}
var setCobrandObj='if('+this.siteLogic+')';if(pSetID)
setCobrandObj+='ebSelCBObj=ebCBArray["'+this.ht+'"];';else
setCobrandObj+='ebIsCobranded=true;';return setCobrandObj;}
function ebayCBWriteHeader(){if(ebSelCBObj&&ebSelCBObj.writeHeader){var autos="";if(((cbThisPageContains(ebmStr+"/")||cbThisPageContains(ebmStr+dot))&&!cbThisPageContains(ebUsingSSL)))
autos=ebmHdr+dot;var hdrStr=scriptOpen+countryCobrandDir+ebHdrDir+
autos+ebHdrFile+ebSelCBObj.headerName+jsExt+scriptClose;document.write(hdrStr);}}
window.writeHeader=ebayCBWriteHeader;function ebayCBWriteBrow(){var browStr=scriptOpen+countryCobrandDir+ebBrowFile+scriptClose;document.write(browStr);}
window.writeBrow=ebayCBWriteBrow;function ebayCBWriteFooter(){if(ebSelCBObj&&ebSelCBObj.writeFooter){var ftrStr=scriptOpen+countryCobrandDir+ebFtrFile+
ebSelCBObj.headerName+jsExt+scriptClose;document.write(ftrStr);cbf=true;}}
window.writeFooter=ebayCBWriteFooter;function ebayCBWriteATC()
{return;}
window.writeATC=ebayCBWriteATC;function ebayCBMicroBrand()
{var pageName;if(!pageName)pageName="";var mbFile="";for(var i=0;i<ebCBMBPages.length&&(mbFile=="");i++)
{if((pageName.toLowerCase()).indexOf(ebCBMBPages[i])==0)
{for(var j=0;j<ebCBMicroBrands.length&&(mbFile=="");j++)
{if(cbLastPageURLContains(ebCBMicroBrands[j][1])||(ReadCookie(ebMBCookieName)==ebCBMBIDs[j][0]))
mbFile=ebCBMicroBrands[j][1]+jsExt;}}}
if(mbFile!="")
{ebSelCBObj=ebCBArray["1"]
var of=scriptOpen+countryCobrandDir+ebCBMBFilePrefix+mbFile;of+=scriptClose;document.write(of);}
return(mbFile!="");}
function ebayCBDisableLastPageCobrand()
{ebCBLastPageURL=ebCBLastPageURI="";}
function ebayCBIsLastPageEBayLink()
{if(cbLastPageURLContains(dot+this.name+dot)&&!cbLastPageURLContains(ebCBPreCobDom))
ebayCBDisableLastPageCobrand();}
function ebayCBInitCobranding()
{ebayCBCreateCobrands();ebayCBDisableLastPageCobrand();for(var i in ebCBArray)
{var savedLPURL=ebCBLastPageURL,savedLPURI=ebCBLastPageURI;if(ebCBArray[i].disableLastPageCobrand)
ebCBArray[i].disableLastPageCobrand();else if(ebCBArray[i].isLastPageEBayLink)
ebCBArray[i].isLastPageEBayLink();eval(ebCBArray[i].detectCobrand(true));if(ebSelCBObj)
break;else
{ebCBLastPageURL=savedLPURL;ebCBLastPageURI=savedLPURI;}}
ebayCBMicroBrand();if(ebSelCBObj)
siteID=cobrandID=ebSelCBObj.siteID;else
siteID=cobrandID="0";if((ebSelCBObj&&(ebSelCBObj.ht!="1"))||cbThisPageURLContains(https)||cbThisPageURLContains(scgi+dot))
{if(!ebSelCBObj)
ebSelCBObj=ebCBArray["1"];}}
ebayCBInitCobranding();
// -->
