/*
C-note$ -- Hundred-dollar auctions of noteworthy Carpenters items
(featured message in KC RAM, newsletter of the Karen Carpenter Remembrance Page)
*/

// month covered:
var cnmonth = "December";

// intro/summary: -- if not blank, include <br><br> at end
var cnintro = "Three <i>Offering</i> albums sold for over a c-note each last month, as did an autographed <i>Passage</i> signed by \"both\" Karen and Richard in their rarely-used Karard (or Richen) handwriting.<br>&nbsp; &nbsp; &nbsp;The 35th Anniversary Box Set is out, so far making two appearances on eBay. Three c-note$ for each, including the new handkerchief. The most unique item found is a 1978 British radio-show giveaway: an autographed <i>The Singles: 1974-1978</i> album.<br>&nbsp; &nbsp; &nbsp;";


// table listing:

// date
// auction site
// number/ID
// item
// quoted description
// # bidders
// sold for <span style=\"font-size: .8em;\"><br>GBP 100.00</span>
// remarks

var cni = new Array();
var cnj = -1;

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "12/23/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3372096957";
cni[cnj][++cnk] = "Signed LP The Carpenters Singles 1974-1978";
cni[cnj][++cnk] = "The Carpenters Singles 1974 - 1978 LP signed by Richard and Karen in 1978 whilst on tour in England and guests on the radio. The LP was won on the David Hamilton Radio Show in December 78.";
cni[cnj][++cnk] = "15";
cni[cnj][++cnk] = "US $395.55<span style=\"font-size: .8em;\"><br>GBP 221.50</span>";
cni[cnj][++cnk] = "says \"Hi! 'Carpenters' Karen & Richard\"";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "12/23/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3372492318";
cni[cnj][++cnk] = "CARPENTERS -AUTOGRAPHED ALBUM";
cni[cnj][++cnk] = "CARPENTERS - \"PASSAGE\" Signed ALBUM - Signed in MARKER BY BOTH";
cni[cnj][++cnk] = "1";
cni[cnj][++cnk] = "US $165.00";
cni[cnj][++cnk] = "Looks like they both signed in the same handwriting this time, too! (Didn't happen that often, you know)";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "12/23/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3372562435";
cni[cnj][++cnk] = "CARPENTERS SIGNED A SONG FOR YOU LP KAREN AND RICHARD CARPENTER NICE LOOK";
cni[cnj][++cnk] = "THIS LP AND COVER ARE IN USED BUT GOOD CONDITION, HAVING ONLY SOME MINOR AGE WEAR. THE COVER IS BEAUTIFULLY SIGNED BY KAREN AND RICHARD CARPENTER.";
cni[cnj][++cnk] = "1";
cni[cnj][++cnk] = "US $200.00";
cni[cnj][++cnk] = "heart left unsigned this time";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "12/23/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "2583377781";
cni[cnj][++cnk] = "CARPENTERS Mr. Postman promo only Japan 45";
cni[cnj][++cnk] = "The Carpenters rare Japanese original white label promo only advance 45 with ultra rare promotional only advance pic sleeve! Cat # AM-235...\"Please Mr. Postman/This Masquerade\"....I have been going record hunting in Japan in Years and before this one I had only see a photo of this record.";
cni[cnj][++cnk] = "1";
cni[cnj][++cnk] = "US $150.00";
cni[cnj][++cnk] = "not as <i>ultra rare</i> as, say, a captured Bigfoot--but you get the point";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "12/26/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3372050711";
cni[cnj][++cnk] = "RICHARD & KAREN CARPENTERS SIGNED SINGLE UACC";
cni[cnj][++cnk] = "7\" Carpenters vinyl single of 'Rainy Days and Monday' / 'Saturday' signed clearly on the cover by both Richard and Karen Carpenter. - This item is authentic hand signed – NOT A COPY.";
cni[cnj][++cnk] = "1";
cni[cnj][++cnk] = "US $169.46<span style=\"font-size: .8em;\"><br>GBP 95.00</span>";
cni[cnj][++cnk] = "UACC - acronym for 'Universal Autograph Collectors Club' (means they collect autographs from everything and everybody--humans, rocks, trees, space aliens, molecules, etc.)";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "12/26/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "2583077525";
cni[cnj][++cnk] = "Carpenters Offering RARE 1st Pressing DJ LP";
cni[cnj][++cnk] = "Carpenters \"Offering\" Original EXTREMELY RARE Promotional LP on A&M Records (SP-4205), with \"Promotional Not For Sale\" on White label and \"Promotional\" sticker on backcover....The RAREST Carpenter's LP. This is the RARE cover that was replaced when they had a big hit with \"Close To You\", the album was re-packaged and re-released under the name \"Ticket To Ride\"";
cni[cnj][++cnk] = "16";
cni[cnj][++cnk] = "US $123.50";
cni[cnj][++cnk] = "trying to capture either an <i>Offering</i> album for under $50 or a Bigfoot--you'd have better luck capturing the latter";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "12/27/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "2584143645";
cni[cnj][++cnk] = "CARPENTERS 13miniLPs 35th COLLECTOR'S BOX SET";
cni[cnj][++cnk] = "lots of mini LP CDs \"Carpenters 35th Anniversary Collector's BOX SET with original BOX, original booklet, original handkerchief. In adition to 30th Collector's Box line up, it contains original mini LP edition \"CHRISTMAS PORTRAIT\", \"AN OLD-FASHIONED CHRISTMAS\" correctly re-designed in paper sleeve. - Titles, 1.THE OFFERING (1969) 2.CLOSE TO YOU(1970) 3.CARPENTERS(1971) 4.A SONG FOR YOU(1972) 5.NOW AND THEN(1973) 6.HORIZON (975) 7.A KIND OF HUSH(1976) 8.PASSAGE (1977) 9.CHRISTMAS PORTRAIT(1978) 10.MADE IN AMERICA(1981) 11.VOICE OF THE HEART(1983) 12.AN OLD-FASHIONED CHRISTMAS(1984) 13.LOVELINES(1989)";
cni[cnj][++cnk] = "1";
cni[cnj][++cnk] = "US $299.99";
cni[cnj][++cnk] = "What's <i>As Time Goes By</i> (2001), chopped liver?";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "12/27/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "2582349544";
cni[cnj][++cnk] = "CARPENTERS 1ST LP \"OFFERING\"";
cni[cnj][++cnk] = "FIRST COVER & TITLE OF CARPENTERS ALBUM ON A&M 4205 (LATER TITLED \"TICKET TO RIDE\") THIS IS WHITE LABEL DJ COPY...'Invocation', 'Your Wonderful Parade', 'Get Together', 'Ticket to Ride', and 9 more tunes....IT IS A STEREO COPY";
cni[cnj][++cnk] = "9";
cni[cnj][++cnk] = "US $142.50";
cni[cnj][++cnk] = "or even rarer than a Bigfoot capturing <i>you</i>";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "12/28/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "2584745346";
cni[cnj][++cnk] = "Carpenters Offering RARE 1st Pressing WLP LP";
cni[cnj][++cnk] = "The Carpenters Offering RARE 1st Pressing White Label Promo Only Original LP. Very, Very, RARE Promotional A&M Records (SP-4205) LP, with Promotional Not For Sale on White labels and Promotional Only sticker on backcover. This LP as you know was later repackaged and renamed to Ticket to Ride and very few of these original Offering version were issued.";
cni[cnj][++cnk] = "1";
cni[cnj][++cnk] = "US $125.00";
cni[cnj][++cnk] = "or a Bigfoot capturing you so he can show you <i>his</i> copy of <i>Offering</i> stashed inside his cave";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "12/29/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3374570528";
cni[cnj][++cnk] = "Karen Carpenter sig. \"The Carpenters\"";
cni[cnj][++cnk] = "signed 3x5 card of Karen Carpenter";
cni[cnj][++cnk] = "9";
cni[cnj][++cnk] = "US $103.50";
cni[cnj][++cnk] = "getting your stars to sign index cards makes for much easier filing (and auctioning) later on";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "12/30/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "2583295281";
cni[cnj][++cnk] = "Japan 13 Mini lp CD Box CARPENTERS Sealed";
cni[cnj][++cnk] = "The CARPENTERS' 35th Aniversary Box contains; 13 paper sleeve jacket CDs +Original Box +Original Booklet +Original Handkerchief. Not like the 30th Box, two Christmas albums are available in the box. - \"CARPENTERS 35TH ANNIVERSARY COLLECTOR'S EDITION\" 1.THE OFFERING (1969) 2.CLOSE TO YOU(1970) 3.CARPENTERS(1971) 4.A SONG FOR YOU(1972) 5.NOW AND THEN(1973) 6.HORIZON(1975) 7.A KIND OF HUSH(1976) 8.PASSAGE (1977) 9.CHRISTMAS PORTRAIT(1978) 10.MADE IN AMERICA(1981) 11.VOICE OF THE HEART(1983) 12.AN OLD-FASHIONED CHRISTMAS(1984) 13.LOVELINES(1989)";
cni[cnj][++cnk] = "2";
cni[cnj][++cnk] = "US $304.69";
cni[cnj][++cnk] = "That's $20 for each item--CDs, book, hanky (but $3 for the latter if it's used; or more, depending on who used it).";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "12/31/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3374433218";
cni[cnj][++cnk] = "JAPAN POSTER:Carpenters Sexy Heart";
cni[cnj][++cnk] = "not a promo poster.Made of a thick paper";
cni[cnj][++cnk] = "4";
cni[cnj][++cnk] = "US $262.00";
cni[cnj][++cnk] = "VHS tapes used to hold poster open for auction pic not included";


