var special_offer = false;
var discount_offer = false;

function SearchString(locObj) {
        var i, inpt = locObj.search.substr(1);
        if (inpt.length > 0) {
                parmstr = inpt;
                var ary = inpt.replace(/\+/g, " ").split("&");
                for (i in ary) {
                        ary[i] = ary[i].split("=");
                        this[unescape(ary[i][0])] = unescape(ary[i][1]);
                }
        }
}

function unframeme() {
        if (self != top)
                top.location.href = self.location.href;
}

function check_cart () {
        if ( qstr["todo"] && qstr["todo"] == "viewcart" ) {
                writecart ();
        }
        parent.scroll(0,0);
}

function getprints ( cid ) {
      var i = 0;
      if( cid == 37 ) {
        for ( var pid in prodh ) {
                if ( prodh[pid][3] == cid ) {
                        i = i+1;
                }
        }
      }else{ 
        for ( var pid in prod ) {
                if ( prod[pid][3] == cid ) {
                        i = i+1;
                }
        }
      }
      return i;
}

function formHandler() {
        var URL = document.frmCategory.CategoryID.options[document.frmCategory.CategoryID.selectedIndex].value;
        if(URL!="")window.location.href = baseurl + "?catg=" + URL;
}

function readit () {
        cval = Get_Cookie ( 'fortyyears' );
        nitems = 0;
        if (cval && cval.length > 0) {
                cary = cval.split(":");
                for (var i in cary) {
                        nitems = nitems + 1;
                        cary[i] = cary[i].split("|");
                }
        }
}

function getDiv(id){
        var mydiv;
        if(document.all){
                mydiv = document.all[id];
        } else if ( document.getElementById ) {
                mydiv = document.getElementById(id);
        }
        return mydiv;
}


function resetit () {
        Delete_Cookie ( 'fortyyears' );
        getDiv("cart_no").innerHTML = "You have <b>0</b> item";
}

function add2cart ( pid ) {
                storeMasterCookie ();
                var num = document.frmProductDetails.Quantity.value;
                var old = Get_Cookie('fortyyears');

                if ( old && old.length > 0  ) {
                        var seen = false;
                        for (var i in cary) {
                                if ( cary[i][0] == pid ) {
                                        seen = true;
                                        cary[i][1] = "" + eval( parseInt(cary[i][1]) + parseInt(num) );
                                }
                        }
                        if ( seen ) {
                                old = "";
                                for (var i in cary) {
                                        if ( old.length > 0 ) {
                                                old = old + ":"  + cary[i][0] + "|" + cary[i][1];
                                        } else {
                                                old = cary[i][0] + "|" + cary[i][1];
                                        }
                                }

                        } else {
                                old = old + ":"  + pid + "|" + num;
                        }
                } else {
                        old = pid + "|" + num;
                }

                storeIntelligentCookie ( 'fortyyears', old );

                window.location.href =  baseurl + "?todo=viewcart";
}

function update () {
        var tstr = "";
        for ( var i in cary ) {
                var chk = eval ("window.shopping_cart.document.form1.checkbox"+i+".checked");
                var qnt = eval ("window.shopping_cart.document.form1.qtext"+i+".value");
                if ( ! chk && qnt > 0 ) {
                        if ( tstr.length > 0 ) {
                                tstr += ":" + cary[i][0] + "|" + qnt;
                        } else {
                                tstr =  cary[i][0] + "|" + qnt;
                        }
                }
        }

        Delete_Cookie ( 'fortyyears' );
        storeIntelligentCookie ( 'fortyyears', tstr );
        window.location.reload (true);
//      var ts = new Date().getTime();
//      window.location.href = baseurl + '?todo=viewcart&ts=' + ts;
}

function print_cart () {
        gtotal = 0;
        for ( var i in cary ) {
                print_item ( i, cary[i][0], cary[i][1] );
        }
}

function print_item ( i, pid, num ) {

        gtotal += eval ( num * prod[pid][2] ); 

        if( prodh[pid]){

        window.shopping_cart.document.write (

'  <TR>\n' +
'  <TD align=middle>\n' +
'  <TABLE id=itable' + i + ' cellSpacing=0 cellPadding=1 \n' +
'  border=0>\n' +
'  <TR>\n' +
'  <TD align=middle height=40><FONT face=Verdana \n' +
'  size=1><A \n' +
'  href="' + baseurl + '?catg=' + prodh[pid][3] + '&prod=' + pid + '" target="_top"><IMG \n' +
'  src="product_images/p' + pid + '.jpg" width=30 \n' +
'  border=0></FONT></A></TD></TR></TABLE></TD>\n' +
'  <TD align=middle><FONT face=Verdana \n' +
'  size=1>' + pid + '</FONT></TD>\n' +
'  <TD align=middle><FONT face=Verdana size=1>7-10 days</FONT></TD>\n' +
'  <TD align=middle width=300><FONT face=Verdana \n' +
'  color=#772120 size=1><B>' + prodh[pid][0] + 
'  </B></FONT></FONT></TD>\n' +
'  <TD class=cartlineitem align=center><FONT \n' +
'  face=Verdana size=1>$' + prodh[pid][2] + '</FONT></TD>\n' +
'  <TD align=middle><FONT face=Verdana \n' +
'  size=1><INPUT class=textbox id=qtext' + i + ' maxLength=3 \n' +
'  size=2 value="' + num + '" name=qtext' + i + '  onKeyPress="return parent.check_input(event);" ></FONT></TD>\n' +
'  <TD class=cartlineitem align=right><FONT \n' +
'  face=Verdana size=1>$' + (eval ( num * prodh[pid][2] )) + '</FONT></TD>\n' +
'  <TD align=middle><INPUT id=checkbox' + i + ' \n' +
'  type=checkbox name=checkbox' + i + '></TD></TR>\n' +
'  <TR>\n' +
'  <TD bgColor=#772120 colSpan=8><IMG \n' +
'  src="images/blank.gif"></TD></TR>\n' +
'  <TR>\n' +
'  <TD colSpan=8 width=1 height=4><IMG \n' +
'  src="images/blank.gif"></TD></TR>\n' );

      }else{
        window.shopping_cart.document.write (

'  <TR>\n' +
'  <TD align=middle>\n' +
'  <TABLE id=itable' + i + ' cellSpacing=0 cellPadding=1 \n' +
'  border=0>\n' +
'  <TR>\n' +
'  <TD align=middle height=40><FONT face=Verdana \n' +
'  size=1><A \n' +
'  href="' + baseurl + '?catg=' + prod[pid][3] + '&prod=' + pid + '" target="_top" ><IMG \n' +
'  src="product_images/p' + pid + '.jpg" width=30 \n' +
'  border=0></FONT></A></TD></TR></TABLE></TD>\n' +
'  <TD align=middle><FONT face=Verdana \n' +
'  size=1>' + pid + '</FONT></TD>\n' +
'  <TD align=middle><FONT face=Verdana size=1>10-14 days</FONT></TD>\n' +
'  <TD align=middle width=300><FONT face=Verdana \n' +
'  color=#772120 size=1><B>' + prod[pid][0] + 
'  </B></FONT></FONT></TD>\n' +
'  <TD class=cartlineitem align=center><FONT \n' +
'  face=Verdana size=1>$' + prod[pid][2] + '</FONT></TD>\n' +
'  <TD align=middle><FONT face=Verdana \n' +
'  size=1><INPUT class=textbox id=qtext' + i + ' maxLength=3 \n' +
'  size=2 value="' + num + '" name=qtext' + i + '  onKeyPress="return parent.check_input(event);" ></FONT></TD>\n' +
'  <TD class=cartlineitem align=right><FONT \n' +
'  face=Verdana size=1>$' + (eval ( num * prod[pid][2] )) + '</FONT></TD>\n' +
'  <TD align=middle><INPUT id=checkbox' + i + ' \n' +
'  type=checkbox name=checkbox' + i + '></TD></TR>\n' +
'  <TR>\n' +
'  <TD bgColor=#772120 colSpan=8><IMG \n' +
'  src="images/blank.gif"></TD></TR>\n' +
'  <TR>\n' +
'  <TD colSpan=8 width=1 height=4><IMG \n' +
'  src="images/blank.gif"></TD></TR>\n' );

      }
}

