function coverphotoPosterOrderPopup(imageid, coverphoto, image_width, image_height) {
     size_x = parseInt(image_width);
     size_y = parseInt(image_height);
     if (window.innerWidth) {
         LeftPosition = (window.innerWidth-600)/2;
         TopPosition = ((window.innerHeight-500)/2)-50;
      } else {
         LeftPosition = (parseInt(window.screen.width) -600)/2;
         TopPosition = ((parseInt(window.screen.height) - 500)/2)-50;
      }
      attr = 'resizable=no,scrollbars=yes,width=600,height=388,screenX=300,screenY=200,left=' + LeftPosition + ',top=' + TopPosition + '';
      popWin=open('', 'new_window', attr);
      popWin.document.write('<head><title>Order a Poster Sized Image of this Cover Photo</title>');
      popWin.document.write('<script LANGUAGE="javascript" SRC="/static/javascript/coverphoto_poster_check.js"></SCRIPT></head>');
      popWin.document.write('<body style="background-color: #000000;"><div align=center>');
      popWin.document.write('<TABLE BORDER="0" WIDTH="98%" STYLE="color: #EEEEEE; background-color: #000000; font-size: 12px;">');
      popWin.document.write(' <TR>');
      popWin.document.write('  <TD align="center" colspan="2" width="100%" style="font-size:14px; color:#00CC00;">');
      popWin.document.write('  9"x11" @ $12.90 / 18"x22" @ $23.90 / 27"x33" @ $36.90 &nbsp; &nbsp; All Prices Include S&H ');
      popWin.document.write('  </TD>');
      popWin.document.write(' </TR>');
      popWin.document.write(' <TR>');
      popWin.document.write('  <TD width="55%">');

      popWin.document.write('<img src="/static/images/coverphoto/'+coverphoto+'/" border="1" width="270" height="322"><BR><DIV WIDTH="100%" ALIGn="CENTER">Cover Photo Item Number: '+imageid+'</DIV></TD>');
      popWin.document.write('  </TD>');
      popWin.document.write('  <TD VALIGN="TOP" width="45%" STYLE="border: solid #888888 1px;">');
      popWin.document.write('   <DIV STYLE="padding: 5px 5px 5px 5px;">');
      popWin.document.write('  <FORM action="https://www.paypal.com/cgi-bin/webscr" METHOD="POST" name="paypal_form" id="paypal_form" onsubmit="return verifyPosterOrder();">');
      popWin.document.write('   <input type="hidden" name="cmd" value="_xclick">');
      popWin.document.write('   <input type="hidden" name="business" value="don@inkedmag.com">');
      popWin.document.write('   <input type="hidden" id="item_name" name="item_name" value="Poster Order">');
      popWin.document.write('   <input type="hidden" id="item_amount" name="amount" value="20.00">');
      popWin.document.write('   <input type="hidden" name="shipping" value="0.00">');
      popWin.document.write('   <input type="hidden" name="page_style" value="Primary">');
      popWin.document.write('   <input type="hidden" name="no_shipping" value="0">');
      popWin.document.write('   <input type="hidden" name="no_note" value="1">');
      popWin.document.write('   <input type="hidden" name="currency_code" value="USD">');
      popWin.document.write('   <input type="hidden" name="tax" value="0.00">');
      popWin.document.write('   <input type="hidden" name="lc" value="US">');
      popWin.document.write('   <input type="hidden" name="bn" value="PP-BuyNowBF">');

      popWin.document.write('  Size: ');
      popWin.document.write('  <SELECT NAME="size" id="size" onchange="recalculatePosterCost('+imageid+');" STYLE="font-size: 11px;">');
      popWin.document.write('  <OPTION value="">..Choose Dimensions..</OPTION>');
      if ((size_x * size_y) > 325000) {
        popWin.document.write('  <OPTION value="9x11">Small: 9in. x 11in. - $9.95</OPTION>');
      }
      if ((size_x * size_y) > 900000) {
        popWin.document.write('  <OPTION value="18x22">Medium: 18in. x 22in. - $19.95</OPTION>');
      }
      if ((size_x * size_y) > 2000000) {
        popWin.document.write('  <OPTION value="27x33">Large: 27in. x 33in. - $29.95</OPTION>');
      }
      popWin.document.write('  </SELECT>');
      //popWin.document.write('  <P>Finish: ');
      //popWin.document.write('  <SELECT NAME="medium" id="medium" onchange="recalculatePosterCost('+imageid+');" STYLE="font-size: 11px;">');
      //popWin.document.write('  <OPTION value="">..Choose Ink/Medium..</OPTION>');
      //popWin.document.write('  <OPTION value="dye_satin">Ink Dye on Satin Photo Paper</OPTION>');
      //popWin.document.write('  <OPTION value="pigment_satin">Pigment on Satin Photo Paper</OPTION>');
      //popWin.document.write('  </SELECT>');
      popWin.document.write('  <p>Subtotal: $<SPAN id="order_subtotal">0.00</SPAN>');
      popWin.document.write('  <P>Shipping: $<SPAN id="shipping_total">0.00</SPAN>');
      popWin.document.write(' <P>Total: $<SPAN id="order_total">0.00</SPAN>');
      popWin.document.write('  <P><INPUT TYPE="SUBMIT" name="submit" value="Place Order" onsubmit="return verifyPosterOrder();">');
      popWin.document.write('  <DIV STYLE="font-size: 9px; line-height: 10px;">Images available for Poster Printing are chosen specifically because the source photo is of a sufficient resolution to allow for the process to occur without noticable image degradation.  All text and Inked logos are re-rendered at a much higher resolution than is shown on the <a href="/" target="_blank" style="color: #CCCC00;">Inked Magazine Website</a>.<p>Note: Availability is limited to delivery addresses in the United States as determined by the third-party printing services provider.  Please allow 2-4 weeks for delivery.</DIV>');
      popWin.document.write('   </FORM>');
      popWin.document.write('   </DIV>');
      popWin.document.write('  </TD>');
      popWin.document.write(' </TR>');
      popWin.document.write('</TABLE>');
      popWin.document.write('</div></body></html>');
}