var alltotal = 0;
var phighest = 0;
var plowest = 9999999;
var pval = new Array();
   for (t = 0; t < cni.length; t++) {
   var usd = convertUSD(cni[t][6]);
   alltotal += usd;
   pval[t] = usd;
   var plowest = (usd < plowest) ? usd : plowest;
   var phighest = (usd > phighest) ? usd : phighest;
   }
var usdtotal = CurrencyFormatted(alltotal);
var usdtotal = CommaFormatted(usdtotal);
var usdavg = CurrencyFormatted(alltotal/cni.length);
var usdavg = CommaFormatted(usdavg);
var usdlowest = CurrencyFormatted(plowest);
var usdlowest = CommaFormatted(usdlowest);
var usdhighest = CurrencyFormatted(phighest);
var usdhighest = CommaFormatted(usdhighest);

var ilowest = new Array();
var iln = -1;
var ihighest = new Array();
var ihn = -1;
   for (t = 0; t < pval.length; t++) {
      if (pval[t] == plowest) {
      ilowest[++iln] = t;
      }
      if (pval[t] == phighest) {
      ihighest[++ihn] = t;
      }
   }

var lweach = "";
var ll = ilowest.length;
   if (ll > 1) {
   var lweach = " each";
   var lshow = "s are ";
      for (k = 0; k < ll-1; k++) {
      var commasep = (k > 0) ? ", " : "";
      var lshow = lshow + commasep + "\"" + cni[ilowest[k]][3] + "\" (" + cni[ilowest[k]][0] + ")";
      }
   var lshow = lshow + " and \"" + cni[ilowest[ll-1]][3] + "\" (" + cni[ilowest[ll-1]][0] + ")";
   }
   else {
   var lshow = " is \"" + cni[ilowest[0]][3] + "\" (" + cni[ilowest[0]][0] + ")";
   }