function getcatg ( cid, prod ) {
        var i = 0;
        for ( var pid in prod ) {
                if ( prod[pid][3] == cid ) {
                        getcatg_cell ( cid, pid, prod );
                        i = i + 1;
                        //if ( i % 3 == 0 ) {
                        if ( i % catg[cid][3] == 0 ) {
                                document.write ("</tr>\n<tr>\n");
                        }
                }
        }
        return i;
}

function getcatg_cell ( cid, pid, prod ) {
        var url = baseurl + '?catg=' + cid + '&prod=' + pid ;
        var copyright_align = "center";
        var copyright = 'Copyright Christo ('+ prod [ pid ] [4] + ')';
        if(pid == 'GPCP2004' || cid == 39 || cid == 40) copyright = prod [ pid ] [4];  
        if(cid == 42){
           copyright = prod [ pid ] [4];  
           copyright_align = "left";
        }
        var sizestr = 'Size (inches): '+ prod [ pid ] [1];
        if( pid == 'GPCP2004' ) sizestr = "";
        if( cid == 42 ) sizestr = "&nbsp;";
        if( cid == 40) sizestr = 'Please allow 6-8 weeks for book shipment.<br>Question? Email us <a href="mailto:info@nurturenaturepress.com">info@nurturenaturepress.com</a>';
        var price_str = "Price:";
        var price_num = prod[ pid ][2];
        var sh_str = "";
        var cell_prop = "width=204 valign=bottom";
        if(cid == 39){
           sizestr = '<br><a href="http://www.nnyn.org/events1.html">Back to the Manifest Destiny Event</a>';
           price_str = "Signed Poster:";
           cell_prop = "valign=bottom colspan="+catg[cid][3];
        }
        if(cid == 40){
           cell_prop = "valign=bottom colspan="+catg[cid][3]+" style=\"padding-left:120;padding-right:120\" ";
           sh_str = "<br>Shipping + Handling $12.50";
        }
 
        var font_size = 1;
        if(cid == 42){
           cell_prop = "valign=top";
           if( catg[42][3] == 2 ) cell_prop += " width=50%";
           font_size = 3;
           price_num = prod[ pid ][1];
        }
        var pimg_str;
        var pnm_str;
        if( typeof(prod[ pid ][8]) != "undefined" && prod[ pid ][8] == "soldout"){
           pimg_str = '<img width=160 src="product_images/sop' + pid + '.jpg" border=0> \n'; 
           pnm_str  = '<font face="Verdana" size="'+font_size+'"><b>' +
                      prod[ pid ] [0] + '</b></font>';
        }else{
           pimg_str = '<a href="' + url + '"><img width=160 src="product_images/p' + pid + '.jpg" border=0></a> \n'; 
           pnm_str  = '<a href="' + url + '" class="greylinks"><font face="Verdana" size="'+font_size+'"><b>' +
                      prod[ pid ] [0] + '</b></font></a>';
        }
        var photo_str = "";
        var photo_align = "center";
        if ( prod [pid] [5] &&  prod [pid] [5].length > 0 ) {
          if( cid == 42 ) {
            photo_str =  prod [pid] [5];
            photo_align = "left";
          }else{
            photo_str = 'Photo by ' + prod [pid] [5];
          }
        }


        document.write (
'                                     <td ' + cell_prop + ' align=center> \n' +
' \n' +
'                                       <table border="0" cellspacing="1" cellpadding="0" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" valign=bottom> \n' +
'                                         <tr> \n' +
'                                           <td align="middle" valign= "center"> \n' +
' \n' +
'                                             <table border="0" cellspacing="1" cellpadding="0" width="150" style="BORDER-COLLAPSE: collapse" bordercolor="#CCCCCC"> \n' +
'                                               <tr> \n' +
'                                                 <td align="middle" valign= "center"> \n' + pimg_str +
'                                                 </td> \n' +
'                                               </tr> \n' +
'                                             </table> \n' +
' \n' +
'                                           </td> \n' +
'                                         </tr> \n' +
'                                         <tr>  \n' +
'                                           <td align="center">' + pnm_str + 
'                                           </td> \n' +
'                                         </tr> \n' +
'                                         <tr>  \n' +
'                                  <td  class="productdisplay" align="center"><font face="Verdana" size="'+font_size+'">Product Code:  <b>#' +
pid + '</b></font></td> \n' +
'                                         </tr> \n' +
'                                         <tr>  \n' +
'                                           <td align="center" class="productdisplay"><font face="Verdana" size="'+font_size+'"></font></td> \n' +
'                                         </tr> \n' +
'                                         <tr>  \n' +
'                                           <td class="productdisplay"  align="center"><font face="Verdana" size="'+font_size+'">'+price_str+' <font color=#FF0000><b>$'+
price_num + '</b></font>'+sh_str+'</td> \n' +
'                                         </tr> \n' +
'                                         <tr> \n' +
'                                           <td colspan="2"><div class="productpagedisplayavail" align="'+copyright_align+'"><font face="Verdana" size="'+font_size+'">'+copyright + '</font></td> \n' +
'                                         </tr> \n' +
'                                         <tr> \n' +
'                                           <td colspan="2"><div class="productpagedisplayavail" align="center"><font face="Verdana" size="'+font_size+'">'+sizestr + '</font></td> \n' +
'                                         </tr> \n' +
'                                         <tr> \n' +
'                                           <td  align="'+photo_align+'"><font face="Verdana" size="'+font_size+'" >'+photo_str+
'</font></td> \n' +
'                                         </tr> \n' +
'                                         <tr>  \n' +
'                                           <td class="productdisplay"  colspan="2" valign="bottom" align="middle"></td> \n' +
'                                         </tr> \n' +
'                                       </table> \n' +
'                                     </td> \n'
);

}

function check_input(e) {
  var keyCode = (e.keyCode) ? e.keyCode : e.which;
    if( (keyCode > 47 && keyCode < 58) || keyCode == 0 || keyCode == 8 ) {
             return true;
    }else{
         return false;
    }
}

