// JavaScript Document

function ViewBuy(Directory,prodID) {
this.Directory = Directory;
this.prodID = prodID;
// this.qty    = qty;
this.price  = getValue(prodID,'price');
this.desc   = getValue(prodID,'desc');
this.fullpic  = '/' + Directory + '/images/' + getValue(prodID,'fullpic');

this.subdesc   = getValue(prodID,'subdesc');
this.longdesc   = getValue(prodID,'longdesc');
this.medium  = getValue(prodID,'medium');
this.dimension  = getValue(prodID,'dimension');
if (this.dimension != 'undefined') { this.fullpic+='" '+this.dimension } 
else {this.fullpic+='"' } ;
this.limit  = getValue(prodID,'limit');
this.texton  = getValue(prodID,'texton');
this.sizeon  = getValue(prodID,'sizeon');
this.opt    = getOptions(prodID,'opt');
tmpXtra     = getOptionCosts(prodID,'opt');
  if(tmpXtra != 0){
  this.price = Number(this.price) + Number(tmpXtra);
  }
HTMLstring='<html>\n';
HTMLstring+='<head>\n';
HTMLstring+='<script language=javascript src="/js/NoRight.js"></script>\n';
HTMLstring+='<script language=javascript src="/NebuCart/js/NC_debug.js"></script>\n';
HTMLstring+='<script language=javascript src="/NebuCart/js/NC_settings.js"></script>\n';
HTMLstring+='<script language=javascript src="/NebuCart/js/NebuCart.js"></script>\n';
HTMLstring+='<script language=javascript src="/NebuCart/js/NC_formatting.js"></script>\n';
HTMLstring+='<link rel="stylesheet" href="nebucart.css" />\n';

HTMLstring+='</head>\n';
HTMLstring+='<title>'+this.desc+'</title>\n';
HTMLstring+='<style type="text/css">\n';
HTMLstring+='.style6 {font-family: Arial, Helvetica, sans-serif; font-size: 9px; }\n';
HTMLstring+='.style8 {font-family: Arial, Helvetica, sans-serif;font-size: 12px}\n';
HTMLstring+='.style12 {font-family: Arial, Helvetica, sans-serif;}\n';
HTMLstring+='.style13 {font-family: Arial, Helvetica, sans-serif;font-size: 16px}\n';
HTMLstring+='.style14 {font-family: Arial, Helvetica, sans-serif;font-size: 12px;}\n';
HTMLstring+='.style16 {font-family: Arial, Helvetica, sans-serif;font-size: 15px}\n';
HTMLstring+='</style>\n';

HTMLstring+='\n';
HTMLstring+='<body>\n';

HTMLstring+='<table width="900"  border="1" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">\n';
HTMLstring+='<tr>\n';
<!-- HTMLstring+='<td width="50%" align="center" height="420"><div align="center" valign="middle"> <img src="'+this.fullpic+'" '+this.dimension+'"/> </div>\n'; -->
HTMLstring+='<td width="50%" align="center" height="420"><div align="center" valign="middle"> <img src="'+this.fullpic+'/> </div>\n';

HTMLstring+='</td><td width="50%" align="center" height="420"><br />\n';
HTMLstring+='<br />\n';
HTMLstring+='<br />\n';
HTMLstring+='<span class="style13">'+this.desc+'</span><br />\n';
HTMLstring+='<br />\n';
HTMLstring+='<span class="style16">'+this.subdesc+'</span>\n';
HTMLstring+='<br />\n';
HTMLstring+='<span class="style8">'+this.longdesc+'<br />\n';
HTMLstring+='<br /><span class="style8">'+this.medium+'</span>\n';
HTMLstring+='<form name="NC_form">';
if (this.texton == "1") { HTMLstring+='<textarea  name="'+this.prodID+'_opt" cols="25" rows="1" maxlength="25" wrap="none" ></textarea>\n' } ;


//  This is the special code for Michael Vinci - his changes will be activated by the Price being set to 1.00
if (this.price == "1.00") {
	this.price = 0 ;
HTMLstring+='<span class="style6">AVAILABLE IN THE FOLLOWING PAPER SIZES</span><br /> \n';
HTMLstring+='<select name="'+this.prodID+'_opt1">\n';
HTMLstring+='<option value="Paper Size    8 x 10 - $200|200">Paper Size  8 x 10 - $200</option>\n';
HTMLstring+='<option value="Paper Size 11 x 14 - $275|275">Paper Size 11 x 14 - $275</option>\n';
HTMLstring+='<option value="Paper Size 16 x 20 - $400|400">Paper Size 16 x 20 - $400</option>\n';
HTMLstring+='<option value="Paper Size 20 x 24 - $525|525">Paper Size 20 x 24 - $525</option>\n';
HTMLstring+='<option value="Paper Size 24 x 30 - $700|700">Paper Size 24 x 30 - $700</option>\n';
HTMLstring+='<option value="Paper Size 24 x 36 - $825|825">Paper Size 24 x 36 - $825</option>\n';
HTMLstring+='</select>\n' };

//  This is the special code for Michael Vinci Holga Pix - his changes will be activated by the Price being set to 1.50
if (this.price == "1.50") {
	this.price = 0 ;
HTMLstring+='<span class="style6">AVAILABLE IN THE FOLLOWING PAPER SIZES</span><br /> \n';
HTMLstring+='<select name="'+this.prodID+'_opt1">\n';
HTMLstring+='<option value="Paper Size    8 x 10 - $200|200">Paper Size  8 x 10 - $200</option>\n';
HTMLstring+='<option value="Paper Size 11 x 14 - $275|275">Paper Size 11 x 14 - $275</option>\n';
HTMLstring+='<option value="Paper Size 16 x 20 - $400|400">Paper Size 16 x 20 - $400</option>\n';
HTMLstring+='<option value="Paper Size 20 x 24 - $525|525">Paper Size 20 x 24 - $525</option>\n';
HTMLstring+='<option value="Paper Size 24 x 30 - $700|700">Paper Size 24 x 30 - $700</option>\n';
HTMLstring+='</select>\n' };




//  This is the special code for Marc Meisenheimer - his changes will be activated by the Price being set to 2.00
if (this.price == "2.00") {
	this.price = 0 ;
HTMLstring+='<span class="style6">AVAILABLE IN THE FOLLOWING PAPER SIZES</span><br /> \n';
HTMLstring+='<select name="'+this.prodID+'_opt1">\n';
HTMLstring+='<option value="Paper Size    8 x 10 - $195|195">Paper Size  8 x 10 - $195</option>\n';
HTMLstring+='<option value="Paper Size 11 x 14 - $285|285">Paper Size 11 x 14 - $285</option>\n';
HTMLstring+='<option value="Paper Size 16 x 20 - $425|425">Paper Size 16 x 20 - $425</option>\n';
HTMLstring+='<option value="Paper Size 20 x 24 - $585|585">Paper Size 20 x 24 - $585</option>\n';
HTMLstring+='<option value="Paper Size 24 x 30 - $760|760">Paper Size 24 x 30 - $760</option>\n';
HTMLstring+='<option value="Paper Size 24 x 36 - $865|865">Paper Size 24 x 36 - $865</option>\n';
HTMLstring+='</select>\n' };

//  This is the special code for Bristol MacDonald - her changes will be activated by the Price being set to 3.00
if (this.price == "3.00") {
	this.price = 0 ;
HTMLstring+='<span class="style6">AVAILABLE IN THE FOLLOWING PAPER SIZES</span><br /> \n';
HTMLstring+='<select name="'+this.prodID+'_opt1">\n';
// HTMLstring+='<option value="Paper Size    8 x 10 - $125|125">Paper Size  8 x 10 - $125</option>\n';
HTMLstring+='<option value="Paper Size 11 x 14 - $175|175">Paper Size 11 x 14 - $175</option>\n';
HTMLstring+='<option value="Paper Size 16 x 20 - $250|250">Paper Size 16 x 20 - $250</option>\n';
HTMLstring+='<option value="Paper Size 20 x 24 - $375|375">Paper Size 20 x 24 - $375</option>\n';
HTMLstring+='<option value="Paper Size 24 x 30 - $525|525">Paper Size 24 x 30 - $525</option>\n';
HTMLstring+='<option value="Paper Size 24 x 36 - $650|650">Paper Size 24 x 36 - $650</option>\n';
HTMLstring+='</select>\n' };

//  This is the special code for Joe Forte - his changes will be activated by the Price being set to 4.00
if (this.price == "4.00") {
	this.price = 0 ;
HTMLstring+='<span class="style6">AVAILABLE IN THE FOLLOWING PAPER SIZES</span><br /> \n';
HTMLstring+='<select name="'+this.prodID+'_opt1">\n';
HTMLstring+='<option value="Paper Size    8 x 10 - $157|157">Paper Size  8 x 10 - $157</option>\n';
HTMLstring+='<option value="Paper Size 11 x 14 - $173|173">Paper Size 11 x 14 - $173</option>\n';
HTMLstring+='<option value="Paper Size 16 x 20 - $211|211">Paper Size 16 x 20 - $211</option>\n';
HTMLstring+='<option value="Paper Size 20 x 24 - $300|300">Paper Size 20 x 24 - $300</option>\n';
HTMLstring+='<option value="Paper Size 24 x 30 - $350|350">Paper Size 24 x 30 - $350</option>\n';
HTMLstring+='<option value="Paper Size 24 x 36 - $400|400">Paper Size 24 x 36 - $400</option>\n';
HTMLstring+='</select>\n' };


//  This is the special code for Angela Cartwright Standard Pix - her changes will be activated by the Price being set to 5.50
if (this.price == "5.60") {
	this.price = 0 ;
HTMLstring+='<span class="style6">AVAILABLE IN THE FOLLOWING PAPER SIZES</span><br /> \n';
HTMLstring+='<select name="'+this.prodID+'_opt1">\n';
//HTMLstring+='<option value="Paper Size    8 x 10 - $235|235">Paper Size  8 x 10 - $235</option>\n';
HTMLstring+='<option value="Paper Size 11 x 14 - $310|310">Paper Size 11 x 14 - $310</option>\n';
HTMLstring+='<option value="Paper Size 16 x 20 - $460|460">Paper Size 16 x 20 - $460</option>\n';
HTMLstring+='<option value="Paper Size 20 x 24 - $605|605">Paper Size 20 x 24 - $605</option>\n';
HTMLstring+='<option value="Paper Size 24 x 30 - $760|760">Paper Size 24 x 30 - $760</option>\n';
HTMLstring+='</select>\n' };

//  This is the special code for Maura Brennan Holga Pix - her changes will be activated by the Price being set to 6.00
if (this.price == "6.00") {
	this.price = 0 ;
HTMLstring+='<span class="style6">AVAILABLE IN THE FOLLOWING PAPER SIZES</span><br /> \n';
HTMLstring+='<select name="'+this.prodID+'_opt1">\n';
HTMLstring+='<option value="Paper Size    8 x 10 - $235|235">Paper Size  8 x 10 - $235</option>\n';
HTMLstring+='<option value="Paper Size 11 x 14 - $310|310">Paper Size 11 x 14 - $310</option>\n';
HTMLstring+='<option value="Paper Size 16 x 20 - $460|460">Paper Size 16 x 20 - $460</option>\n';
HTMLstring+='<option value="Paper Size 20 x 24 - $605|605">Paper Size 20 x 24 - $605</option>\n';
HTMLstring+='<option value="Paper Size 24 x 30 - $760|760">Paper Size 24 x 30 - $760</option>\n';
HTMLstring+='</select>\n' };

//  This is the special code for Rav Avery - her changes will be activated by the Price being set to 7.00
if (this.price == "7.00") {
	this.price = 0 ;
HTMLstring+='<span class="style6">AVAILABLE IN THE FOLLOWING PAPER SIZES</span><br /> \n';
HTMLstring+='<select name="'+this.prodID+'_opt1">\n';
HTMLstring+='<option value="Paper Size 11 x 14 - $310|310">Paper Size 11 x 14 - $310</option>\n';
HTMLstring+='<option value="Paper Size 16 x 20 - $460|460">Paper Size 16 x 20 - $460</option>\n';
HTMLstring+='<option value="Paper Size 20 x 24 - $605|605">Paper Size 20 x 24 - $605</option>\n';
HTMLstring+='<option value="Paper Size 24 x 30 - $760|760">Paper Size 24 x 30 - $760</option>\n';
HTMLstring+='<option value="Paper Size 24 x 36 - $885|885">Paper Size 24 x 36 - $885</option>\n';
HTMLstring+='</select>\n' };


// Code to allow the pictures to be in many sizes Change the 0 to a 1 to enable this feature
if (this.sizeon == "1") {
HTMLstring+='<span class="style6">AVAILABLE IN THE FOLLOWING PAPER SIZES</span><br /> \n';
HTMLstring+='<select name="'+this.prodID+'_opt1">\n';
HTMLstring+='<option value="Paper Size    8 x 10 - $235|235">Paper Size  8 x 10 - $235</option>\n';
HTMLstring+='<option value="Paper Size 11 x 14 - $310|310">Paper Size 11 x 14 - $310</option>\n';
HTMLstring+='<option value="Paper Size 16 x 20 - $460|460">Paper Size 16 x 20 - $460</option>\n';
HTMLstring+='<option value="Paper Size 20 x 24 - $605|605">Paper Size 20 x 24 - $605</option>\n';
HTMLstring+='<option value="Paper Size 24 x 30 - $760|760">Paper Size 24 x 30 - $760</option>\n';
HTMLstring+='<option value="Paper Size 24 x 36 - $885|885">Paper Size 24 x 36 - $885</option>\n';
HTMLstring+='</select>\n' };

HTMLstring+='<br /><span class="style6">ALL PRICES INCLUDE SHIPPING & HANDLING</span><br /> \n ' ;

HTMLstring+='<input type="hidden" name="'+this.prodID+'"       value="1" />\n';
HTMLstring+='<input type="hidden" name="'+this.prodID+'_desc"  value="'+this.desc+'" />\n';
HTMLstring+='<input type="hidden" name="'+this.prodID+'_price" value="'+this.price+'" />\n';





// The next 3 lines are the code to allow a purchase though PayPal  - un comment them to 
// This is disabled until the site is completed

 HTMLstring+='<p><a href="';
 HTMLstring+="javascript:AddItem('"+this.prodID+"')"; 
 HTMLstring+='">ADD TO CART</a>\n'; 

// This is disabled until the site is completed
// HTMLstring+='"><img src="/NebuCart/imgs/carttags.gif" alt="Add" border="0"  /></a>\n';  
// Do not enable this line
  
HTMLstring+='<p>&nbsp;</p>\n';

HTMLstring+='</p><p><a href="javascript:window.close();">CLOSE WINDOW</a>\n';
HTMLstring+='</form></table>\n';
HTMLstring+='</body>\n';
HTMLstring+='</html>\n';

// alert(HTMLstring); 
newwindow=window.open("","view","width=900,height=700");
newdocument=newwindow.document;
newdocument.write(HTMLstring);
newdocument.close();
} ;

