/*
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 = "October";

// intro/summary: -- if not blank, include <br><br> at end
var cnintro = "Autographs and photographs dominated last month's high-end auctions, with five items each passing the century mark. Two of the former, however, appear forged.<br>&nbsp; &nbsp; &nbsp; Other expensive items were a 1975 telegram saying the duo had to cancel its upcoming British tour due to Karen's illness, a 1976 book about the Carpenters, and the 1989 <i>Compact Disc Collection</i>. The first came with a napkin from Karen and Tom Burris' wedding reception.<br>&nbsp; &nbsp; &nbsp; ";


// table listing:

// date
// auction site
// number/ID
// item
// quoted description
// # bidders
// sold for
// remarks

var cni = new Array();
var cnj = -1;

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "10/13/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3353728857";
cni[cnj][++cnk] = "Karen Carpenter Telegram and Wedding Napkin";
cni[cnj][++cnk] = "In 1975 the story came out when the Carpenters were forced to cancel a European tour when the gauntly Karen was too weak to perform. In 1976, Karen moved out of her parents house to an apartment of her own. A few years later she married a real estate developer named Thomas J. Burris....2 important artifacts of this time; an original telegram to England cancelling the Duo's performance and an orignal imprinted napkin (a couple small coffee stains on bottom) and the telegram is age-toned";
cni[cnj][++cnk] = "3";
cni[cnj][++cnk] = "US $103.50";
cni[cnj][++cnk] = "telegram is dated 23 Oct 1975";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "10/15/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3351966671";
cni[cnj][++cnk] = "Signed Karen Carpenter's Passage LP Richard";
cni[cnj][++cnk] = "SIGNED CARPENTERS \"PASSAGE\" LP. IT IS SIGNED BY RICHARD AND THE LATE KAREN CARPENTER.";
cni[cnj][++cnk] = "12";
cni[cnj][++cnk] = "US $157.50";
cni[cnj][++cnk] = "funny how RC & KC have the same handwriting here";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "10/18/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3354129404";
cni[cnj][++cnk] = "autographed <i>Close To You</i> LP";
cni[cnj][++cnk] = "HANDSIGNED CLOSE TO YOU CARPENTERS BY Karen Carpenter and Richard Carpenter. The LP is an original FIRST PRESSING! A&M Records Stereo SP-4271. Note: in this First Pressing of Close To You, for some inexplicable reason \"Love is Surrender\" is listed in the same time (3:09) as \"Maybe It's You.\" Also note: On \"Reason to Believe\" the publisher was originally listed as Faithful Virtue Music Co., Inc. Later pressings changed the publisher to Koppelman & Rubin Music, Inc. On the Richard Carpenter-John Bettis compositions, the publisher was shown on these pressings as \"Almo Music Corp.\" Later on it was changed to Irving Music, Inc. These copies with revised information betray that it was such because the Williams-Nichols songs indicate Irving Music Inc. (w/o the comma).";
cni[cnj][++cnk] = "13";
cni[cnj][++cnk] = "US $182.50";
cni[cnj][++cnk] = "didn't know about those differences in the album's first and later pressings";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "10/20/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3352470678";
cni[cnj][++cnk] = "Signed Karen Carpenter +1 Goodbye To 45 RPM";
cni[cnj][++cnk] = "hand signed copy of the Carpenters \"Goodbye To Love\" Single....This is a 7\" record. It signed by Richard and the late Karen Carpenter. This is not a preprint or autopen.";
cni[cnj][++cnk] = "20";
cni[cnj][++cnk] = "US $127.50";
cni[cnj][++cnk] = "a suspicously un-RC autograph";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "10/21/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3355845639";
cni[cnj][++cnk] = "Karen and Richard Carpenters BOTH signed display";
cni[cnj][++cnk] = "photo/CD dsiplay with card signed by the late great Karen Carpenter and her brother Richard";
cni[cnj][++cnk] = "1";
cni[cnj][++cnk] = "US $169.95";
cni[cnj][++cnk] = "autographed paper displayed with <i>The Singles 1969-1973</i> CD";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "10/21/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3355281019";
cni[cnj][++cnk] = "KAREN CARPENTER AUTOGRAPHED RECORD ALBUM 1973";
cni[cnj][++cnk] = "KAREN CARPENTER AUTOGRAPHED ALBUM FROM 1973. PERFECTLY SIGNED IN THIN BLACK SHARPIE ON THE INSIDE. I GOT THIS AUTOGRAPH FROM THE CARPENTER FAMILY IN THE EARLY 1970'S WHEN I WAS A RENTER IN ONE OF THEIR APARTMENT BUILDINGS, IN DOWNEY CALIFORNIA. I LIVED IN \"CLOSE TO YOU\" APARTMENTS FOR ALMOST A YEAR and ALTHOUGH I NEVER MET KAREN - LIVING IN HER PARENTS' APARTMENT BUILDING WAS VERY COOL!";
cni[cnj][++cnk] = "18";
cni[cnj][++cnk] = "US $122.50";
cni[cnj][++cnk] = "album is <i>The Singles 1969-1973</i>";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "10/26/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3560400486";
cni[cnj][++cnk] = "1976 JAPAN HARDCOVER BOOK";
cni[cnj][++cnk] = "1976 hardcover book on the Carpenters from Japan. The book has 146 pages. There are 70 B&W pictures and 10 color pictures of Karen & Richard Carpenter. Sections in the book include: Memorys, On Stage, Off Stage, Portraite & Carpenters Report. The text is all in Japanese. There's a discography with 14 pictures of album releases and 14 pictures of singles/EP's....The paper slip cover on the outside has some wear.";
cni[cnj][++cnk] = "15";
cni[cnj][++cnk] = "US $177.50";
cni[cnj][++cnk] = "for the fan who has everything";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "10/26/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3356533696";
cni[cnj][++cnk] = "Carpenters 1981 B&W PIC Karen Carpenter";
cni[cnj][++cnk] = "original B&W photo of Karen and Richard Carpenter from 1981. The picture was used in a LA Times article. It was taken at the Carpenters' office at A&M Records. It measures approximately 7 1/2\" X 11\".";
cni[cnj][++cnk] = "5";
cni[cnj][++cnk] = "US $202.50";
cni[cnj][++cnk] = "ditto";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "10/26/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3356537258";
cni[cnj][++cnk] = "Carpenters 1980 ABC PIC Karen Carpenter";
cni[cnj][++cnk] = "1980 ABC-TV publicity photo of Karen Carpenter. It was taken during the taping of the Carpenters' last special \"Music, Music, Music.\" The B&W photo measures 7\" X 9\". A press sheet is attached to the back of the picture. It states: \"The song is George Gershwin's \"I Got Rhythm,\" and Karen Carpenter proves that he could have been writing about her when she joins the dancers for this number in \"Music, Music, Music,\" the new Carpenters special on the ABC Television Network FRIDAY, MAY 16 (8:00-9:00 p.m., EDT).\"";
cni[cnj][++cnk] = "6";
cni[cnj][++cnk] = "US $224.50";
cni[cnj][++cnk] = "ditto";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "10/26/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3356542341";
cni[cnj][++cnk] = "Carpenters FC WEDDING PIC Karen Carpenter";
cni[cnj][++cnk] = "color 8X10 photo of Karen Carpenter taken at her 1980 wedding. This is an original photo from the Downey fan club.";
cni[cnj][++cnk] = "4";
cni[cnj][++cnk] = "US $181.49";
cni[cnj][++cnk] = "photo of just the bride";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "10/26/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3357032026";
cni[cnj][++cnk] = "KAREN CARPENTER SOFTBALL PRESS PHOTO";
cni[cnj][++cnk] = "photo of the Carpenters with the fabulous Karen Carpenter playing softball is either a fan club photo or a press photo....It may have been passed out at games where they would play for The American Cancer Society. It's a really rare shot";
cni[cnj][++cnk] = "4";
cni[cnj][++cnk] = "US $157.50";
cni[cnj][++cnk] = "shows the whole Carpenters team in uniform";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "10/27/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3357246278";
cni[cnj][++cnk] = "1975 Press Kit with photos";
cni[cnj][++cnk] = "original A&M Records press kit trumpeting the release of their latest album 'Horizon'. complete in original folder - it comes with bio, discography, release sheet/album info, and 3 beautiful black and white 8 x 10 photos + a carpenters l8 x 10 logo";
cni[cnj][++cnk] = "13";
cni[cnj][++cnk] = "US $127.50";
cni[cnj][++cnk] = "autographs displayed with <i>The Singles 1969-1973</i> CD";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "10/30/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "2567404980";
cni[cnj][++cnk] = "12 CD BOX SET";
cni[cnj][++cnk] = "The Carpenters Compact Disc Collection - 12 albums in lovely presentation pack. Foreword by Richard Carpenter - no. 0953";
cni[cnj][++cnk] = "2";
cni[cnj][++cnk] = "US $169.57<span style=\"font-size: .8em;\"><br>GBP 100.00</span>";
cni[cnj][++cnk] = "A&M CARCD 12 (released in 1989)";


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
*/