function writecart () {

var iframe_base = window.location.href.substring(0, window.location.href.lastIndexOf("/") + 1);

var discount_text = "";
if(discount_offer) discount_text = ''+
'                    <tr> \n' +
'                      <td bgcolor="#EFBE4A" style="padding:10"> \n' + 
'<FONT face="Arial, Helvetica, sans-serif" size="2">Your 15% discount will be deducted from your purchase total when you check out.</FONT>' +
'                      </td> \n' +
'                    </tr> \n'; 

window.shopping_cart.document.open("text/html");
window.shopping_cart.document.write(
'<html><head><title>shopping cart</title>\n' +
'<base href="' + iframe_base + '" >\n' +
'</head><body bgcolor="#EFBE4A">\n' +
'                  <table border="0" cellpadding="0" cellspacing="0" width=616> \n' +
'<!--                    <tr> \n' +
'                      <td bgcolor="#D3D3D5"> \n' +
'                        <img border="0" src="images/back_round.jpg" width="17" height="10"></td> \n' +
'                    </tr>--> \n' +
discount_text +
'                    <tr> \n' +
'                      <td bgcolor="#EFBE4A"> \n' +
' \n' +
'                        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber1"> \n' +
'                          <tr> \n' +
'                            <td><img border="0" src="images/' +
'hd_shoppingcart.jpg"></td> \n' +
'                          </tr> \n' +
'                        </table> \n' +
' \n' +
'                      </td> \n' +
'                    </tr> \n' +
'                    <tr> \n' +
'                      <td> \n' +
' \n' +
'                        <!-- Main Page Start --> \n' +
' \n' +
'                          <div align="center"> \n' +
'                          <center> \n' +
' \n' +
'                          <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber2"> \n' +
'                            <tr> \n' +
'                              <td> \n' +
'                               <div align="center"> \n' +
'                               <center> \n' +
' \n' +
' \n' +
'<!-- Start of shopping cart -->  \n' +
'                                 <table border="0" width="100%" valign="top" align="left" cellpadding="2" cellspacing="3" ID="Table1"> \n' +
'                                   <tr> \n' +
'<tr><td colspan=2>\n' +
'<DIV align=center>\n' +
'<CENTER>\n' +
'<FORM name=form1 action="" method=post>\n' +
'<TABLE id=Table1 cellSpacing=0 cellPadding=0 \n' +
'width=614 border=0>\n' +
'  <TR>\n' +
'  <TD><FONT face=verdana color=red size=1></FONT>\n' +
'  <TABLE id=AutoNumber2 \n' +
'  style="BORDER-COLLAPSE: collapse" cellSpacing=0 \n' +
'  cellPadding=0 width="100%" border=0>\n' +
'  <TR>\n' +
'  <TH class=cartheader bgColor=#EFBE4A><FONT \n' +
'  face=Verdana \n' +
'  size=1><NOBR>IMG</NOBR></FONT></TH>\n' +
'  <TH class=cartheader bgColor=#EFBE4A><FONT \n' +
'  face=Verdana size=1><NOBR>ITEM \n' +
'  #</NOBR></FONT></TH>\n' +
'  <TH class=cartheader bgColor=#EFBE4A><FONT \n' +
'  face=Verdana size=1><NOBR>SHIPS \n' +
'  IN</NOBR></FONT></TH>\n' +
'  <TH class=cartheader bgColor=#EFBE4A><FONT \n' +
'  face=Verdana \n' +
'  size=1><NOBR>DESCRIPTION</NOBR></FONT></TH>\n' +
'  <TH class=cartheader bgColor=#EFBE4A><FONT \n' +
'  face=Verdana size=1><NOBR>PRICE \n' +
'  PER</NOBR></FONT></TH>\n' +
'  <TH class=cartheader bgColor=#EFBE4A><FONT \n' +
'  face=Verdana size=1><NOBR>QTY</NOBR></FONT></TH>\n' +
'  <TH class=cartheader bgColor=#EFBE4A><FONT \n' +
'  face=Verdana size=1><NOBR>SUB \n' +
'  TOTAL</NOBR></FONT></TH>\n' +
'  <TH class=cartheader bgColor=#EFBE4A><FONT \n' +
'  face=Verdana \n' +
'  size=1><NOBR>REMOVE</NOBR></FONT></TH></TR>\n' +
'  <TD bgColor=#772120 colSpan=8><IMG \n' +
'  src="images/blank.gif"></TD></TR>\n' +
'  <TR>\n' );

print_cart ();
var siteid = Get_Cookie ( 'forty_siteid' );

var sitestr = "";
if ( siteid && siteid.length > 0 ) {
        sitestr = "&siteid=" + escape(siteid);
}
var btotal = gtotal;
var discount = 0;
var dis_str = "";
if(special_offer || discount_offer){
  discount =  Math.round(100 * (0.15 * gtotal)) / 100;
  gtotal = btotal - discount;
  dis_str = '  <TR>\n' +
'  <TD class=cartlineitemB width="100%" colSpan=4 \n' +
'  ></TD>\n' +
'  <TD class=cartlineitemB align=right colSpan=3 \n' +
'  height=10><B><FONT face=Verdana size=1>15% Discount \n' +
'  &nbsp; -$' + discount + '</FONT></B></TD>\n' +
'  <TD height=10>&nbsp;</TD></TR>\n';
}

var urlstr = "/nnyn/gate.cgi?price=" + gtotal + "&desc=" + escape (cval) +
        sitestr;

window.shopping_cart.document.write (
'  <TR>\n' +
'  <TD class=cartlineitemB align=right width="100%" \n' +
'  colSpan=8><A href="javascript:parent.update();"><IMG \n' +
'  alt="Update Changes" \n' +
'  src="images/bt_update.gif" border=0 \n' +
'  name=image1></A> \n' +
'  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \n' +
'  <A href="javascript:parent.update();"><IMG id=image2 \n' +
'  alt=Remove src="images/bt_remove.gif" \n' +
'  border=0 name=image2></A> </TD></TR>\n' +
'  <TR>\n' +
'  <TD class=cartlineitemB width="100%" colSpan=4 \n' +
'  ></TD>\n' +
'  <TD class=cartlineitemB align=right colSpan=3 \n' +
'  height=10><B><FONT face=Verdana size=1>Product \n' +
'  SubTotal &nbsp; $' + btotal + '</FONT></B></TD>\n' +
'  <TD height=10>&nbsp;</TD></TR>\n' + dis_str +
'</TABLE></CENTER></DIV></TD></TR>\n' +
'  <TR>\n' +
'  <TD>\n' +
'  <TABLE id=Table6 cellSpacing=0 cellPadding=0 \n' +
'  width="100%" border=0>\n' +
'<TR bgColor=#EFBE4A>\n' +
'<TD class=cartlineitemB align=right \n' +
'bgColor=#EFBE4A colSpan=4>&nbsp;</TD>\n' +
'<TD class=cartlineitemB align=right \n' +
'bgColor=#EFBE4A colSpan=3><FONT face=Verdana \n' +
'size=1><B>GRAND TOTAL &nbsp; $' + gtotal +
'</B></FONT></TD>\n' +
'<TD class=cartlineitemB \n' +
'bgColor=#EFBE4A></TD></TR>\n' +
'  <TR>\n' +
'  <TD colspan=4><BR><A \n' +
'  href="' + baseurl + '" target="_top"><IMG \n' +
'  src="images/bt_contshopping.gif" \n' +
'  border=0></A><IMG height=1 alt="" \n' +
'  src="images/blank.gif" \n' +
'  width=1 border=0></TD>\n' +
'  <TD align=right colspan=4><BR>');

if ( gtotal > 0 ) {
window.shopping_cart.document.write (
'  <A \n' +
'  href="' + urlstr + '"><IMG \n' +
'  alt="continue checkout" \n' +
'  src="images/bt_contchkout.gif" \n' +
'  border=0></A>');
}

window.shopping_cart.document.write (
'  </TD></TR></TABLE>\n' +
' \n' +
'                               </center> \n' +
'                               </div> \n' +
'                <!-- Main Page End --> \n' +
'                              </td> \n' +
'                            </tr> \n' +
'                          </table> \n' +
'<script type="text/javascript">' +
'var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl."' +
': "http://www.");' +
'document.write(unescape("%3Cscript src=\'" \+ gaJsHost \+' + 
'"google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));' +
'</script>' +
'<script type="text/javascript">' +
'try {' +
'var pageTracker = _gat._getTracker("UA-2342435-4");' +
'pageTracker._trackPageview();' +
'} catch(err) {}</script>' +

'                          </body></html> \n' );

window.shopping_cart.document.close ();
}


