// JavaScript-Library for eCARD-Service "Pixapunx.de"
// created      : 04.12.2003 by B. Hillmann (bh@christelpete.com)

// opens a Browser-Windows with the eCard-Composer-Flash-Movie! :)
function doCompose (pp_card, format) {
  // set the windows-size depending on eCard-Format
  if (format == 'h') {
    var w = 340; var h = 480;
  } else {
    var w = 460; var h = 360;
  }

  // set the Top and Left Windows-Position to center on user-screen
  var posL = (screen.width) ? (screen.width - w) / 2 : 0;
  var posT = (screen.height) ? (screen.height - h) / 2 : 0;

// build the "settings"-string for the eCard-Window
  var ppSettings = 'height=' + h + ', width=' + w + ', top= ' + posT + ', left=' + posL + ', scrollbars=no, resizable=no';
  var ppComposer = window.open ('pp_CORE.php?pp_CMD=pp_COMPOSE&pp_card=' + pp_card + '&format=' + format, 'ppComposer', ppSettings);
}

// opens a Browser-Windows with the eCard-Show-Flash-Movie! :)
function doShow (id, format) {
  // set the windows-size depending on eCard-Format
  if (format == 'h') {
    var w = 340; var h = 480;
  } else {
    var w = 460; var h = 360;
  }

  // set the Top and Left Windows-Position to center on user-screen
  var posL = (screen.width) ? (screen.width - w) / 2 : 0;
  var posT = (screen.height) ? (screen.height - h) / 2 : 0;

// build the "settings"-string for the eCard-Window
  var ppSettings = 'height=' + h + ', width=' + w + ', top= ' + posT + ', left=' + posL + ', scrollbars=no, resizable=no';
  var ppComposer = window.open ('../pp_CORE.php?pp_CMD=pp_SHOW&pp_cardID=' + id + '&format=' + format, 'ppShow', ppSettings);
}

