var IMAGE_SERVER = "http://pics.ebaystatic.com/aw/pics/"; var THUMB_PATH = "http://thumbs.ebaystatic.com/pict/"; var isEnding = false; var theDate = new Date(); var eBayDate = new Date(theDate.getTime() + theDate.getTimezoneOffset() * 60000); var eBayTimeOffset = 28800000; var errorCode = 0; var _sniplet = ""; var priceLabel = "Price"; var productLabel = "Product"; var pictureLabel = "Picture"; var timeLabel = "Time Left"; var bidsLabel = "Bids"; var headerColor = "#66CCFF"; var borderColor = "#0099FF"; var titleColor = "#FFCE63"; var fontSize = "-2"; var fontFace = "Verdana, Arial, Helvetica, sans-serif"; var fontColor = "#000000"; var endColor = "#FF0000"; var trackingProvider = "http://www.qksrv.net/click-1133049-9254938?loc="; var linkTarget = "_blank"; var viHref = "http://cgi.ebay.com/ws/eBayISAPI.dll%3FViewItem%26item%3D"; var theWorldsMarketplace = "The World's Online Marketplace(TM)"; var theDisclaimer = "disclaimer"; var ebayHome = "http://pages.ebay.com/"; var disclaimerDomain = "http://pages.ebay.com/"; var ebayHomeLogoSm = "http://pics.ebaystatic.com/aw/pics/api/MrktPlcLogoStrspnt_108x45.gif"; var ebayHomeLogoLg = "http://pics.ebaystatic.com/aw/pics/api/MrktPlcLogoLtrspnt_144x59.gif"; var searchLink = "http://search.ebay.com/ws/search/SaleSearch?ht=0&satitle=Pan+%28mythology%29&sosortorder=1&sosortproperty=1&sotextsearched=1"; var tableWidth = 500; var tableHeight = 0; var dLabel = "d" + " "; var hLabel = "h" + " "; var mLabel = "m" + " "; var sLabel = "s"; var itemCount = 4; var varItemCount = itemCount; var searchLinkString = "'View all ' + varItemCount + ' items on eBay'"; var ekTitle = ""; var ekTitleFontSize = "3"; var ekTitleFontFace = "Arial, Helvetica, sans-serif"; var isPrvdMediaPlex= false; var isPrvdCJ= true; var trackingID= "1133049"; var adsServed=false; var t = new Date(); var cacheBuster = escape(t.toGMTString()); var sid = ""; var binIcon = ""; function _alert(str) { // alert(str); } function _genLink(href, caption) { var link = ""; if (isPrvdMediaPlex) { if (adsServed) { link = "" + caption + ""; _alert(link); return link; } function _genItemLink(itemId, title) { var link = ""; if (isPrvdMediaPlex) { if (adsServed) { link = "" + title + ""; } else { link = "" + title + ""; } _alert(link); return link; } function _docWrite(str) { _sniplet += str; if (fooStr) alert(str); } var fooStr = false; function _getSniplet() { _eBaySniplet(); return _sniplet; } function _write(str) { _docWrite('' + str + ''); } function _writeWithColor(str, textColor) { _docWrite('' + str + ''); } function _spacer(w, h) { return ''; } function _cleanTitle(str) { var title = new String(str); return title.replace(/\*/g, """); } function _rowDiv(colSpan) { _docWrite('' + _spacer("100%", 2) + ''); _docWrite('' + _spacer("100%", 1) + ''); _docWrite('' + _spacer("100%", 2) + ''); } function _tracking() { //alert("isPrvdMediaPlex" + isPrvdMediaPlex + " adsServed: " + adsServed); var str = ""; if (isPrvdMediaPlex) { if (adsServed) { str = ''; } else { str = ''; } } return str; } function _header() { var imgHeight = 45; _docWrite(''); _docWrite(''); _docWrite(''); _docWrite(''); _docWrite(''); if (tableWidth < 250) { imgHeight = 45; _docWrite('
' + _spacer(1, 1) + _tracking() + ''+ _spacer((tableWidth - 2), 1) + '' + _spacer(1, 1) + '
'); _docWrite(_genLink(ebayHome, "\"eBay")); } else { imgHeight = 59; _docWrite('
'); _docWrite(_genLink(ebayHome, "\"eBay")); } _docWrite('
'); _docWrite(''); _docWrite(''); _docWrite(''); _docWrite(''); _docWrite(''); _docWrite('
' + _spacer(1, 1) + ''); _docWrite(''+ _spacer(5, 1)); _docWrite(''+ekTitle+''); _docWrite('' + _spacer(1, 1) + '
'); _docWrite(''); _docWrite(''); _docWrite(''); _docWrite(''); _docWrite(''); _docWrite(''); _docWrite(''); _docWrite(''); disClaimerHelper(); _docWrite(''); _docWrite(''); _docWrite(''); _docWrite(''); _docWrite(''); _docWrite(''); _docWrite(''); _docWrite('
' + _spacer(1, 1) + '' + _spacer(5, 1) + ''); /* _docWrite(''); _docWrite(''); _docWrite(''); _docWrite(''); _docWrite(''); _docWrite('
' + _spacer(1, 1) + ''); _docWrite(''); _docWrite(''+ekTitle+''); _docWrite('' + _spacer(1, 1) + '
'); */ _docWrite(''); } function _footer(disClaimerHelper) { _docWrite('
'); _docWrite('
' + _spacer(5, 1) + '' + _spacer(1, 1) + '
' + _spacer(1, 1) + '' + _spacer("100%", 1) + '' + _spacer(1, 1) + '
' + _spacer("100%", 1) + '
'); } function _disclaimer(colSpan, disclaimer) { _docWrite('' + _spacer(1, 1) + ''); _docWrite(''); _docWrite(''); if (errorCode > 0) { _docWrite(''); } else { _docWrite(''); if (disclaimer && itemCount > 0) { _docWrite(''); } _docWrite(''); } _docWrite('
' + errorCode + '' + _spacer(10, 1) + ''); if (itemCount > 0) { _write(_genLink(escape(searchLink), eval(searchLinkString) )); } else { _write(_spacer(1, 1)); } _docWrite(''); _write(_genLink(escape(disclaimerDomain + "help/community/editorkitlegal.html"), '' + theDisclaimer + '')); _docWrite('' + _spacer(10, 1) + '
'); _docWrite(''); _docWrite('' + _spacer(1, 1) + ''); } function _worldMarketPlaceLink() { itemCount = 0; _docWrite("
" + _spacer(5,5) + "

"); _docWrite(_genLink(ebayHome, theWorldsMarketplace)); _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; //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 _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); if (imgInfo > 0) { return _genItemLink(itemId,str); } else { return str; } } // display type 4 function _labels4() { _docWrite(''); _write(productLabel); _docWrite(''); _write(priceLabel); _docWrite(''); _write(_spacer(5,1)); _write(bidsLabel); _write(_spacer(5,1)); _docWrite(''); _write(timeLabel); _docWrite(''); _rowDiv(4); } function _disclaimer4() { _disclaimer(3, true); } function _item4(itemId, title, price, endTime, bidCount) { var timeColor = (isEnding ? endColor : fontColor); _docWrite(''); _write(_genItemLink(itemId, _cleanTitle(title))); _docWrite(''); _write("" + price + ""); _docWrite(''); _write((bidCount == 0 ? "-" : bidCount)); _docWrite(''); _writeWithColor(endTime, timeColor); _docWrite(''); _rowDiv(4); } function _eBaySniplet() { _alert("style 4"); _header(); _labels4(); _item4("2233117311", "PAN FIGURE/GOD/MYTHOLOGY", "$9.99", _getTimeLeft( new Date(2004,2,25,9,5,52)), 0); _item4("2995408781", "MAC 4 Pan + 3 Eyeshadow - Mythology, Paradisco, Shroom", "$9.99", _getTimeLeft( new Date(2004,2,27,22,29,36)), 0); _item4("4100577416", "Silver Greek mythology PAN ring size 8 1/4", "$14.95", _getTimeLeft( new Date(2004,2,28,18,13,58)), 0); _item4("3712389048", "Michael Ricker Pewter Greek Mythology Pan", "$19.99", _getTimeLeft( new Date(2004,2,28,19,25,13)), 0); _footer(_disclaimer4); } document.write(_getSniplet());