");
}
function strTrim()
{
// Match space at the beginning and end of a string and replace it with
// empty strings.
return this.replace(/^\s+/, '').replace(/\s+$/, '');
}
String.prototype.trim = strTrim;
//#EK Keyword
function _nullSearch(formObj)
{
var trackingSearchLink="";
var queryString=formObj.satitle.value;
var nullQuery=encodeURIComponent(queryString);
var nullSearchLink=encodeURIComponent(ekSearchURL_Full+"?satitle="+nullQuery);
if(isRover)
{
if (isPrvdMediaPlex || isPrvdHDTorBJMT || isPrvdCNNA)
{
trackingSearchLink=roverMediaPlexU+"loc="+nullSearchLink;
}
if (isPrvdCJ)
{
trackingSearchLink=roverCJU+"&loc="+nullSearchLink;
}
if (isPrvdEPN)
{
trackingSearchLink=roverEPNU+"&mpre="+nullSearchLink;
}
if (roverNA)
{
trackingSearchLink=roverNAU+"loc="+nullSearchLink;
}
}
else
{
trackingSearchLink=trackingProvider;
if (isPrvdMediaPlex)
{
if (adsServed)
trackingSearchLink+="mpt="+cacheBuster+"&mpro="+nullSearchLink;
else
trackingSearchLink+="loc="+nullSearchLink;
}
else
trackingSearchLink+=nullSearchLink;
if (isPrvdCJ&&(sid!=null&&sid!=""))
trackingSearchLink+="&SID="+sid;
if (isPrvdEPN&&(sid!=null&&sid!=""))
trackingSearchLink+="&customid="+sid;
if (isJSTrackKeyword)
trackingSearchLink+="&kw="+nullQuery;
if (isJSTrackCategory)
trackingSearchLink+="&cat="+textTrackCategory;
}
formObj.action='javascript: document.location="'+encodeURIComponent(trackingSearchLink)+'"';
return true;
}
//$EK Keyword
function _makeNullSearchBox(headSearch)
{
var htmlString="";
return htmlString;
}
function _ShowSearchBox() {
itemCount = 0;
_docWrite('
' + _spacer(8,5) + '
');
//#EK Keyword
var trackingProviderReal=isPrvdMediaPlex?trackingProvider.slice(0, -2):trackingProvider;
_docWrite('
');
_docWrite("
");
}
function _padNumber(theNumber) {
if (theNumber < 10)
return "0" + theNumber;
return theNumber;
}
/*function _getTimeLeft(itemDate) {
isEnding = false; //reset global for font color
var offSetTime = itemDate.getTime() + eBayTimeOffset+3600000; //offset for pst.
//var offSetTime = itemDate.getTime() ;
var diffTime = offSetTime - eBayDate.getTime();
var seconds = Math.floor(diffTime / 1000) % 60;
var minutes = Math.floor(diffTime / (60 * 1000)) % 60;
var hours = Math.floor(diffTime / (60 * 60 * 1000)) % 24;
var days = Math.floor(diffTime / (24 * 60 * 60 * 1000));*/
//if (diffTime < 3600000 /* msec */)
/* isEnding = true; // set global for font color
var timeLeft = _spacer(8, 1);
if (days > 0) {
timeLeft = timeLeft + days + dLabel + _padNumber(hours) + hLabel + _padNumber(minutes) + mLabel;
}
else if (hours > 0) {
timeLeft = timeLeft + hours + hLabel + _padNumber(minutes) + mLabel;
}
else if (minutes > 0) {
timeLeft = timeLeft + minutes + mLabel;
}
else {
timeLeft = timeLeft + "<01" + mLabel;
}
return timeLeft;
}*/
function _getTimeLeft(days,hours,minutes) {
isEnding = false; //reset global for font color
var timeLeft = _spacer(8, 1);
if (days > 0) {
timeLeft = timeLeft + days + dLabel + _padNumber(hours) + hLabel + _padNumber(minutes) + mLabel;
}
else if (hours > 0) {
timeLeft = timeLeft + hours + hLabel + _padNumber(minutes) + mLabel;
}
else if (minutes > 0) {
isEnding = true;
timeLeft = timeLeft + minutes + mLabel;
}
else {
isEnding = true;
timeLeft = timeLeft + "<01" + mLabel;
}
return timeLeft;
}
function _genImg(imgInfo,itemId)
{
var str = "";
str += _spacer(5,1);
if (imgInfo == 2)
{
//display Item image
str += '';
}
else if (imgInfo == 1)
{
// display camera icon
str += '';
}
else
{
// display spacer image
str += '';
}
str += _spacer(5,1);
return _genItemLink(itemId,str);
}
function _writeWithColor2(str, textColor) {
_docWrite('' + str +
'');
}
function _write2(str) {
_docWrite('' + str +
'');
}
function _genHeaderLogo(ebayHome, logoAltText)
{
var hi;
str= '';
if(logoSize<=3)
str=_spacer(5, 1)+str;
str=_genLink(false, ebayHome, str);
if(logoSize>3)
{
str='