/*
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 = "September";

// intro/summary: -- if not blank, include <br><br> at end
var cnintro = "First the strange. One of Karen Carpenter's bed spreads was given to the manager of the formerly Carpenters-owned apartment complexes in Downey who later gave it to the head maintenance man there who, in turn, sold it last month on eBay. Not clear if the bed spread was originally from Karen's condominium in Century City or her family's home in Downey.<br><br>Now the rare. Last month two \"mini LP-style\" 30th Anniversary Boxsets from Japan were auctioned on eBay--one without and the other with the accompanying logo-imprinted handkerchief. Three autographed items were also sold, including a drumhead \"skin\" purportedly signed by both Richard and Karen. In addition, there were two photographs sold on eBay for more than a hundred dollars each.<br><br>";


// 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] = "9/09/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3346357464";
cni[cnj][++cnk] = "Autographed <i>Close To You</i> LP";
cni[cnj][++cnk] = "signed by Karen Carpenter and Richard Carpenter....COA: Issued by Nancy Sullivan - Musik Memorabilia - Hartford, Conn.";
cni[cnj][++cnk] = "20";
cni[cnj][++cnk] = "US $224.50";
cni[cnj][++cnk] = "\"Musik\"?";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "9/12/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3347197674";
cni[cnj][++cnk] = "DRUM SKIN SIGNED BY 2 W/COA";
cni[cnj][++cnk] = "Drum Skin Signed by Richard and Karen Carpenter";
cni[cnj][++cnk] = "5";
cni[cnj][++cnk] = "US $102.35<span style=\"font-size: .8em;\"><br>GBP 62.00</span>";
cni[cnj][++cnk] = "must've been some autograph request";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "9/14/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3347645433";
cni[cnj][++cnk] = "8x10 NOV 1973 Karen Carpenter";
cni[cnj][++cnk] = "photo of Karen and Richard Carpenter that was taken on November 22, 1973.";
cni[cnj][++cnk] = "4";
cni[cnj][++cnk] = "US $177.50";
cni[cnj][++cnk] = "should've been 8 by 10 <i>feet</i> for that price";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "9/20/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3348328876";
cni[cnj][++cnk] = "Autographed <i>Ticket To Ride</i> (1978) LP";
cni[cnj][++cnk] = "autographed in person by KAREN CARPENTER AND RICHARD CARPENTER....Signature(s) verified by the American Signature Authentication Service of Redmond, WA";
cni[cnj][++cnk] = "2";
cni[cnj][++cnk] = "US $107.50";
cni[cnj][++cnk] = "LP is A&M MFP (Music for Pleasure) #50431";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "9/22/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "2558611640";
cni[cnj][++cnk] = "30th Anniversary Boxset Sealed";
cni[cnj][++cnk] = "11 orginal albums: miniaturized version of cardboard albums complete with embosees and flaps. Japan only limited release....Manufacture original sealed";
cni[cnj][++cnk] = "2";
cni[cnj][++cnk] = "US $255.00";
cni[cnj][++cnk] = "";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "9/30/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3351610490";
cni[cnj][++cnk] = "Karen Carpenter's King Size Fur Bed Spread";
cni[cnj][++cnk] = "This Oversized King (Cal King) I think? The spread is black fur with a large yellow/gold valuer looking round rope trim. I don't know what the fur is. Knowing Karen it is imitation but it is soft, and about 3/4 to 1 inch hairs....I have also put pictures of the home where she died to show you that I have been there and that I am not a phony....This bed spread was on Karen's bed until a few years before she passed away. This would be a great Carpenters collectors find. It was given to the manager (Maxine) of the 5th St. apartments in Downey. \"Close to you\" and \"We've only just begun\" I had been the main maintenance man there sense 1994 until Richard sold the aprts. back in around 2001. I still work there and at Richard's old house for the new owners. It has been in storage, sealed until about 3 months ago when I obtained it from Maxine. If you need a letter of authenticity I will write one and send a copy of one of my pay stubs from Newville realty that Richard owned....It is kind of heavy and would be warm if not hot on a bed....<a href=\"http://members.aol.com/bszabat/proof.JPG\">Here</a> is a link to pictures of the inside of their home that I had taken while working for the Agnus their mother.";
cni[cnj][++cnk] = "4";
cni[cnj][++cnk] = "US $295.00";
cni[cnj][++cnk] = "From her condominium in Century City or her room at the Newville Ave. home?";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "9/30/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "2559755855";
cni[cnj][++cnk] = "mini lp BOX SET Japan";
cni[cnj][++cnk] = "japanese paper sleeve mini lp style cd box set, Carpenters Box(11CD POCM-9040/50). titles are 1)offering 2)Close to You 3)ST 4)Song for You 5)Horizon 6)Now & Then 7)Kind of Hush 8)Passage 9)Made in America 10)Voice of the Heart 11)Lovelines. and it comes with booklet and handkerchief still sealed.";
cni[cnj][++cnk] = "1";
cni[cnj][++cnk] = "US $350.00";
cni[cnj][++cnk] = "The one sold on 9/22 was about a hundred bucks less. Perhaps because it left out that handkerchief.";

cni[++cnj] = new Array(); var cnk = -1;
cni[cnj][++cnk] = "9/30/03";
cni[cnj][++cnk] = "eBay";
cni[cnj][++cnk] = "3350960619";
cni[cnj][++cnk] = "FC COLOR 8X10 Karen Carpenter";
cni[cnj][++cnk] = "color 8X10 photo of Karen Carpenter from the Downey fan club. The photo was taken during the taping of the 1980 \"Music, Music, Music\" TV special....The autograph was preprinted on the photo - it is not an original autograph.";
cni[cnj][++cnk] = "8";
cni[cnj][++cnk] = "US $103.50";
cni[cnj][++cnk] = "";


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
*/