var hweach = "";
var hl = ihighest.length;
   if (hl > 1) {
   var hweach = " each";
   var hshow = "s are \"";
      for (k = 0; k < hl-1; k++) {
      var commasep = (k > 0) ? ", " : "";
      var hshow = hshow + commasep + "\"" + cni[ihighest[k]][3] + "\" (" + cni[ihighest[k]][0] + ")";
      }
   var hshow = hshow + " and \"" + cni[ihighest[hl-1]][3] + "\" (" + cni[ihighest[hl-1]][0] + ")";
   }
   else {
   var hshow = " is \"" + cni[ihighest[0]][3] + "\" (" + cni[ihighest[0]][0] + ")";
   }

function showItems() {
   if (cni.length < 2) {
      if (cni.length < 1) {
      var cnhighlowdescr = 'No final bids of at least $100 on any Carpenters items were found for ' + cnmonth;
      }
      else {
      var cnhighlowdescr = 'Below is the only final bid of at least $100 on a Carpenters item found for ' + cnmonth;
      }
   }
   else {
   var cnhighlowdescr = 'Below are all final bids of at least $100 on Carpenters items found for ' + cnmonth + '. ';
      if (usdhighest == usdlowest) {
      var cnhighlowdescr = cnhighlowdescr + 'The ' + cni.length + ' listed sold for $' + usdhighest + hweach;
      }
      else {
      var cnhighlowdescr = cnhighlowdescr + 'Of the ' + cni.length + ' listed, the highest priced item' + hshow + ', which sold for $' + usdhighest + hweach + '. The lowest priced one' + lshow + ', which sold for a mere $' + usdlowest + lweach;
      }
   }
document.write(cnintro + cnhighlowdescr + '.<br><br><table width="100%" style="font-family: arial; font-size: .8em;" cellpadding="2" cellspacing="0" border="0"><tr><td></td><td colspan="4" height="1" bgcolor="#dddddd"></td></tr><tr valign="bottom"><td align="center"><i>Date</i><br></td><td align="center" bgcolor="#dddddd"><i>Site</i><br></td><td bgcolor="#eeeeee" class="cnitem"><i>Item</i><br></td><td align="center" bgcolor="#dddddd"><i>Bids</i><br></td><td nowrap align="right" bgcolor="#dddddd" class="cnsold"><i>Sold for</i><br></td></tr><tr bgcolor="#dddddd" valign="top"><td colspan="2" align="center"><i>Number/ID</i><br></td><td colspan="3" bgcolor="#eeeeee"><i><span class="cndesc">Description </span><span class="cnrmks">& remarks</span></i><br></td></tr><tr><td colspan="2"></td><td colspan="3" height="1" bgcolor="#bbbbbb"></td></tr><tr><td colspan="5" height="1"></td></tr>');
   for (j = 0; j < cni.length; j++) {
   document.write('<tr><td></td><td colspan="4" height="1" bgcolor="#eeeedd"></td></tr><tr valign="top"><td align="center">' + cni[j][0] + '<br></td><td bgcolor="#eeeedd"><a href="http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=' + cni[j][2] + '">' + cni[j][1] + '</a><br></td><td bgcolor="#ffffee" class="cnitem">' + cni[j][3] + '<br></td><td align="center" bgcolor="#eeeedd">' + cni[j][5] + '<br></td><td nowrap align="right" bgcolor="#eeeedd" class="cnsold">' + cni[j][6] + '<br></td></tr><tr valign="top"><td colspan="2" align="center" bgcolor="#eeeedd">' + cni[j][2] + '<br></td><td colspan="3" rowspan="2" bgcolor="#ffffee"><dl><dt class="cndesc">' + cni[j][4] + '<dd class="cnrmks">' + cni[j][7] + '<br></td></tr><tr><td colspan="2">&nbsp;</td></tr><tr><td colspan="2"></td><td colspan="3" height="1" bgcolor="#ccccbb"></td></tr>');
   }
document.write('</table>' + listTotals());
}