function product_detail(cid, pid, prod){

document.write(
'                  <table border="0" cellpadding="0" cellspacing="0" width=616>\n' +
'<!--                    <tr>\n' +
'                      <td bgcolor="#D3D3D5">\n' +
'                        <img border="0" src="images/back_round.jpg" width="17" height="10"></td>\n' +
'                    </tr>\n' +
'-->                    <tr>\n' +
'                      <td bgcolor="#EFBE4A">\n' +
'\n' +
'                        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" >\n' +
'                          <tr>\n' +
'                            <td>&nbsp;&nbsp;<img border="0" src="images/hd_prod_details.jpg"></td>\n' +
'                          </tr>\n' +
'                        </table>\n' +
'\n' +
'                      </td>\n' +
'                    </tr>\n' +
'                    <tr>\n' +
'                      <td>\n' +
'\n' +
'<!-- Main Page Start -->\n' +
'\n' +
'                        <div align="center">\n' +
'                        <center>\n' +
'\n' +
'                        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">\n' +
'                          <tr>\n' +
'                            <td class=normal><p align="justify">&nbsp;</p></td>\n' +
'                          </tr>\n' +
'                          <tr>\n' +
'                            <td>\n' +
'                              <div align="center">\n' +
'                              <center>\n' +
'\n' +
'\n' +
'                                <table border="0" width="100%" valign="top" align="left" cellpadding="2" cellspacing="3">\n' +
'                                  <tr>\n' +
'                                    <td width="100%"> \n' +
'                                      <form name=frmProductDetails method=post action="#" ID="Form1">\n'); 
/*
'                                        <input type=hidden name=productID value="' +
pid + '" ID="Hidden1">\n' +

'                                        <input type=hidden name=ImageURL value="p' +
pid + '.jpg" ID="Hidden2">\n' +
'                                        <input type=hidden name=ProductCode value="'+
pid + '" ID="Hidden3">  \n' +
'                                        <input type=hidden name=ProductName value="' +
prod[ pid ][0] + '" ID="Hidden4">\n' +
'                                        <input type=hidden name=Description value="All prints signed by Christo. Prints of completed works signed by Christo and Jeanne-Claude." ID="Hidden5">\n' +
'                                        <input type=hidden name=Price value="'+
prod[ pid ][2] + '" ID="Hidden6">       \n' +
'                                        <input type=hidden name=ShipsIn value="24 Hrs" ID="Hidden7">\n' +
'                                        <input type=hidden name=Mode value="add" ID="Hidden8">\n' +
*/
document.write('\n' +
'                                        <table cellSpacing="0" cellPadding="0" width="100%" border="0" valign="top" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" align="center">\n' +
'                                          <tr>\n' +
'                                            <td vAlign="top" align="right" width=304>\n' +
'\n' +
'                                              <table cellSpacing="0" cellPadding="5" border="0" style="BORDER-COLLAPSE: collapse" bordercolor="#CCCCCC">\n' +
'                                                <tr>\n' +
'                                                  <td align="right">'  );

        if ( prod [ pid ] [6] ) {
            document.write (
        '<a href="' + baseurl + "?catg=" + cid + "&prod=" + pid + '&viewimage='+ pid + '"><IMG src="product_images/p' +
                        pid + '.jpg" width=200 border=0></a>\n' +
        '<table cellSpacing="0" cellPadding="0" width=100%><tr><td align=center>\n' +
'<a href="' + baseurl + "?catg=" + cid + "&prod=" + pid + '&viewimage='+ pid + '"><font face="Verdana" size="1" color=black><b>Click to enlarge image<b></font></td></tr></table></a>'); 
        }else{
            document.write ('<IMG src="product_images/p' +      pid + '.jpg" width=200 border=0>');
        }

document.write('</td>\n' +
'                                                </tr>\n' +
'                                              </table>\n' +
'\n' +
'                                            </td>\n' +
'                                            <td>&nbsp;&nbsp;</td>\n' +
'                                            <td vAlign="top" width=375>\n' +
'\n' +
'                                              <table cellSpacing="3" align=left border=0 width=100%>\n' +
'                                                <tr>\n' +
'                                                  <td class="producttitle"></td>\n' +
'                                                </tr>\n' +
'                                                <tr>\n' +
'                                                  <td>\n' +
'                                                    <div class="productpagedisplay">\n' +
'                                                    <font face="Verdana" size="1"><b>Product Code:</b> #' +
pid + '</font></div><br>\n');

if (pid == '16553') {
        document.write ('<font face="Verdana" size="1">This print has been produced as a part of a Museum exhibition and has been printed on a thin paper stock.</font><br>\n');
}
 
var signed_str = '<b>All prints signed by Christo. Prints of completed works signed by Christo and Jeanne-Claude.</b>';
if(pid == 'GPCP2004') signed_str = prod[ pid ][7];
if(cid == 39 || cid == 40) signed_str = prod[ pid ][4];
if(cid == 42) signed_str = "";
var size_str = '<b>Size:</b> ' + prod[ pid ][1] + '<br>&nbsp;<br>All dimensions in inches.';
if(pid == 'GPCP2004') size_str = prod[ pid ][4];
if(cid == 39 || cid == 42) size_str = "";
if(cid == 40) size_str = 'Please allow 4-6 weeks for book shipment.<br>Shipping + Handling: $12.50<br>Question? Email us <a href="mailto:info@nurturenaturepress.com">info@nurturenaturepress.com</a>';
var price_str = prod[ pid ][2];
if(cid == 42) price_str = prod[ pid ][1];

document.write(
'                                                  </td>\n' +
'                                                </tr>\n' +
'                                                <tr>\n' +
'                                                  <td>\n' +
'                                                    <div class="productdisplayB">\n' +
'                                                    <b>\n' +
'                                                    <font face="Verdana" size="1">' +
prod[ pid ][0] + '</font></b></div>\n' +
'                                                  </td>\n' +
'                                                </tr>\n' +
'                                                <tr>\n' +
'                                                  <td>\n' +
'                                                    <div class="productdisplayB">\n' +
'                                                    <font face="Verdana" size="1">' + signed_str + '</font></div>\n' +
'                                                  </td>\n' +
'                                                </tr>\n' +
'                                                <tr>\n' +
'                                                  <td>\n' +
'                                                    <font face="Verdana" size="1"><b>');

if ( catg [ cid ] [2] && catg [ cid ] [2].length > 0 ) {
        document.write ( catg [ cid ] [2] );
}

document.write ('</b><br></font>\n' +
'                                                    <div class="productdisplayB">\n' +
'                                                    <font face="Verdana" size="1"><br>' + size_str +
'</font></div>\n' +
'                                                  </td>\n' +
'                                                </tr>\n' +
'                                                <tr>\n' +
'                                                  <td><br>\n' +
'                                                    <div class="productpagedisplay">\n' +
'                                                    <font face="Verdana" size="1"><b>Quantity:</b></font></div>\n' +
'                                                  </td>\n' +
'                                                </tr>\n' +
'                                                <tr>\n' +
'                                                  <td>\n' +
'                                                    <div class="productpagedisplayavail">\n' +
'                                                    <font face="Verdana" size="1">\n' +
'                                                    <input class=textbox size=10 name=Quantity type=text maxlength=2 value="1" ID="Text1"  onKeyPress="return check_input(event);" >&nbsp;</font></div>\n' +
'                                                  </td>\n' +
'                                                </tr>\n' +
'                                                <tr>\n' +
'                                                  <td>\n' +
'\n' +
'                                                    <table>\n' +
'                                                      <tr>\n' +
'                                                        <td class="productdisplayB" width="70">\n' +
'                                                          <b><font face="Verdana" size="1">Your Price:</font></b>\n' +
'                                                        </td>\n' +
'                                                        <td class="productpagedisplay" align="right">\n' +
'                                                          <font face="Verdana" size="1">$' + 
price_str + '</font>\n' +
'                                                        </td>\n' +
'                                                      </tr>\n' +
'                                                      <TR>\n' +
'                                                        <TD><font face="Verdana" size="1" color=red></font></TD>\n' +
'                                                      </TR>\n' +
'                                                      <tr>\n' +
'                                                        <td colSpan="2">\n' +
'                                                          <font face="Verdana" size="1">\n' +
'                                                          <IMG height=10 src="images/blank.gif" width=1></font></td>\n' +
'                                                      </tr>\n' +
'                                                      <tr>\n' +
'                                                        <td colSpan="2">\n' +
'                                                          <A href="#"><font face="Verdana" size="1"></font></a></td>\n' +
'                                                      </tr>\n' +
'                                                      <tr>\n' +
'                                                        <td colSpan="2">\n' +
'                                                          <A href="#"><font face="Verdana" size="1"></font></a></td>\n' +
'                                                      </tr>\n' +
'                                                      <tr>\n' +
'                                                        <td colSpan="2">\n' +
'                                                          <A href="javascript:add2cart(\'' + pid +'\')"><font face="Verdana" size="1"><IMG src="images/bt_addtocart.gif" border=0></font></a></td>\n' +
'                                                      </tr>\n' +
'                                                    </table>\n' +
'\n' +
'                                                  </td>\n' +
'                                                </tr>\n' +
'                                              </table>\n' +
'\n' +
'                                            </td>\n' +
'                                          </tr>\n' +
'                                        </table>\n' +
'\n' +
'                                      </form>\n' +
'                                    </td>\n' +
'                                  </tr>\n' +
'                                  <tr>\n' +
'                                    <td colspan=3 align=right><a class=leftlinks href="' + 
baseurl + "?catg=" + cid + '">&lt;&lt; Back to Product Listing</a></td>\n' +
'                                  </tr>\n' +
'                                  <tr>\n' +
'                                    <td><p>&nbsp;</p></td>\n' +
'                                  </tr>\n' +
'                              </tr>\n' +
'                            </table>\n' +
'\n' +
'                            </center>\n' +
'                            </div>\n' +
'\n' +
'<!-- Main Page End -->\n' +
'\n' +
'                          </td>\n' +
'                        </tr>\n' +
'                      </table>\n' );


}


