var cartWindow = null;

function CMEOpenCart(sReferenceLocation, dWidth, dHeight)
{
    var sOptions = "toolbar=no,menubar=no,status=yes,scrollbars=yes,width=" +
      dWidth + ",height=" + dHeight + ",resizable=yes";
    cartWindow = open(sReferenceLocation,"Cart", sOptions);
    cartWindow.focus();
}

function CMEOpenRegistration(sReferenceLocation, dWidth, dHeight)
{
    var sOptions = "toolbar=no,menubar=no,status=yes,scrollbars=yes,width=" +
      dWidth + ",height=" + dHeight + ",resizable=yes";
    cartWindow = open(sReferenceLocation,"Registration", sOptions);
    cartWindow.focus();
}

function CMECloseCart()
{
  cartWindow.close();
}

//var wCMEConfirmBuyWindow = null;

function CMEConfirmBuy()
{
    sText =  "<html><head><title>Message</title><body bgcolor=#7fa7e0>";
    sText += "<center><br>";
    sText += "<font face=arial color=#ffffff size=2><b>";
    sText += "Thank you. This item has been placed<br>"; 
    sText += "in your shopping cart.<br>";
    sText += "</b></font>";
    sText += "</center></body></html>";
    setTimeout('CMEConfirmBuyWindowOpen(sText)', 100);   // delay one tenths of a second before opening
}

function CMEConfirmBuyWindowOpen(sText)
{
  wCMEConfirmBuyWindow = window.open('','CME Comfirm Buy','width=200,height=100');
  wCMEConfirmBuyWindow.document.write(sText);
  setTimeout('CMEConfirmBuyWindowClose(wCMEConfirmBuyWindow)', 3000); // delay 6 seconds before closing
}

function CMEConfirmBuyWindowClose(wCMEConfirmBuyWindow)
{
  wCMEConfirmBuyWindow.close();    // close small window and depart
}


