//<!--
// \include\js\globals.js@@\main\e415_caboose\1 

function Is()
{var t=true;var agt=navigator.userAgent.toLowerCase();this.major=parseInt(navigator.appVersion);this.webTV=this.opera=this.nav=this.ie=this.firefox=this.safari=false;var vInd=0;if(agt.indexOf("webtv")!=-1)
{this.webTV=t;vInd=agt.indexOf("webtv/")+6;}
else if(agt.indexOf("firefox")!=-1)
{this.firefox=true;vInd=agt.lastIndexOf("firefox")+7;}
else if(agt.indexOf("safari")!=-1)
{this.safari=t;vInd=agt.lastIndexOf("safari")+7;}
else if(agt.indexOf("opera")!=-1)
{this.opera=t;vInd=agt.lastIndexOf("opera")+6;}
else if(navigator.appName=="Netscape")
{this.nav=t;vInd=agt.lastIndexOf("/")+1;}
else if(agt.indexOf("msie")!=-1)
{this.ie=t;vInd=agt.indexOf("msie")+4;}
this.ver=parseInt(agt.substring(vInd));this.win=(agt.indexOf("win")!=-1);this.winXP=(this.win&&(agt.indexOf("windows nt 5.1;")!=-1));this.mac=(agt.indexOf("mac")!=-1);this.macppc=(this.mac&&((agt.indexOf("ppc")!=-1)||(agt.indexOf("powerpc")!=-1)));this.xpSp2=(agt.indexOf("sv1")!=-1);}
if(typeof(is)=="undefined")
is=new Is();var country="us";var countryDomain=".ebay.com/";var countryDesc="US";var countryDoubleByte=false;var countries=new Array(new Array(".ebay.com.au/",".com.au/","au","Australia"),new Array(".ebay.at/",".at/","at","AT"),new Array(".befr.ebay.be/",".befr.","befr","Belgium"),new Array(".benl.ebay.be/",".benl.","benl","Belgium"),new Array(".ebay.ca/",".ca/","ca","Canada"),new Array(".ebay.ch/",".ch/","ch","CH"),new Array(".ebay.es/",".es/","es","Spain"),new Array(".es.ebay.com/",".es.","es","Spain"),new Array(".ebay.fr/",".fr/","fr","France"),new Array(".ebay.de/",".de/","de","Germany"),new Array(".ebay.it/",".it/","it","Italy"),new Array(".ebay.in/",".in/","in","India"),new Array(".ebay.nl/",".nl/","nl","Netherlands"),new Array(".tw.ebay.com/",".tw.","tw","Taiwan"),new Array(".ebay.com.cn/",".cn.","cn","China"),new Array(".ebay.co.uk/",".co.uk/","uk","UK"),new Array(".ebay.com/",".","us","US"));var cbc=false,brow=false,atc=false,cbf=false;var dot='.';var and='&';var qstn='?';var eql='=';var or="||";var http="http://";var www="www";var httpwww=http+www;var https="https://";var cgi="cgi";var scgi="s"+cgi;var jsExt=dot+"js";var tclExt=dot+"tcl";var com="com";var dotCom=dot+com;var scriptOpen='<SC'+'RIPT SRC="';var scriptClose='"></SC'+'RIPT>';var ebStr="ebay";var ebDom=dot+ebStr;var ebInclude="include";var qaDom=dot+"qa"+dot;var thisPage=location.href.toLowerCase();var lastPage="";if(history.length>1)
lastPage=document.referrer.toLowerCase();var thisPageURL,thisPageURI,lastPageURL,lastPageURI;var qaMachineName="";var includeDir="",cobrandDir="",countryCobrandDir="";var picsDir="pics.ebaystatic.com/aw/pics/";var countryIncludeDir="";var includeHost;if(!includeHost)
includeHost=http+ebInclude+ebDom+dotCom+"/";var ebHTSch="ht"+eql;var ebSID="s_partnerid",ebSIDSch=ebSID+eql;var ebCID="co_partnerid",ebCIDSch=ebCID+eql;var seoAOpen=' | <a href="';var seoFontOpen='<font color="#0000CC">';var seoFontClose='</font></a>';var seoCookIn="in";globals=true;

// \include\js\common_functions_no_stylesheet.js@@\main\3 

String.prototype.contains=function(pWanted){return(this.indexOf(pWanted)!=-1);}
String.prototype.containsAny=function(){var args=arguments,len=args.length,rv=false;for(var i=0;i<len&&!rv;i++)
rv=(this.indexOf(args[i])!=-1);return rv;}
String.prototype.containsAll=function(){var args=arguments,len=args.length;for(var i=0;i<len;i++)
{if(this.indexOf(args[i])==-1)
return false;}
return true;}
String.prototype.is=function(s){return(this==s);}
String.prototype.isAny=function(){var args=arguments,len=args.length,rv=false;for(var i=0;i<len&&!rv;i++)
rv=(this==args[i]);return rv;}
Number.prototype.dec2Hex=function(){return parseInt(this,10).toString(16)}
String.prototype.hex2Dec=function(){return parseInt(this,16);}
String.prototype.replaceTokens=function()
{var value=this;var re;var token;for(var i=0;i<arguments.length;i++)
{token="<#"+(i+1)+"#>";re=new RegExp(token,"gi");if(value.indexOf(token)!=-1)
{value=value.replace(re,arguments[i])}}
return value;}
function ebayStringContains(pSource,pWanted)
{return(pSource.indexOf(pWanted)!=-1);}
window.stringContains=ebayStringContains;function ebayEvalParameters(pStr)
{var str=location.search;if(pStr)
str=pStr;var ps=str.substr(1).split("&");for(var i=0;i<ps.length;i++)
{var p=unescape(ps[i]).split("=");if(country.isAny("tw","cn"))
p=ps[i].split("=");if(p[1])
{var eStr=p[0]+"=";if((p[1]=="true")||(p[1]=="false")||(p[1]=="null"))
eStr+=p[1]+";";else
{var tmp="";for(var j=0;j<p[1].length;j++)
{if(p[1].charAt(j)=="'")
tmp+="\\'";else if(p[1].charAt(j)=="+")
tmp+=" ";else
tmp+=p[1].charAt(j);}
p[1]=tmp;eStr+="'"+p[1]+"';";}
eval(eStr);}}}
function ebayUpdateLocationVars()
{var qInd=thisPage.indexOf(qstn);if(qInd==-1)
{thisPageURL=thisPage;thisPageURI="";}
else
{thisPageURL=thisPage.substring(0,qInd);thisPageURI=thisPage.substring(qInd);}
qInd=lastPage.indexOf(qstn);if(qInd==-1)
{lastPageURL=lastPage;lastPageURI="";}
else
{lastPageURL=lastPage.substring(0,qInd);lastPageURI=lastPage.substring(qInd);}
var qaCountryDomain=countryDomain,c;country="";for(var i=0;i<countries.length&&(country=="");i++)
{c="."+countries[i][2]+".";if(thisPageURL.containsAny(c,countries[i][0],countries[i][1]))
{countryDomain=countries[i][0];country=countries[i][2];countryDesc=countries[i][3];qaCountryDomain=(c==".us.")?".":c;}}
var isSecure=false;var isQA=thisPageURL.contains(qaDom);if(thisPageURL.indexOf(https)==0)
{isSecure=true;ebInclude="secure"+ebInclude;picsDir="secure"+picsDir;}
if(isQA)
{var qaInd=includeHost.indexOf(qaDom);var dotInd=includeHost.lastIndexOf(dot,qaInd-1)+1;if(dotInd!=0)
qaMachineName=includeHost.substring(dotInd,qaInd);countryDomain=(qaMachineName=="")?"":qaCountryDomain;countryDomain+=qaMachineName+qaDom+ebStr+dotCom+"/";}
var protocol=thisPageURL.substring(0,thisPageURL.indexOf("://")+3);if(!protocol.isAny(http,https))
protocol=http;picsDir=protocol+picsDir;includeDir=protocol+ebInclude+dot;if(isQA)
{if(qaMachineName!="")
includeDir+=qaMachineName+dot;includeDir+="qa"+dot;}
includeDir+=ebStr+"static"+dotCom+"/aw/pics/";cobrandDir=includeDir+"js/cobrand/";countryIncludeDir=includeDir+country+"/js/";countryCobrandDir=countryIncludeDir+"cobrand/";includeDir+="js/";countryDoubleByte=country.isAny("tw","cn");}
function ebayDowngradeDomain()
{var eInd=document.domain.indexOf(ebDom+dot);if(eInd!=-1)
document.domain=new String(document.domain).substr(eInd+1);}
function ebayShowPopupWindow(url,name,width,height,toolbar,location,status,scrollbars,resizable,menubar,left,top,customprops)
{var props="";if(width)props+=",width="+width;if(height)props+=",height="+height;if(toolbar)props+=",toolbar="+toolbar;if(location)props+=",location="+location;if(status)props+=",status="+status;if(scrollbars)props+=",scrollbars="+scrollbars;if(resizable)props+=",resizable="+resizable;if(menubar)props+=",menubar="+menubar;if(left)props+=",screenX="+left+",left="+left;if(top)props+=",screenY="+top+",top="+top;if(customprops)props+=","+customprops;if(props!="")props=props.substring(1);var w=window.open(url,name,props);if(!is.opera&&w&&!w.closed)w.focus();return w;}
function ebaySignInOut(signin,signout,sspagesignin,sspagesignout)
{if(typeof(readCookieEx)!='undefined')
{var url=http+'signin'+countryDomain+'/ws2/eBayISAPI.dll?SignIn';url+='&ssPageName=';var ssp=sspagesignin,sign=signin;if((readCookieEx("ebaysignin")==seoCookIn)||(readCookieEx("keepmesignin")==seoCookIn))
{ssp=sspagesignout;sign=signout;}
var str=seoAOpen+url+ssp+'">'+seoFontOpen+sign;document.write(str+seoFontClose);}}
window.eBaySignInOut=ebaySignInOut;function ebayRegister(text,sspage)
{if(typeof(readCookieEx)!='undefined')
{if((readCookieEx("ebaysignin")!=seoCookIn)||(readCookieEx("keepmesignin")!=seoCookIn))
{var str=seoAOpen+http+'cgi1'+countryDomain+'/aw-cgi/eBayISAPI.dll?SignIn';str+='?RegisterShow&ssPageName="'+sspage+'">'+seoFontOpen;document.write(str+text+seoFontClose);}}}
window.eBayRegister=ebayRegister;function ebayGetUnencodedHost(pURL)
{var dl=document.location,tp=unescape(dl);if(tp.contains("_W0QQ"))
{if(tp.split("/").length==4)
{tp=tp.replace(/_W0QQ/,"?");tp=tp.replace(/Z/g,"=");tp=tp.replace(/Q3A/g,":");tp=tp.replace(/Q3a/g,":");tp=tp.replace(/Q3B/g,";");tp=tp.replace(/Q3b/g,";");tp=tp.replace(/QQ/g,"&");}}
return tp;}
function ebayHelpLoadStrings()
{var str=scriptOpen+countryIncludeDir+"help/help_strings.js";document.write(str+scriptClose);}
var globals;if(globals)
{ebayUpdateLocationVars();if(thisPageURL.contains("/help/"))
ebayHelpLoadStrings();}
function ebayBustFrames(){var t=top.location;var w=window.location;if(t!=w)
t.replace(w);}
window.bustFrames=ebayBustFrames;

// \include\js\help\openHelpWindow.js@@\main\26 

var cbc;var focusWin=((navigator.userAgent.toLowerCase().indexOf("msie")==-1)||(parseInt(navigator.appVersion)>=5));function openHelpWindow(pPath)
{document.location.href=pPath;return false;}
function openNonHelpWindow(pPath)
{var win=ebayShowPopupWindow(pPath,"third",400,620,1,1,1,1,1,1);if(focusWin)
win.focus();return false;}
function openContextualHelpWindow(pPath)
{if(!(is.mac&&is.ie))
{ebayDowngradeDomain();}
var w=440,h=500;var win=ebayShowPopupWindow(pPath,"helpwin",w,h,0,0,0,1,1,0,parseInt(screen.availWidth-450),"0");if((!win||win.closed)&&(typeof(ebHelpStrPopupBlocked)=="string"))
{if(typeof(ebay)!="undefined")
ebay.oDocument.messageBox(ebHelpStrPopupBlocked);else
alert(ebHelpStrPopupBlocked);}
return false;}
function openHelpWebTV(pPath)
{document.location.href=pPath;return false;}
if(navigator.appName.indexOf("WebTV")!=-1)
{window.openHelpWindow=window.openNonHelpWindow=window.openContextualHelpWindow=openHelpWebTV;}