/******************************* 
move todo document.write js from 
index to here
********************************/

function todo_viewcart(){

document.write(
'<div id="shopid" ' +
'style="position:relative;width=645;height:870;border:none"><iframe ' +
'name="shopping_cart" id="shopping_cart" width=645 height="100%" ' +
'frameborder="0" src=""></iframe>' +
'<table><tr></td>');

}

function todo_purchinfo(){

document.write(
'                  <table border="0" cellpadding="0" cellspacing="0" width=616>\n' +
'<!--                    <tr>\n' +
'                      <td bgcolor="#D3D3D5">\n' +
'                        <img border="0" src="images/back_round.jpg" width="17" height="10"></td>\n' +
'                    </tr>\n' +
'-->                    <tr>\n' +
'                      <td bgcolor="#EFBE4A">\n' +
'\n' +
'                        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber1">\n' +'                          <tr>\n' +
'                            <td width=400><img border="0" src="images/hd_purchinfo.jpg"></td>\n' +
'                          </tr>\n' +
'                        </table>\n' +
'\n' +
'                      </td>\n' +
'                    </tr>\n' +
'                    <tr>\n' +
'                      <td>\n' +
'\n' + 
'                        <!-- Main Page Start -->\n' +
'\n' +
'                        <div align="center">\n' +
'                        <center>\n' +
'\n' +
'                        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="94%" id="AutoNumber2">\n' +
'                          <tr>\n' +
'                            <td class=normal>\n' +
'                              <br>\n' +
'                              <p align="justify">\n' +
'                              <b>Pricing</b><br>\n' +
'                              All prices listed are in US dollars.</p>\n' +
'                              <p>&nbsp;</p>\n' +
'                              <p align="justify">\n' +
'                              <b>Return and Exchange Policy</b><br>\n' +
'                              All sales are final and non-refundable.  Artprints are not returnable unless the merchandise arrives damaged.  If your merchandise arrives damaged, please notify our customer service immediately and return the artwork in the original packing tube to our new address as follows:</p>\n' +
'                              <p>\n' +
'                              Nurture New York\'s Nature<br>\n' +
'                              518 Northhampton Street, Ste 501<br>\n' +
'                              Easton, PA  18042<br>\n' +
'                              &nbsp; Attn: Rachel Hogan<br>\n' +
'                              &nbsp; Tel: (610) 253-4432<br>\n' +
'                              email: <a href="mailto:artprints@nnyn.org">artprints@nnyn.org</a>\n' +
'                              <p>&nbsp;</p>\n' +
'                              <p align="justify">\n' +
'                              <b>Sales Tax</b><br>\n' +
'                              Orders purchased at the Nurture New York\'s Nature or shipped within New York State are subject to the appropriate sales tax. Sales tax will be computed after any shipping and handling charges are added, if applicable.</p>\n' +
'                              <p>&nbsp;</p>\n' +
'                              <p align="justify">\n' +
'                              <b>Shipping (US and Canada)</b><br>\n' +
'                              All prints are shipped (and insured) via UPS.  Please allow seven business days for processing and delivery.  You will be notified immediately if your order is out of stock and on reorder or will take more than seven business days to arrive.</p>\n' +
'                              <p>\n' +

'                               <table border="1" bordercolor="black" cellspacing="1" style="border-collapse: collapse; border: medium none">\n' +
'                                                                       <tr>\n' +
'                                                                               <td width="109" valign="top" class=normal>Print Quantity</td>\n' +
'                                                                               <td width="168" valign="top" class=normal>To the contiguous USA (UPS 3 Day Shipping)</td>\n' +
'                                                                               <td width="166" valign="top" class=normal>To Alaska, Hawaii, and other US Territories (UPS 3 Day Shipping)</td>\n' +
'                                                                       </tr>\n' +
'                                                                       <tr>\n' +
'                                                                               <td width="109" valign="top" class=normal>1</td>\n' +
'                                                                               <td width="168" valign="top" class=normal>$12.50</td>\n' +
'                                                                               <td width="166" valign="top" class=normal>$20.95</td>\n' +
'                                                                       </tr>\n' +
'                                                                       <tr>\n' +
'                                                                               <td width="109" valign="top" class=normal>2</td>\n' +
'                                                                               <td width="168" valign="top" class=normal>$11.95</td>\n' +
'                                                                               <td width="166" valign="top" class=normal>$21.95</td>\n' +
'                                                                       </tr>\n' +
'                                                                       <tr>\n' +
'                                                                               <td width="109" valign="top" class=normal>3</td>\n' +
'                                                                               <td width="168" valign="top" class=normal>$20.95</td>\n' +
'                                                                               <td width="166" valign="top" class=normal>$30.95</td>\n' +
'                                                                       </tr>\n' +
'                                                                       <tr>\n' +
'                                                                               <td width="109" valign="top" class=normal>4</td>\n' +
'                                                                               <td width="168" valign="top" class=normal>$21.95</td>\n' +
'                                                                               <td width="166" valign="top" class=normal>$31.95</td>\n' +
'                                                                       </tr>\n' +
'                                                                       <tr>\n' +
'                                                                               <td width="109" valign="top" class=normal>5</td>\n' +
'                                                                               <td width="168" valign="top" class=normal>$30.95</td>\n' +
'                                                                               <td width="166" valign="top" class=normal>$40.95</td>\n' +
'                                                                       </tr>\n' +
'                                                                       <tr>\n' +
'                                                                               <td width="109" valign="top" class=normal>6</td>\n' +
'                                                                               <td width="168" valign="top" class=normal>$31.95</td>\n' +
'                                                                               <td width="166" valign="top" class=normal>$41.95</td>\n' +
'                                                                       </tr>\n' +
'                                                                       <tr>\n' +
'                                                                               <td width="109" valign="top" class=normal>7</td>\n' +
'                                                                               <td width="168" valign="top" class=normal>$40.95</td>\n' +
'                                                                               <td width="166" valign="top" class=normal>$50.95</td>\n' +
'                                                                       </tr>\n' +
'                                                                       <tr>\n' +
'                                                                               <td width="109" valign="top" class=normal>8</td>\n' +
'                                                                               <td width="168" valign="top" class=normal>$41.95</td>\n' +
'                                                                               <td width="166" valign="top" class=normal>$51.95</td>\n' +
'                                                                       </tr>\n' +
'                                                                       <tr>\n' +
'                                                                               <td width="109" valign="top" class=normal>9</td>\n' +
'                                                                               <td width="168" valign="top" class=normal>$50.95</td>\n' +
'                                                                               <td width="166" valign="top" class=normal>$60.95</td>\n' +
'                                                                       </tr>\n' +
'                                                                       <tr>\n' +
'                                                                               <td width="109" valign="top" class=normal>10</td>\n' +
'                                                                               <td width="168" valign="top" class=normal>$51.95</td>\n' +
'                                                                               <td width="166" valign="top" class=normal>$61.95</td>\n' +
'                                                                       </tr>\n' +
'                               </table>\n' +
'                               <p>\n' +
'                               <p align="justify">\n' +
'                               For orders of 10 prints or more, please contact Customer Service to make special shipping arrangements.</p>\n' +'                               <p>\n' +
'                               <p align="justify">\n' +
'                               (NNYN is not responsible for customs charges on artwork sent overseas.)</p>'+
'<!--                               <p align="justify">\n' +
'                               If you would like to arrange for express delivery or other special shipping services,  please contact Customer Service.  For most express delivery requests, there will be an <i>additional</i> $15 flat fee.</p>\n' + 
'                               <p>\n' +
'                               <p align="justify">\n' +
'                               Customers are welcome to pick up their order at the Nurture New York\'s Nature at no charge. Please call the Nurture New York\'s Nature at 212.573.6968 to set up an appointment.</p>\n' +
'                              <p>&nbsp;</p>\n' +
'                              <p align="justify">\n' +
'                              <b>International Shipping (aside from Canada)</b><br>\n' +
'                              We will ship your order to any location around the world. Recipients are responsible for duties and taxes.  Please contact Customer Service to arrange for shipping outside the US and Canada.</p>\n' +
'                              <p>&nbsp;</p>\n' +
'                              <p align="justify">\n' +
'                              <b>Nonprofit/NGO Organizations</b><br>\n' +
'                              All sales to qualified not-for-profit or non-governmental organizations (NGO) will be tax-exempt.  Please contact Customer Service to register as a not-for-profit or non-governmental organization customer of the Nurture New York\'s Nature.</p>\n' +
'                              <p>&nbsp;</p>\n' +
'                              <p align="justify">\n' +
'                              <b>Corporate Gifts</b><br>\n' +
'                              The Christo and Jeanne-Claude hand-signed art prints are available for corporate gifts.  Please contact Customer Service at the Nurture New York\'s Nature (212.573.6968) to inquire about purchasing prints for corporate gifts.</p>\n' +
'                              <p>&nbsp;</p>\n' +
'                              <p align="justify">\n' +
'                              <b>Custom Framing</b><br>\n' +
'                              The Nurture New York\'s Nature offers custom framing for any art prints purchased.  Please contact Customer Service for details.</p>\n' +
'                              <p>&nbsp;</p>\n' +
'                              <p align="justify">\n' +
'                              <b>Exhibition</b><br>\n' +
'                              You are welcome to come view the prints in the exhibition, "Christo and Jeanne-Claude 40 Years of Public Art" or to purchase prints in-person. Please call the Nurture New York\'s Nature (212.573.6968) to set up an appointment.</p>\n' +
'-->                              <p>&nbsp;</p>\n' +
'                            </td>\n' +
'                          </tr>\n' +
'                        </table>\n' +
'\n' +
'                        </center>\n' +
'                        </div>\n' +
'                <!-- Main Page End -->\n');

}


