//<!--
//\include\js\common_functions.js@@\main\19

function ebayStringContains(pSource,pWanted)
{if(pSource.indexOf(pWanted)==-1)
return false;return true;}
window.stringContains=ebayStringContains;function ebayEvalParameters(pStr)
{var str=document.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=="tw")
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 tmpCountryDomain=countryDomain;country="";for(var i=0;i<countries.length&&(country=="");i++)
{if(stringContains(thisPageURL,countries[i][0])||stringContains(thisPageURL,countries[i][1]))
{country=countries[i][2];tmpCountryDomain=countries[i][1];}}
var rtcURLi=thisPageURL.indexOf("http://",1);if(rtcURLi!=-1)
includeDir=thisPageURL.substring(0,rtcURLi);var isSecure=false;countryDomain=tmpCountryDomain;picsDir=http+"pics.ebay.com/aw/pics/";var isQA=stringContains(thisPageURL,qaDom);if(thisPageURL.indexOf(https)==0)
{isSecure=true;ebInclude=scgi;picsDir=https+scgi+ebDom+dotCom+"/saw/pics/";}
else if(isQA)
{var qaInd=includeHost.indexOf(qaDom);var dotInd=includeHost.lastIndexOf(dot,qaInd-1)+1;if(dotInd!=0)
qaMachineName=includeHost.substring(dotInd,qaInd);countryDomain=tmpCountryDomain+qaMachineName+qaDom+ebStr+dotCom+"/";}
includeDir+=thisPageURL.substring(0,thisPageURL.indexOf("://")+3)+ebInclude+dot;if(isQA)
{if(qaMachineName!="")
includeDir+=qaMachineName+dot;includeDir+="qa"+dot;}
includeDir+=ebStr+dotCom+"/";if(isSecure)
includeDir+="s";includeDir+="aw/pics/";cobrandDir=includeDir+"js/cobrand/";countryIncludeDir=includeDir+country+"/js/";countryCobrandDir=countryIncludeDir+"cobrand/";includeDir+="js/";}
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)
{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(props!="")props=props.substring(1);return window.open(url,name,props);}
var globals;if(globals)
ebayUpdateLocationVars();
// -->
