// JavaScript Document

function ViewBuy(Directory,prodID) {
	this.neckon = 0; 
	this.pendon = 0;
	this.chainon = 0;
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.neckon  = getValue(prodID,'neckon');
this.pendon  = getValue(prodID,'pendon');
this.chainon  = getValue(prodID,'chainon');
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="/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+='<link rel="stylesheet" type="text/css" href="/ACS.css" />\n';
HTMLstring+='</head>\n';
HTMLstring+='<title>'+this.desc+'</title>\n';
HTMLstring+='<style type="text/css">\n';
HTMLstring+='body {	background-color: #000000;}\n';
HTMLstring+='</style>\n';

HTMLstring+='\n';
HTMLstring+='<body>\n';
HTMLstring+='<div align="center"><img src="/BANNERS/ACS_BAN.jpg" width="899" height="73" />\n';
HTMLstring+='</div>\n';
HTMLstring+='<table width="900"  border="1" align="center" cellpadding="1" cellspacing="1" bgcolor="#000000">\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="PicName">'+this.desc+'</span><br />\n';
HTMLstring+='<span class="x-small">'+this.subdesc+'</span><br />\n';
HTMLstring+='<br />\n';
HTMLstring+='<span class="medium">'+this.longdesc+'<br />\n';
HTMLstring+='<br />'+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' } ;

// Code to allow the Necklaces to have a Dangle on them... 
if (this.neckon == "1") { 
HTMLstring+='<select name="'+this.prodID+'_opt1">\n';
HTMLstring+='<option value="Heart Dangle" selected>Heart Dangle</option>\n';
HTMLstring+='<option value="Star Dangle">Star Dangle</option>\n';
HTMLstring+='<option value="No Dangle">No Dangle</option>\n';
HTMLstring+='</select>\n'} ;
// End of Dangle code 

// Code to allow the Pendants in Silver or Gold... 
if (this.pendon == "1") { 
HTMLstring+='<select name="'+this.prodID+'_opt1">\n';
HTMLstring+='<option value="Silver" selected>Silver</option>\n';
HTMLstring+='<option value="Gold">Gold</option>\n';
HTMLstring+='</select>\n'} ;
// End of Pendant silver/gold code 

// Code to allow the Pendants necklace choice of Chain or Ribbon... 
if (this.chainon == "1") { 
HTMLstring+='<select name="'+this.prodID+'_opt1">\n';
HTMLstring+='<option value="Chain" selected>Chain</option>\n';
HTMLstring+='<option value="Ribbon">Ribbon</option>\n';
HTMLstring+='</select>\n'} ;
// End of Pendant chain/ribbon code 

HTMLstring+='<p><a href="';
HTMLstring+="javascript:AddItem('"+this.prodID+"')";
HTMLstring+='"><img src="/NebuCart/imgs/carttags.gif" alt="Add" border="0"  /></a>\n';
HTMLstring+='<p>&nbsp;</p>\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';
HTMLstring+='</p><p><a href="javascript:window.close();"> <img src="/Symbols/CloseWindow.jpg" border=0 width="115" height="24" /> </a>\n';
HTMLstring+='</form></table>\n';
HTMLstring+='</body>\n';
HTMLstring+='</html>\n';

// alert(HTMLstring); 
newwindow=window.open("","view","width=950,height=550,scrollbars=1");
newdocument=newwindow.document;
newdocument.write(HTMLstring);
newdocument.close();
} ;