function todo_privacy(){

document.write(
'                  <table border="0" cellpadding="0" cellspacing="0" width=616>\n' +
'<!--                    <tr>\n' +
'                      <td bgcolor="#D3D3D5">\n' +
'                        <img border="0" src="images/back_round.jpg" width="17" height="10"></td>\n' +
'                    </tr>\n' +
'-->                    <tr>\n' +
'                      <td bgcolor="#EFBE4A">\n' +
'\n' +
'                        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber1">\n' +'                          <tr>\n' +
'                            <td width=400><img border="0" src="images/hd_privacy.jpg"></td>\n' +
'                          </tr>\n' +
'                        </table>\n' +
'\n' +
'                      </td>\n' +
'                    </tr>\n' +
'                    <tr>\n' +
'                      <td>\n' +
'\n' +
'                        <!-- Main Page Start -->\n' +
'\n' +
'                        <div align="center">\n' +
'                        <center>\n' +
'\n' +
'                        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="94%" id="AutoNumber2">\n' +
'                          <tr>\n' +
'                            <td class=normal>\n' +
'                              <br>\n' +
'                              <p align="justify">\n' +
'                              Nurture New York\'s Nature is strongly committed to protecting the privacy of its online customers.   We only require the information necessary to fulfill your order, and your information will never be shared, sold or rented to third parties.  Credit card payments are secure.</p>\n' +
'                              <p>&nbsp;</p>\n' +
'                              <p>&nbsp;</p>\n' +
'                              <p>&nbsp;</p>\n' +
'                              <p>&nbsp;</p>\n' +
'                              <p>&nbsp;</p>\n' +
'                            </td>\n' +
'                          </tr>\n' +
'                        </table>\n' +
'\n' +
'                        </center>\n' +
'                        </div>\n' +
'                <!-- Main Page End -->\n');

}


function todo_contactus(){

document.write(
'                  <table border="0" cellpadding="0" cellspacing="0" width=616>\n' +
'<!--                    <tr>\n' +
'                      <td bgcolor="#D3D3D5">\n' +
'                        <img border="0" src="images/back_round.jpg" width="17" height="10"></td>\n' +
'                    </tr>\n' +
'-->                    <tr>\n' +
'                      <td bgcolor="#EFBE4A">\n' +
'\n' +
'                        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber1">\n' +'                          <tr>\n' +
'                            <td width=400><img border="0" src="images/hd_contact.jpg"></td>\n' +
'                          </tr>\n' +
'                        </table>\n' +
'\n' +
'                      </td>\n' +
'                    </tr>\n' +
'                    <tr>\n' +
'                      <td>\n' +
'\n' +
'                        <!-- Main Page Start -->\n' +
'\n' +
'                        <div align="center">\n' +
'                        <center>\n' +
'\n' +
'                        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="94%" id="AutoNumber2">\n' +
'                          <tr>\n' +
'                            <td class=normal>\n' +
'                              <br>\n' +
'                              <b>Nurture New York\'s Nature<br>Art Print Sales</b>\n' +
'                              <blockquote>\n' +
'                              <p>\n' +
'                              Nurture New York\'s Nature - Art Prints<br>\n' +
'                              Rachel Hogan<br>\n' +
'                              518 Northhampton Street<br>\n' +
'                              Easton, PA  18042<br>\n' +
'                              Tel: (610) 330-0876<br>\n' +
'                              email: <a href="mailto:artprints@nnyn.org">artprints@nnyn.org</a>\n' +
'                              </blockquote>\n' +
'                              <p>&nbsp;</p>\n' +
'                            </td>\n' +
'                          </tr>\n' +
'                        </table>\n' +
'\n' +
'                        </center>\n' +
'                        </div>\n' +
'                <!-- Main Page End -->\n');

}