// \include\lib\_global\ebayInit.js@@\main\e415_caboose\3 

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.replaceToken=function(pStr,pToken,pRepl)
{var rv=pStr,re=new RegExp(pToken,"gi");if(rv.has(pToken))
rv=rv.replace(re,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(pPattern)
{var rv=this,re,tkn,a=arguments,l=a.length;for(var i=1;i<l+1;i++)
rv=this.replaceToken(rv,pPattern.replace("n",(i)),a[i]);return rv;}
String.prototype.decodeBase64=function()
{var rv=this,len=rv.length,ret="",i=0;var chr1,chr2,chr3="";var enc1,enc2,enc3,enc4="";var aChar="ABCDEFGHIJKLMNOPQRSTUVWXYZ"+"abcdefghijklmnopqrstuvwxyz"+"0123456789+/=*";var test=new RegExp("[^A-Za-z0-9+/=*]");if(test.exec(rv)){return;}
do{enc1=aChar.indexOf(rv.charAt(i++));enc2=aChar.indexOf(rv.charAt(i++));enc3=aChar.indexOf(rv.charAt(i++));enc4=aChar.indexOf(rv.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;ret+=String.fromCharCode(chr1);if(!(enc3>=64))
ret+=String.fromCharCode(chr2);if(!(enc4>=64))
ret+=String.fromCharCode(chr3);chr1=chr2=chr3=enc1=enc2=enc3=enc4="";}while(i<len);return ret;}
String.prototype.decodeUTF8=function()
{var s=this,len=s.length;var rs="";var i=0;var c=c1=c2=0;while(i<len)
{c=s.charCodeAt(i);if(c<128)
{rs+=String.fromCharCode(c);i++;}
else if((c>191)&&(c<224))
{c2=s.charCodeAt(i+1);rs+=String.fromCharCode(((c&31)<<6)|(c2&63));i+=2;}
else
{c2=s.charCodeAt(i+1);c3=s.charCodeAt(i+2);rs+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}}
return rs;}
String.prototype.parseSets=function(s,v,n)
{s=s?s:"^";v=v?v:",";n=n?n:"=";var a=[];var ma=this.split(s);if(ma)
{for(i in ma)
{var t=ma[i].split(n);if(t[0]!=""&&t[1]!="")
a[t[0]]=t[1].split(v);}}
return a;}
String.prototype.trim=function()
{var s=this;while(s.substring(0,1).isAny(' ','\n','\r'))
s=s.substring(1,s.length);while(s.substring(s.length-1,s.length).isAny(' ','\n','\r'))
s=s.substring(0,s.length-1);return s;}
Number.prototype.dec2Hex=function(){return parseInt(this,10).toString(16)}
String.prototype.hex2Dec=function(){return parseInt(this,16);}

// \include\lib\_global\ebayBase.js@@\main\e415_caboose\4 

function EbayObject(pParent,pName)
{if(!this.objType)
this.objType="EbayObject";this.parent=pParent;this.name=pName;this.controls=new Array;var eb=(typeof(ebay)=="object");this.oDocument=eb?ebay.oDocument:null;this.oGlobals=eb?ebay.oGlobals:null;this.oUtils=eb?ebay.oUtils:null;this._get=ebObjectGet;this._exec=ebObjectExecute;this.getArgs=ebObjectGetArgs;this.createError=ebObjectCreateError;this.throwDebug=ebObjectThrowDebug;this.throwWarning=ebObjectThrowWarning;this.throwError=ebObjectThrowError;this.EVENT_BEFORE=0;this.EVENT_AFTER=1;this.aArgs=["","_a[1]","_a[1],_a[2]","_a[1],_a[2],_a[3]","_a[1],_a[2],_a[3],_a[4]"];}
function ebObjectGetArgs(pLen)
{var s="",a=this.aArgs,l=a.length-1;if(pLen<=l)
return a[pLen];else
{s=a[l];for(var i=l+1;i<=pLen;i++)
s+=",_a["+i+"]";return s;}}
function ebObjectGet(pName)
{var p=eval("this."+pName);if(p)
return p;this.throwWarning("Invalid property '"+pName+"'","get");return"";}
function ebObjectExecute(pFunction)
{var s="this."+pFunction,f=eval(s);if(typeof(f)=="function")
{var _a=arguments,l=_a.length-1;s+="("+this.getArgs(l)+");";return eval(s);}
this.throwError("Invalid method '"+pFunction+"'","_exec");return true;}
function ebObjectCreateError(pType,pMsg,pCmd)
{if(typeof(EbayError)!="undefined")
new EbayError(pType,pMsg,null,this.name,this.objType,pCmd);}
function ebObjectThrowDebug(pMsg,pCmd)
{this.createError(2,pMsg,pCmd);}
function ebObjectThrowWarning(pMsg,pCmd)
{this.createError(1,pMsg,pCmd);}
function ebObjectThrowError(pMsg,pCmd)
{this.createError(0,pMsg,pCmd);}
function EbayBaseControl(pParent,pName)
{if(!this.objType)
this.objType="EbayBaseControl";this.base=EbayObject;this.base(pParent,pName);this.controls=[];var eh=this.oEventHandler=new EbayEventHandler(this,"Event Handler");this._registerEvent=eh.registerEvent;this._getEvent=eh.getEvent;this._getEventEx=eh.getEventEx;this._registerListener=ebControlRegisterListener;this._processEvent=eh.processEvent;this.listenTo=ebControlListenTo;this._addControl=ebControlAddControl;this._getControl=ebControlGetControl;this._getControlEx=ebControlGetControlEx;this.actualGetControl=ebControlActualGetControl;var p=this.parent;if(p&&typeof(p._addControl)=="function")
p._addControl(pName,this,true);}
function ebControlRegisterListener(pEvent,pSequence,pHandler)
{pEvent._exec("registerListener",pSequence,this,pHandler);}
function ebControlListenTo(pSource,pEventName,pSequence,pHandler)
{var e=pSource._getEvent(pEventName);this._registerListener(e,pSequence,pHandler)}
function ebControlAddControl(pName,pObj,pOverwriteExisting)
{var c=this.controls;if(!c[pName]||pOverwriteExisting)
c[pName]=pObj;return c[pName];}
function ebControlActualGetControl(pName)
{var c=this.controls,rc;if(c)
{for(var i in c)
{if(i==pName)
return c[i];else if(c[i]&&c[i].controls)
{rc=c[i].actualGetControl(pName);if(rc)
return rc;}}}
return null;}
function ebControlGetControl()
{var a=arguments,l=a.length,i=0,ct=this,n=a[i];while(ct.controls[n])
{ct=ct.controls[n];if(i==(l-1))
return ct;i++;n=a[i];}
with(this)
{var c=actualGetControl(n);if(c)return c;throwError("Control not found at '"+n+"'","getControl");}
this.throwError("Control not found at '"+n+"'","_getControl");return null;}
function ebControlGetControlEx()
{var a=arguments,len=a.length,i=0,s="this._getControl(";for(i;i<len;i++)
{if(i>0)
s+=",";s+="a["+i+"]";}
s+=")";var c=eval(s);if(c==null)
{this.throwWarning("Control not found at '"+a[0]+"'","_getControlEx");return new EbayObject();}
return c;}

// \include\lib\_global\ebayEvent.js@@\main\e415_caboose\2 

function EbayEvent(pParent,pName,pHandler)
{if(!this.objType)
this.objType="EbayEvent";this.base=EbayObject;this.base(pParent,pName);this.aHandlers=[pHandler];this.aListeners=[[],[]];this.registerListener=ebEventRegisterListener;this.notify=ebEventNotify;this.addHandler=ebEventAddHandler;}
function ebEventRegisterListener(pSequence,pParent,pHandler,pBlocking)
{var sa=this.aListeners[pSequence];sa[sa.length]=new EbayListener(pParent,pHandler,pBlocking);}
function ebEventNotify(pSequence)
{with(this)
{var a=arguments,len=a.length,aStr="";for(var i=1;i<len;i++)
aStr+=",a["+i+"]";var l=aListeners[pSequence],len=l.length,rv,fn="_listener_",lp="l[i].parent.";for(i=0;i<len;i++)
{eval(lp+fn+"="+lp+l[i].sEventFunction+";rv="+lp+"_exec(fn,this"+aStr+");");if(!rv&&l[i].bBlocking)
return false;}}
return true;}
function ebEventAddHandler(pName)
{this.aHandlers[this.aHandlers.length]=pName;}
function EbayListener(pParent,pHandler,pBlocking)
{if(!this.objType)
this.objType="EbayListener";this.base=EbayObject;this.base(pParent,"Event Listener");this.sEventFunction=pHandler;this.bBlocking=pBlocking;}
function EbayEventHandler(pParent,pName)
{if(!this.objType)
this.objType="EbayEventHandler";this.base=EbayObject;this.base(pParent,pName);this.aEvents=[];this.registerEvent=ebEventHandlerRegisterEvent;this.getEvent=ebEventHandlerGetEvent;this.getEventEx=ebEventHandlerGetEventEx;this.processEvent=ebEventHandlerProcessEvent;}
function ebEventHandlerRegisterEvent(pName,pHandler)
{var eh=this.oEventHandler,e=eh.aEvents[pName];if(e)
{e.addHandler(pHandler);}
else
{with(eh)
aEvents[pName]=e=new EbayEvent(eh,pName,pHandler);var s="this."+pName+" = function() {"+'var a = arguments, len = a.length, s = "";'+'for (var i=0; i<len; i++)'+' s += ",a[" + i + "]";'+" return eval('this._processEvent(\""+pName+"\"' + s + ')'); }";eval(s);}
return e;}
function ebEventHandlerGetEvent(pName,pEx)
{var e=this.oEventHandler._get("aEvents['"+pName+"']");if(e=="")
e=pEx?new EbayEvent():null;return e;}
function ebEventHandlerGetEventEx(pName)
{return this._getEvent(pName,true)}
function ebEventHandlerProcessEvent(pEventID)
{var rv=false;with(this)
{var e=oEventHandler.aEvents[pEventID];if(e)
{var a=arguments,l=a.length,aStr="";for(var i=1;i<l;i++)
aStr+=",a["+i+"]";rv=eval("e.notify(EVENT_BEFORE"+aStr+");");if(rv)
{var hs=e.aHandlers,l=hs.length,fn;for(i=0;i<l;i++)
{fn="_event_",ef=hs[i];if(ef)
eval("this."+fn+" = "+ef+";");rv=ef?eval("_exec(fn,e"+aStr+")"):false;}
eval("e.notify(EVENT_AFTER"+aStr+");");}}}
return rv;}

// \include\lib\_global\ebayGlobals.js@@\main\e415_caboose\2 

function EbayClient(pParent,pName)
{if(!this.objType)
this.objType="EbayClient";if(!pParent.objType.is("EbayGlobals"))
return;this.base=EbayObject;this.base(pParent,pName);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=false;this.iVer=-1;this.fMinorVer=0;this.init=function()
{var nv=navigator,agt=nv.userAgent.toLowerCase(),i=0;with(this)
{if(agt.has("webtv"))
{bWebTV=true;i=agt.indexOf("webtv/")+6;}
else if(agt.has("firefox"))
{bFirefox=true;i=agt.lastIndexOf("firefox")+7;}
else if(agt.has("safari"))
{bSafari=true;i=agt.lastIndexOf("safari")+7;}
else if(agt.has("opera"))
{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;}
iVer=parseInt(agt.substring(i));fMinorVer=parseFloat(agt.substring(i))-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"));bActiveXSupported=(!bMac&&(typeof(ActiveXObject)=='function'));}}
this.activeXLibLoaded=function(pName)
{if(this.bIE)
{var h='<scr'+'ipt language="JavaScript" type="text/JavaScript">';h+='var aX;</scr'+'ipt>';var d=this.parent.parent.oDocument.doc;d.writeln(h+'<scr'+'ipt language="vbscript" type="text/vbscript">');d.writeln('on error resume next');d.writeln('aX = IsObject(CreateObject("'+pName+'"))');d.writeln('</scr'+'ipt>');return(typeof(aX)!="undefined"&&aX);}
return false;}
this.init();}
function EbayEnvironment(pParent,pName)
{if(!this.objType)
this.objType="EbayEnvironment";if(!pParent.objType.is("EbayGlobals"))
return;this.base=EbayObject;this.base(pParent,pName);this.sCountry=this.sCountryDomain=this.sCountryDesc="";this.sTrainId="e415";this.sEnvironment="prod";this.bCountryDoubleByte=false;this.sEbay="ebay";this.sDomain=".ebay";this.sInclude="include";this.sQADomain=".qa.";this.sQAMachine=this.sIncludeDir=this.sCountryIncludeDir="";this.sPicsDir="pics.ebaystatic.com/aw/pics/";this.sIncludeHost=(typeof(includeHost)!="undefined")?includeHost:this.sInclude+this.ebDom+".com/";this.sJSPackageSuffix="";this.sThisPage=this.sLastPage=this.sThisPagePath=this.sThisPageQuery=this.sLastPagePath=this.sLastPageQuery=this.sProtocol=this.sThisPagePool=this.sThisPageHost="";this.init=function()
{with(this)
{var pro=sProtocol=location.protocol;var tp=sThisPage=sThisPagePath=getUnencodedHost();sThisPagePool=tp.substring(tp.indexOf("://")+3,tp.indexOf("."));sThisPageHost=location.hostname;var qInd=tp.indexOf("?");if(qInd!=-1)
{sThisPagePath=tp.substring(0,qInd);sThisPageQuery=tp.substring(qInd);}
if(typeof(document.referrer)!='undefined'&&document.referrer.length>0)
{var lp=sLastPage=sLastPagePath=sLastPageQuery=getUnencodedHost(document.referrer.toLowerCase());qInd=lp.indexOf("?");if(qInd!=-1)
{sLastPagePath=lp.substring(0,qInd);sLastPageQuery=lp.substring(qInd);}}
this.setLocals=ebEnvironmentSetLocals;this.setLocals();var qacd=".ebay.com/",tpp=sThisPagePath;qacd=(sCountry=="us")?".":"."+sCountry+".";if(tpp.has(".dev."))
{sCountryDomain=tpp.substring(tpp.indexOf("."),tpp.indexOf(".com")+4);sCountryDomain+="/";sCookieDomain=sDomain+".com";}
var isSecure=pro.is("https:"),isQA=tpp.has(sQADomain);if(isSecure)
{sInclude="secure"+sInclude;sPicsDir="secure"+sPicsDir;}
if(isQA)
{var ih=sIncludeHost,qi=ih.indexOf(sQADomain),di=ih.lastIndexOf(".",qi-1)+1;if(di)
sQAMachine=ih.substring(di,qi);sCountryDomain=sQAMachine.is("")?"":qacd;sCountryDomain+=sQAMachine+sQADomain+sEbay+".com/";sCookieDomain=sDomain+".com";}
if(!pro.has("http"))pro="http:";pro+="//";sPicsDir=pro+sPicsDir;sIncludeDir=sIncludeHost+"aw/pics/lib/";sCountryIncludeDir=sIncludeDir+sCountry+"/";sIncludeDir+="_global/";sJSPackageSuffix=(sTrainId.is("v")?"":("_e4151"+sCountry))+".js";}}
this.getUnencodedHost=function(pURL)
{var tp=unescape(pURL?pURL:document.location);if(tp.has("_W0QQ"))
{if(tp.split("/").length==4)
{tp=tp.replace(/_W0QQ/,"?");tp=tp.replace(/Z/g,"=");tp=tp.replace(/Q3A/g,":");tp=tp.replace(/Q3a/g,":");tp=tp.replace(/Q3B/g,";");tp=tp.replace(/Q3b/g,";");tp=tp.replace(/QQ/g,"&");}}
return tp;}
this.init();}
function EbayGlobals(pParent,pName)
{if(!this.objType)
this.objType="EbayGlobals";if(!pParent.objType.is("Ebay"))
return;this.base=EbayObject;this.base(pParent,pName);this.oClient=new EbayClient(this,"Client Information");this.oEnvironment=new EbayEnvironment(this,"Environment Information");}

// \include\lib\_global\ebayUtils.js@@\main\e415_caboose\2 

function EbayUtils(pParent,pName)
{if(!this.objType)
this.objType="EbayUtils";if(!pParent.objType.is("Ebay"))
return;this.base=EbayObject;this.base(pParent,pName);this.scriptTag=function(pPath)
{return'<sc'+'ript src="'+pPath+'" language="javascript" type="text/javascript"> </sc'+'ript>';}
this.isInArray=function(pArr,pVal)
{var rv=false,l=pArr.length;for(var i=0;i<l&&!rv;i++)
rv=pArr[i]==pVal;return rv;}
this.controlPath=function(pObj)
{with(pObj)
{var s="",o=pObj;while(o!=ebay)
{s=",'"+o.name+"'"+s;o=o.parent;}
s=s.substr(1);return"ebay._getControl("+s+")";}}
this.parseCurrency=function(pVal,pNonDecimal)
{var v=new String(pVal);if(pNonDecimal)
{v=v.replace(/\./g,"");v=v.replace(/,/g,".");}
v=parseFloat(v.replace(/,/g,""));return v;}
this.roundCurrency=function(pVal)
{return Math.round(pVal*100)/100;}
this.formatCurrency=function(pVal,pNonDecimal)
{var v=new String(this.roundCurrency(pVal)),dInd=v.lastIndexOf(".");if(dInd==-1)
{v+=".00";}
else if(dInd==v.length-2)
{v+="0";}
if(pNonDecimal)
{v=v.replace(",",".");dInd=v.lastIndexOf(".");v=v.substring(0,dInd)+","+v.substr(dInd+1);}
return v;}}

// \include\lib\_global\ebayDocument.js@@\main\e415_caboose\1 

function EbayDOM(pParent,pName)
{if(!this.objType)
this.objType="EbayDOM";this.base=EbayBaseControl;this.base(pParent,pName);if(!pParent.objType.is("Ebay"))
{this.throwError("Illegal object creation","constructor");return;}
this.doc=document;this.win=window;this.aParams=[];this.aConfigs=[];var bQueryLoaded=false;this.fCustomOnload=this.fCustomOnUnload=null;this.getQueryValue=function(pKey)
{with(this)
{if(!bQueryLoaded)
loadParams();return aParams[pKey]?aParams[pKey]:"";}}
this.loadParams=function()
{var str=this.doc.location.search;if(str.length==0)
return;str=str.substr(1);var ps=str.split("&"),psLen=ps.length;for(var i=0;i<psLen;i++)
{var p=unescape(ps[i]).split("=");if(this.parent.oGlobals.oEnvironment.bCountryDoubleByte)
p=ps[i].split("=");this.aParams[p[0]]="";if(p[1])
{var tmp="",c,len=p[1].length;for(var j=0;j<len;j++)
{c=p[1].charAt(j);if(c.is("'"))tmp+="\\'";else if(c.is("+"))tmp+=" ";else tmp+=c;}
this.aParams[p[0]]=tmp;}}
bQueryLoaded=true;}
this.onLoad=function()
{with(this)
{if(fCustomOnload)
fCustomOnload();_exec("bind");}}
this.onUnload=function()
{with(this)
{if(fCustomOnUnload)
fCustomOnUnload();doc=win=null;}}
this.registerEvents=function()
{with(this)
{win.jsObj=this;if(typeof(win.onload)=="unknown")
win.onload=null;_registerEvent("load","onLoad");fCustomOnload=win.onload;win.onload=function()
{jsObj._exec("load");}
if(typeof(win.onunload)=="unknown")
win.onunload=null;_registerEvent("unload","onUnload");fCustomOnUnload=win.onunload;win.onunload=function()
{if(jsObj)
{jsObj._exec("unload");jsObj=null;}}
if(typeof(win.onresize)=="unknown")
win.onresize=null;_registerEvent("resize","");win.onresize=function()
{jsObj._exec("resize");}
_registerEvent("bind");}}
this.registerEvents();this.addConfig=function(pConfig)
{var n=pConfig.name,c=this.aConfigs[n]=pConfig;return c;}
this.createConfig=function(pName)
{return this.addConfig(new EbayConfig(pName));}
this.getConfig=function(pName)
{return this.aConfigs[pName];}
this.downgradeDomain=ebDowngradeDomain;ebDowngradeDomain=null;this.closeWindow=function(pWin)
{if(pWin&&!pWin.closed)
pWin.close();}
this.write=function(pStr)
{with(this.doc)
{if(typeof(standardWrite)=="undefined")
write(pStr);else
standardWrite(pStr);}}
this.writeln=function(pStr)
{with(this.doc)
{if(typeof(standardWriteln)=="undefined")
writeln(pStr);else
standardWriteln(pStr);}}
this.createElement=function(pStr)
{with(this.doc)
{return(typeof(standardCreateElement)=="undefined")?createElement(pStr):standardCreateElement(pStr);}}
this.redirect=function(pUrl,pReplace)
{var l=this.doc.location;if(pReplace)l.replace(pUrl);else l.href=pUrl;}
this.gotoAnchor=function(pName)
{var l=this.doc.location,n=pName,t=l.href.split("#");if(n&&(t[1]!=n))
l.href=t[0]+'#'+n;}
this.getCookie=function(pName,pSubName)
{var cj=this._getControl('cookieJar');return cj?(pSubName?cj.readCookielet(pName,pSubName):cj.readCookie(pName)):"";}
this.setCookie=function(pName,pSubName,pValue,pExpires,pSecure)
{var cj=this._getControl('cookieJar');if(cj)
pSubName?cj.writeCookielet(pName,pSubName,pValue,"","",pExpires):cj.writeCookie(pName,pValue,"","",pExpires,pSecure);}
this.getFormElem=function(pName,pType)
{var d=this.doc;if(!d)
return null;var frms=d.forms,ln=frms.length,e,eLen;for(var i=0;i<ln;i++)
{e=frms[i].elements;eLen=e.length;for(var j=0;j<eLen;j++)
{if(e[j].name==pName)
{if(pType)
{if(e[j].type==pType)
return e[pName];}
else
return e[j];}}}
this.throwError("Element '"+pName+"' not found on this page","getFormElem");return null;}
this.getUIElem=function(pName)
{var s=pName,d=this.doc;if(d.getElementById)
return d.getElementById(s);else if(d.all)
return d.all(s);this.throwWarning("Not supported","getElem");return null;}
this.messageBox=function(pTxt)
{window._showEbayAlert(pTxt);}}
window._showEbayAlert=window.alert;function ebDowngradeDomain()
{var dd=document.domain,i=dd.indexOf(".ebay.");if(i!=-1)
document.domain=new String(dd).substr(i+1);}
function ebDocumentCheckDowngradeDomain()
{var agt=navigator.userAgent.toLowerCase();if(location.search.has("downgradeDomain=true")&&!agt.hasAll("mac","msie"))
ebDowngradeDomain();}
ebDocumentCheckDowngradeDomain();

// \include\lib\_global\ebayConfig.js@@\main\2 

function EbayConfig(pName)
{if(!this.objType)
this.objType="EbayConfig";this.name=pName;this.oGlobals=ebay.oGlobals;}

// \include\lib\_global\ebayError.js@@\main\e415_caboose\1 

function EbayError(pErrType,pErrDesc,pInnerError,pSource,pCmd)
{if(!this.objType)
this.objType="EbayError";this.vType=pErrType||0;this.sDesciption=pErrDesc;this.sSource=pSource||"unknown";this.sCommand=pCmd||"unknown";this.dDate=new Date();this.sBrowser=navigator.userAgent;this.sLocation=location.href||"";this.oInnerError=pInnerError||null;this.toString=ebErrorToString;this.getMessage=ebErrorGetMessage;var em=_ebayErrorManager;if(em==null)
_ebayErrorManager=em=new EbayErrorManager();em.add(this);}
function ebErrorToString(pHideMore)
{with(this)
{var h=getMessage();if(oInnerError)
h+="->>"+oInnerError.toString(true);if(pHideMore!=true)
{h+="\n <Browser: "+sBrowser+">";h+="\n <Page Location: "+sLocation+">";}
return h;}}
function ebErrorGetMessage()
{with(this)
{var ty="ERROR";switch(vType)
{case 1:{ty="WARNING";break;}
case 2:{ty="INFO";break;}}
return"["+ty+": "+sSource+"."+sCommand+"] "+sDesciption+" @"+dDate;}}
function EbayErrorManager()
{if(!this.objType)
this.objType="EbayErrorManager";this.bDebug=false;this.aErrors=[];this.oDebugWin=new EbayHTMLPopup(this,"debugWin");function convertErrorTo(pErrors,pIsHTML)
{var h="",e=pErrors,l=e.length,sBr=pIsHTML?"<br>":"\n",col;for(var i=0;i<l;i++)
{if(pIsHTML)
col=(e[i].vType==0)?"red":"green";h+=((i==0)?"":sBr)+(i+1)+". "+"<font color="+col+">"+e[i].toString()+"</font>";}
return h;}
this.convertErrorTo=convertErrorTo;this.add=function add(pError)
{this.aErrors[this.aErrors.length]=pError;}
this.toString=function toString()
{return this.convertErrorTo(this.aErrors,false)}
this.toHTML=function toHTML()
{return this.convertErrorTo(this.aErrors,true)}
this.show=function show()
{if(this.bDebug)
{ebay.oDocument.downgradeDomain();var pUrl="http://pages"+ebay.oGlobals.oEnvironment.sCountryDomain+"js_debug/debugger.html?downgradeDomain=true";this.oDebugWin.showEx(pUrl,800,500,false,false,true,true,true,true,400,25);}}}
var _ebayErrorManager=null;if(location.search.toLowerCase().has("invokejsdebug=true"))
{if(!_ebayErrorManager)
_ebayErrorManager=new EbayErrorManager();_ebayErrorManager.bDebug=true;}
function _ebayErrorHandler(eMsg,eUrl,eLine)
{eMsg=eMsg||"Unknown JS error occured";eUrl=eUrl||location.href;eLine=eLine||0;var eO=new EbayError(0,eMsg+" (Line: "+eLine+")",null,"Script","Unknown");eO.location=eUrl;_ebayErrorManager.show();return true;}
function _ebayTurnOnErrorHandler(pCustomEvent)
{if(location.search.toLowerCase().has("invokejsdebugger=true"))
return;window.onerror=(pCustomEvent)?pCustomEvent:_ebayErrorHandler;}
if(!location.host.has(".qa.")&&!location.host.has(".corp.ebay.com"))
_ebayTurnOnErrorHandler();

// \include\lib\_global\ebay.js@@\main\e415_caboose\1 

function Ebay(pName)
{if(!this.objType)
this.objType="Ebay";var w=window,wo=(w.parent!=w)?w.parent:w.opener;var parent=(wo&&location.search.hasAny("downgradeDomain=true","ej2child=true"))?wo.g_ebPopupParent:null;this.base=EbayBaseControl;this.base(parent,pName);this.oServer=null;this.init=function()
{this.oDocument=new EbayDOM(this,"Document object");this.oGlobals=new EbayGlobals(this,"Global objects");this.oUtils=new EbayUtils(this,"Common functions");}
this.init();if(typeof(ebayGetErrors)=="function")
this.getErrors=ebayGetErrors;}
window.ebay=new Ebay("EbayJavascript2");

// \include\lib\us\_global\ebayLocals.js@@\main\2 

function ebEnvironmentSetLocals()
{this.bCountryDoubleByte=false;this.sCountryDomain=".ebay.com/";this.sCookieDomain=".ebay.com";this.sCountry="us";this.sCountryDesc="US";}

// \include\lib\_global\ebayPage.js@@\main\e415_caboose\1 

function EbayPage(pParent,pName)
{if(!this.objType)
this.objType="EbayPage";this.base=EbayBaseControl;this.base(pParent,pName);this.oConfig=new EbayConfig(pName);this.onBeforeLoad=this.onAfterLoad=this.onBeforeUnload=this.onAfterUnload=null;with(this)
{var p=parent,e=p._getEvent("load"),eb=EVENT_BEFORE,ea=EVENT_AFTER;_registerListener(e,eb,"onBeforeLoad");_registerListener(e,ea,"onAfterLoad");e=p._getEvent("unload");_registerListener(e,eb,"onBeforeUnload");_registerListener(e,ea,"onAfterUnload");}}
ebay.oDocument.oPage=new EbayPage(ebay.oDocument,"page");

// \include\lib\_global\_ui\_base\base.js@@\main\e415_caboose\2 

function EbayHTML(pParent,pName,pElemName,pDisabled,pCfg)
{if(!this.objType)
this.objType="EbayHTML";this.base=EbayBaseControl;this.base(pParent,pName);this.sElemName=pElemName;this.bDisabled=pDisabled||false;this.eElem=null;this.aBindEvents=[];this.oConfig=pCfg||null;this.getDocElem=ebHTMLGetDocumentElement;this.getElem=ebHTMLGetElem;this.bind=ebHTMLBind;this.bindHTML=ebHTMLBindHTML;this.bindEvents=ebHTMLBindEvents;this.bindEventString=ebHTMLBindEventsString;this.assignJSObject=ebHTMLAssignJSObject;this.enable=ebHTMLEnable;this.show=ebHTMLShow;this.focus=ebHTMLFocus;this.setLTWH=ebHTMLSetLTWH;this.left=ebHTMLLeft;this.top=ebHTMLTop;this.width=ebHTMLWidth;this.height=ebHTMLHeight;this.setStyle=ebHTMLSetStyle;this.getStyle=ebHTMLGetStyle;this.onBeforeUnload=ebHTMLOnBeforeUnload;this.subscribeEvents=ebHTMLSubscribeEvents;with(this)
{_registerListener(oDocument._getEvent("bind"),EVENT_AFTER,"bind");_registerListener(oDocument._getEvent("unload"),EVENT_BEFORE,"onBeforeUnload");}}
function ebHTMLSubscribeEvents()
{var aA=arguments,e,len=aA.length;for(var i=0;i<len;i++)
{e=aA[i].toLowerCase();this.aBindEvents[e]=e;}}
function ebHTMLOnBeforeUnload()
{var e=this.eElem;if(e&&e.jsObjs)
{for(var i in e.jsObjs)
e.jsObjs[i]=null;e.jsObjs=null;this.eElem=null;}}
function ebHTMLGetDocumentElement(pName,pColl)
{var c=eval("this.oDocument.doc."+pColl);return c?c[pName]:null;}
function ebHTMLGetElem(pName)
{return this.oDocument.getFormElem(pName);}
function ebHTMLBind()
{with(this)
{bindHTML();bindEvents();}}
function ebHTMLBindHTML()
{with(this)
{var eN=sElemName;if(typeof(eN)!="undefined"&&eN.length>0)
{eElem=getElem(eN);if(eElem)
{assignJSObject(eElem);if(bDisabled)
enable(false);}}}}
function ebHTMLAssignJSObject(pElem)
{var set=false,jso=pElem.jsObjs;for(var i in jso)
{if(jso[i]==this)
{jso[i]=this;set=true;break;}}
if(!set)
{if(!jso)
jso=pElem.jsObjs=[];jso[jso.length]=this;}}
function ebHTMLBindEvents()
{if(!this.eElem)
return;var e=this.aBindEvents;if(e)
{for(var i in e)
{eval("this.eElem."+i+" = function (){"+this.bindEventString(i)+"}");}}}
function ebHTMLBindEventsString(pEventId)
{var s="var rv = true, jso = this.jsObjs;"+"if (jso)"+"{"+"for (var i in jso)"+"{"+"var _o=jso[i];"+"if (!_o.bDisabled && (typeof(_o."+pEventId+") == 'function'))"+"rv = _o."+pEventId+"(this, arguments[0]);"+"}"+"}"+"return rv;";return s;}
function ebHTMLEnable(pEnable)
{var e=this.eElem;if(e)
{e.disabled=!pEnable;}
this.bDisabled=!pEnable;}
function ebHTMLShow(pShow,pNoDisplayChange)
{var e=this.eElem;if(e)
{var s=e.style;if(s)
{s.visibility=pShow?"":"hidden";if(!pNoDisplayChange)
s.display=pShow?"":"none";}}}
function ebHTMLFocus(pFocus)
{var e=this.eElem;if(e)
{with(e)
pFocus?focus():blur();}}
function ebHTMLSetLTWH(pVal,pName)
{var e=this.eElem;if(e)
{if((pVal!=null)&&!isNaN(parseInt(pVal)))
eval("e.style."+pName.toLowerCase()+"=pVal;");return eval("e.offset"+pName);}}
function ebHTMLLeft(pLeft)
{return this.setLTWH(pLeft,"Left");}
function ebHTMLTop(pTop)
{return this.setLTWH(pTop,"Top");}
function ebHTMLWidth(pWidth)
{return this.setLTWH(pWidth,"Width");}
function ebHTMLHeight(pHeight)
{return this.setLTWH(pHeight,"Height");}
function ebHTMLSetStyle(pName,pVal)
{var e=this.eElem;if(e&&!e.length)
eval("e.style."+pName+"=pVal;");}
function ebHTMLGetStyle(pName)
{var e=this.eElem;if(e&&!e.length)
return eval("e.style."+pName+";");}

// \include\lib\_global\_ui\_base\popup.js@@\main\3 

function EbayHTMLPopup(pParent,pName,pCfg)
{if(!this.objType)
this.objType="EbayHTMLPopup";this.base=EbayBaseControl;this.base(pParent,pName);this.oConfig=pCfg||null;this.sUrl="";this.iWidth=this.iHeight=this.iLeft=this.iTop=this.oWin=null;this.bToolbar=this.sLocation=this.bStatus=this.bScrollbars=this.bResizable=this.bMenubar=true;this.sProps=this.sCustomProps="";this.bModal=false;this.sSavedFocusFunction=null;this.iHBuffer=this.iWBuffer=0;this.show=ebHTMLPopupShow;this.showEx=ebHTMLPopupShowEx;this.resizeParent=ebHTMLPopupResizeParent;this.close=ebHTMLPopupClose;this.focus=ebHTMLPopupFocus;this.sizeToContent=ebHTMLPopupSizeToContent;this.onBeforeShow=null;this.onAfterShow=null;}
function ebHTMLPopupShow()
{with(this)
{if(onBeforeShow)
onBeforeShow();if(sUrl.length==0)
return null;var sP=(iWidth!=null)?",width="+iWidth:"";sP+=(iHeight!=null)?",height="+iHeight:"";sP+=(iLeft!=null)?",screenX="+iLeft+",left="+iLeft:"";sP+=(iTop!=null)?",screenY="+iTop+",top="+iTop:"";sP+=",toolbar="+((bToolbar)?"1":"0");sP+=",location="+((sLocation)?"1":"0");sP+=",status="+((bStatus)?"1":"0");sP+=",scrollbars="+((bScrollbars)?"1":"0");sP+=",resizable="+((bResizable)?"1":"0");sP+=",menubar="+((bMenubar)?"1":"0");sP+=(sCustomProps.length>0)?","+sCustomProps:"";if(sP.length>0)
sP=sP.substring(1);sProps=sP;var tWin=this.oDocument.win;tWin.g_ebPopupParent=this;if(bModal)
{tWin.g_ebPopupObject=this;sSavedFocusFunction=tWin.onfocus;tWin.onfocus=function(){g_ebPopupObject.focus();}}
var w=tWin.open(sUrl,name,sP);if(w)
w.focus();oWin=w;if(onAfterShow)
onAfterShow();return w;}}
function ebHTMLPopupShowEx(pUrl,pWidth,pHeight,pToolbar,pLocation,pStatus,pScrollbars,pResizable,pMenubar,pLeft,pTop,pCustomsProps,pModal,pWBuffer,pHBuffer)
{with(this)
{if(pUrl)
sUrl=pUrl;iWidth=pWidth;iHeight=pHeight;iLeft=pLeft;iTop=pTop;bToolbar=pToolbar;sLocation=pLocation;bStatus=pStatus;bScrollbars=pScrollbars;bResizable=pResizable;bMenubar=pMenubar;if(pCustomsProps)
sCustomProps=pCustomsProps;bModal=pModal;iHBuffer=pHBuffer;iWBuffer=pWBuffer;return show();}}
function ebHTMLPopupResizeParent(pX,pY,pW,pH)
{var p=this.parent;if(p)
{if(!isNaN(pX)&&!isNaN(pY))
p.moveTo(pX,pY);if(!isNaN(pW)&&!isNaN(pH))
p.resizeTo(pW,pH);}}
function ebHTMLPopupClose()
{with(this)
{if(bModal)
oDocument.win.onfocus=sSavedFocusFunction;oDocument.closeWindow(oWin);}}
function ebHTMLPopupFocus()
{var w=this.oWin;if(w&&!w.closed)
w.focus();else
this.close();}
function ebHTMLPopupSizeToContent()
{with(this)
{var c=oGlobals.oClient;if(!(c.bNav&&(c.iVer<5)))
{var ims=oWin.document.images,len=ims.length;var bottom=0,right=0,cB,cR;for(var i=0;i<len;i++)
{cB=ims[i].offsetTop+ims[i].offsetHeight;cR=ims[i].offsetLeft+ims[i].offsetWidth;if(cB>bottom)bottom=cB;if(cR>right)right=cR;}
oWin.resizeTo(right+iWBuffer,bottom+iHBuffer);}}}

// \include\lib\_global\features\cookiejar\dp_cookie_format.js@@\main\e415_caboose\1 

function EbayDPCookieFormat(p,n)
{if(!this.objType)
this.objType="EbayDPCookieFormat";this.base=EbayCookieFormat;this.base(p,n);this.setExp=function(e)
{if(!e)
{n=new Date();y=n.getUTCFullYear();if(y<1900)
{y=1900+y;}
n.setUTCFullYear(y+2);e=n;}
this.expires=e;}
this.parse2Str=function()
{var cl,i,e,s="";cl=this.aCookielets;if(cl)
{for(i in cl)
{if(cl[i])
{with(cl[i])
{e=expDate-new Date();if(e>0)
s+=name+"/"+escape(value)+expHex+"^";}}}}
this.value=s?this.version+s:"";}
this.parse2Objs=function()
{var v,m,c,l,e,x,o;with(this)
{v=value;v=v.substring(version.length,v.length);m=v.split("^");if(m)
{for(i in m)
{c=m[i];l=c.length;e=c.substring(l-8,l);c=c.substring(0,l-8);x=c.split("/");if(x[0]!=""&&x[1]!="")
{o=unescape(c.substring(c.indexOf("/")+1,l));add(x[0],o,e);}}}}}}

// \include\lib\_global\features\cookiejar\ds_cookie_format.js@@\main\e415_caboose\1 

function EbayDSCookieFormat(p,n)
{if(!this.objType)
this.objType="EbayDSCookieFormat";this.base=EbayCookieFormat;this.base(p,n);this.setExp=function(e){}
this.parse2Str=function()
{var n,s="^";var cl=this.aCookielets;if(cl)
{for(i in cl)
{n=cl[i].name;if(cl[i]&&n)
s+=n+"="+cl[i].value+"^";}}
this.value=escape(s);}
this.parse2Objs=function()
{var v=unescape(this.value);var mc=v.split("^");if(mc)
{for(i in mc)
{var x=mc[i].split("=");if(x[0]!=""&&x[1]!="")
{var o=x[1];for(var j=2;j<x.length;j++)
{o+="="+x[j];}
this.add(x[0],o);}}}}}

// \include\lib\_global\features\cookiejar\cookie_jar.js@@\main\e415_caboose\1 

function EbayCookieJar(pParent,pName,pCfg)
{if(!this.objType)
this.objType="EbayCookieJar";this.oConfig=pCfg;this.COMPAT="10";this.CONVER="01";this.STRICT="00";this.base=EbayBaseControl;this.base(pParent,pName);this.sCookie='';this.aMap=[];this.aModes=[];this.aCookies=[];this.aFormats=[];this.oEnv=pCfg.oGlobals.oEnvironment;this.getMode=function(c)
{var t=this.aModes[c];return(t?t:"");}
this.fillModes=function()
{with(this)
{var h,cL,a,i,l,f,j,b="";h=getCookielet(pCfg.sModesCookie,pCfg.sModesCookielet);cL=pCfg.sConvCookieList.split(",");j=cL.length;for(i=0;i<j;i++)
{aModes[cL[i]]=(h=="0")?STRICT:"";}
if(h&&h!="0")
{if(h.has("."))
{a=h.split(".");j=a.length;for(i=0;i<j;i++)
{b=a[i].hex2Dec().toString(2)+b;}}
else
{b=h.hex2Dec().toString(2);}
i=0;l=b.length;if(aModes)
{for(o in aModes)
{j=l-(2*(i+1));f=b.substring(j,j+2).toString(10);f=(!f)?STRICT:f;aModes[o]=(f.length==1)?"0"+f:f;i++;}}}}}
this.getFormat=function(pN)
{var m,o,i;m=this.aMap;if(m)
{for(o in m)
{if(m[o])
{for(i in m[o])
{if(m[o][i]==pN)
return o;}}}}
return"EbayCookieFormat";}
this.get=function(pN)
{var c=this.aCookies[pN];return c?c:(pN?this.add(pN,""):"");}
this.add=function(pN,pV)
{with(this)
{var o,fo;o=new EbayCookieEx(this,pN,pV,oEnv.sCookieDomain,"/","",false);o.format=getFormat(pN);fo=getFormatObj(o.format);o.parse2Objs=fo.parse2Objs;o.parse2Str=fo.parse2Str;o.add=fo.add;o.write=fo.write;o.read=fo.read;o.setExp=fo.setExp;o.parse2Objs();aCookies[pN]=o;return o;}}
this.getFormatObj=function(pN)
{f=this.aFormats[pN];return f?f:"";}
this.init=function()
{with(this)
{var a,o,n,j;readDocCookie();a=sCookie.split("; ");j=a.length;for(o=0;o<j;o++)
{n=a[o].split("=");if(n.length==2)
{add(n[0],n[1]);}}}}
this.addCookielet=function(pCont,pName,pVal,pExp)
{var c=this.get(pCont);if(c)
c.add(pName,pVal,pExp);}
this.getCookielet=function(pC,pCl)
{with(this)
{refresh();var c=get(pC);return c?c.read(pCl):"";}}
this.write=function(pCont,pExp)
{var c=this.get(pCont);if(c)
{c.setExp(pExp);c.write();}}
this.read=function(pName)
{with(this)
{refresh();var c=get(pName);return c?c.ueValue():"";}}
this.writeRawCookie=function(pName,pVal,pExp,pDomain,pPath,pSec)
{with(this)
{var c=get(pName);if(c)
{if(pVal)
c.value=pVal;if(pExp)
{if(pExp=="yes"||pExp=="delete")
expires=new Date(pCfg.sCookieDeleteDate);c.expires=pExp;}
if(pDomain)
c.domain=pDomain;if(pPath)
c.path=pPath;if(pSec)
c.secure=pSec;c.write();}}}
this.refresh=function()
{with(this)
{if(sCookie.indexOf(parent.doc.cookie)!=0)
init();}}
this.initFmts=function()
{with(this)
{var o;aMap=pCfg.sFormatMap.parseSets();if(aMap)
{for(o in aMap)
{aFormats[o]=eval("new "+o+"(this, o)");}}}}
this.readDocCookie=function()
{this.sCookie=this.parent.doc.cookie;}
this.initFmts();this.init();this.fillModes();this.getDest=function(n,bCL)
{var aM=this.oConfig.aNewMapping;if(aM[n])
return bCL?aM[n][1]:aM[n][0];return"";}
this.readCookie=function(c)
{with(this)
{var m=getMode(c);var v=nv="";v=read(c);nv=getCookielet(getDest(c,false),getDest(c,true));if(m==COMPAT)
{v=v?v:nv;}
else if(m==CONVER)
{v=nv?nv:v;}
else if(m==STRICT)
{v=nv;}
return v;}}
this.readCookielet=function(c,cl)
{with(this)
{var m=getMode(c);var v="";if(m==STRICT||m==CONVER)
{nc=getDest(c,false);ncl=getDest(c,true);v=getCookielet(nc,ncl);v=pareseReg(c,cl,nc,ncl,v);}
else
{v=getCookielet(c,cl);}
return v;}}
this.writeCookielet=function(c,cl,v,d,p,e1,e2)
{with(this)
{var m=getMode(c);if(m==STRICT||m==CONVER)
{nc=getDest(c,false);ncl=getDest(c,true);nv=getCookielet(nc,ncl);v=buildReg(c,cl,nc,ncl,v,nv);c=nc;cl=ncl;}
addCookielet(c,cl,v,e1);write(c,(typeof(e2)!="undefined")?e2:'')}}
this.writeCookie=function(c,v,d,p,e,s)
{with(this)
{var m=getMode(c);if(m==STRICT||m==CONVER)
{var nc=getDest(c,false);e=new Date(e);addCookielet(nc,getDest(c,true),v,e);write(nc);}
else
{writeRawCookie(c,v,e,d,p,s);}}}
this.deleteCookie=function(c,d,p)
{this.writeCookie(c,null,d,p,new Date(1),false);}
this.pareseReg=function(c,cl,nc,ncl,v)
{if(c=="reg")
{if(v.has("=")&&v.has("^"))
{var a=v.parseSets();if(a[cl])
return a[cl][0];}
return"";}
else
return v;}
this.buildReg=function(c,cl,nc,ncl,v,nv)
{if(c!="reg")
return v;var r="";if(nv.has("=")&&nv.has("^"))
{var a=nv.parseSets();if(!a[cl])
a[cl]=new Array();a[cl][0]=v;if(a)
{for(var m in a)
{r+=m+"="+a[m][0]+"^";}}}
else
{r=cl+"="+v+"^";}
return"^"+r;}}
function EbayCookieEx(pParent,pName,pVal,pDomain,pPath,pExp,pSec)
{if(!this.objType)
this.objType="EbayCookieEx";this.base=EbayBaseControl;this.base(pParent,pName);this.name=pName;this.value=pVal;this.ueValue=function(){return unescape(this.value)}
this.domain=pDomain;this.path=pPath;this.secure=pSec;this.expires=pExp;this.format="";this.version="b";this.aCookielets=[];this.add=function(pName,pVal,pExp)
{this.aCookielets[pName]=new EbayCookieletEx(this,pName,pVal,pExp);}}
function EbayCookieletEx(pParent,pName,pVal,pExp)
{if(!this.objType)
this.objType="EbayCookieletEx";this.base=EbayBaseControl;this.base(pParent,pName);this.name=pName;this.value=pVal?pVal:'';this.expires=pExp?pExp:'';var exd=edk=ed=eh='';this.init=function()
{with(this)
{e=expires;if(typeof(e)=="object")
{exd=e;y=e.getUTCFullYear();if(y<1900)
y=y+1900;e=Date.UTC(y,e.getUTCMonth(),e.getUTCDate());}
var un="undefined";if(typeof(e.hex2Dec)!=un)
{e=e.hex2Dec();edk=e;e=e*1000;exd=new Date(e);ed=e;eh=edk.dec2Hex();}
else
{ed=e;edk=Math.floor(e/1000);eh=edk.dec2Hex();}}
this.expDate=exd;this.expDec=ed;this.expHex=eh;this.expDecBy1000=edk;}
this.init();}
function EbayCookieFormat(pParent,pName)
{if(!this.objType)
this.objType="EbayCookieFormat";this.base=EbayCookieEx;this.base(pParent,pName);this.setExp=function(e)
{if(e)
this.expires=e;}
this.parse2Str=function()
{this.value=escape(this.value);}
this.parse2Objs=function(){}
this.write=function()
{with(this)
{parse2Str();v=value;if((isNaN(v)&&v.length<4000)||(v+'').length<4000)
{var t=new Date(expires);expires=(isNaN(t))?expires:t;document.cookie=(name?name+'=':'')+(v?v:'')+(domain?'; domain='+domain:'')+(path?'; path='+path:'')+(expires?'; expires='+expires.toGMTString():'')+(secure?'; secure='+escape(secure):'');parent.readDocCookie();}
else
{t=parent.oEnv;if(t.sThisPagePath.has(t.sQADomain))
alert("ERROR: Cookie data could not be set over 4kb.");}}}
this.read=function(pName)
{var c=this.aCookielets[pName];return c?c.value:"";}}
function EbayCookieJarConfig(name)
{if(!this.objType)
this.objType="EbayCookieJarConfig";this.base=EbayConfig;this.base(name);this.sConvCookieList="";this.sFormatMap="";this.sCookieDeleteDate="May, 01 1999 12:00:00 GMT";this.sModesCookie="ebay";this.sModesCookielet="cv";this.aNewMapping="";}

// \include\lib\_global\features\cookiejar\init.js@@\main\e415_caboose\1 

function initCookieJar()
{var c=new EbayCookieJarConfig('CJ');c.sConvCookieList="recent_vi,ebaysignin,keepmesignin,item_list,back_to_list,reg,p,etfc,history_item";c.sFormatMap="EbayCookieFormat=r^EbayDPCookieFormat=dp1^EbayDSCookieFormat=ebay,reg,apcCookies";c.aNewMapping="recent_vi=ebay,lvmn^ebaysignin=ebay,sin^reg=dp1,reg^p=dp1,p^etfc=dp1,etfc^keepmesignin=dp1,kms^ItemList=ebay,wl^BackToList=s,BIBO_BACK_TO_LIST".parseSets();ebay.oDocument.oCookieJar=new EbayCookieJar(ebay.oDocument,"cookieJar",c);}
initCookieJar();

// \include\lib\_global\features\cookiejar\helper.js@@\main\1 

function getCJ()
{return ebay.oDocument.oCookieJar;}
function readCookieEx(c)
{return getCJ().readCookie(c);}
function readCookieletEx(c,cl)
{return getCJ().readCookielet(c,cl);}
function writeCookieletEx(c,cl,v,d,p,e1,e2)
{getCJ().writeCookielet(c,cl,v,d,p,e1,e2);}
function writeCookieEx(c,v,d,p,e,s)
{getCJ().writeCookie(c,v,d,p,e,s);}
function deleteCookieEx(c,d,p)
{getCJ().deleteCookie(c,d,p);}
with(window)
{WriteCookie=writeCookieEx;ReadCookie=readCookieEx;readMultiCookie=EbayReadDPCookielet=readCookieletEx;writeMultiCookie=writeCookieletEx;DeleteCookie=deleteCookieEx;Write2YearCookie=function(c,v,d,p,e,s)
{if(!e)
{td=new Date();y=td.getYear();td.setYear(y+2);e=td.valueOf();}
writeCookieEx(c,v,d,p,e,s)}}

// \include\lib\_global\features\help\open_help_window.js@@\main\3 

function EbayOpenHelpWindow(pParent,pName)
{if(!this.objType)
this.objType="EbayOpenHelpWindow";this.base=EbayBaseControl;this.base(pParent,pName);var c=this.oGlobals.oClient;this.bFocusWin=(!c.bIE&&(c.iVer>4));this.openNonHelpWindow=function(pPath)
{var p=new EbayHTMLPopup(this,"popup","third");p.showEx(pPath,400,620,1,1,1,1,1,1);if(bFocusWin)
win.focus();return false;}
this.openContextualHelpWindow=function(pPath)
{if(!(c.bMac&&c.bIE))
this.oDocument.downgradeDomain();var p=new EbayHTMLPopup(this,"popup","helpwin");var w=440,h=500;p.showEx(pPath,w,h,0,0,0,1,1,0,parseInt(screen.availWidth-450),"0");var win=p.oWin;if((!win||win.closed)&&(typeof(ebHelpStrPopupBlocked)=="string"))
{if(typeof(ebay)!="undefined")
ebay.oDocument.messageBox(ebHelpStrPopupBlocked);else
alert(ebHelpStrPopupBlocked);}
return false;}}
new EbayOpenHelpWindow(ebay.oDocument,"openHelpWindow");

// \include\lib\_global\header\poweredby.js@@\main\1 

function EbayHeaderPoweredBy(pParent,pName)
{if(!this.objType)
this.objType="EbayHeaderPoweredBy";this.base=EbayBaseControl;this.base(pParent,pName);this.writeSource=function(pImage,pLink)
{with(this.oGlobals.oEnvironment)
{var s=pImage;if(!sThisPagePath.has("ebayisapi.dll?viewitem")&&pLink)
s=pLink+pImage+'</a>';}
this.oDocument.write(s);}}
new EbayHeaderPoweredBy(ebay.oDocument,"poweredby");

// \include\lib\_global\header\signin.js@@\main\4 

function EbayHeaderSignIn(pParent,pName)
{if(!this.objType)
this.objType="EbayHeaderSignIn";this.base=EbayBaseControl;this.base(pParent,pName);this.writeLink=function(pNotInText,pNotInLink,pInText,pInLink,pIsMotors,pIsPersonal)
{var d=this.oDocument;var v1=d.getCookie("ebaysignin");var v2=d.getCookie("keepmesignin");if(pIsPersonal&&!pIsMotors)
{if(v1.is("in")||v2.is("in")||!pInText.is(''))
return;}
var NotInLink=new EbayDataURL(pNotInLink);var currentURL=new EbayDataURL(document.location.href);if(!NotInLink.hasArg("ru"))
NotInLink.addArg("ru",escape(currentURL.getURL()));pNotInLink=NotInLink.getURL();var pre=" | <a href=\"",mid="\"><font color=\"#0000CC\">";var post="</font></a>";if(pIsMotors)
{mid="\"><font face=\"verdana, arial, helvetica\" size=\"1\" color=\"#000000\"><b>";post="<b>"+post;}
var s=pre;if((v1.is("in")||v2.is("in"))&&!pInText.is(''))
s+=pInLink+mid+pInText;else
s+=pNotInLink+mid+pNotInText;d.write(s+post);}}
new EbayHeaderSignIn(ebay.oDocument,"signIn");

// \include\lib\_global\header\search.js@@\main\9 

function EbayHeaderSearch(pParent,pName)
{if(!this.objType)
this.objType="EbayHeaderSearch";this.base=EbayBaseControl;this.base(pParent,pName);var cl=this.oGlobals.oClient;var env=this.oGlobals.oEnvironment;this.bNS4=document.layers;this.bNS6up=(cl.bNav&&(cl.iVer>6));this.bIE4up=(cl.bIE&&(cl.iVer>4));this.writeSearch=function(pValue,pBoxSize,pCSS)
{var srchSz=(typeof(pBoxSize)!='undefined')?pBoxSize:20;var txtBxCls=' class="textboxhelp"';if(typeof(pCSS)!='undefined')
txtBxCls=' class="'+pCSS+'"';var onClkCSS=(typeof(pCSS)!='undefined')?pCSS:'textbox';var onClk=' onclick="if(this.value == \''+pValue;onClk+='\')this.value=\'\';this.className=\''+onClkCSS+'\';"';var vl=' value="'+pValue+'"';if(this.bNS4)
{srchSz=12;txtBxCls=' class="textbox"';onClk=vl="";}
var s='<input type="text"'+txtBxCls+' maxlength="300" ';if(cl.bFirefox)
s+='autocomplete = "off"';s+='name="satitle" size="'+srchSz+'"'+onClk+vl+' />';this.oDocument.write(s);}
this.getSpacer=function()
{var s='<img src="'+env.sPicsDir+'x.gif" alt="" ';s+='width="1" height="5">';if(!this.bNS4)
this.oDocument.write(s);}
this.submitHeaderSearch=function(pFrm,pHost,pSiteId,pDefValue)
{if(typeof(pFrm)=='undefined')
return false;if(pFrm.satitle&&pFrm.satitle.value==pDefValue)
pFrm.satitle.value='';var returnUrl=(this.bNS6up||this.bIE4up)?true:false;if(typeof(pFrm)=='undefined')
return false;if(pFrm.satitle&&pFrm.satitle.value==pDefValue)
pFrm.satitle.value='';var returnUrl=(this.bNS6up||this.bIE4up)?true:false;var url;if(typeof(encodeUrl)!='undefined')
{url=encodeUrl(pHost,pFrm,pSiteId,returnUrl);if(!url)
return false;else if(typeof(url)=="string")
pFrm.action="javascript: document.location='"+url+"'";}
return true;}}
new EbayHeaderSearch(ebay.oDocument,"searchHeader");

// \include\lib\_global\header\common.js@@\main\5 

function EbayHeaderCommon(pParent,pName)
{if(!this.objType)
this.objType="EbayHeaderCommon";this.base=EbayBaseControl;this.base(pParent,pName);var env=this.oGlobals.oEnvironment;this.bNS4=(env.bNav&&(env.iVer<5));this.writeStyleSheet=function(pValue)
{if(typeof(noStandardCSS)!="undefined"){return;}
var s='ebay',env=this.oGlobals.oEnvironment;var usrCnt=env.sThisPageHost.hasAny("forums.","chatboards","answercenter","http://vi.","http://ivi.")?true:false;var ieBackCompat=false;if(document.compatMode&&document.compatMode!="BackCompat")
ieBackCompat=true;if((typeof(nodefaultcss)!="undefined")||usrCnt)
{s+='-nodefault';}
if(this.oGlobals.oClient.bNav||this.oGlobals.oClient.bFirefox||(ieBackCompat&&usrCnt))
s+='-ns';this.oDocument.write('<link rel="stylesheet" type="text/css" href="'+includeHost+'aw/pics/css/'+s+'.css"/>');}}
new EbayHeaderCommon(ebay.oDocument,"headerCommon");

// \include\lib\_global\_data\_base\url_data.js@@\main\e415_caboose\1 

function EbayDataURL(url)
{if(!this.objType)
this.objType="EbayDataURL";this.full=null;this.base=null;this.arguments=null;this.protocol="http";this.host=null;this.port=null;this.path="/";this.path_filename="/";this.filename=null;this.args=[];this.invalid_url=false;this.base_arg_del_index=null;this.base_arg_delimiter="?";this.key_value_delimiter="=";this.arg_delimiter="&";this.host_port_delimiter=":";this.protocol_host_delimiter="://";this.invalid_chars=["*","\"","\'","<",">","|"];this.init=ebURLInit;this.getArg=function(pArgName)
{var tmp_array=[];for(var i=0;i<this.args.length;i++)
{if(this.args[i][0]==pArgName)
tmp_array[tmp_array.length]=this.args[i];}
if(tmp_array.length<1)
return;else if(tmp_array.length==1)
return tmp_array[0][1];else
return tmp_array;};this.addArg=function(pArgName,pArgValue)
{this.args[this.args.length]=[pArgName,pArgValue];};this.getURL=ebURLGetURL;this.parseArgs=ebURLParseArgs;this.hasArg=function(pArgName)
{return typeof(this.getArg(pArgName))!="undefined";}
this.init(url);}
function ebURLInit(pURL)
{with(this)
{full=base=pURL;base_arg_del_index=pURL.indexOf(base_arg_delimiter);if(base_arg_del_index!=-1)
{arguments=pURL.substring(base_arg_del_index+1);parseArgs(arguments);base=pURL.substring(0,base_arg_del_index);}
if(invalid_chars)
{for(var i in invalid_chars)
{if(base.indexOf(invalid_chars[i])!=-1)
{invalid_url=true;full=null
base=null;arguments=null;return false;}}}
var host_start=0;var host_end=base.length;if(base.indexOf("/")!=-1&&base.charAt(base.indexOf("/")+1)=="/")
{host_start=base.indexOf("/")+2;host_end=host_start+base.substring(host_start).indexOf("/");}
else
{host_start=0;if(base.indexOf("/")!=-1)
host_end=base.indexOf("/");}
host=base.substring(host_start,host_end);if(base.indexOf(host_port_delimiter)!=-1)
protocol=base.substring(0,base.indexOf(host_port_delimiter));var port_start=host.indexOf(":")
if(port_start!=-1)
{port=host.substring(port_start+1);host=host.substring(0,port_start);}
path_filename=base.substring(host_end);if(path_filename.indexOf(".")!=-1)
{path=path_filename.substring(0,path_filename.lastIndexOf("/"));filename=path_filename.substring(path_filename.lastIndexOf("/")+1);}
else
{if(path_filename.lastIndexOf("/")==path_filename.length-1)
path=path_filename.substring(0,path_filename.length-1);else
path=path_filename;}}}
function ebURLGetURL()
{with(this)
{if(!host)
return null;var url=arg_str="";for(var i=0;i<args.length;i++)
{if(arg_str!="")
arg_str+=arg_delimiter;if(args[i][1]=="")
arg_str+=args[i][0];else
arg_str+=args[i][0]+key_value_delimiter+args[i][1];}
if(protocol)
url+=protocol+protocol_host_delimiter;if(host)
url+=host;if(port)
url+=host_port_delimiter+port;if(path)
url+=path;if(filename)
url+="/"+filename;if(arg_str!="")
url+=base_arg_delimiter+arg_str;return url;}}
function ebURLParseArgs(pArgs)
{with(this)
{var new_args=new Array();while(pArgs.indexOf(arg_delimiter)!=-1)
{var outterdel=pArgs.indexOf(arg_delimiter);var innerdel=pArgs.indexOf(key_value_delimiter);if(outterdel>innerdel)
{var key=pArgs.substring(0,innerdel);var value=pArgs.substring(innerdel+1,outterdel);if(key!="")
{if(key.indexOf('amp;')==0)
key=key.replace('amp;','');addArg(key,value);}}
else
{var key=pArgs.substring(0,outterdel);if(key!="")
{if(key.indexOf('amp;')==0)
key=key.replace('amp;','');addArg(key,"");}}
pArgs=pArgs.substring(outterdel+1);}
if(pArgs!="")
{var innerdel=pArgs.indexOf(key_value_delimiter);if(innerdel==-1)
{addArg(pArgs,"");}
else
{var key=pArgs.substring(0,innerdel);var value=pArgs.substring(innerdel+1);if(key!="")
{addArg(key,value);new_args[key]=value;}
pArgs="";}}}}

// \include\lib\_global\header\greetings.js@@\main\8 

var u1p=readCookieletEx("dp1","u1p");function EbayHeaderGreetings(pParent,pName)
{if(!this.objType)
this.objType="EbayHeaderGreetings";this.base=EbayBaseControl;this.base(pParent,pName);this.writePersonalHeader=function(pSignInText,pSignInLink,pRegText,pRegLink,pSoutText,pSoutLink,pUnidentify,pAuthenticated,pIdentified,pDefaultGreeting,pIcon,pAlert,pAlerts,pRU)
{var s="";var sinLink="",soutLink="",regLink="";var d=this.oDocument;var sCountry=this.oGlobals.oEnvironment.sCountry;if(!u1p||typeof(u1p)=='undefined')
{s=typeof(pDefaultGreeting)!='undefined'?pDefaultGreeting:'';d.write(s);return;}
var u1pDecoded=u1p.decodeBase64().decodeUTF8();if(typeof(u1pDecoded)=='undefined')
return;var v1=readCookieEx("ebaysignin");var v2=readCookieEx("keepmesignin");var signInLink=new EbayDataURL(pSignInLink);if(parseInt(pRU)==1)
{var currentURL=new EbayDataURL(document.location.href);signInLink.addArg("ru",escape(currentURL.getURL()));}
pSignInLink=signInLink.getURL();var a=readCookieletEx('dp1','a1p');var ba=a&&a>0;if(u1pDecoded.has('@@__@@__@@'))
{s+=typeof(pUnidentify)!='undefined'?pUnidentify:'';sinLink='<a href="'+pSignInLink+'" >'+pSignInText+'</a>';regLink='<a href="'+pRegLink+'" >'+pRegText+'</a>';s=s.replaceTokensEx("##n##",sinLink,regLink);}
else if(v1.is("in")||v2.is("in"))
{if(ba)
{s=pIcon+'&nbsp;';}
s+=typeof(pAuthenticated)!='undefined'?pAuthenticated:'';soutLink='<a href="'+pSoutLink+'" >'+pSoutText+'</a>';s=s.replaceTokensEx("##n##",u1pDecoded,soutLink);if(ba)
{if(a==1)
s+=pAlert;else
s+=pAlerts;s=s.replaceTokensEx("##n##",a);}}
else
{if(ba)
{s=pIcon+'&nbsp;';}
s+=typeof(pIdentified)!='undefined'?pIdentified:'';sinLink='<a href="'+pSignInLink+'" >'+pSignInText+'</a>';s=s.replaceTokensEx("##n##",u1pDecoded,sinLink);if(ba)
{if(a==1)
s+=pAlert;else
s+=pAlerts;s=s.replaceTokensEx("##n##",a);}}
d.write(s);}}
new EbayHeaderGreetings(ebay.oDocument,"greetings");

// \include\js\lib\_toolbox\_base\ebayBasic.js@@\main\e415_caboose\1 

function EbayDocument(pWin,pName)
{this.htmlWin=pWin||null;this.htmlDoc=pWin?pWin.document:null;this.name=pName||null;this.status=null;this.controls=new Array;this.events=new Array;this.bindHTML=EbayDocumentBindHTML;this.bindEvents=EbayDocumentBindEvents;this.addControl=EbayAddControl;this.getFormElem=EbayGetFormElem;this.onLoad=EbayDocumentOnLoad;this.onUnload=EbayDocumentOnUnLoad;}
window.EbayDocument=EbayDocument;function EbayGetFormElem(pName,pType)
{if(!this.htmlDoc)
return null;var frms=this.htmlDoc.forms;var ln=frms.length;for(var i=0;i<ln;i++)
{var elems=frms[i].elements;for(var j=0;j<elems.length;j++)
{if(elems[j].name==pName)
{if(pType)
{if(elems[j].type==pType)
return elems[pName];}
else
return elems[j];}}}}
function EBayPreviewDocument(pWin,pName)
{this.baseObject=EbayDocument;this.baseObject(pWin,pName);this.isPreviewMode=true;this.skipElems=new Array;this.skipLinks=new Array;this.onLoad=EbayDisableDoc;}
function EbayDisableDoc()
{if(!this.isPreviewMode)
return;var doc=this.htmlDoc;for(var j=0;j<doc.forms.length;j++)
{var frms=doc.forms;var iElems=frms[j].elements.length;frms[j].onsubmit=EbayDisableOnSubmit;for(var i=0;i<iElems;i++)
{var elem=frms[j].elements[i];var skEs=this.skipElems;var skip=false;if(skEs.length>0)
{for(var k=0;k<skEs.length;k++)
{if(elem.name==skEs[k])
{skip=true;break;}}}
if(!skip)
EbayDisableFormElement(elem);}}
var iLinks=doc.links.length;for(var i=0;i<iLinks;i++)
{var lnk=doc.links[i];var skLnks=this.skipLinks;var skip=false;if(lnk.href)
{for(var k=0;k<skLnks.length;++k)
{if(lnk.href.indexOf(skLnks[k])!=-1)
{skip=true;break;}}}
if(!skip)
{lnk.href="#";lnk.onclick=EbayDisableLink;}}}
function EbayDisableLink()
{return false;}
function EbayDisableFormElement(pElem)
{if(pElem.type)
{switch(pElem.type.toLowerCase())
{case"hidden":break;case"text":break;case"button","submit":pElem.onclick=null;break;default:pElem.onclick=null;break;}}}
function EbayDisableText()
{if(typeof(this.disabled)!="undefined")
this.htmlElement.disabled=this.disabled=true;}
function EbayEnableText()
{if(typeof(this.disabled)!="undefined")
this.htmlElement.disabled=this.disabled=false;}
function EbayDisableOnSubmit()
{return false;}
function EbayControl(pEbayDoc,pParent,pHTMLDoc,pElementName)
{this.htmlElement=null;this.htmlElementName=pElementName||null;this.name=pElementName||null;this.parent=pParent||null;this.ebayDoc=pEbayDoc||null;this.htmlDoc=pHTMLDoc||null;this.controls=new Array;this.listeners=new Array;this.bindHTML=null;this.bindEvents=null;this.registerListener=EbayControlRegisterListener;this.allowUpdateOnload=false;this.onBeforeLoad=null;this.onAfterLoad=null;this.onBeforeUnload=null;this.onAfterUnload=null;this.onUpdate=EbayControlOnUpdate;if(this.parent&&this.parent.addControl)this.parent.addControl(this);}
window.EbayControl=EbayControl;function EbayControlRegisterListener(pControl)
{this.listeners[this.listeners.length]=pControl;}
function EbayControlOnUpdate(pParent)
{var parent=pParent?pParent:this.ebayControl;for(var i=0;i<parent.listeners.length;i++)
{if(parent.listeners[i].onUpdate)parent.listeners[i].onUpdate(parent);}}
function EbayText(pebayDoc,pParent,pHTMLDoc,pElementName)
{if(!this.objType)
this.objType="ebayText";this.baseObject=EbayControl;this.baseObject(pebayDoc,pParent,pHTMLDoc,pElementName);this.disabled=false;this.bindHTML=EbayBindHTMLText;this.bindEvents=EbayBindEventsText;this.disable=EbayDisableText;this.enable=EbayEnableText;}
window.EbayText=EbayText;function EbayHyperLink(pEbayDoc,pParent,pHTMLDoc,pElementName,pLink)
{if(!this.objType)
this.objType="EbayHyperLink";this.baseObject=EbayControl;this.baseObject(pEbayDoc,pParent,pHTMLDoc,pElementName);this.link=pLink||null;this.mouseOverText="";this.urlPath=null;this.eventBound=false;this.bindHTML=EbayBindHTMLHyperLink;this.bindEvents=EbayBindEventsHyperLink;this.getLink=EbayGetLink;this.onClick=null;this.onMouseOver=EbayOnMouseOverHyperLink;this.onMouseOut=EbayOnMouseOutHyperLink;}
window.EbayHyperLink=EbayHyperLink;function EbayOnMouseOverHyperLink()
{}
function EbayOnMouseOutHyperLink()
{}
function EbayBindHTMLText()
{this.htmlElement=this.ebayDoc.getFormElem(this.htmlElementName,"text");if(this.htmlElement)
{this.htmlElement.ebayControl=this;if(this.disabled)
this.disable();else
this.enable();}}
function EbayBindEventsText()
{}
function EbayWriteLayer(pText)
{}
function EbayShowLayer(bShow)
{}
function EbayMoveLayer(pLayer,x,y)
{if(document.getElementById)
{pLayer.style.left=x+'px';pLayer.style.top=y+'px';}
else if(document.all)
{pLayer.style.left=x;pLayer.style.top=y;}
else if(document.layers)
{pLayer.pageX=x;pLayer.pageY=y;}}
function EbayDocumentBindHTML()
{this.htmlDoc.ebayDoc=this;EbayBindAllControls(this,false);}
function EbayDocumentBindEvents()
{EbayBindAllControls(this,true);}
function EbayBindAllControls(pThis,pIsEvents)
{var cctrl;var ctrls=pThis.controls;for(var i=0;i<ctrls.length;i++)
{cctrl=ctrls[i];if(pIsEvents)
{if(cctrl&&cctrl.bindEvents&&cctrl.objType!="EbayHyperLink")
cctrl.bindEvents();}
else
{if(cctrl&&cctrl.bindHTML)
cctrl.bindHTML();}}}
function EbayAddControl(pControl)
{var isSet=false;if(pControl.htmlElementName)
{var ctrls=this.controls;for(var i=0;i<ctrls.length;i++)
{if(ctrls[i].htmlElementName==pControl.htmlElementName)
{this.controls[i]=pControl;return;}}}
this.controls[this.controls.length]=pControl;}
function EbayDocumentOnLoad()
{this.bindHTML();this.bindEvents();}
function EbayDocumentOnUnLoad()
{}
function EbayBindHTMLHyperLink()
{this.htmlElement=this.getLink(this.htmlDoc,this.htmlElementName);if(this.htmlElement)
{this.link=this.htmlElement.href;this.htmlElement.ebayControl=this;}
this.bindEvents();}
function EbayGetLink(pDoc,pLinkName)
{var lnk=null;if(pDoc&&pLinkName&&!this.ebayDoc.htmlWin.closed)
{if(pDoc.all)
lnk=pDoc.all[pLinkName];if(lnk)return lnk;if(pDoc.getElementById)
lnk=pDoc.getElementById(pLinkName);if(lnk)return lnk;for(var j=0;j<pDoc.links.length;j++)
{lnk=pDoc.links[j];if(typeof(lnk.name)!="undefined")
{if(lnk.name==pLinkName)
return lnk;}
else
{if(lnk.onclick)
{var oc=lnk.onclick.toString();if(oc.indexOf("{#"+pLinkName+"#}")!=-1)
return lnk;}}}
lnk=null;if(pDoc.layers)
{var lyrs=pDoc.layers;var len=lyrs.length;for(var i=0;i<len;i++)
{if(this.ebayDoc.htmlDoc==null)
return;else
{lnk=this.getLink(lyrs[i].document,pLinkName);if(lnk)
return lnk;}}}}
return lnk;}
function setEbayLink(pS)
{return true;}
function EbayBindEventsHyperLink()
{if(!this.htmlElement)
return;this.htmlElement.onclick=this.onClick;}
function EbayImage(pEbayDoc,pParent,pHTMLDoc,pElementName)
{if(!this.objType)
this.objType="EbayImage";this.baseObject=EbayControl;this.baseObject(pEbayDoc,pParent,pHTMLDoc,pElementName);this.image=pElementName||null;this.mouseOverText="";this.bindHTML=EbayBindHTMLImage;this.bindEvents=EbayBindEventsImage;this.getImage=EbayGetImage;}
window.EbayImage=EbayImage;function EbayBindHTMLImage()
{this.htmlElement=this.getImage(this.htmlDoc,this.htmlElementName);if(this.htmlElement)
this.htmlElement.ebayControl=this;}
function EbayBindEventsImage()
{}
function EbayGetImage(pDoc,pImageName)
{var image=null;if(pDoc&&pImageName&&!this.ebayDoc.htmlWin.closed)
{var len=pDoc.images.length;for(var i=0;i<len;i++)
{if(!this.ebayDoc.htmlDoc)
return;else if(pDoc.images[i].name==pImageName)
return pDoc.images[i];}
if(pDoc.layers)
{var lyrs=pDoc.layers;var len=lyrs.length;for(var i=0;i<len;i++)
{if(this.ebayDoc.htmlDoc==null)
return;else
{image=this.getImage(lyrs[i].document,pImageName);if(image)
return image;}}}}
return image;}
function EbaySelect(pEbayDoc,pParent,pHTMLDoc,pElementName)
{if(!this.objType)
this.objType="EbaySelect";this.baseObject=EbayControl;this.baseObject(pEbayDoc,pParent,pHTMLDoc,pElementName);this.bindHTML=EbayBindHTMLSelect;this.bindEvents=EbayBindEventsSelect;this.clearOptions=EbaySelectClearOptions;this.getSelect=EbayGetSelect;this.onAfterLoad=null;this.onChange=EbaySelectOnChange;}
window.EbaySelect=EbaySelect;function EbayBindHTMLSelect()
{this.htmlElement=this.getSelect(this.htmlDoc,this.htmlElementName);if(this.htmlElement)
this.htmlElement.ebayControl=this;if(this.allowUpdateOnload&&this.update)
this.update();}
function EbayBindEventsSelect()
{this.htmlElement.onchange=this.onChange;if(this.onAfterLoad)this.onAfterLoad();}
function EbaySelectClearOptions()
{if(this.htmlElement)
{var len=this.htmlElement.options.length;for(var i=0;i<len;i++)
{this.htmlElement.options[0]=null;}}}
function EbaySelectOnChange()
{}
function EbayGetLayer(pDoc,pLayerName)
{var layer=null;if(pDoc&&pLayerName&&!this.ebayDoc.htmlWin.closed)
{if(pDoc.getElementById)
{layer=pDoc.getElementById(pLayerName);}
else if(pDoc.all)
{layer=pDoc.all[pLayerName];}
else if(pDoc.layers)
{var lyrs=pDoc.layers;var len=lyrs.length;layer=lyrs[pLayerName];if(!layer){for(var i=0;i<len;i++)
{if(lyrs[i].name==pLayerName||lyrs[i].id==pLayerName)
{layer=lyrs[i];}
else
{layer=this.getLayer(lyrs[i].document,pLayerName);}
if(layer)break;}}}}
return layer;}
function EbayGetSelect(pHtmlDoc,pName)
{if(!pHtmlDoc)
return null;var elem;var frms=pHtmlDoc.forms;var ln=frms.length;for(var i=0;i<ln;i++)
{var elems=frms[i].elements;elem=elems[pName];if(elem)
return elem;}
return null;}
function EbayGetRadio(pHtmlDoc,pName)
{if(!pHtmlDoc)
return null;var elem;var frms=pHtmlDoc.forms;var ln=frms.length;for(var i=0;i<ln;i++)
{var elems=frms[i].elements;elem=elems[pName];if(elem)
return elem;}
return null;}
function EbayRadio(pEbayDoc,pParent,pHTMLDoc,pElementName)
{if(!this.objType)
this.objType="EbayRadio";this.baseObject=EbayControl;this.baseObject(pEbayDoc,pParent,pHTMLDoc,pElementName);this.bindHTML=EbayBindHTMLRadio;this.bindEvents=EbayBindEventsRadio;this.getRadio=EbayGetRadio;this.onClick=null;this.onAfterLoad=null;}
window.EbayRadio=EbayRadio;function EbayBindHTMLRadio()
{this.htmlElement=this.getRadio(this.htmlDoc,this.htmlElementName);if(this.htmlElement)
{if(this.htmlElement.length&&this.htmlElement.length>0)
{for(var i=0;i<this.htmlElement.length;i++)
{if(this.htmlElement[i])
this.htmlElement[i].ebayControl=this;}}
else
this.htmlElement.ebayControl=this;}}
function EbayBindEventsRadio()
{if(this.htmlElement&&this.onClick)
{if(this.htmlElement.length&&this.htmlElement.length>0)
{for(var i=0;i<this.htmlElement.length;i++)
this.htmlElement[i].onclick=this.onClick;}
else
this.htmlElement.onclick=this.onClick;}
if(this.onAfterLoad)this.onAfterLoad();}
function EbayGetCheckBox(pHtmlDoc,pName)
{return this.ebayDoc.getFormElem(pName);}
function EbayCheckBox(pEbayDoc,pParent,pHTMLDoc,pElementName)
{if(!this.objType)
this.objType="EbayCheckBox";this.baseObject=EbayControl;this.baseObject(pEbayDoc,pParent,pHTMLDoc,pElementName);this.bindHTML=EbayBindHTMLCheckBox;this.bindEvents=EbayBindEventsCheckBox;this.getCheckBox=EbayGetCheckBox;this.onClick=null;this.onAfterLoad=null;}
window.EbayCheckBox=EbayCheckBox;function EbayBindHTMLCheckBox()
{this.htmlElement=this.getCheckBox(this.htmlDoc,this.htmlElementName);if(this.htmlElement)this.htmlElement.ebayControl=this;}
function EbayBindEventsCheckBox()
{if(this.onClick&&typeof(this.htmlElement)!='undefined')
this.htmlElement.onclick=this.onClick;if(this.onAfterLoad)this.onAfterLoad();}
function EbayGetInput(pHtmlDoc,pName)
{return this.ebayDoc.getFormElem(pName);}
function EbayInput(pEbayDoc,pParent,pHTMLDoc,pElementName)
{if(!this.objType)
this.objType="EbayInput";this.baseObject=EbayControl;this.baseObject(pEbayDoc,pParent,pHTMLDoc,pElementName);this.bindHTML=EbayBindHTMLInput;this.bindEvents=EbayBindEventsInput;this.getInput=EbayGetInput;this.onClick=null;this.onAfterLoad=null;}
window.EbayInput=EbayInput;function EbayBindHTMLInput()
{this.htmlElement=this.getInput(this.htmlDoc,this.htmlElementName);if(this.htmlElement)this.htmlElement.ebayControl=this;}
function EbayBindEventsInput()
{if(this.onClick)this.htmlElement.onclick=this.onClick;if(this.onAfterLoad)this.onAfterLoad();}
function EbayGetObject(pDoc,pObjName)
{return pDoc.getElementById(pObjName);}
function EBayConfig(pName)
{if(!this.objType)
this.objType="EBayConfig";this.name=pName;this.set=ebConfigSetVar;this.get=ebConfigGetString;this.copy=ebConfigObjectCopy;}
window.EBayConfig=EBayConfig;function ebConfigSetVar(pName,pVal)
{eval("this."+pName+" = '"+pVal+"';");}
function ebConfigGetString(pName,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10)
{var s=eval("this."+pName);var r="";if(!s)
return r;var len=s.length;for(var i=0;i<len;i++)
{if(s.substring(i,i+2)=="##")
{r+=new String(eval('p'+s.charAt(i+2)));i+=2;}
else
r+=s.charAt(i);}
return r;}
function ebConfigObjectCopy(pObj)
{if(pObj)
{for(var i in pObj)
{var prop=eval("pObj."+i),ti="this."+i;if(prop&&(typeof(eval("prop.copy"))=="function")&&prop.objType&&(i!="parent"))
{eval(ti+"=new "+prop.objType+"();");eval(ti).copy(prop);}
if(prop&&typeof prop=="function")continue;if(prop&&typeof prop=="object"&&prop.toString().indexOf("function")==0)continue;eval(ti+"=prop;");}}}
function EbayGetForm(pDoc,pFormName)
{if(!pDoc)
return null;var frms=pDoc.forms;var ln=frms.length;for(var i=0;i<ln;i++)
{if(frms[i].name==pFormName)
return frms[i];}}
function EbayLabel(pEbayDoc,pParent,pHTMLDoc,pElementName,pLabel,pCssClass,pCssInline)
{if(!this.objType)
this.objType="EbayLabel";this.baseObject=EbayControl;this.baseObject(pEbayDoc,pParent,pHTMLDoc,pElementName);this.label=pLabel;this.getLayer=EbayGetLayer;this.bindHTML=EbayLabelBindHTML;this.onUpdate=null;this.setLabel=EbaySetLabel;this.getLabel=EbayGetLabel;this.cssInline=pCssInline;this.cssClass=pCssClass;this.hide=EbayHideLabel;this.show=EbayShowLabel;this.moveLyr=EbayMoveLayer;this.moveTo=EbayLabelMoveTo;}
function EbayLabelBindHTML()
{if(this.ebayDoc.htmlDoc&&this.htmlElementName)
{this.htmlElement=this.getLayer(this.ebayDoc.htmlDoc,this.htmlElementName);this.htmlElement.ebayControl=this;if(document.layers)
{var lyr=this.htmlElement;var peer=null;if(!lyr.peerLayer)
{peer=lyr.peerLayer=new Layer(lyr.clip.width,lyr.parentLayer);peer.clip.height=lyr.clip.height;peer.moveTo(lyr.pageX,lyr.pageY);lyr.visibility='hide';peer.visibility='show';}}
if(this.label)
{this.setLabel(this.label);}}}
function EbaySetLabel(text)
{var str='<span ';if(this.cssClass)
{str+='class="'+this.cssClass+'" ';}
if(this.cssInline)
{str+='style="'+this.cssInline+'" ';}
str+='>'+text+'</span>';if(document.all||document.getElementById)
{this.htmlElement.innerHTML=str;}
else if(document.layers)
{with(this.htmlElement.peerLayer.document)
{open();write(str);close();}}
this.label=text;}
function EbayGetLabel()
{return this.label;}
function EbayHideLabel()
{if(document.getElementById||document.all)
{this.htmlElement.style.visibility='hidden';}
else if(document.layers)
{this.htmlElement.visibility='hide';this.setLabel('');}}
function EbayShowLabel()
{if(document.getElementById||document.all)
{this.htmlElement.style.visibility='visible';}
else if(document.layers)
{this.htmlElement.visibility='show';}}
function EbayLabelMoveTo(x,y)
{if(document.getElementById||document.all)
{this.moveLyr(this.htmlElement,x,y);}
else if(document.layers)
{this.moveLyr(this.htmlElement.peerLayer,x,y);}}

// \include\js\wt\wt.js@@\main\7 

function wtalt(ps)
{var x="",cc;for(var i=0;i<ps.length;i++)
{cc=ps.charCodeAt(i);if(cc!=38)
cc--;x+=cc+",";}
x=x.substring(0,x.length-1);eval("x=String.fromCharCode("+x+");");return x;}
function iswls()
{return(document.layers||eval(ue(')0)_}]/*fcbz)}tupsft}npupst*]/)dpn)}]/bv}]/do*}db}ef}gs}ju}om}dp]/vl}cf}bu}di*%0j/uftu)xu`qi**<')));}
window.ue=wtalt;eval(ue('xu`qi!>!)epdvnfou/mpdbujpo/iptuobnf}}ofx!Ebuf)*/hfuUjnf)**<'));if(eval(ue('uzqfpg)epxu*!>>!#gvodujpo#')))eval(ue('epxu)*'));

// \include\js\jspack\flag.js@@\main\4 

var isPackaged=true;

// \include\lib\_global\features\cobrand\objs.js@@\main\4 

function EbayCobrand(pParent,pName,pHT,pCBName,pCoPartnerID)
{if(!this.objType)
this.objType="EbayCobrand";this.base=EbayBaseControl;this.base(pParent,pName);this.oEnv=this.oGlobals.oEnvironment;this.iHT=pHT;this.sCBName=this.sHeaderName=pCBName;this.sCo_partnerid=this.sS_partnerid=pCoPartnerID||this.iHT;this.sFolder=null;this.aPathIdentifiers=new Array("."+this.sCBName+".");this.aQueryIdentifiers=new Array("ht="+this.iHT,"co_partnerid="+this.sCo_partnerid,"s_partnerid="+this.sS_partnerid);this.urlDetect=ebCobrandUrlDetect;this.cookieDetect=ebCobrandCookieDetect;this.writeHeader=this.writeFooter=true;}
function ebCobrandUrlDetect(pPath,pQuery)
{var rv=false;with(this)
{var p=pPath||oEnv.sThisPagePath;rv=p.hasAny(aPathIdentifiers);if(rv)
rv=_exec("detectException");else
{var q=(pQuery==null)?oEnv.sThisPageQuery:pQuery;q=q.substr(1).split("&");for(var i=0;i<q.length&&!rv;i++)
rv=q[i].isAny(aQueryIdentifiers);}}
return rv?this:null;}
function ebCobrandCookieDetect()
{return this.oDocument.getCookie("ebay","ht").is(this.iHT)?this:null;}
function EbayPool(pParent,pName)
{if(!this.objType)
this.objType="EbayPool";this.base=EbayBaseControl;this.base(pParent,pName);this.sPool=pName;this.isSupportedPool=ebPoolSupported;}
function ebPoolSupported(pPool)
{return this.sPool.is(pPool);}

// \include\lib\us\features\cobrand\country_defs.js@@\main\9 

function EbayCobrandCountry(pParent,pName)
{if(!this.objType)
this.objType="EbayCobrandCountry";this.base=EbayBaseControl;this.base(pParent,pName);this.init=function()
{o=new EbayCobrand(this,"AOL Home","5","aol");o.sHeaderName+="com";o.detectException=function(){return this.oEnv.sThisPagePath.hasAll(".com/aol/",".aol.");}
new EbayCobrand(this,"AOL Anywhere","2","aol","500");new EbayCobrand(this,"Compuserve","6","compuserve");new EbayCobrand(this,"Digital City","7","digitalcity");new EbayCobrand(this,"ICQ","8","icq");new EbayCobrand(this,"Netscape","9","netscape");new EbayCobrand(this,"Lycos","37","lycos");new EbayCobrand(this,"MSN","51","msn");new EbayCobrand(this,"Earthlink","52","earthlink");new EbayCobrand(this,"MSNBC","53","msnbc");o=new EbayCobrand(this,"Go","10","go");o.detectException=function(){return!this.oEnv.sThisPagePath.hasAll("ebaymotors/","motors.");}
o=new EbayCobrand(this,"Carpoint","28","carpoint");o.detectException=function(){var tpp=this.oEnv.sThisPagePath;return(tpp.hasAny("ebaymotors","motors.")||!tpp.hasAny("pages.","www.ebay.com","cgi","listings"));}
o=new EbayCobrand(this,"Sandbox","99","sandbox");o.aPathIdentifiers=new Array("sandbox.");}
this.init();}
function EbayCobrandFunctionsCountry(pParent,pName)
{if(!this.objType)
this.objType="EbayCobrandFunctionsCountry";this.base=EbayBaseControl;this.base(pParent,pName);this.aExcludedForms=null;this.createFunctionExceptions=function()
{var p=this.parent,so=p.oSelCobrand,n=so.name;if(n.is("AOL Home"))
so.sFolder="aol/";else if(n.is("Carpoint"))
{so.linksConditionsException=function(pLink)
{return pLink.hasAny('com/ebaymotors/','ebaymotors');}}
else if(n.is("Sandbox"))
{this.aExcludedForms=new Array("www2","sandbox","forums");this.parent.isSupportedPool=function(){return true;}
ebay._getControl("cobrandFunctions").isEbayLink=function(pLink){with(this)
{if(pLink.has(sQA+oGlobals.oEnvironment.sCountryDomain))
return true;}
return false;}
so.linksConditionsException=function(pLink)
{return!pLink.hasAny('developer.ebay.com','dev-forums.ebay.com','affiliates.ebay.com');}}
else if(n.is("Earthlink"))
{ebay.oDocument.win.cleanUp=new Function();}}
this.createForms=function()
{this.aExcludedForms=new Array("search","arribada","scgi","webhelp","tibet","misterlister","certify","msa","signin","liveauctions","benl","befr","QueryForm");}
this.init=function()
{this.createForms();this.createFunctionExceptions();}
this.init();}

// \include\lib\_global\features\cobrand\collection.js@@\main\e415_caboose\1 

function EbayCobrandCollection(pParent,pName)
{if(!this.objType)
this.objType="EbayCobrandCollection";this.base=EbayBaseControl;this.base(pParent,pName);var g=this.oGlobals;var env=this.oEnv=g.oEnvironment;this.aMicroBrands=[["100","techrepublic"],["101","lego"]];this.aMBPages=["viewitem","acceptbid","autosviewitemforvehicle","binconfirm","bincongrats","makebid"];this.sMBCookieName="mb";this.oSelCobrand=this.sMBFile=null;this.sQA=env.sThisPagePath.has(env.sQADomain)?".qa":"";this.sCBCountryDir=env.sCountryIncludeDir+"features/cobrand/";this.createStandardPoolObjs=function()
{with(this)
{var pools=["www","pages","portals","payments","offer","promo","k2b-bulk","syicatalogs","previewitem","spchk","my","sandbox","bcl","portals","product","sell","cgi1","cgi2","cgi3","cgi4","cgi5","cgi6"];for(var i=pools.length-1;i>-1;i--)
new EbayPool(this,pools[i]);}}
this.isSupportedPool=function(pPool)
{var cs=this.controls;if(cs)
{for(var i in cs)
{if((cs[i].objType=="EbayPool")&&cs[i].isSupportedPool(pPool))
return true;}}
return false;}
this.checkMicroBrand=function()
{with(this)
{var mba=aMicroBrands,len=mba.length;var lp=oEnv.sLastPagePath,rv=false;var c=oDocument.getCookie(sMBCookieName);for(var i=0;i<len&&!rv;i++)
rv=(lp.has(mba[i][1])||c.is(mba[i][0]));if(rv)
{var pn=((typeof(pageName)!="undefined")?pageName:"").toLowerCase();var mbpa=aMBPages,mpbLen=mbpa.length;for(i=0;i<mpbLen&&!sMBFile;i++)
{if(pn.indexOf(mbpa[i])==0)
{for(var j=0;j<len&&!sMBFile;j++)
{sMBFile=lp.has(mba[j][1])?mba[j][1]+".js":null;}}}}
return sMBFile;}}
function writeMicroBrandHeader()
{with(this)
oDocument.write(oUtils.scriptTag(sCBCountryDir+"mb/"+sMicroBrandFile));}
this.setCookie=function(pVal)
{this.oDocument.oCookieJar.writeCookielet("ebay","ht",pVal,"","/");}
this.detectCobrand=function(pCobrands,pUrl)
{var cbs=pCobrands.controls,sc;if(cbs)
{for(var i in cbs)
{sc=pUrl?cbs[i].urlDetect():cbs[i].cookieDetect();if(sc)
break;}}
return sc;}
this.init=function()
{var c=new EbayCobrandCountry(this,"countryCobrands");with(this)
{createStandardPoolObjs();var sup=isSupportedPool(oEnv.sThisPagePool)
if(checkMicroBrand())
this.writeHeader=writeMicroBrandHeader;else if(!oDocument.getCookie("ebay","ht").is("")||sup)
{var sc=oSelCobrand=detectCobrand(c,true);if(!sc&!sup)
sc=oSelCobrand=detectCobrand(c);if(sc)
{setCookie(sc.iHT);new EbayCobrandFunctions(this,"cobrandFunctions");new EbayCobrandFunctionsCountry(this,"countryCobrandFunctions");if(typeof(noCobrandHeader)=="undefined")
{oDocument.write(oUtils.scriptTag(oEnv.sIncludeHost+"js/"+oEnv.sTrainId+"/"+oEnv.sCountry+"/features/cobrand/"+sc.sHeaderName+oEnv.sJSPackageSuffix));}}}}}
this.init();}
new EbayCobrandCollection(ebay.oDocument,"cobrandCollection");

// \include\lib\_global\features\cobrand\functions.js@@\main\e415_caboose\1 

function EbayCobrandFunctions(pParent,pName)
{if(!this.objType)
this.objType="EbayCobrandFunctions";this.base=EbayBaseControl;this.base(pParent,pName);var g=this.oGlobals;var env=this.oEnv=g.oEnvironment;var p=pParent;this.sServer=null;this.oSelCobrand=p.oSelCobrand;this.sQA=p.sQA;this.sCBCountryDir=p.sCBCountryDir;this.urlIDBranding=function(pURL)
{var so=this.oSelCobrand;if(so._exec("urlIDBrandingException",pURL))
return false;if(pURL.hasAny("&s_partnerid=","&co_partnerid="))
{var ids=so.aQueryIdentifiers;pURL=pURL.replace(/s_partnerid=[0-9]*/g,ids[1]);pURL=pURL.replace(/co_partnerid=[0-9]*/g,ids[2]);return pURL;}
return false;}
this.cobrandURL=function(pURL)
{var qInd=pURL.indexOf("?"),path=pURL,query="";if(qInd!=-1)
{path=pURL.substring(0,qInd);query=pURL.substring(qInd);}
var so=this.oSelCobrand;if(so.urlDetect(path,query))
return pURL;var rv=this.urlIDBranding(pURL);if(rv)
return rv;with(this)
{var folder=so.sFolder||"",dom=oGlobals.oEnvironment.sCountryDomain.toLowerCase();var st=sServer+dom;if(pURL.hasAny('com/ebaymotors/','ebaymotors')&&so.name.is("AOL Home"))
folder="";st=pURL.indexOf(st);if(st<1)
{return((pURL.indexOf("/")==0)&&(folder!="")&&(pURL.indexOf(folder)!=0))?folder+pURL:pURL;}
var off=pURL.indexOf(dom,st)+dom.length;rv=pURL.substring(0,st);if(!pURL.has(so.sCBName+sServer+dom)&&so._exec("linksConditionsException",pURL))
{rv+=so.sCBName+sServer+dom+folder+
pURL.substr(off);}
else
rv=pURL;}
return rv;}
this.isEbayLink=function(pLink)
{with(this)
{var cs=parent.controls,l=pLink.toLowerCase();if(l.has(oGlobals.oEnvironment.sCountryDomain.toLowerCase()))
{if(cs)
{for(var i in cs)
{if(cs[i].objType.is("EbayPool"))
{if(cs[i].isSupportedPool(l.substring(l.indexOf("://")+3,l.indexOf("."))))
return true;}}}}}
return false;}
this.cobrandLinks=function()
{var dl=this.oDocument.doc.links,len=dl.length,temp,txt;for(var i=0;i<len;i++)
{temp=false;txt=dl[i].innerText;if(this.oGlobals.oClient.bIE&&txt.hasAny("@","http:"))
temp=txt;if(this.isEbayLink(dl[i].href))
dl[i].href=this.cobrandURL(dl[i].href);if(temp)
dl[i].innerText=temp;}}
this.cobrandForms=function()
{var f=this.parent._getControlEx("countryCobrandFunctions")._get("aExcludedForms");var s="",action,len=f.length;for(var j=0;j<len;j++)
{if(j>0)s+="&&";s+='!action.has("'+f[j]+'")';}
f=this.oDocument.doc.forms,len=f.length;for(var i=0;i<len;i++)
{action=f[i].action;if(eval(s))
f[i].action=this.cobrandURL(action);var fe=f[i].elements,eLen=fe.length;var un="undefined";for(var j=0;j<eLen;j++)
{with(fe[j])
{if(typeof(type)!=un&&typeof(value)!=un)
{if(type.is("hidden")&&(value.indexOf("http")==0)&&this.isEbayLink(value))
value=this.cobrandURL(value);}}}}}
this.updateSiteFormElem=function(pElem,pID)
{if(pElem)
{var idx=pElem.value.indexOf("&"),rest="";if(idx!=-1)
rest=pElem.value.substring(idx);pElem.value=pID+rest;}}
this.cobrandSearchAttribs=function()
{with(this)
{var df=oDocument.doc.forms,len=df.length;var sc=oSelCobrand,dfe;for(var i=0;i<len;i++)
{dfe=df[i].elements;updateSiteFormElem(dfe["ht"],sc.ht);updateSiteFormElem(dfe["s_partnerid"],sc.s_partnerid);updateSiteFormElem(dfe["co_partnerid"],sc.co_partnerid);}}}
this.cobrandPage=function()
{with(this)
{oSelCobrand.sCBName="."+oSelCobrand.sCBName;sServer="";if(sQA!="")
{var tpp=env.sThisPagePath,c='.'+env.sCountry;sServer=tpp.substring(tpp.indexOf("."),(tpp.indexOf(c)!=-1?tpp.indexOf(c):tpp.indexOf(sQA)));var ex=new Array(oSelCobrand.sCBName,".listings",".stores");var len=ex.length;for(var i=0;i<len;i++)
{if(sServer.indexOf(ex[i])==0)
sServer=sServer.substr(ex[i].length);}}
cobrandLinks();cobrandForms();cobrandSearchAttribs();parent._exec("writeFooter");}}
this.parent.cobrandPage=new Function("return this._getControl('cobrandFunctions')._exec('cobrandPage');");}

// \include\js\lib\features\surveys\dvcookie.js@@\main\5 

function updateDVCookie()
{var l=window.location.href;if(l.indexOf("temp_survey_popup.html")!=-1)
return;writeCookieletEx("ebay","dv",Math.floor(new Date()/1000).dec2Hex());}
updateDVCookie();

// \include\lib\_global\features\help\contextual_rebrand.js@@\main\3 

function EbayHelpContextualRebrand(pParent,pName)
{if(!this.objType)
this.objType="EbayHelpContextualRebrand";this.base=EbayBaseControl;this.base(pParent,pName);this.execute=function(pGuide,pFeature,pNoEscape)
{var hPath="/help/",hIndexPath=hPath+"index.html",hInd;var dl=this.oDocument.doc.links,url,pre,post;for(var i=dl.length-1;i>-1;i--)
{if(typeof(dl[i].href)=='unknown')
continue;url=dl[i].href;hInd=url.indexOf(hIndexPath);if(hInd!=-1)
{pre=url.substring(0,url.lastIndexOf("/")+1);post=url.substring(url.lastIndexOf("/")+1);this.oDocument.doc.links[i].href=url=pre+pGuide+"/"+post;}
if(pFeature&&url.has(hPath))
{hInd=url.indexOf(".html")+5;var preUrl=url.substring(0,hInd),postUrl=url.substr(hInd);post="fromFeature=";post+=pNoEscape?pFeature:escape(pFeature);post="?"+post;if(postUrl.charAt(0)=='?')
postUrl="&"+postUrl.substr(1);this.oDocument.doc.links[i].href=preUrl+post+postUrl;}}}}
new EbayHelpContextualRebrand(ebay.oDocument,"helpContextualRebrand");

// \include\js\finding\packagefiles\string.js@@\main\4 

function strLTrim()
{return this.replace(/^\s+/,'');}
function strRTrim()
{return this.replace(/\s+$/,'');}
function strTrim()
{return this.replace(/^\s+/,'').replace(/\s+$/,'');}
String.prototype.lTrim=strLTrim;String.prototype.rTrim=strRTrim;String.prototype.trim=strTrim;

// \include\js\finding\packagefiles\constants.js@@\main\12 

function ConstantVariableNames(){this.bShortValue=true;this.bConvert=true;this.aOldParamName=new Array();this.aNewParamName=new Array();this.aConstantParamName=new Array();this.addParam=function(o,n,c){this.aOldParamName[o]=c;this.aNewParamName[c]=n;this.aConstantParamName[this.aConstantParamName.length]=c;this[c]=(this.bShortValue)?n:o;}
this.convertParam=function(p){var constant=this.aOldParamName[p];return(this.bConvert&&typeof constant!="undefined")?this.aNewParamName[constant]:p;}
this.addParam("sousecase","fwc","USE_CASE");this.addParam("socolumnlayout","fcl","COLUMN_LAYOUT");this.addParam("socomparecolumnlayout","fccl","COMPARE_COLUMN_LAYOUT");this.addParam("socurrencydisplay","fcd","CURRENCY_DISPLAY");this.addParam("soitemstatus","fis","ITEM_STATUS");this.addParam("sokeywordredirect","fkr","KEYWORD_INTERCEPT_AUTO_REDIRECT");this.addParam("somediaplexredirected","fmr","MEDIAPLEX_REDIRECTED");this.addParam("sonewuser","fnu","NEW_USER");this.addParam("sorecordsperpage","frpp","RECORDS_PER_PAGE");this.addParam("sorecordstoskip","frts","RECORDS_TO_SKIP");this.addParam("somorecategories","fmc","SHOW_MORE_CATEGORIES");this.addParam("somoreattrid","fmai","SHOW_MORE_ATTRIBUTE_ID");this.addParam("somorecategoryid","fmci","SHOW_MORE_CATEGORY_ID");this.addParam("sorecentlyvieweditems","frvi","SHOW_RECENTLY_VIEWED_ITEMS");this.addParam("soreco","fris","RIS_RECO");this.addParam("sosimilaritems","fsi","SHOW_SIMILAR_ITEMS");this.addParam("sosortorder","fsoo","SORT_ORDER");this.addParam("sosortproperty","fsop","SORT_PROPERTY");this.addParam("socondcol","fcc","DISPLAY_CONDITION");this.addParam("sotextsearched","fts","TEXT_SEARCHED");this.addParam("sotimedisplay","ftid","TIME_DISPLAY");this.addParam("sospellrecommendation","fspr","SPELL_RECO");this.addParam("soincludewords","fiw","INCLUDE_WORDS");this.addParam("soexcludewords","few","EXCLUDE_WORDS");this.addParam("sosearchwordscombine","fswc","SEARCH_WORDS_COMBINE");this.addParam("solocationselector","fls","LOCATION_SELECTOR");this.addParam("soattrs","fa","SHOW_ATTRS");this.addParam("soloctog","flt","LOCATION_TOGGLE");this.addParam("sodisstem","fds","DISABLE_STEMMING");this.addParam("socolorid","fci","STORE_COLOR_ID");this.addParam("sostorename","fsn","STORE_NAME");this.addParam("sopdextmode","fpdem","PRODUCT_EXTENDED_MODE");this.addParam("soptitle","fpt","PRODUCT_TITLE_STRING");this.addParam("sopimurl","fpimu","PRODUCT_IMAGE_URL");this.addParam("soptmode","fptm","PRODUCT_TITLE_MODE");this.addParam("sorefprod","frp","PRODUCT_IDS_FROM_REFERRER");this.addParam("soselectregion","fser","SELECT_REGION");this.addParam("sosimquery","fsq","SIMILAR_QUERY");this.addParam("sosyic","fsc","SYI_LOWER_PRICE_SEARCH");this.addParam("socustoverride","fco","OVERRIDE_DISPLAY_FROM_CUSTOMIZATION");this.addParam("sotime","ft","TIME");this.addParam("sopostal","fpos","SPOT_ZIP_CODE");this.addParam("sopostalchg","fpc","LOCATION_CHANGE_REQUEST");this.addParam("socmd","fcmd","COMMAND");this.addParam("saanythingpoints","saayp","ANYTHING_POINTS");this.addParam("saavailabletocountry","saatc","AVAILABLE_TO_COUNTRY_ID");this.addParam("saavailabletosite","saats","AVAILABLE_TO_SITE_ID");this.addParam("sacharity","sacha","CHARITY");this.addParam("sactlgid","sacti","LIVE_AUCTION_CATALOG_ID");this.addParam("sadepartment","sadpt","DEPARTMENT_NUMBER");this.addParam("sagallery","sagal","GALLERY");this.addParam("sagiftservice","sagfs","GIFT_SERVICES");this.addParam("sagift","sagft","GIFT");this.addParam("sahasreserveprice","sahrp","HAS_RESERVE_PRICE");this.addParam("saitem","saitm","ITEM_ID");this.addParam("salistedinsite","salis","LISTED_IN_SITE_ID");this.addParam("sacurrency","sacur","LISTING_CURRENCY_ID");this.addParam("saregion","sargn","LISTING_REGION_ID");this.addParam("salocatedincountry","salic","LOCATED_IN_COUNTRY_ID");this.addParam("salot","salot","LOT");this.addParam("samotorscategorymap","samcm","MOTORS_CATEGORY_MAP");this.addParam("samotorsendyear","samsy","MOTORS_ENDYEAR");this.addParam("samotorsmake","sammk","MOTORS_MAKE");this.addParam("samotorsmodel","samml","MOTORS_MODEL");this.addParam("samotorsstartyear","samsy","MOTORS_STARTYEAR");this.addParam("samotorswarranty","samwy","MOTORS_WARRANTY_FILTER");this.addParam("sas_partnerid","saspi","MOTORS_S_PARTNER_ID");this.addParam("sapricehi","saprchi","PRICE_HIGH");this.addParam("sapricelo","saprclo","PRICE_LOW");this.addParam("saprice","saprc","NORMED_CURRENT_PRICE");this.addParam("sanormstartprice","sansp","NORMED_START_PRICE");this.addParam("sanownew","sannw","NOW_AND_NEW");this.addParam("sacategory","sacat","PARENT_CATEGORY");this.addParam("sapaypal","sappl","PAYPAL");this.addParam("saescrow","saesw","ESCROW");this.addParam("sapaypalofferid","sapoi","PAYPAL_BUYER_CREDIT");this.addParam("saquantity","saqty","QUANTITY");this.addParam("sasaleclass","sascs","SALE_CLASS");this.addParam("saseller","sasel","SELLER_ID");this.addParam("saschid","sasci","LIVE_AUCTION_SCHEDULE_ID");this.addParam("saSl","sasl","SELLER");this.addParam("saSs","sass","SINGLE_SELLER");this.addParam("sastartprice","saspr","START_PRICE");this.addParam("sastarttime","sastt","START_TIME");this.addParam("sastoreid","sasid","STORE_ID");this.addParam("sastorename","sastn","STORE_NAME2");this.addParam("safeatured","safea","FEATURED");this.addParam("sagalleryfeatured","sagaf","GALLERY_FEATURED");this.addParam("sasuperfeatured","saspf","SUPER_FEATURED");this.addParam("saendtimeoffset","saeto","END_TIME_OFFSET");this.addParam("saendtime","saetm","END_TIME");this.addParam("sadistance","sadis","SPOT_DISTANCE");this.addParam("sacqty","sacqy","COMPOUND_QUANTITY");this.addParam("sonotimefilter","fntf","TIME_FILTER_DISABLED");this.addParam("sotr","sotr","TIME_FILTER");this.addParam("sotrtype","ftrt","TR_TRY");this.addParam("sotrvalue","ftrv","TR_VALUE");this.addParam("sacqty","sacqy","COMPOUND_QUANTITY");this.addParam("sacqtyop","sacqyop","COMPOUND_QUANTITY_OP");this.addParam("sofindtype","sofindtype","FIND_TYPE");this.addParam("dff","dff","DATE_FILTER");this.addParam("dfs","dfs","DATE_FILTER_START_DATE");this.addParam("dfts","dfts","DATE_FILTER_START_TIME");this.addParam("dfe","dfe","DATE_FILTER_END_DATE");this.addParam("dfte","dfte","DATE_FILTER_END_TIME");this.addParam("fscl","fscl","SALE_CLASS_CB");this.addParam("floc","floc","LOCATION_CB");this.addParam("fgtp","fgtp","GOTOPAGE");this.addParam("fpay","fpay","PAYMENT");this.addParam("fpaym","fpaym","PAY_METHOD");this.addParam("fmmk","fmmk","MOTORS_MODEL");this.addParam("fmmd","fmmd","MOTORS_MAKE");this.addParam("fylo","fylo","MODEL_START_YR");this.addParam("fyhi","fyhi","MODEL_END_YR");this.addParam("mppfqy","mppfqy","MOTORS_KEYWORD");}
var SEO=new ConstantVariableNames();

// \include\js\finding\packagefiles\encodeurllib.js@@\main\21 

var URL_ENCODING_ENABLED=true;var TITLE_NAME='satitle';var VCS_NAME='povcs';var SEARCH_TITLE='poqry';var searchTerm='';var pfAttributes='';var isSubmitFromProductPages='false';var DisplayProductFinderValues='false';var AccentSymbol=['%C1','%E1','%C0','%E0','%C2','%E2','%C4','%E4','%C3','%E3','%C5','%E5','%C6','%E6','%C7','%E7','%C9','%E9','%C8','%E8','%CA','%EA','%CB','%EB','%u0192','%CC','%EC','%CE','%EE','%CF','%EF','%ED','%ED','%D1','%F1','%D3','%F3','%D4','%F4','%D6','%F6','%D5','%F5','%F2','%F2','%DF','%DA','%FA','%D9','%F9','%DB','%FB','%DC','%FC','%DD','%FD'];var AsciiSymbol=['A','a','A','a','A','a','A','a','A','a','A','a','E','e','C','c','E','e','E','e','E','e','E','e','f','I','i','I','i','I','i','i','i','N','n','o','o','O','o','O','o','O','o','o','o','s','U','u','U','u','U','u','U','u','Y','y'];var excludeOptionValues=new Array();function isEncodingEnabled()
{return URL_ENCODING_ENABLED;}
function encodeUrl(pHost,pForm,pSiteId,pReturnUrl)
{if(typeof isAttributePage!='undefined'&&typeof pForm.sofocus!='undefined'&&pForm.sofocus.value=='pf')
{DisplayProductFinderValues='true';}
if(typeof(pForm.elements[TITLE_NAME])!="undefined")
searchTerm=pForm.elements[TITLE_NAME].value;var catObj=pForm.elements[SEO.PARENT_CATEGORY];var catName='';var catValue='';var si='';var index=-1;if(catObj!=null&&typeof catObj.type!='undefined')
{if(catObj.type=='select-one')
{si=catObj.selectedIndex;if(si>=0){catValue=catObj.options[si].value;index=catValue.indexOf("&");if(index!=-1)
catValue=catValue.substring(0,index);if((catValue.length>0)&&(catValue!=-1)&&(catValue!=6000))
if(catValue==-100)
catName=catObj.options[si+1].text;else
catName=catObj.options[si].text;}}}
var umlauts=false;var params=getFormElementArray(pForm);if(DisplayProductFinderValues=='true')
{pfAttributes=getPFElementsArray(pForm);}
var exclude=new Array(TITLE_NAME,"query2","cgiurl","siteid","ebaytag1code_tmp","ebaytag1_tmp","worldlocation");excludeOptionValues['ebaycurr']='999';excludeOptionValues['ht']='1';var buttonObj='';for(var i=0;i<pForm.elements.length;i++)
{buttonObj=pForm.elements[i];if(buttonObj.type=='button'||buttonObj.type=='submit')
exclude=addToExclude(buttonObj.name,exclude);}
if(pSiteId==16||pSiteId==77||pSiteId==193)
umlauts=true;return encodeEbayUrl(pHost,searchTerm,catName,pfAttributes,params,exclude,umlauts,pReturnUrl);}
function encodeProductUrl(pHost,pForm,pSiteId,pReturnUrl)
{var pageFromProdPage=pForm.elements['optprodpage'];if(typeof pageFromProdPage!='undefined')
{isSubmitFromProductPages='true';}
searchTerm=pForm.elements[SEARCH_TITLE].value;var catObj=pForm.elements[VCS_NAME];var catName='';var catValue='';var si='';var index=-1;if(catObj!=null&&typeof catObj.type!='undefined'&&catObj.type!='hidden')
{if(catObj.type=='select-one')
{si=catObj.selectedIndex;if(si>=0){catValue=catObj.options[si].value;index=catValue.indexOf("&");if(index!=-1)
catValue=catValue.substring(0,index);if((catValue.length>0)&&(catValue!=-1)&&(catValue!=6000))
catName=catObj.options[si].text;}}}
else
{catName=pForm.elements.popnm.value;}
var umlauts=false;var params=getFormElementArray(pForm);var exclude=new Array(TITLE_NAME,"query2","cgiurl","siteid","ebaytag1code_tmp","ebaytag1_tmp","worldlocation");excludeOptionValues['ebaycurr']='999';excludeOptionValues['ht']='1';var buttonObj='';for(var i=0;i<pForm.elements.length;i++)
{buttonObj=pForm.elements[i];if(buttonObj.type=='button'||buttonObj.type=='submit')
exclude=addToExclude(buttonObj.name,exclude);}
if(pSiteId==16||pSiteId==77||pSiteId==193)
umlauts=true;return encodeEbayUrl(pHost,searchTerm,catName,pfAttributes,params,exclude,umlauts,pReturnUrl);}
function encodeEbayUrl(pHost,pSearchTerm,pCategoryName,pPFAttributes,pParams,pExclude,pUmlauts,pReturnUrl)
{if(pReturnUrl==null)pReturnUrl=false;var myEbayUrl=new ebayUrl(pHost,pSearchTerm,pCategoryName,pPFAttributes,pParams,pExclude,pUmlauts);if(isValidUrl(myEbayUrl.encodedUrl))
{if(pReturnUrl)
{return myEbayUrl.encodedUrl;}
else
{window.location.href=myEbayUrl.encodedUrl;return false;}}
else{return true;}}
function ebayUrl(pHost,pSearchTerm,pCategoryName,pPFAttributes,pParams,pExclude,pUmlauts)
{this.addTitle=false;this.urlHost=pHost;if(location.host.has("sandbox"))
{this.urlHost=ebay.oDocument._getControl('cobrandFunctions').exec("cobrandURL(this.URLHost)");}
this.searchTerm=pSearchTerm;this.categoryName=pCategoryName;this.params=pParams;this.exclude=pExclude;this.umlauts=pUmlauts;this.formattedUrlHost=this.formatHost(this.urlHost);this.encodedSearchTerm=this.encodeSearchTerm(this.searchTerm,this.umlauts,true);this.encodedCategoryName=this.encodeCategoryName(this.categoryName,this.umlauts);this.encodedParams=this.encodeParams(this.params,this.exclude,this.addTitle);if(DisplayProductFinderValues=='true')
{this.pfAttributes=pPFAttributes;this.encodedPFAttributes=this.encodePFAttributes(this.pfAttributes,this.umlauts);this.encodedUrl=this.formattedUrlHost+this.encodedSearchTerm+this.encodedCategoryName+this.encodedPFAttributes+this.encodedParams;}
else
this.encodedUrl=this.formattedUrlHost+this.encodedSearchTerm+this.encodedCategoryName+this.encodedParams;}
ebayUrl.prototype.formatHost=checkHost;ebayUrl.prototype.encodeSearchTerm=convertSearchTerm;ebayUrl.prototype.encodeCategoryName=convertCategoryName;ebayUrl.prototype.encodeParams=convertParams
ebayUrl.prototype.encodeSeoString=convertToSeoString;ebayUrl.prototype.encodePFAttributes=convertPFAttributes;function checkHost(pStr)
{var str=pStr;if(typeof str!='string')
str='/';else if(!(str.charAt(str.length-1)=='/'))
str+='/';return str;}
function convertSearchTerm(pStr,pUmlauts,pTitle)
{var str=pStr;var newStr='';if(str==''||str==null)return'';else
{newStr=this.encodeSeoString(str,pUmlauts,pTitle);}
return newStr;}
function convertCategoryName(pStr,pUmlauts)
{var str=pStr;var newStr='';if(str==''||str==null)return'';else
{newStr=this.encodeSeoString(str,pUmlauts);if(newStr!='')newStr='_'+newStr;}
return newStr;}
function convertPFAttributes(pfArray,pUmlauts)
{var newStr='';for(i=0;i<pfArray.length;i++){var str=pfArray[i];if(str!=''&&str!=null)
{if(i==0)
newStr=this.encodeSeoString(str,pUmlauts);else
newStr+='-'+this.encodeSeoString(str,pUmlauts);}}
if(newStr!='')newStr='_'+newStr;return newStr;}
function convertToSeoString(pStr,pUmlauts,pTitle)
{var str=pStr;var umlauts=pUmlauts;var spaceOnly=true;var convStr='';var skipping=false;var pos=0;var c='';if(str==null||(typeof str.length=='undefined'||1>str.length))
return'';str=str.trim();for(var i=0;i<str.length;i++)
{c=str.charAt(i);if(c.match(/[A-Za-z0-9]/))
{convStr+=c;skipping=false;}
else if((pos=charAsciiReplace(c))>=0)
{convStr+=AsciiSymbol[pos];if(umlauts&&(c==unescape('%E4')||c==unescape('%F6')||c==unescape('%FC')))
convStr+='e';else if(umlauts&&(c==unescape('%DF')))
convStr+='s';skipping=false;spaceOnly=false;}
else if(c=='\'')
spaceOnly=false;else if(!skipping)
{if(c!=' ')spaceOnly=false;convStr+='-';skipping=true;}
else
if(c!=' ')spaceOnly=false;}
if(convStr.charAt(0)=='-')
convStr=convStr.substring(1);if(convStr.charAt(convStr.length-1)=='-')
convStr=convStr.substring(0,convStr.length-1);if(pTitle)
{if(!spaceOnly)
{if(typeof this.addTitle!='undefined')
this.addTitle=true;}}
return convStr;}
function convertParams(pParams,pExclude)
{var paramList='';var defaultForm=document.forms[0];var exclude=pExclude;if(this.addTitle)
exclude=removeFromExclude(TITLE_NAME,exclude);if(pParams=='')
{var tempArray=getFormElementArray(defaultForm);paramList+=convertFormElementArray(tempArray,exclude);}
else if(isArray(pParams))
paramList+=convertFormElementArray(pParams,exclude);else
paramList='';if(paramList!='')paramList='_W0'+paramList;return(paramList);}
function convertFormElementArray(pArray,pExclude)
{var convertedString='';var excludeStr=pExclude.toString();var excludePattern='';for(var i=0;i<pArray.length;i++)
{var obj=pArray[i];var objName='';var objValue='';if((isArray(obj)&&(typeof obj.type=='undefined')))
{for(var j=0;j<obj.length;j++)
{objName=obj[j].name;excludePattern=new RegExp(objName);if(excludeStr.search(excludePattern)==-1)
{objValue=getElementValue(obj[j]);if(objValue!=null&&objValue.length>0&&typeof objValue!='undefined')
{convertedString+=encodeParam(objName,objValue);}}}}
else
{objName=obj.name;excludePattern=new RegExp(objName);if(excludeStr.search(excludePattern)==-1)
{objValue=getElementValue(obj);if(objValue!=null&&objValue.length>0&&typeof objValue!='undefined')
{if(obj.type=="select-multiple"){var tmpObjValueArr=getElementValue(obj).split(",");for(var j=0;j<tmpObjValueArr.length;j++){convertedString+=encodeParam(obj.name,tmpObjValueArr[j]);}}else{convertedString+=encodeParam(obj.name,getElementValue(obj));}}}}}
return convertedString;}
function encodeParam(pName,pValue)
{pName=(typeof SEO!="undefined")?SEO.convertParam(pName):pName;var strName=escape(pName);var strValue=escape(pValue);var strParam='';strName=strName.replace(/[Z]/g,'%5A');strName=strName.replace(/[Q]/g,'%51');strName=strName.replace(/[\/]/g,'%2F');strValue=strValue.replace(/[Z]/g,'%5A');strValue=strValue.replace(/[Q]/g,'%51');strValue=strValue.replace(/[\/]/g,'%2F');strParam='QQ'+strName+'Z'+strValue;strParam=strParam.replace(/[%]/g,'Q');return strParam;}
function removeFromExclude(pName,pExclude)
{var pos=null;var exclude=new Array();if(!isArray(pExclude))
return null;for(var i=0;i<pExclude.length;i++)
{if(pName==pExclude[i])pos=i;}
if(pos!=null)
{if(!(pExclude.length==1&&pos==0))
{if(pos==0)
exclude=pExclude.slice(1);else if(pos==pExclude.length-1)
exclude=pExclude.slice(0,pExclude.length-1);else
{for(var i=0;i<pExclude.length;i++)
{if(pos!=i)
exclude[exclude.length]=pExclude[i];}}}}
return exclude;}
function addToExclude(pName,pExclude)
{var exclude=new Array();if(!isArray(pExclude))
return null;if(typeof pName!='string')
return null;if(pName!='')
{exclude=pExclude;exclude[exclude.length]=pName;return exclude;}
else
{return pExclude;}}
function getFormElementArray(pForm)
{var oForm=new SeoForm(pForm);oForm.getFormElementArray();return oForm.aElem;}
function getPFElementsArray(pForm)
{var alist=pForm.elements.alist.value;var elementArray=new Array();var pfArray=new Array();elementArray=alist.split(",");for(var i=0;i<pForm.elements.length;i++)
{for(j=0;j<elementArray.length-1;j++)
{if(pForm.elements[i].name==elementArray[j])
{si=pForm.elements[i].selectedIndex;if(si>0){pfArray[pfArray.length]=pForm.elements[i].options[si].text;}}}}
return pfArray;}
function getElementValue(pObj)
{switch(pObj.type)
{case"button":case"submit":case"reset":case"text":return(pObj.value=="")?null:pObj.value;break;case"textarea":return(pObj.value=="")?null:pObj.value;break;case"hidden":if(pObj.value=="")return null;else return pObj.value;break;case"file":return pObj.value;break;case"checkbox":case"radio":if(pObj.checked)return pObj.value;break;case"select-one":if(pObj.selectedIndex<0)return null;else{var excludeValue=excludeOptionValues[pObj.name];var paramValue=pObj.options[pObj.selectedIndex].value;var index=paramValue.indexOf("&");if(index!=-1)paramValue=paramValue.substring(0,index);if(excludeValue!=null&&paramValue==excludeValue)return null;else return pObj.options[pObj.selectedIndex].value;}
break;case"select-multiple":var multiArray=new Array();for(var i=0;i<pObj.options.length;i++)
{if(pObj.options[i].selected)
multiArray[multiArray.length]=pObj.options[i].value;}
return multiArray.join(',');break;}}
function getElementInFormByName(pForm,pName)
{var myForm=document.forms[pForm];for(var i=0;i<myForm.elements.length;i++)
{if(myForm.elements[i].name==pName)
return myForm.elements[i];}
return null;}
function isArray(pObj)
{if(typeof pObj=='object')
return(typeof pObj.length=='undefined')?false:true;else return false;}
function isValidUrl(pUrl)
{if(typeof pUrl=='undefined')return false;else if(pUrl=='')return false;else if(pUrl==null)return false;else return true;}
function charAsciiReplace(pChar)
{var c=pChar;for(var i=0;i<AccentSymbol.length;i++)
{if(c==unescape(AccentSymbol[i]))return i;}
return-1;}
function debugEbayUrl(pObj)
{alert('OBJECT INFO:\n'+'urlHost: '+pObj.urlHost+'\nsearchTerm: '+pObj.searchTerm+'\ncategoryName: '+pObj.categoryName+'\nparams length: '+pObj.params.length+'\nformattedUrlHost: '+pObj.formattedUrlHost+'\nencodedSearchTerm: '+pObj.encodedSearchTerm+'\nencodedCategoryName: '+pObj.encodedCategoryName+'\nencodedParams: '+pObj.encodedParams+'\nencodedUrl: '+pObj.encodedUrl)}

// \include\js\finding\packagefiles\optimizeform.js@@\main\11 

function SeoForm(form,dVal){this.form=form;this.defaultOptionValues=new Array();if(dVal!=null)this.defaultOptionValues=dVal;else if(typeof defaultOptionValues!="undefined")this.defaultOptionValues=defaultOptionValues;this.overrideOptionValues=new Array();this.overrideOptions=new Array();this.aElem=new Array();this.shortQuery="?";this.url="";this.abort=false;this.submit=function(){this.removeDefaults();if(!this.abort)this.form.action="javascript: document.location='"+this.url+"'";return true;}
this.link=function(baseUrl,originalUrl){this.removeDefaults();if(this.abort)return originalUrl;else return baseUrl+this.shortQuery;}
this.removeDefaults=function(){this.getFormElementArray();this.buildShortQuery();for(var j=0;j<this.overrideOptions.length;j++){var opt=this.overrideOptions[j];this.shortQuery+="&"+opt.name+"="+this.escapeVal(opt.value);}
var query=this.shortQuery;if(this.form.action.indexOf("?")>-1){if(this.form.action.charAt(this.form.action.length-1)=='&')query=query.substring(1);else query="&"+query.substring(1);}
this.url=this.form.action+query;return this.url;}
this.getFormElementArray=function(){this.aElem=new Array();for(var i=0;i<this.form.elements.length;i++){var element=this.form.elements[i];if(this.isSplitable(element))this.splitOverloadedParams(element);else this.aElem[this.aElem.length]=element;}
this.removeUnwantedParams();}
this.isSplitable=function(element){switch(element.type){case"text":return false;case"checkbox":case"radio":return element.checked;case"select-one":case"select-multiple":return(element.selectedIndex>-1);default:return false;}}
this.splitOverloadedParams=function(element){var string=element.name+"="+element.value;var pairs=string.split('&');if(pairs.length<=1)this.aElem[this.aElem.length]=element;else{for(var i=0;(i<pairs.length);i++){var pair=pairs[i].split('=');var sType=(i==0)?"text":"hidden";this.aElem[this.aElem.length]={type:sType,name:pair[0],value:pair[1]};}}}
this.removeUnwantedParams=function(){var a=new Array();for(var i=0;i<this.aElem.length;i++){var element=this.aElem[i];if(this.isDuplicate(element))continue;if(this.isDefault(element))continue;if(this.isOverride(element))continue;a[a.length]=element;}
this.aElem=a;}
this.isDefault=function(pObj){var defaultValue=(typeof this.defaultOptionValues[pObj.name]!="undefined")?this.defaultOptionValues[pObj.name]:"";var elemValue="";switch(pObj.type){case"checkbox":case"radio":elemValue=(pObj.checked)?pObj.value:"";break;case"select-one":elemValue=(pObj.selectedIndex>-1)?pObj.options[pObj.selectedIndex].value:"";break;case"select-multiple":return false;default:elemValue=pObj.value;}
return(defaultValue==elemValue);}
this.isDuplicate=function(pObj){var count=0;var hidden=(pObj.type=="hidden");var visibleOption=false;var multipleHiddenOptions=false;if(!hidden)return false;else{for(var i=0;i<this.form.elements.length;i++){var elem=this.form.elements[i];if(elem.name==pObj.name&&elem.value==pObj.value){count++;if(elem.type=="radio"||elem.type=="checkbox"){if(elem.checked)visibleOption=true;}else if(elem.type=="select-one"||elem.type=="select-multiple"){if(elem.selectedIndex!=-1)visibleOption=true;}else if(elem.type=="text")visibleOption=true;else if(count>1&&visibleOption==false)multipleHiddenOptions=true;}}
return(visibleOption||multipleHiddenOptions);}}
this.isOverride=function(pObj){return(typeof this.overrideOptionValues[pObj.name]!="undefined");}
this.buildShortQuery=function(){for(var i=0;i<this.aElem.length;i++){var obj=this.aElem[i];if((this.isArray(obj)&&(typeof obj.type=='undefined'))){for(var j=0;j<obj.length;j++)this.concatShortQuery(obj[j].name,this.getElementValue(obj[j]),i+j);}else if(typeof obj.type!='undefined'){if(obj.type=='select-multiple'){var strVal=this.getElementValue(obj);var arrValues=strVal.split(",");for(var k=0;k<arrValues.length;k++)this.concatShortQuery(obj.name,arrValues[k],i);}else this.concatShortQuery(obj.name,this.getElementValue(obj),i);}}}
this.concatShortQuery=function(objName,objValue,objNum){var param="";if(objValue!=null&&objValue.length>0&&typeof objValue!='undefined'){if(objNum>0)param+="&";param+=objName+"="+this.escapeVal(objValue);}
this.shortQuery+=param;}
this.getElementValue=function(pObj){switch(pObj.type)
{case"button":return null;break;case"submit":return null;break;case"reset":return null;break;case"text":return(pObj.value=="")?null:pObj.value;break;case"textarea":return(pObj.value=="")?null:pObj.value;break;case"hidden":return(pObj.value=="")?null:pObj.value;break;case"file":return pObj.value;break;case"checkbox":return(pObj.checked)?pObj.value:null;break;case"radio":if(pObj.checked)return pObj.value;else return null;break;case"select-one":if(pObj.selectedIndex<0)return null;else{var paramValue=pObj.options[pObj.selectedIndex].value;var index=paramValue.indexOf("&");if(index!=-1)paramValue=paramValue.substring(0,index);return pObj.options[pObj.selectedIndex].value;}
break;case"select-multiple":var multiArray=new Array();for(var i=0;i<pObj.options.length;i++)
{if(pObj.options[i].selected)
multiArray[multiArray.length]=pObj.options[i].value;}
return multiArray.join(',');break;}}
this.isArray=function(pObj)
{if(typeof pObj=='object')
return(typeof pObj.length=='undefined')?false:true;else return false;}
this.escapeVal=function(v){var re=new RegExp("[']","g");v=v.toString();if(v.indexOf('%')>-1)this.abort=true;if(v.indexOf('\\x')>-1)this.abort=true;if(v.indexOf('\\u')>-1)this.abort=true;v=v.replace(re,"\\'");return v;}
this.addOverride=function(pName,pValue){this.overrideOptions[this.overrideOptions.length]={name:pName,value:pValue};this.overrideOptionValues[pName]=pValue;}}
// b=1475960 -->