function convertUSD(usdval) {
var ppcents = usdval.indexOf(".");
var ppdols = usdval.indexOf("$");
var susd = usdval.substring(ppdols+1,ppcents+3);
return eval(susd);
}

function listTotals() {
var cntotals = (cni.length < 2) ? '' : '<table width="100%" style="font-family: arial; font-size: .8em;"><tr valign="top"><td>' + cni.length + ' items<br></td><td align="right" class="cnsold"><i>total:&nbsp;</i> US $' + usdtotal + '<span style="font-size: .9em; font-weight: normal;"><br><i>average:&nbsp;</i> US $' + usdavg + '</span><br></td></tr></table>';
return cntotals;
}

// following 2 functions found at:
// http://devwebprocanada.com/devwebproca-44-20030520CurrencyFormattingandPuttingCommasInNumbers.html

function CurrencyFormatted(amount)
{
var i = parseFloat(amount);
if(isNaN(i)) { i = 0.00; }
var minus = '';
if(i < 0) { minus = '-'; }
i = Math.abs(i);
i = parseInt((i + .005) * 100);
i = i / 100;
s = new String(i);
if(s.indexOf('.') < 0) { s += '.00'; }
if(s.indexOf('.') == (s.length - 2)) { s += '0'; }
s = minus + s;
return s;
}
// end of function CurrencyFormatted()

function CommaFormatted(amount)
{
var delimiter = ","; // replace comma if desired
var a = amount.split('.',2)
var d = a[1];
var i = parseInt(a[0]);
if(isNaN(i)) { return ''; }
var minus = '';
if(i < 0) { minus = '-'; }
i = Math.abs(i);
var n = new String(i);
var a = [];
while(n.length > 3)
{
var nn = n.substr(n.length-3);
a.unshift(nn);
n = n.substr(0,n.length-3);
}
if(n.length > 0) { a.unshift(n); }
n = a.join(delimiter);
if(d.length < 1) { amount = n; }
else { amount = n + '.' + d; }
amount = minus + amount;
return amount;
}
// end of function CommaFormatted()

/*
URL for item list:

http://search-completed.ebay.com/search/search.dll?MfcISAPICommand=GetResult&ht=1&query2=carpenters&search_option=1&submit=+Search+&minPrice=100&maxPrice=&category0=&srchdesc=y&completedOnly=30&exclude=&st=&SortProperty=MetaEndSort&maxRecordsPerPage=50&worldlocation=ebayavail&region=0&available_to=1&located_in=1&ebaycurr=&siteid=0&query=carpenters&shortcut=&ebaytag1code_tmp=&ebaytag1_tmp=&ebaytag1code=&ebaytag1=&ebaytag12=ebayreg&from=R6
*/