function todo_default40(){

document.write (
'                  <table border="0" cellpadding="0" cellspacing="0" width=616>\n' +
'<!--                    <tr>\n' +
'                      <td bgcolor="#D3D3D5">\n' +
'                        <img border="0" src="images/back_round.jpg" width="17" height="10"></td>\n' +
'                    </tr>\n' +
'-->                    <tr>\n' +
'                      <td bgcolor="#EFBE4A">\n' +
'\n' +
'                        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber1">\n' +'                          <tr>\n' +
'                            <td width=400 height=15><img src="images/40header1.jpg" border=0></td>\n' +
'                          </tr>\n' +
'                        </table>\n' +
'\n' +
'                      </td>\n' +
'                    </tr>\n' +
'                    <tr>\n' +
'                      <td>\n' +
'\n' +
'                        <!-- Main Page Start -->\n' +
'\n' +
'                          <div align="center">\n' +
'                          <center>\n' +
'\n' +
'                          <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber2">\n' +
'                            <tr>\n' +
'                              <td class=normal><p align="justify"></td>\n' +
'                            </tr>\n' +
'                            <tr>\n' +
'                              <td>\n' +
'                                &nbsp;\n' +
'                              </td>\n' +
'                            </tr>\n' +
'                            <tr>\n' +
'                              <td>\n' +
'                              <center>\n' +
'                                <table border=0 width=152>\n' +
'                                  <tr>\n' +
'                                    <td>\n' +
'                                      <img src="images/40yrshm.jpg" border=0 usemap="#map1">\n' +
'                                      <map name="map1">\n' +
'                                        <area shape="rect" coords="0,0,153,152" href="http://www.nnyn.org" target="_blank" alt="Go to Nurture New York\'s Nature" title="Go to Nurture New York\'s Nature">\n' +
'                                        <area shape="rect" coords="153,0,496,152" href="index.html?catg=3" alt="Go to Gates Artprints" title="Go to Gates Artprints">\n' +
'                                      </map>\n' +
'                                      <br>\n' +
'                                      <img src="images/40header2.jpg" border=0>\n' +
'                                    </td>\n' +
'                                  </tr>\n' +
'                                  <tr>\n' +
'                                    <td class=normal>\n' +
'                                <font color="#6699CC"><p>The artists Christo and Jeanne-Claude have generously donated signed art prints from their 40 year career to the non-profit organization Nurture New York\'s Nature. The proceeds from the sale of these art prints will be used exclusively to benefit Nurture New York\'s Nature initiatives.</p>\n' +
'<p><a href="index.html?catg=3">Click here</a> to see the new Gates Project for Central Park artprints and to take advantage of the special offer.</p></font>\n' +
'                                    </td>\n' +
'                                  </tr>\n' +
'                                  <tr>\n' +
'                                    <td>\n' +
'                                      <p>&nbsp;</p>\n' +
'                                    </td>\n' +
'                                  </tr>\n' +
'                                  <tr>\n' +
'                                    <td>\n' +
'                                      <center><img src="images/netproceeds.jpg" border=0></center>\n' +
'                                    </td>\n' +
'                                  </tr>\n' +
'                                  <tr>\n' +
'                                    <td>\n' +
'                                      <p>&nbsp;</p>\n' +
'                                    </td>\n' +
'                                  </tr>\n' +
'                                </table>\n' +
'                              </center>\n' +
'                              </td>\n' +
'                            </tr>\n' +
'                          </table>\n' );


}


function todo_catgnoprod(){

var special_str = "";
if(special_offer){
   special_str = "<tr><td style=\"padding-left:10px;padding-right:10px;padding-top:10px;text-align:justify;\"><font color=\"#000000\" face=\"Arial, Helvetica, sans-serif\" size=\"2\">As a special thank you to our many supporters, Nurture New York's Nature is pleased to offer a special 15% discount on all Christo and Jeanne-Claude and Rauschenberg prints advertised on its website for the holidays.</font></td></tr><tr><td style=\"padding-left:10px;padding-right:10px;padding-top:10px;text-align:justify;\"><font color=\"#000000\" face=\"Arial, Helvetica, sans-serif\" size=\"2\">HAPPY HOLIDAYS and thanks again for your support! The 15% discount will be noted at checkout.</font></td></tr><tr><td style=\"padding-left:10px;padding-right:10px;padding-top:10px;text-align:justify;\"><font color=\"#000000\" face=\"Arial, Helvetica, sans-serif\" size=\"2\">We are currently moving our fulfillment to Pennsylvania, during the next two weeks please allow extra time for delivery. We apologize for the inconvenience.</font></td></tr>";
}

var catg_header = 
'                        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber1"> \n' +
'                          <tr> \n' +
'                            <td>&nbsp;&nbsp;<img border="0" src="images/' +
catg[ qstr["catg"] ] [1] + '"></td> \n' +
'                          </tr> \n' +
'                          <tr> \n' +
'                            <td style="padding-left:10px;padding-right:10px;text-align:justify;"> \n' +
'<font color=\"#000000\" face=\"Arial, Helvetica, sans-serif\" size=\"2\">'+
"<!--The artists Christo and Jeanne-Claude have generously donated signed art prints from their 40 year career to the non-profit organization Nurture New York's Nature. The proceeds from the sale of these art prints will be used exclusively to benefit Nurture New York's Nature initiatives." +
"Nurture New York's Nature (NNYN) is an authorized vendor of hand-signed art prints by Christo and Jeanne-Claude, as noted on their website (www.christojeanneclaude.net). The artists have generously donated signed art prints from their 40-year career to NNYN with all proceeds to be used exclusively to support our <a href=\"../programs.html\">programs</a>.-->" +
"Nurture New York's Nature (NNYN) is the proud recipient of an exclusive, world-wide, royalty free license from the artists, Christo and Jeanne-Claude, to produce events and programs commemorating their work of art, <i><b>The Gates, Central Park, New York City 1979 - 2005</b></i>. In that connection, the artists have generously donated signed <i><b>Gates</b></i> and other art prints from their 40 year career to support NNYN's programs. The net proceeds from sales are used to help protect and restore the City's natural environment and to create public awareness of the importance of those undertakings to the health and well-being of the City's inhabitants.  (See also <a href='http://www.christojeanneclaude.net' target='_blank'>www.christojeanneclaude.net</a>).<p>To order by internet, click below. To order by fax or mail, see information at the bottom of this page. " +
'</font>'+
'                            </td> \n'+
'                          </tr> \n' +
special_str +
'                        </table> \n';

var note_str =
'                                  <tr> \n' +
'                                     <td colspan='+catg[qstr["catg"]][3]+' style="padding-left:10px;padding-right:10px"><p><font color="#000000" face="Arial, Helvetica, sans-serif" size="2"><b>Note: Please see our <a href="../faq.html">FAQ</a> for any questions regarding the art prints.<br>&nbsp;<br></p></b></font> \n' +
'                                     </td> \n' +
'                                   </tr>\n';

if ( qstr["catg"] == 39 || qstr["catg"] == 40 || qstr["catg"] == 42) catg_header = "";
if ( qstr["catg"] == 41 ) {
    catg_header =
'                        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber1"> \n' +
'                          <tr> \n' +
'                            <td>&nbsp;&nbsp;<img border="0" src="images/' +
catg[ qstr["catg"] ] [1] + '"></td> \n' +
'                          </tr> \n' +
'                          <tr> \n' +
'                            <td style="padding-left:10px;padding-right:10px"> \n' +
"As a special thanks to our many supporters, Nurture New York's Nature would like to offer three select signed Gates prints at a special price of $250. All proceeds will be used to continue to support NNYN's programs; the artists receive no proceeds from these sales. Please visit our <a href=\"../faq.html\">FAQ</a> section for answers to specific questions."+
"<br><br>Thanks again for your support of Nurture New York's Nature." +
'                            </td> \n'+
'                          </tr> \n' +
'                        </table> \n';
    note_str = "";
}
if ( qstr["catg"] == 43 ) {
    catg_header = ''+
'                        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber1"> \n' +
'                          <tr> \n' +
'                            <td>&nbsp;&nbsp;<img border="0" src="images/' +
catg[ qstr["catg"] ] [1] + '"></td> \n' +
'                          </tr> \n' +
'                          <tr> \n' +
'                            <td style="padding-left:10px;padding-right:10px"> \n' +
"In Celebration of the Commemorative 1 Year Anniversary of Christo & Jeanne-Claude<br>The Gates, Central Park, New York City, 1979-2005" +
'                            </td> \n'+
'                          </tr> \n' +
'                        </table> \n';
}

document.write(
'                  <table border="0" cellpadding="0" cellspacing="0" width=616> \n' +
'<!--                    <tr> \n' +
'                      <td bgcolor="#D3D3D5"> \n' +
'                        <img border="0" src="images/back_round.jpg" width="17" height="10"></td> \n' +
'                    </tr> \n' +
'-->                    <tr> \n' +
'                      <td bgcolor="#EFBE4A"> \n' +
' \n' + catg_header +
' \n' +
'                      </td> \n' +
'                    </tr> \n' +
'                    <tr> \n' +
'                      <td> \n' +
' \n' +
'                        <!-- Main Page Start --> \n' +
' \n' +
'                          <div align="center"> \n' +
'                          <center> \n' +
' \n' +
'                          <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber2"> \n' +
' <!--                           <tr> \n' +
'                              <td class=normal><p align="justify"></td> \n' +
'                            </tr> \n' +
' -->                           <tr> \n' +
'                              <td align=center> \n' +
'                                <BR> \n' +
'                                <font face=verdana size=2>' +
catg[ qstr["catg"] ] [2] + '</font> \n' +
'                                <br> \n' + snote + 
'                              </td> \n' +
'                            </tr> \n' +
'                            <tr> \n' +
'                              <td> \n' +
'                               <div align="center"> \n' +
'                               <center> \n' +
' \n' +
' \n' +
'<!-- Start of art work -->  \n' +
'<!-- art work category title, art count --> \n' +
'                                 <table border="0" width="100%" valign="top" align="left" cellpadding="2" cellspacing="3" ID="Table1"> \n' +
note_str+
'                                   <tr> \n' +
'                                     <td class="galllerytitles" align="left" colspan='+catg[ qstr["catg"] ] [3]+' style="padding-left:10px"> \n' +
'                                       <font class="leftlinks"><font color="#666699">' +
catg[ qstr["catg"] ] [0] + ' <span class="productpagedisplay">(' +
artprints + ')</span></font></font> \n' +
'                                     </td> \n' +
'                                   </tr> \n' +
'                                   <tr> \n' +
'<!-- art table row1, col1 --> \n' );


if (qstr["catg"] == 37 )
getcatg ( qstr["catg"], prodh );
else
getcatg ( qstr["catg"], prod );

document.write (
'                                   </tr> \n' +
'                                   <tr> \n' +
'                                   </tr> \n' +
'<!-- End of art table --> \n' +
'                                   <tr> \n' +
'                                   </tr> \n' +
'                                 </table> \n' +
' \n' +
'                               </center> \n' +
'                               </div> \n' +
'                <!-- Main Page End --> \n' +
'                              </td> \n' +
'                            </tr> \n' +
'                          </table> \n' );


}


function todo_viewimage(){

document.write(
'                  <table border="0" cellpadding="0" cellspacing="0" width=616>\n' +
'<!--                    <tr>\n' +
'                      <td bgcolor="#D3D3D5">\n' +
'                        <img border="0" src="images/back_round.jpg" width="17" height="10"></td>\n' +
'                    </tr>\n' +
'-->                    <tr>\n' +
'                      <td bgcolor="#EFBE4A">\n' +
'\n' +
'                        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" >\n' +
'                          <tr>\n' +
'                            <td>&nbsp;&nbsp;<img border="0" src="images/hd_prod_details.jpg"></td>\n' +
'                          </tr>\n' +
'                        </table>\n' +
'\n' +
'                      </td>\n' +
'                    </tr>\n' +
'                    <tr>\n' +
'                      <td>\n' +
'\n' +
'<!-- Main Page Start -->\n' +
'\n' +
'                        <div align="center">\n' +
'                        <center>\n' +
'\n' +
'                        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">\n' +
'                          <tr>\n' +
'                            <td class=normal><p align="justify">&nbsp;</p></td>\n' +
'                          </tr>\n' +
'                          <tr>\n' +
'                            <td>\n' +
'                              <div align="center">\n' +
'                              <center>\n' +
'\n' +
'\n' +
'                                <table border="0" width="100%" valign="top" align="left" cellpadding="2" cellspacing="3">\n' +
'                                  <tr>\n' +
'                                    <td width="100%"> \n' +
'                                        <table cellSpacing="0" cellPadding="0" width="100%" border="0" valign="top" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" align="center">\n' +
'                                          <tr>\n' +
'                                            <td vAlign="top" align="center" >\n' +
'\n' +
'                                              <table cellSpacing="0" cellPadding="5" border="0" style="BORDER-COLLAPSE: collapse" bordercolor="#CCCCCC">\n' +
'                                                <tr>\n' +
'                                                  <td align="right"><IMG src="product_images/lp' +
        pid + '.jpg" border=0></td>\n' +
'                                                </tr>\n' +
'                                              </table>\n' +
'\n' +
'                                            </td>\n' +
'                                          </tr>\n' +
'                                        </table>\n' +
'\n' +
'                                    </td>\n' +
'                                  </tr>\n' +
'                                  <tr>\n' +
'                                    <td colspan=3 align=right><a class=leftlinks href="' + 
baseurl + "?catg=" + cid + "&prod=" + pid + '">&lt;&lt; Back to Product Details</a></td>\n' +
'                                  </tr>\n' +
'                                  <tr>\n' +
'                                    <td><p>&nbsp;</p></td>\n' +
'                                  </tr>\n' +
'                          </tr>\n' +
'                        </table>\n' +
'\n' +
'                        </center>\n' +
'                        </div>\n' +
'\n' +
'<!-- Main Page End -->\n' +
'\n' +
'                          </td>\n' +
'                        </tr>\n' +
'                      </table>\n' );

}

function check_special(){
  if ( Get_Cookie ( 'nnyn_discount_special' ) ){
      discount_offer = true;
  }else if( qstr[ "discount" ] != null && qstr[ "discount" ].length > 0 && qstr["discount"] == "D9D3QTEB4CNP76P2") {
      storeMasterCookie ();
      storeSessionCookie ( 'nnyn_discount_special', 'true' );
      discount_offer = true;
  }
}
