######################################################################
# web_store.setup.frames.javascript                                   #
#                    Global File Location variables                   #
#
#  $sc_store is set by the main shopping cart program.
#
#  $sc_store is derived from the name of the name of the cgi program
#     $sc_store.cgi
#
#######################################################################
#  Look for ???? for where to make changes
#######################################################################
#######################################################################
#  Replace the values in the next 6 lines with your values:
#    sc_main_dir     name of directory under cgi-bin directory for
#                    this shopping cart program
#                    public_html-+
#                                |- cgi-bin-+
#                                           |-sc_main_dir 
#                                             + sc_store.cgi
#                                             + sc_store
#    sc_domain       full domain name; xyz.com
#    sc_login_name   account name
#    sc_admin_id     email address of tech support person
#    sc_monitor_id   email address of monitoring person
#    sc_banner       path to banner image
#
#    sc_main_store   name on cgi program
#######################################################################
$sc_main_dir  ='gtrental-chi';        # jxlrw main directory
$sc_domain    ='globaltalker.com';
$sc_login_name='globalta';                                 
$sc_admin_id  ='dennis@infinex.com';
$sc_monitor_id='shel001@infinex.com';
$sc_testing_id='testing@globaltalker.com';
$sc_banner="/~globalta/banner.jpg";  # path is Alias'd in httpd.conf
$sc_other_cookie='gtlogin';

$sc_main_store =$sc_store;        # jxlrw main store name
$sc_html_common="../$sc_main_dir/$sc_store/Html";

#######################################################################
# Paths to common web_store code
#######################################################################
$sc_www_lib='/home/httpd/cgi-bin/Web_store/Library';  # libs
$sc_www_pgm='/home/httpd/cgi-bin/Web_store/web_store.cgi';

#######################################################################
# Paths to the Library containing the shared code
#######################################################################
$sc_html_search_routines_library_path = "$sc_www_lib/web_store_html_search.pl";
$sc_cgi_lib_path         = "$sc_www_lib/cgi-lib.pl";
$sc_mail_lib_path        = "$sc_www_lib/mail-lib.pl";
$sc_html_setup_file_path = "$sc_www_lib/web_store_html_lib.pl";
$sc_db_lib_path          = "$sc_www_lib/web_store_db_lib.pl";
$sc_order_lib_path       = "$sc_www_lib/web_store_order_lib.pl";
$sc_pgp_lib_path         = "$sc_www_lib/pgp-lib.pl";
$sc_membership_path      = "$sc_www_lib/web_store_membership.pl";  # jxl dma

#######################################################################
# non-SSL and SSL URL paths
#######################################################################
$sc_nossl_url="https://$sc_domain/cgi-bin/$sc_main_dir";
$sc_ssl_url  ="https://$sc_domain/cgi-bin/$sc_main_dir";
$sc_order_script_url = "$sc_ssl_url/$sc_store.cgi";

$sc_bgcolor='#ffffff';
$sc_text='000000';
$sc_fldsep="\|";                        # jxl log file field separator

#######################################################################
# cybercash paths and values for direct credit card payments
#######################################################################
BEGIN
{ push(@INC, '/usr/local/cybercash/mck-3.2.0.3-linux/perl-api');
  push(@INC, '/homed/globalta/public_html/cgi-bin/cybercash-gt/');
}
$sc_cybercash_code="$sc_www_lib/CCSubmit.cgi";
$sc_cybercash_pgm ="CCSubmit";

$sc_cc_currency='usd';
$sc_cc_total  ='grand_total';
$sc_cc_number ='cc_number';
$sc_cc_exp_mt ='cc_monthS';
$sc_cc_exp_yr ='cc_yearS';
$sc_cc_exp    ='cc_exp';
$sc_cc_owner  ='cc_owner';
$sc_cc_street ='b_street';
$sc_cc_city   ='b_city';
$sc_cc_state  ='b_stateS';
$sc_cc_zip    ='b_zip';
$sc_cc_country='b_country';

$sc_cc_vdate  = 'cc_vdate';         # verification date
$sc_cc_status = 'cc_status';        # status 'OK, AVS=Y/N'

@rp_dcountry = ('Country', 'aus','can','chi','hk','jap','sing','tai','us','other');
@rp_dcountry2 = ('Country', '澳洲','加拿大','中国','香港','日本','星加坡','台湾','美国','其他国家');

#######################################################################
# jxl dma membership subroutines
$sc_member_email_to        = "$sc_admin_id";
$sc_member_email_from      = "$sc_admin_id";
$sc_member_email_subj      = "Membership at $sc_domain";
$sc_member_path            = "$sc_html_common/membership.html";
$sc_member_add_path        = "$sc_html_common/membership_add.html";
$sc_member_mod_path        = "$sc_html_common/membership_mod.html";
$sc_member_ver_path        = "$sc_html_common/membership_ver.html";
$sc_member_ord_path        = "$sc_html_common/membership_ord.html";
$sc_member_email_body      = "$sc_html_common/emailmember.txt";
$sc_empty_cart_path        = "$sc_html_common/empty_cart.html";
$sc_display_product_path   = "$sc_html_common/display_product.html";
$sc_display_cart_path      = "$sc_html_common/display_cart.html";
$sc_error_msg_path         = "$sc_html_common/error_msg.html";
$sc_order_email_body       = "$sc_html_common/emailorder.txt";
$sc_customer_email_body    = "$sc_html_common/emailcustomer.txt";
$sc_agent_email_body    = "$sc_html_common/emailagent.txt";
$sc_inventory_email_body    = "$sc_html_common/emailinventory.txt";
$sc_order_thank_you_txt    = "$sc_html_common/thankyou.txt";
$sc_trackorder_form        = "$sc_html_common/trackorder.html";
$sc_aff_mod_path           = "$sc_html_common/aff_mod.html";
$sc_aff_ver_path           = "$sc_html_common/aff_ver.html";
$sc_aff_trk_path           = "$sc_html_common/aff_trk.html";
$sc_data_item_path         = "$sc_html_common/gtdata.html";
$sc_del_item_really_path   = "$sc_html_common/del_item.html";
$sc_del_cat_really_path    = "$sc_html_common/del_cat.html";
$sc_add_rental_page ="rentphone_step3.html";
$sc_shipping_path          = "$sc_html_common/shipping.html";
$sc_member_login_path ="$sc_html_common/member_login.html";
$sc_html_order_form_path   = "$sc_html_common/outlet_order_form_with_shipping.html";
$sc_html_order_form_id_path= "$sc_html_common/outlet_order_form_with_shipping.html";
$sc_html_order_form_confirm_path   = "$sc_html_common/outlet_order_form_with_shipping_confirm.html";
$sc_html_order_form_confirm_passwd_path = "$sc_html_common/outlet_order_form_with_shipping_confirm.html";
$sc_store_front_path       = "$sc_html_common/index.html";
$sc_cart_view_header_html ="$sc_html_common/cart_header.html";
$sc_cart_view_footer_html ="$sc_html_common/cart_footer.html";

$sc_member_lock_file   = "./$sc_main_store/Admin_files/member-lock"; # jxl dma
$sc_member_acct_id     = "./$sc_main_store/Admin_files/member.num";  # jxl dma
$sc_member_db_file     = "../../../calendar/member.txt";   # aaron
$sc_affiliate_db_file     = "../../../calendar/affiliate/affiliate.txt";   # aaron
$sc_tracking_lock_file = "./$sc_main_store/Admin_files/tracking-lock"; # jxl dma
$sc_tracking_db_file   = "./$sc_main_store/Admin_files/tracking/track";
$sc_tracking_db_dir    = "./$sc_main_store/Admin_files/tracking";
$sc_tracking_db_pfx    = "track-";
$sc_order_number_path  = "./$sc_main_store/Admin_files/order.num";
$sc_data_lock_file     = "./$sc_store/Admin_files/data-lock";  # jxl dma
$sc_store_db_file = "$sc_main_store/Data_files/rental_store";

#######################################################################
# member ids that are pre-initialized in the member data base
#######################################################################
$sc_admin_control_id    ='Admin';       # unknown function
$sc_product_control_id  ="$sc_store".'-Product'; # modifies product db
$sc_affiliate_control_id='Affer';       # says if member can be an affiliate
$sc_affiliate_manager_id='Affmgr';      # modifies affiliate information
$sc_billing_control_id  ='Billing';     # says if credit card is ok
$sc_billing_manager_id  ='Billmgr';     # modifies credit card info
$sc_shipping_control_id ='Shipping';    # says when items are shipped
$sc_shipping_manager_id ='Shipmgr';     # modifies shipping info
$sc_payment_control_id  ='Payment';     # says when commissions are paid
$sc_payment_manager_id  ='Paymgr';      # modifies commission info
#######################################################################

$sc_acct_id_mod  ='m_acct_id';
$sc_user_id_mod  ='m_user_id';
$sc_user_pw_mod  ='m_passwd1';
$sc_user_pw2_mod ='m_passwd2';
$sc_acct_id_cur  ='a_acct_id';
$sc_user_id_cur  ='a_user_id';
$sc_user_pw_cur  ='a_passwd1';

$sc_user_create_date = 'a_cdate';
$sc_user_create_time = 'a_ctime';
$sc_user_modify_date = 'a_mdate';
$sc_user_modify_time = 'a_mtime';

$sc_order_date = 'order_date';
$sc_order_time = 'order_time';
$sc_order_num  = 'order_num';

$sc_aff_mem_flag ='r_aff_mem';          # A if affiliate
$sc_aff_test     ='r_depositS';         # non-null if affiliate
$sc_aff_ship_date='s_date';             # ship date
$sc_aff_comm_date='r_date';             # date commission is available

$sc_aff_info         = 'r_methodS';
$sc_aff_userid       = 'r_aff_id';
$sc_aff_billing      = 'r_tot_billing';
$sc_aff_shipping     = 'r_tot_shipping';
$sc_aff_return_policy= 'r_tot_return';
$sc_aff_due_on_day   = 'r_tot_due';
$sc_aff_commission   = 'r_tot_commission';

$sc_no_show_cc  ='cc_no_show';
$sc_user_carts_directory_path   = "./$sc_store/User_carts";
$sc_cart_path                   = "./$sc_store/User_carts";
$sc_rental_info_path                   = "./$sc_store/User_carts";
$sc_data_file_path              = "./$sc_store/Data_files/data.file";
$sc_data_file_pfx               = 'df_';
$sc_data_dir_path               = "./$sc_store/Data_files";
$sc_data_rental_list_file               = "./$sc_store/Data_files/rentallist.db";

$sc_options_directory_path      = "./$sc_store/Html/Options/";
$sc_html_product_directory_path = "./$sc_main_store/Html";

$sc_store_front_full_path       = "$sc_nossl_url/$sc_store.cgi";

$sc_counter_file_path           = "./$sc_store/Admin_files/counter.file";
$sc_error_log_path              = "./$sc_store/Admin_files/error.log";
$sc_access_log_path             = "./$sc_store/Admin_files/access.log";

$sc_main_script_url             = "$sc_nossl_url/$sc_store.cgi";

$sc_min_airtime_stock      = "5";
$sc_rental_page_add_item  ="step"; # hidden varibale use in phone rental page when item is added
$sc_cart_security_deposit = "s_deposit";

$sc_cart_font_begin='<font face="Arial" size="2">';
$sc_cart_font_end='</font>';
$sc_cart_font_quantity_begin='<font face="Arial" size="2">';
$sc_cart_font_quantity_end='</font>';

#######################################################################
#         Rental Info Database Definition Variables
#######################################################################
@sc_rental_info_db_fields =
( 'cart_id',
  'rp_ocountry',
  'rp_dcountry',
  'rp_decountry',
  'rp_agent',
  'dep_tm_1',
  'dep_dt_mn_1',
  'dep_dt_dy_1',
  'dep_tm_2',
  'dep_dt_mn_2',
  'dep_dt_dy_2',  
  'renttotal',
  'rentlate1',
  'rentlate2',
  'rentlate3'
);

@sc_rental_mon_pic =
("Jan_new.gif","Feb_new.gif","Mar_new.gif","Apr_new.gif","May_new.gif","Jun_new.gif","Jul_new.gif","Aug_new.gif","Sep_new.gif","Oct_new.gif","Nov_new.gif","Dec_new.gif");

@sc_rental_mon_1day =
(1,4,4,0,2,5,0,3,6,1,4,6,2,5,6,1,3,6,1,4,0,2,5,0,3,6,6,2,4,0,2,5,1,3,6,1);

@sc_rental_mon_detail_pic =
("Mon31_new.gif","Thu28_new.gif","Thu31_new.gif","Sun30_new.gif","Tue31_new.gif","Fri30_new.gif","Sun31_new.gif","Wed31_new.gif","Sat30_new.gif","Mon31_new.gif","Thu30_new.gif","Sat31_new.gif",
 "Tue31_new.gif","Fri28_new.gif","Fri31_new.gif","Mon30_new.gif","Wed31_new.gif","Sat30_new.gif","Mon31_new.gif","Thu31_new.gif","Sun30_new.gif","Tue31_new.gif","Fri30_new.gif","Sun31_new.gif",
 "Wed31_new.gif","Sat28_new.gif","Sat31_new.gif","Tue30_new.gif","Thu31_new.gif","Sun30_new.gif","Tue31_new.gif","Fri31_new.gif","Mon30_new.gif","Wed31_new.gif","Sat30_new.gif","Mon31_new.gif"
);

@month_shortname =
(Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec);

@month_longname =
(January,February,March,April,May,June,July,August,September,October,November,December);

#######################################################################
#         Tracking Database Definition Variables
#######################################################################
$sc_billing_ver_date='cc_vdate';
$sc_billing_ver_status='cc_status';
$sc_shipping_date='s_date';
$sc_shipping_status='s_status';
$sc_shipping_number='s_num';
$sc_commission_ids='commission_ids';
$sc_commission_amts='commission_amts';
$sc_commission_amt='commission_amt';
$sc_commission_default='commission_default';
$sc_commission_quantity='quantity';
$sc_product_return_days='return_period';

@sc_tracking_db_fields =
( 'order_num',
  'order_date',
  'order_time',
  'a_acct_id',
  'a_user_id',
  'r_aff_id',
  'commission_default',
  'commission_ids',
  'commission_amts',
  'return_period',
  'quantity',
  'p_item_id',
  'p_cat_id',
  'price',
  'name',
  'description',
  'location',
  'category',
  'options',
  'price_after_options',
  'final_shipping',
  'final_discount',
  'final_sales_tax',
  'grand_total',
  'b_name1',
  'b_name2',
  'b_company',
  'b_street',
  'b_city',
  'b_stateS',
  'b_zip',
  'b_country',
  'b_day_area',
  'b_day_pfx',
  'b_day_num',
  'b_email',
  'cc_typeS',
  'cc_number',
  'cc_monthS',
  'cc_yearS',
  'cc_owner',
  'cc_vdate',
  'cc_status',
  's_shipping',
  's_name1',
  's_name2',
  's_street',
  's_city',
  's_stateS',
  's_zip',
  's_country',
  's_day_area',
  's_day_pfx',
  's_day_num',
  's_date',
  's_num',
  's_status',
  'text_of_code',
  "unique_cart_line_id");
#######################################################################
#         Member Database Definition Variables
#######################################################################
$sc_aff_deposit_date='r_depositS';

@sc_affiliate_db_fields=
(  'a_user_id,req',
  'a_email,req',
  'a_passwd1,req',
  's_name1,opt',
  's_name2,opt',
  's_company,opt',
  's_street,opt',
  's_city,opt',
  's_stateS,opt',
  's_zip,opt',
  's_country,opt',
  'aff_phonenum,opt',
  'aff_companyreg,opt',
  'aff_status,opt',
  'aff_junk,opt'
);

@sc_member_db_fields =
(  'a_user_id,req',
  'a_email,req',
  'a_passwd1,req',
  's_name1,opt',
  's_name2,opt',
  's_loc,opt',
  's_pcphone,opt',
  's_pcpin,opt',
  'cc_typeS,opt',
  'cc_number,opt',
  'cc_exp,opt',
  'cc_owner,opt',
  's_company,opt',
  's_street,opt',
  's_city,opt',
  's_stateS,opt',
  's_zip,opt',
  's_country,opt',
  's_account,opt',
  's_info,opt',
  'u_control,opt',
  'u_pcp,opt',
  'u_passwd_crypt,opt',
  'u_privatekey,opt',
  'u_emailpager,opt',     
  'u_proinfo,opt',
  'r_aff_mem,opt'
);

@sc_member_db_fields_add =
(  'a_user_id,req',
  'a_email,req',
  'a_passwd1,req',
  'b_name1,opt',
  'b_name2,opt',
  'b_loc,opt',
  'b_pcphone,opt',
  'b_pcpin,opt',
  'cc_typeS,opt',
  'cc_number,opt',
  'cc_exp,opt',
  'cc_owner,opt',
  'b_company,opt',
  'b_street,opt',
  'b_city,opt',
  'b_stateS,opt',
  'b_zip,opt',
  'b_country,opt',
  'b_account,opt',
  'b_info,opt',
  'u_control,opt',
  'u_pcp,opt',
  'u_passwd_crypt,opt',
  'u_privatekey,opt',
  'u_emailpager,opt',     
  'u_proinfo,opt',
  'r_aff_mem,opt'
);

@sc_affiliate_db_fields_add=
(  'a_user_id,req',
  'a_email,req',
  'a_passwd1,req',
  'b_name1,opt',
  'b_name2,opt',
  'b_company,opt',
  'b_street,opt',
  'b_city,opt',
  'b_stateS,opt',
  'b_zip,opt',
  'b_country,opt',
  'b_phone,opt',
  'aff_companyreg,opt',
  'aff_status,opt',
  'aff_junk,opt'
);

#######################################################################
# Data base item fieldsa    Unique to a store                jxlrw
#######################################################################
$sc_product_id='p_item_id';
$sc_product_cat='p_cat_id';
 
@sc_item_db_fields=
( 'p_cat_id,req',
  'p_cat_name,req',
  'p_item_id,req',
  'p_item_name,req',
  'p_smallimage,opt',
  'p_title,opt',
  'p_description,opt',
  'p_manufacturer,opt',
  'p_instock,opt',
  'p_minstock,opt',
  'p_listprice,opt',
  'p_saleprice,opt',
  'p_returnperiod,opt',
  'p_weight,opt',
  'p_weighttype,opt',
  'p_options,opt'
);
#######################################################################
#  Database Definition Variables    Unique to a store       jxlrw     #
#######################################################################
$db{'p_cat_id'}        = 0;     # jxlrw  req field name
$db{'p_cat_name'}      = 1;
$db{'p_item_id'}       = 2;     # jxlrw  req field name
$db{'p_item_name'}     = 3;
$db{'p_smallimage'}    = 4;
$db{'p_title'}         = 5;
$db{'p_description'}   = 6;
$db{'p_specialdb'}  = 7;
$db{'p_instock'}       = 8;
$db{'p_minstock'}      = 9;
$db{'p_listprice'}     =10;
$db{'p_saleprice'}     =11;
$db{'p_value'}  =12;
$db{'p_weight'}        =13;
$db{'p_weighttype'}    =14;
$db{'p_options'}       =15;

$sc_db_index_of_product_id=$db{'p_item_id'};

@sc_db_display_fields = ("$db{'p_cat_name'}",
                         "Item",
                         "Price",
                         "Options",
                         "Order");

@sc_db_index_for_display = (        
            $db{'p_smallimage'},
         $db{'p_item_name'},   
         $db{'p_description'},   
            $db{'p_saleprice'}
                           );

@sc_db_index_for_defining_item_id = (
$db{'p_item_id'},
$db{'p_cat_id'},
 $db{'p_saleprice'},
   $db{'p_item_name'},
   $db{'p_weight'},
   $db{'p_weighttype'},
   $db{'p_value'},
   $db{'p_specialdb'}
      );

# jxlrw   sc_db_index_of_price MUST BE SPECIFIED or else the product
# jxlrw   is all screwed up .... since webstore assumes that there is a price.
$sc_db_index_of_price = $db{'p_saleprice'};   # jxlrw MUST BE SPECIFIED!

# jxlrw   The following MUST BE SPECIFIED or else the items that are bought
# jxlrw   won't pass the cart compare test during checkout.
$sc_db_index_of_commission_default = $db{'p_item_name'};
$sc_db_index_of_commission_ids     = $db{'p_item_name'};
$sc_db_index_of_commission_amts    = $db{'p_item_name'};
$sc_db_index_of_return_period      = $db{'p_item_name'};

@sc_db_rental_list = (
'model',
'plan',
'rate',
'late'
);

#######################################################################
# Product display controls                           jxlrw
#######################################################################
$sc_product_display_format= 'multiform';
$sc_product_display_title = "Product Listing";

$sc_product_display_header = qq!
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<\!--Hide from JavaScript-Impaired Browsers
function initArray() {
 for(i=0;i<initArray.arguments.length; i++)
  this[i] = initArray.arguments[i];
}

var isnMonths=new initArray("January","February","March","April","May","June","July","August","September","October","November","December");
var isnDays= new initArray("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");
today=new Date();
hrs=today.getHours();
min=today.getMinutes();
sec=today.getSeconds();
clckh=""+((hrs>12)?hrs-12:hrs); 
clckm=((min<10)?"0":"")+min;
clcks=((sec<10)?"0":"")+sec;
clck=(hrs>=12)?"p.m.":"a.m.";

var stnr="";
var ns="0123456789";
var a="";
// End Hiding -->
<\!--
//-->
</script>
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="" bgcolor="#FFFFFF">
<table width="653" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
  <tr valign="top"> 
    <td height="324"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="85%" valign="top" height="328"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td> 
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width="74%">&nbsp;</td>
                      <td width="26%"> 
                        <script language="JavaScript">
<\!--hide script from old browsers
// fixes a Netscape 2 and 3 bug
function getFullYear(d) { // d is a date object
yr = d.getYear();
if (yr < 1000)
yr+=1900;
return yr;
}

document.write("<FONT FACE='Verdana, Arial, Helvetica, Sans-Serif' SIZE='1' COLOR='#333333'><B> "+isnDays[today.getDay()]
+", "+isnMonths[today.getMonth()]+" "+today.getDate()+", "
+getFullYear(today)+"</B></FONT>")
// end hiding -->
</script>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr valign="top"> 
                <td height="2"> 
                  <div align="left"><br></div>
                </td>
              </tr>
!;# rw

$sc_product_display_row = qq!
  <\!-- sc_product_display_row -->
 <FORM METHOD = "post"  ACTION="$sc_store.cgi">
    <INPUT TYPE="hidden" NAME="cart_id" VALUE="%s">
    <INPUT TYPE="hidden" NAME="page" VALUE="">
    <INPUT TYPE="hidden" NAME="item-%s" value=1>
 <tr valign="top"> 
                <td height="2"> 
                  <div align="right">
                    <table width="600" border="1" cellspacing="0" cellpadding="3" bgcolor="#F4F1D0">
                      <tr> 
                        <td height="17" width="110" bgcolor="#FFFFFF" valign=top><img src="/~$sc_login_name/%s"></td>
                        <td height="17" width="324" valign="top"> 
                          <p><font face="Arial" size="2"><b>%s</b></font></p>
                          <p><font face="Arial" size="2">%s</font></p>
                        </td>
                        <td height="17" width="208" valign="top"> 
                          <div align="center"> 
                            <p><font face="Arial" size="2"><b>Sale Price<br>
                              <font color="#CC0000">%s</font></b></font></p>
                            <p><INPUT TYPE="image" NAME="add_to_cart_button" VALUE="Buy"
 src="/~$sc_login_name/buy.gif" width="40" height="20" border="0"></p>
                          </div>
                        </td>
                      </tr>
                    </table>
                  </div>
                </td>
              </tr>
<tr valign="top">
                <td height="2">&nbsp;</td>
              </tr>
</form>
!;                                    # rw

$sc_product_display_footer = qq!
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
  !;

#######################################################################
#   Membership form Variables                                 jxl dma #
#
# Each entry has:
#  - field name
#  - type of field:
#      alpha         alphanumeric 
#      char          a-z,A-Z only
#      num           0-9 only, where x is the number of digits
#      date          mm/dd/yyyy
#      email         name@domain.com/net/edu/org
#      pw1           1st password for verification
#      pw2           2nd password for verification
#      any           alphanumeric plus some special characters
#  - size of field   maximum number of characters/digits
#  - lng of field    required number of characters/digits
#  - description     description of field ... for error messages
#
# Usage:
#  $value= $form_data{$field_name}
#  $type = $sv_vars{$field_name}[$sv_type]
#  $desc = $sv_vars{$field_name}[$sv_desc]
#######################################################################
# Index's for the different fields for each field name in sv_vars
#######################################################################
  $sv_type=0;
  $sv_size=1;
  $sv_lng =2;
  $sv_desc=3;
#######################################################################
#    'name'                => [type, size, lng, 'Description'],
#######################################################################
  %sv_vars = 
    (
     'a_acct_id'           => [html, 30, 0, 'Account ID'],
     'a_user_id'           => [html, 30, 0, 'Account User ID'],
     'a_passwd1'           => [pw1,   30, 0, 'Verification Password'],
     'a_passwd2'           => [pw2,   30, 0, 'Second Verification Password'],
     'a_cdate'             => [date, 10, 0, 'Member Date'],
     'a_ctime'             => [any,   8, 0, 'Member Time'],
     'a_mdate'             => [date, 10, 0, 'Member Date'],
     'a_mtime'             => [any,   8, 0, 'Member Time'],
     'm_passwd1'           => [pw1,   8, 0, 'Verification Password'],
     'm_passwd2'           => [pw2,   8, 0, 'Second Verification Password'],
     'b_name1'             => [html,  20, 0, 'Billing First Name'],
     'b_name2'             => [html,  20, 0, 'Billing Last Name'],
     'b_company'           => [html,  20, 0, 'Billing Company Name'],
     'b_street'            => [html,  20, 0, 'Billing Street Address'],
     'b_city'              => [html,  20, 0, 'Billing City'],
     'b_stateS'            => [html, 20,0,'Billing State'],
     'b_zip'               => [any,   10, 0, 'Billing Zip Code'],
     'b_country'           => [html, 20, 0, 'Billing Country'],
     'b_day_area'          => [num,   3, 3, 'Billing Day Phone Number Area Code'],
     'b_day_pfx'           => [num,   3, 3, 'Billing Day Phone Number Prefix'],
     'b_day_num'           => [num,   4, 4, 'Billing Day Phone Number'],
     'b_phone'           => [num,   15, 0, 'Billing Phone Number'],
     'b_eve_area'          => [num,   3, 3, 'Billing Evening Phone Number Area Code'],
     'b_eve_pfx'           => [num,   3, 3, 'Billing Evening Phone Number Prefix'],
     'b_eve_num'           => [num,   4, 4, 'Billing Evening Phone Number'],
     'b_fax_area'          => [num,   3, 3, 'Billing Fax Phone Number Area Code'],
     'b_fax_pfx'           => [num,   3, 3, 'Billing Fax Phone Number Prefix'],
     'b_fax_num'           => [num,   4, 4, 'Billing Fax Phone Number'],
     'b_email'             => [email,20, 0, 'Billing Email Address'],
     'b_FullName'          => [html,  40, 0, 'Billing Full Name'],
     'b_CityStZip'         => [html,  40, 0, 'Billing City, St, Zip'],
     'b_PhoneDay'          => [any,  12, 0, 'Billing Day Phone'],
     'cc_no_show'          => [any,   1, 1, 'Credit Card Not Saved'],
     'cc_CreditCard'       => [any,  20, 0, 'Pay by Credit Card'],
     'cc_typeS'            => [char, 10, 0, 'Credit Card Type'],
     'cc_number'           => [num,  16, 0, 'Credit Card Number'],
     'cc_monthS'           => [num,   2, 2, 'Credit Card Expiration Month'],
     'cc_yearS'            => [num,   4, 4, 'Credit Card Expiration Year'],
     'cc_exp'              => [mmyy,  4, 0, 'Credit Card Expiration Date (mm/yy)'],
     'cc_owner'            => [any,  20, 0, 'Credit Card Owners Name'],
     'cc_vdate'            => [date, 10,10, 'Credit Card Verification Date'],
     'cc_status'           => [any,   3, 0, 'Credit Card Verification Status'],
     'cart_id'             => [any,  20, 0, 'Shopping Cart Number'],
     'page'                => [any,  20, 0, 'Shopping Cart Page'],
     'sc_store'            => [any,  20, 0, 'Store Name'],
     's_name1'             => [html,  20, 0, 'Shipping First Name'],
     's_name2'             => [html,  20, 0, 'Shipping Last Name'],
     's_instructions'      => [html,  20, 0, 'Shipping Instructions'],
     's_company'           => [html,  20, 0, 'Shipping Company Name'],
     's_street'            => [html,  20, 0, 'Shipping Street Address'],
     's_city'              => [html,  20, 0, 'Shipping City'],
     's_stateS'            => [html, 20, 0,'Shipping State'],
     's_zip'               => [any,   10, 0, 'Shipping Zip Code'],
     's_country'           => [html, 20, 0, 'Shipping Country'],
     's_day_area'          => [num,   3, 3, 'Shipping Day Phone Number Area Code'],
     's_day_pfx'           => [num,   3, 3, 'Shipping Day Phone Number Prefix'],
     's_day_num'           => [num,   4, 4, 'Shipping Day Phone Number'],
     's_phone'           => [any,   20, 0, 'Shipping Phone Number'],
     's_shipping'          => [html,  5, 0, 'Shipping'],
     's_status'            => [html,  10, 0, 'Shipping Status'],
     's_date'              => [date, 10,10, 'Date Shipped'],
     's_num'               => [any,  40, 0, 'Shipping Number'],
     's_email'             => [email,20, 0, 'Shipping Email Address'],
     's_FullName'          => [html,  40, 0, 'Shipping Full Name'],
     's_CityStZip'         => [html,  40, 0, 'Shipping City, St, Zip'],
     's_PhoneDay'          => [any,  12, 0, 'Shipping Day Phone'],
     'order_num'           => [alpha, 6, 6, 'Order Number'],
     'order_date'          => [alpha,10,10, 'Order Date'],
     'order_time'          => [alpha, 8, 8, 'Order Time'],
     'quantity'            => [num,   4, 0, 'Quantity'],
     'd_name'              => [any,  20, 0, 'Restaurant Name'],
     'd_product_cat'       => [any,  20, 0, 'Restaurant Zip Code'],
     'd_product_id'        => [any,  20, 0, 'Restaurant ID'],
     'd_restid'            => [any,  20, 0, 'Restaurant User ID'],
     'd_type'              => [any,  20, 0, 'Product Item Type'],
     'd_price_avg'         => [amt,  10, 0, 'Price Average'],
     'd_street'            => [any,  20, 0, 'Company Street'],
     'd_city'              => [any,  20, 0, 'Company City'],
     'd_state'             => [char,  2, 0, 'Company State'],
     'd_zip'               => [num,   5, 5, 'Company Zip Code'],
     'd_phone_area'        => [num,   3, 3, 'Company Phone Area Code'],
     'd_phone_pfx'         => [num,   3, 3, 'Company Phone Area Prefix'],
     'd_phone_num'         => [num,   4, 4, 'Company Phone Area Number'],
     'd_fax_area'          => [num,   3, 3, 'Company Fax Area Code'],
     'd_fax_pfx'           => [num,   3, 3, 'Company Fax Area Prefix'],
     'd_fax_num'           => [num,   4, 4, 'Company Fax Area Number'],
     'd_image_url'         => [htm,  80, 0, 'Image URL'],
     'd_link'              => [any,  80, 0, 'Link to other Data Structure'],
     'd_hours_from'        => [any,  10, 0, 'Company Hours (From)'],
     'd_hours_to'          => [any,  10, 0, 'Company Hours (To)'],
     'd_days_open'         => [any,  10, 0, 'Company Days Open'],
     'd_description'       => [any, 100, 0, 'Company Description'],
     'd_keywords'          => [any, 100, 0, 'Company Keywords'],
     'commission_ids'      => [any,  20, 0, 'Commission Ids'],
     'commission_amts'     => [any,  20, 0, 'Commission Amts'],
     'commission_default'  => [any,  20, 0, 'Commission Default'],
     'd_spare1'            => [html,  20, 0, 'Product Item Spare 1'],
     'd_spare2'            => [html,  20, 0, 'Product Item Spare 2'],
     'd_options'           => [html,  20, 0, 'Product Item Options'],
     'd_location'          => [html,  20, 0, 'Product Item Location Options'],
     'd_category'          => [html,  20, 0, 'Product Item Category Options'],
     'p_item_id'           => [html,  20, 0, 'Item ID'],
     'p_cat_id'            => [html,20, 0, 'Item Category'],
     'p_cat_name'          => [html,  20, 0, 'Item Item Type'],
     'p_listprice'         => [amt,  10, 0, 'Item Price'],
     'p_item_name'         => [html,  20, 0, 'Item Name'],
     'p_title'             => [html,  20, 0, 'Item Title'],
     'p_smallimage'        => [html,20, 0, 'Item Small Image'],
     'p_largeimage'        => [html,20, 0, 'Item Large Image'],
     'p_description'       => [html, 100, 0, 'Item Description'],
     'p_specialdb'         => [html, 100, 0, 'DB for special items'],
     'p_weight'            => [num,  20, 0, 'Item Weight'],
     'p_weighttype'        => [alpha,20, 0, 'Item Weight Type'],
     'p_manufacturer'      => [html,  20, 0, 'Item Manufacturer'],
     'p_instock'           => [num  ,20, 0, 'Item In Stock'],
     'p_minstock'          => [num  ,20, 0, 'Item Minumum Stock'],
     'p_listprice'         => [amt  ,20, 0, 'Item List Price'],
     'p_saleprice'         => [amt  ,20, 0, 'Item Sales Price'],
     'p_returnperiod'      => [num  ,20, 0, 'Item Return Period'],
     'p_category'          => [html,  20, 0, 'Purchase Category'],
     'p_location'          => [html,  20, 0, 'Location'],
     'p_options'           => [html, 100, 0, 'Item Options'],
     'price_after_options' => [amt,  10, 0, 'Price after options'],
     'final_shipping'      => [amt,  10, 0, 'Final Shipping'],
     'final_sales_tax'     => [amt,  10, 0, 'Final Sales Tax'],
     'grand_total'         => [amt,  10, 0, 'Grand Total'],
     'text_of_cart'        => [html,  1000, 0, 'Text of Cart'],
     'text_of_code'        => [html,  1000, 0, 'Text of Code'],
     'text_of_inventory'   => [html,  1000, 0, 'Text of Inventory'],
     'r_aff_mem'           => [char,  1, 1, 'Affiliate Member'],
     'r_methodS'           => [char, 10, 0, 'Deposit Method'],
     'r_depositS'          => [num,   2, 0, 'Day of Deposit'],
     'r_bank'              => [any,  40, 0, 'Bank Name'],
     'r_acct'              => [any,  40, 0, 'Bank Acct or Credit Card Number'],
     'r_owner'             => [any,  20, 0, 'Bank Acct or Credit Card Owner'],
     'hits_seen'           => [num,   5, 0, 'Search Matches already seen'],
     'keywords'            => [any,  40, 0, 'Search Keywords'],
     'rp_country'          => [html,  40, 0, 'Rent Phone Country'],
     'rp_model'            => [html,  20, 0, 'Rent Phone Model'],
     'rp_ocountry'         => [html,  40, 0, 'Rent Phone Original Country'],
     'rp_dcountry'         => [html,  40, 0, 'Rent Phone Destination Country'],
     'rp_decountry'        => [html,  40, 0, 'Rent Phone Destination Country'],
     'rp_agent'            => [html,  20, 0, 'Rent Phone Agent Code'],
     'dep_tm_1'            => [any,  20, 0, 'Rent Phone Pickup Time'],
     'dep_dt_mn_1'         => [any,  20, 0, 'Rent Phone Pickup Month'],
     'dep_dt_dy_1'         => [any,  20, 0, 'Rent Phone Pickup Date'],
     'dep_tm_2'            => [any,  20, 0, 'Rent Phone Return Time'],
     'dep_dt_mn_2'         => [any,  20, 0, 'Rent Phone Return Month'],
     'dep_dt_dy_2'         => [any,  20, 0, 'Rent Phone Return Date'],
     'rp_p_location'       => [html,  20, 0, 'Rent Phone Pickup Location'],
     'rp_p_city'           => [html,  20, 0, 'Rent Phone Pickup City'],
     'rp_p_country'        => [html,  20, 0, 'Rent Phone Pickup Country'],
     'rp_r_location'       => [html,  20, 0, 'Rent Phone Return Location'],
     'rp_r_city'           => [html,  20, 0, 'Rent Phone Return City'],
     'rp_r_country'        => [html,  20, 0, 'Rent Phone Return Country'],
     'rp_total_amount'     => [any,  20, 0, 'Rent Phone Total Amount'],
     'rp_terms'            => [html,  20, 0, 'Rent Phone Terms and Condition'],
     'selectphoneplan'     => [html,  200, 0, 'Rent Phone Step2'],
     'step2'               => [html,  20, 0, 'Rent Phone Step2'],
     'current_month'       => [any,  20, 0, 'Current Month'],
     'current_year'        => [any,  20, 0, 'Current Year'],
     'number_of_rental_date'    => [any,  20, 0, 'Rent Phone Step2'],
     'hidden_option_fields'     => [any,  20, 0, 'Rent Phone Step3 Hidden Value'],
     'renttotal'           => [amt,  20, 0, 'Total Rent Fee'],
     'rentlate1'           => [amt,  20, 0, 'Late Charge per Day'],
     'rentlate2'           => [amt,  20, 0, 'Late Charge per Week'],
     'rentlate3'           => [amt,  20, 0, 'Late Charge per Month'],
     'security_deposit'    => [amt,  20, 0, 'Security Deposit'],
     'return_deposit'      => [amt,  20, 0, 'Security Deposit Return'],
     'purchased_items'      => [amt,  20, 0, 'Non-rental Items'],
     'rentalstore'         => [html,  40, 0, 'Rental Store Name'],
     'r_id'                => [any,  10, 0, 'Rental Store ID'],
     's_method'            => [html,  20, 0, 'Shipping/Pickup Method'],
     'customer'            => [html,  20, 0, 'Customer Status'],
     'billing_eq_shipping' => [any,  20, 0, 'Billing Equal Shipping'],
     'err_msg'             => [html,  200, 0, 'Billing Equal Shipping'],
     'aa_gtlogin'             => [any,  30, 0, 'GT Login ID'],
     'aa_email'             => [any,  30, 0, 'GT Login Email'],
     'unique_cart_line_id' => [num,  20, 0, 'Unique Cart Line ID']
    );
#######################################################################
# Special array for <option value=" " SELECTED> fields
#######################################################################
  @sc_selected=
    ('s_country',
     'b_country'
 #    'cc_typeS'
    );
#######################################################################
# shipping.html web page variables
#######################################################################
@sc_rental_store_fields=
('rentalstore','r_id','r_com','r_add','r_city','r_state','r_zip','r_phone','s_email');


  @sc_shipping_fields_req=           # ID/Passwd was not entered
    ("cart_id,req",
     "page,opt",
     "s_shipping,req",
     "a_user_id,opt",
     "a_passwd1,opt",
     "s_company,opt",
     "s_name1,req",
     "s_name2,req",
     "s_street,req",
     "s_city,req",
     "s_stateS,opt",
     "s_zip,opt",
     "s_country,req",
     "s_phone,opt",
     "r_aff_id_id,opt",
     "commission_ids,opt",
     "commission_amts,opt",
     "commission_default,opt",
     "ssl_url,rep",
     "sc_store,rep",
     "sc_bgcolor,rep"
    );
  @sc_shipping_fields_opt=           # ID/Passwd was entered
    ("cart_id,req",
     "page,opt",
     "s_shipping,req",
     "a_user_id,req",
     "a_passwd1,req",
     "s_company,opt",
     "s_name1,opt",
     "s_name2,opt",
     "s_street,opt",
     "s_city,opt",
     "s_stateS,opt",
     "s_zip,opt",
     "s_country,opt",
     "s_phone,opt",
     "r_aff_id_id,opt",
     "commission_ids,opt",
     "commission_amts,opt",
     "commission_default,opt",
     "ssl_url,rep",
     "sc_store,rep",
     "sc_bgcolor,rep"
    );
#######################################################################
# Billing fields that should be set equal to Shipping fields
#######################################################################
  $sc_billing_eq_shipping_check_box='billing_eq_shipping';
  @sc_billing_eq_shipping_fields=
    ('b_company,s_company',
     'b_name1,s_name1',
     'b_name2,s_name2',
     'b_street,s_street',
     'b_city,s_city',
     'b_stateS,s_stateS',
     'b_zip,s_zip',
     'b_country,s_country',
     'b_phone,s_phone',
     'b_shipping,s_shipping',
    );
#######################################################################
# email fields that should be concatenated for formatting
#######################################################################
  @sc_email_concat=
    ("b_FullName,b_name1,' ',b_name2",
     "b_CityStZip,b_city,'  ',b_stateS,'. ',b_zip,'  ',b_country",
     "b_PhoneDay,b_phone",
     "s_FullName,s_name1,' ',s_name2",
     "s_CityStZip,s_city,'  ',s_stateS,'. ',s_zip,'  ',s_country",
     "s_PhoneDay,s_phone",
    ); 
#######################################################################
# order_form.html web page variables
#######################################################################
  @sc_order_form_fields=
    ("cart_id,req",
     "page,opt",
     "s_shipping,opt",
     "s_company,opt",
     "s_name1,opt",
     "s_name2,opt",
     "s_street,opt",
     "s_city,opt",
     "s_stateS,opt",
     "s_zip,opt",
     "s_country,opt",
     "s_phone,opt",
     "s_email,opt",
     "b_company,opt",
     "b_name1,req",
     "b_name2,req",
     "b_street,req",
     "b_city,req",
     "b_stateS,req",
     "b_zip,req",
     "b_country,req",
#    "b_day_area,req",
#    "b_day_pfx,req",
#    "b_day_num,req",
     "b_email,req",
     'cc_typeS,cc_number',
     'cc_number,cc_exp',
     'cc_exp,cc_owner',
     'cc_owner,cc_typeS',
     "a_acct_id,opt",
#     "a_user_id,a_passwd1",
#    "a_passwd1,a_user_id",
     "r_aff_id,opt",
     "ssl_url,rep",
     "sc_store,rep",
     "sc_bgcolor,rep"
    );
#######################################################################
# Db_variables for searching
#######################################################################
#
# All query fields should begin with
# sc_query_ so that they will be passed
# from screen to screen as hidden variables
# if they have value
#
# Special query input form fields are
# sc_db_exact_match = "yes" if no pattern match
# and sc_db_case_sensitive = "yes", if we are doing
# a case insensitive search
#
@sc_db_query_criteria = ("query_price_low_range|2|<=|number",
                         "query_price_high_range|2|>=|number",
                         "p_cat_id|0|=|string",
                         "p_item_id|2|=|string",
                         "p_description|1,3,5|=|string");

# We want to restrict the number of rows returned 
# so that the browser does not get overloaded
#
$sc_db_max_rows_returned = 10;

$sc_search = "$sc_store.cgi?search_request_button=find&cart_id=&keywords=";
#######################################################################
# Product category display controls                           jxlrw
#######################################################################
$sc_cat_row=qq!
<br><a href="$sc_store.cgi?&p_cat_id=%%p_cat_id%%&p_item_id=%%p_item_id%%&d_product_cat=%%d_product_cat%%&cart_id=" target="body">%%p_cat_name%%</a>
!;
#######################################################################
$sc_search_not_found=qq!
  <\!-- sc_search_not_found -->
  <br>Your search for <b>%%keywords%%</b> was not successful.
  <br>Check your spelling or search for something else.
  <p><INPUT TYPE="button" VALUE="Return" onClick="history.go(-1)"
  !;
#######################################################################
$sc_search_start=qq!
  <\!-- sc_search_start -->
  <INPUT TYPE="hidden" NAME="hits_seen" VALUE="%%hits_seen%%">
  <INPUT TYPE="hidden" NAME="keywords" VALUE="%%keywords%%">
  <INPUT TYPE="hidden" NAME="d_product_cat" VALUE="%%d_product_cat%%">
  <INPUT TYPE="submit" NAME="search_request_button" VALUE="Next $sc_db_max_rows_returned items">
  <br>!;                                  #jxlhits
#######################################################################
$sc_search_middle=qq!
  <\!-- sc_search_middle -->
  <INPUT TYPE="hidden" NAME="hits_seen" VALUE="%%hits_seen%%">
  <INPUT TYPE="hidden" NAME="keywords" VALUE="%%keywords%%">
  <INPUT TYPE="hidden" NAME="d_product_cat" VALUE="%%d_product_cat%%">
  <INPUT TYPE="button" VALUE="Previous $sc_db_max_rows_returned items" onClick="history.go(-1)">
  <INPUT TYPE="submit" NAME="search_request_button" VALUE="Next $sc_db_max_rows_returned items">
  <br>!;                                  #jxlhits
#######################################################################
$sc_search_end=qq!
  <\!-- sc_search_end -->
  <INPUT TYPE="hidden" NAME="hits_seen" VALUE="%%hits_seen%%">
  <INPUT TYPE="hidden" NAME="keywords" VALUE="%%keywords%%">
  <INPUT TYPE="hidden" NAME="d_product_cat" VALUE="%%d_product_cat%%">
  <INPUT TYPE="button" VALUE="Previous $sc_db_max_rows_returned items" onClick="history.go(-1)">
  <br>!;                                  #jxlhits
#######################################################################
#                    Cart Definition Variables                        #
#######################################################################

# The cart associative array is defined via the following steps:
#
# 1. The 0th field is ALWAYS the quantity of the purchased item
#
# 2. The subsequent fields are the same fields defined 
#    in the @sc_db_index_for_defining_item_id variable.  
#    This is done because whatever is defined in this array,
#    becomes the part of the product defined in the user's cart.
#       
# 3. The field before the next to last field is ALWAYS the   
#    "options" that have been selected by the user.  If you are    
#     not using options, this field still needs to be here. It will
#     just be used as an empty place marker.
#       
# 4. The next to last field is ALWAYS the price
#    after options have been calculated in with the normal price.
#       
# 5. The last field is ALWAYS a computer generated
#    unique identifier to distinguish cart line items from
#    each other.
#

$cart{"quantity"}            = 0;
$cart{"p_item_id"}           = 1;
$cart{"p_cat_id"}            = 2;
$cart{"p_saleprice"}         = 3;
$cart{"p_item_name"}         = 4;
$cart{"p_weight"}            = 5;
$cart{"p_weighttype"}        =6;
$cart{"p_value"}        =7;
$cart{"p_specialdb"}        =8;
$cart{"p_options"}           =9;
$cart{"price_after_options"} =10;
$cart{"unique_cart_line_id"} =11;

# This is the index to the original item price
$sc_cart_index_of_price               = $cart{"p_saleprice"};
$sc_cart_index_of_price_after_options = $cart{"price_after_options"};

# jxlrw   The following MUST BE SPECIFIED or else the items that are bought
# jxlrw   won't pass the cart compare test during checkout.
$sc_cart_index_of_commission_default  = $cart{'p_item_name'};
$sc_cart_index_of_commission_ids      = $cart{'p_item_name'};
$sc_cart_index_of_commission_amts     = $cart{'p_item_name'};
$sc_cart_index_of_return_period       = $cart{'p_item_name'};

# this will show the index of another column of our choice
# to measure -- such as weight or volume if we are selling
# something where the weight or volume affects the shipping
# or discount logic.
#
# jxl $sc_cart_index_of_measured_value = $cart{"p_saleprice"};
$sc_cart_index_of_measured_value = $cart{"p_weight"};
$sc_cart_index_of_deposit= $cart{"p_value"};
$sc_total_measured_value_name='Weight';
$sc_total_measured_value_unit='kg';

@sc_cart_display_fields = ("Item",
  #                         "Option"
#                          "Price"
                          );

# price after options is 6 
# and price before options would be 3

# Index into cart file is the SAME as the index
# into database.... except that quantity has been
# added to the beginning
# and the end has price after options and a unique
# computer generated row id.
#
@sc_cart_index_for_display = 
  ($cart{"p_item_name"},
#$cart{"p_weight"}
#   $cart{"p_options"}
  );

$sc_cart_index_of_item_id = $cart{"p_item_id"};
$sc_cart_index_of_quantity = $cart{"quantity"};

###########################################################
# jxlrw  Commonly used headings and words
# jxlrw  used on web pages
###########################################################
$sc_cart_quantity_heading='<font face="Arial" size="2">Qty</font>';
$sc_cart_subtotal_heading='<font face="Arial" size="2">Sub Total</font>';
$sc_cart_table_bgcolor = 'bgcolor=#ff9900';
$sc_cart_pre_shipping    ='Current Payment';
$sc_cart_sales_tax       ='Sales Tax';
$sc_cart_grand_total     ='Grand Total';
$sc_cart_shipping_charge ='Shipping';

###########################################################
# jxlrw  Commonly used headings and words
# jxlrw  used on order forms and email
###########################################################
$sc_order_quantity_heading='Quantity';
$sc_order_subtotal_heading='SubTot';
$sc_order_subtotal_item   ='SubTotal For Item';
$sc_order_pre_shipping    ='Pre-shipping';
$sc_order_sales_tax       ='Sales Tax';
$sc_order_grand_total     ='Grand Total';
$sc_order_shipping_charge ='Shipping';
###########################################################
# jxlrw  Headers and footers for displaying a cart
###########################################################
$sc_cart_view_header=qq!
<table width=100%>
 !;
$sc_cart_view_footer=qq!
 !;
###########################################################
# jxlrw  Headers and footers for modifying cart quantities
###########################################################
$sc_cart_new_quantity_header=qq!
<table width=565 border=0>
<tr><td>
<font size="2" face="Arial">
 <center>
   <table border="0">
     <tr>
       <th>New Quantity</th>
</FONT>

 !;
$sc_cart_new_quantity_footer=qq!
<font size="2" face="Arial">
 <P>
 <A HREF = "$sc_store.cgi?submit_change_quantity_button=yes&cart_id="
           TARGET="body">
 <INPUT TYPE="submit" NAME="submit_change_quantity_button"
        VALUE="Change Quantity">
 <INPUT TYPE="submit" VALUE="Continue Shopping">
 $sc_no_frames_button
 </FONT>
 </FORM>
 </CENTER>
</td></tr></table>
!;
###########################################################
# jxlrw  Headers and footers for deleting cart items
###########################################################
$sc_cart_delete_item_header=qq!
<table width=565 border=0>
<tr><td>
<font size="2" face="Arial">
 <center>
<img src="/~globalta/yourshoppingcart.gif">	
   <table border="0" width="100%">
     <tr>
       <th bgcolor=#ff9900><font size="2" face="Arial">Delete</font></th>
 !;
$sc_cart_delete_item_footer=qq!
 <INPUT TYPE="image" NAME="submit_deletion_button"
        VALUE="Delete Checked Items" src="/~globalta/Latin1/arr_delete_checked_items.gif" border=0>
<\!-- <INPUT TYPE="image"  VALUE="Continue Shopping" src="/~globalta/Latin1/arr_continue_shopping.gif" border=0>-->
 $sc_no_frames_button
 </FONT>
 </FORM>
 </CENTER>
</td></tr></table>
 !;
#######################################################################
#                    Order Form Definition Variables                  #
#######################################################################

  #the following will generate hidden fields with
  #the contents of the cart inside of them.

  $sc_order_with_hidden_fields = "yes";

# increasing numerical value (1,2,3) if its 0,
# then it never gets calculated at this stage
#
  $sc_calculate_discount_at_display_form = 0;
  $sc_calculate_discount_at_process_form = 0;

  $sc_calculate_shipping_at_display_form = 1;
  $sc_calculate_shipping_at_process_form = 2;

  $sc_calculate_sales_tax_at_display_form = 1;
  $sc_calculate_sales_tax_at_process_form = 2;

  @sc_order_form_shipping_related_fields = 
    ("s_country");

  @sc_order_form_discount_related_fields =
    ("a_acct_id");

$sc_order_form_shipping_related_field = "s_shipping";
$sc_order_form_shipping_destination_field = "s_country";
$sc_order_form_shipping_2day_file = "2day_shipping";
$sc_order_form_shipping_3day_file = "3day_shipping";
$sc_order_form_us_shipping_2day_file = "2day_us_shipping";
$sc_order_form_us_shipping_3day_file = "3day_us_shipping";
$sc_us_shipping="us_shipping_method.html";  #html page for us shipping method

# Shipping_logic is an array of criteria of what type of
# shipping cost to apply.
# The first pipe-delimited fields correspond to the
# sc_order_form_shipping_related_fields. 
#
# Subsequent fields correspond to total price, total quantity,
# and total measurement field. If the field is left blank,
# then that total does not enter into the equation of what
# shipping logic to apply.
#
# The last field is the amount of shipping to apply.
# It is either a hard dollar amount or it is a percentage
# (indicated by % sign) that will be applied to the 
# total price of the order.
#
#  @sc_shipping_logic = 
 #    ("US||1-5||5",
 #    "US||6-100||10");

$sc_shipping_pickup_option = "rp_p_location";

#
# Discount logic is the same as shipping logic except
# that whatever value is calculated for the discount will
# be subtracted rather than added to the grand total.
#
  @sc_discount_logic  = ("A||1-1000||10%");

#
# Sales tax is always a percentage of the total order
# 
  $sc_sales_tax = ".0825"; # 8.25%
  $sc_sales_tax_form_variable = "s_stateS";
  @sc_sales_tax_form_values = ("CA", "California");

#
# Process Order Variables:
#
# set email address     jxl dma
$sc_order_email = "info\@globaltalker.com, dennis\@infinex.com";
#$sc_order_email_to = "fax\@htnet.net";
#$sc_order_email_to = "14155332782\@pacbellpcs.net";
#$sc_order_email_subject="$sc_order_fax_phone";
$sc_customer_email_subject="GT Rental";
$sc_bcc_email = "$sc_monitor_id";
$sc_send_order_to_email = "yes";
$sc_send_order_to_log = "no";
$sc_order_log_file = "./$sc_main_store/Admin_files/order.log";
$sc_order_log_cus_dir="./$sc_main_store/Admin_files/order_cus";
$sc_order_log_bus_dir="./$sc_main_store/Admin_files/order_bus";
$sc_order_check_db = "yes";

#
# Do we use PGP Encryption -- WARNING: This is a difficult
# option to setup. You must go into the pgp-lib.pl file
# and edit the pgp variables in the header for your specific
# setup.
#
$sc_use_pgp = "no";
$sc_pgp_temp_file_path = "./$sc_store/Admin_files";

#######################################################################
#                     Store Option Variables                          #
#######################################################################

$sc_use_html_product_pages = "No"; # A yes means that you will not generate
				 # Product pages using a database.
$sc_should_i_display_cart_after_purchase = "No"; # A no means that the
				# client will be sent back to the product
				# page from which they just ordered.
				# A yes means that they will be taken to a
				# page displaying their current cart after
				# every purchase. 

$sc_shall_i_let_client_know_item_added = "no";
$sc_item_ordered_message = "<H2><CENTER>Your order has been added to your
                            cart! Thank you!</CENTER></H2>";
$sc_shall_i_email_if_error = "yes";
$sc_shall_i_log_errors = "yes";
$sc_shall_i_log_accesses = "yes";

#######################################################################
#                    HTML Search Variables                            #  
#######################################################################

$sc_root_web_path = "/homed/$sc_login_name/public_html/cgi-bin/$sc_main_store/$sc_store/Html/Products";
# Set URL for searches    jxl dma
$sc_server_url = "$sc_nossl_url/$sc_store/Html/Products";
@sc_unwanted_files = ('*.cgi');

#######################################################################
#                  Error Message Variables                            #
#######################################################################

$sc_page_load_security_warning = "I am sorry, but you may only use this
	program to view HTML pages.  If you absolutely MUST view non-HTML
	pages within your store, you must modify lines 79-81, but be
	careful, doing so may make your system vulnerable to hackers.";

$sc_randomizer_error_message = "There must be something wrong with your local
	rand function because I cannot get a unique, random number for
	your shopping cart. Please check the call to rand in the Assign a
	Shopping Cart routine.";

#######################################################################
#                  Miscellaneous Variables
#######################################################################
$sc_admin_email = "$sc_admin_id";
@acceptable_file_extensions_to_display = (".html", ".htm", ".shtml");
$sc_money_symbol = "\$";
$sc_money_symbol_placement = "front";
 
$sc_current_century = "20";
$sc_number_days_keep_old_carts = .5;

$sc_no_frames_button = "";
#######################################################################
# Tracking display controls
#######################################################################
$sc_tracking_display_none= qq!
    <p>You have no outstanding orders at this time.<p>
       !;

$sc_tracking_display_header = qq!

    <\!-- sc_tracking_display_header -->
    <br><b>Account:</b> %%a_acct_id%% &nbsp &nbsp<b>User ID:</b> %%a_user_id%%
    <br>%%b_name1%% %%b_name2%%, the status of your order(s)
       is shown in the following table.
    <br>
    <form method="post" action="$sc_store.cgi">
      <input type = "hidden" name="d_product_cat" value="%%d_product_cat%%">
      <table border>
        <tr>
          <th colspan="2">Order Info</th>
          <th colspan="3">Billing Info</th>
          <th colspan="2">Delivery Info</th>
        </tr>
        <tr>
          <th>Date</th>
          <th>Number</th>
          <th>Price</th>
          <th>Type</th>
          <th>Verified</th>
          <th>Date</th>
          <th>Number</th>
        </tr>!;

$sc_tracking_display_row = qq!
        <\!-- sc_tracking_display_row -->
        <tr>
          <td>%%order_date%%</td>
          <td><input type="submit" name="display_order_email" value="%%order_num%%"></td>
          <td align="right">%%grand_total%%</td>
          <td>%%cc_typeS%%</td>
          <td>%%cc_vdate%%<br>%%cc_status%%</td>
          <td>%%s_date%%<br>%%s_status%%</td>
          <td>%%s_shipping%%<br>%%s_num%%</td>
        </tr>!;

$sc_tracking_display_trailer = qq!
      </table>
    </form>
    !;

#######################################################################
# Affiliate status display controls
#######################################################################
$sc_aff_display_none= qq!
    <p>You have no outstanding commissions at this time.<p>
       !;

$sc_aff_display_status = qq!
        <\!-- sc_aff_display_status -->
        <p>%%r_tot_commission%%  Total paid commissions
        <br>%%r_tot_billing%%  Total waiting for Billing Verification
        <br>%%r_tot_shipping%%  Total waiting for Shipping
        <br>%%r_tot_return%%    Total waiting for return period
        <br>%%r_tot_due%%       Total commissions to be paid on
                                the %%r_aff_deposit%% of the month.
        !;

$sc_aff_display_header = qq!

    <\!-- sc_aff_display_header -->
    <br><b>Account:</b> %%a_acct_id%% &nbsp &nbsp<b>Affiliate ID:</b> %%a_user_id%%
    <br>%%b_name1%% %%b_name2%%, the status of your commission(s)
       is shown in the following table.
    <br>
    <table border>
      <tr>
        <th colspan="2">Order Info</th>
        <th colspan="3">Commission Status</th>
        <th colspan="2">Commission Due</th>
      </tr>
      <tr>
        <th>Date</th>
        <th>Order</th>
        <th>Billing</th>
        <th>Shipping</th>
        <th>Days</th>
        <th>Date</th>
        <th>Amt</th>
      </tr>!;

$sc_aff_display_row = qq!
      <\!-- sc_aff_display_row -->
      <tr>
        <td>%%order_date%%</td>
        <td>%%order_num%%</td>
        <td>%%cc_vdate%%<br>%%cc_status%%</td>
        <td>%%s_date%%<br>%%s_status%%</td>
        <td align="right">+ %%return_period%%</td>
        <td>%%r_date%%</td>
        <td align="right">%%commission_amt%%</td>
      </tr>!;

$sc_aff_display_trailer = qq!
    </table>
    !;

#######################################################################
# Billing status display controls
#######################################################################
$sc_billing_display_none= qq!
    <p>You have no outstanding billing at this time.<p>
       !;

$sc_billing_display_header = qq!

    <\!-- sc_billing_display_header -->
    <br><b>Company ID:</b> $sc_billing_control_id
    <br>Click the "<b>NOK</b>" or "<b>OK</b>" button to
       set the results of your billing check.
    <br>
    <table border>
      <tr>
        <th colspan="1">Order</th>
        <th colspan="2">Billing Info</th>
        <th colspan="2">Status</th>
        <th colspan="2">Select</th>
      </tr>
      <tr>
        <th>Info</th>
        <th>Number Expr</th>
        <th>Amount</th>
        <th>Date</th>
        <th>Status</th>
        <th>OK</th>
        <th>NOK</th>
      </tr>!;
             
$sc_billing_display_row = qq!

    <\!-- sc_billing_display_row -->
    <form method = "post" action="$sc_store.cgi">
      <input type = "hidden" name="page" value="../frames_frontpage.html">
      <input type = "hidden" name="d_product_cat" value="%%d_product_cat%%">
      <input type = "hidden" name="order_num" value="%%order_num%%">
      <tr>
        <td>%%order_date%%
            <input type="submit" name="display_order_email" value="%%order_num%%"></td>
        <td>%%cc_number%%\&nbsp;%%cc_monthS%%/%%cc_yearS%%
            <br><b>%%cc_typeS%%</b> &nbsp; %%cc_owner%%</td>
        <td align="right">%%grand_total%%</td>
        <td>%%cc_vdate%%</td>
        <td>%%cc_status%%</td>
        <td><input type="submit" name="billing_ok_button" value="OK"></td>
        <td><input type="submit" name="billing_nok_button" value="NOK"></td>
      </tr>
    </form>!;

$sc_billing_display_trailer = qq!
    <\!-- sc_billing_display_trailer -->
    </table>
    !;

#######################################################################
# Shipping status display controls
#######################################################################
$sc_shipping_display_none= qq!
    <p>You have no outstanding shipping at this time.<p>
       !;

$sc_shipping_display_header = qq!

    <\!-- sc_shipping_display_header -->
    <br><b>Company ID:</b> $sc_shipping_control_id
    <br>Click the "<b>Submit</b>" button to
       set the results of your shipping process.
    <br>
    <table border>
      <tr>
        <th colspan="1">Order</th>
        <th colspan="3">Order Status</th>
        <th colspan="1">Submit</th>
      </tr>
      <tr>
        <th>Info</th>
        <th>Billing</th>
        <th>Carrier Shipping Num</th>
        <th>Shipping</th>
        <th>Submit</th>
      </tr>!;
             
$sc_shipping_display_row = qq!

    <\!-- sc_shipping_display_row -->
    <form method = "post" action="$sc_store.cgi">
      <input type = "hidden" name="page" value="../frames_frontpage.html">
      <input type = "hidden" name="order_num" value="%%order_num%%">
      <input type = "hidden" name="d_product_cat" value="%%d_product_cat%%">
      <tr>
        <td>%%order_date%%
           <input type="submit" name="display_order_email" value="%%order_num%%"></td>
        <td>%%cc_vdate%% %%cc_status%%</td>
        <td>Carrier: %%s_shipping%%<br>
        <input type="text" name="s_num" value="%%s_num%%" size="20" maxlength="20"></td>
        <td>%%s_date%%<br>
            <select name="s_status">
              <option value>** Status **</option>
              <option value="OK, Shipped">OK, Shipped</option>
              <option value="Back Order">Back Order</option>
              <option value="Not In Stock">Not In Stock</option>
              <option value="Discontinued">Discontinued</option>
            </select>
        </td>
        <td><input type="submit" name="shipping_button" value="Submit"></td>
      </tr>
    </form>!;

$sc_shipping_display_trailer = qq!
    <\!-- sc_shipping_display_trailer -->
    </table>
    !;
#######################################################################
# Member/affiliate status display controls
#######################################################################
$sc_member_display_none= qq!
    <p>There are no members or affiliates at this time.<p>
       !;

$sc_member_display_header = qq!

    <\!-- sc_member_display_header -->
    <br><b>Company ID:</b> $sc_affiliate_control_id
    <br>Click the "<b>Submit</b>" button to
       update a member's or an affiliate's status.
    <br>
    <table border>
      <tr>
        <th>Account</th>
        <th>T</th>
        <th>Userid</th>
        <th>Name</th>
      <th>Address/Email</th>
        <th>Created</th>
        <th>Modified</th>
        <th>Options</th>
        <th>Update</th>
      </tr>!;
             
$sc_member_display_row = qq!
    <\!-- sc_member_display_row -->
    <form method = "post" action="$sc_store.cgi">
      <input type = "hidden" name="d_product_cat" value="%%d_product_cat%%">
      <input type = "hidden" name="page" value="../frames_frontpage.html">
      <input type = "hidden" name="a_user_id" value="%%a_user_id%%">
      <tr>
        <td>%%a_acct_id%%</td>
        <td>%%r_aff_mem%%</td>
        <td>%%a_user_id%%</td>
        <td>%%b_name1%%\&nbsp;%%b_name2%%</td>
   <td>%%b_street%%<br>%%b_city%%,%%b_stateS%%,%%b_zip%%<br>(%%b_day_area%%)%%b_day_pfx%%%%b_day_num%%<br>%%b_email%%</td>
        <td>%%a_cdate%%<br>%%a_ctime%%</td>
        <td>%%a_mdate%%<br>%%a_mtime%%</td>
        <td><select name="mem_oper">
              <option value>** Options **</option>
              <option value="AffOn">Set Aff On</option>
              <option value="AffOff">Set Aff Off</option>
              <option value="DelMem">Delete Mem</option>
            </select>
        </td>
        <td><input type="submit" name="aff_control_button" value="Submit"></td>
      </tr>
    </form>!;

$sc_member_display_trailer = qq!
    <\!-- sc_member_display_trailer -->
    </table>
    !;
#######################################################################
# Category display controls
#######################################################################
$sc_category_display_none= qq!
    <p>You have no product categories in $sc_data_dir_path.<p>
    <table border="1">
      <form method = "post" action="$sc_store.cgi">
        <input type = "hidden" name="page" value="../frames_frontpage.html">
        <tr>
          <th>New Product Category
          <th>Add Category
        <tr>
          <td valign="top"><input type="text" name="p_cat_id" value="">
          <td valign="top"><input type="submit" name="category_add_button"
              value="Add Category">
        </tr>
      </form>
    </table>
    !;

$sc_category_display_header = qq!

    <\!-- sc_category_display_header -->
    <br><b>Company ID:</b> $sc_product_control_id
    <br>Click the "<b>Select</b>" button to
       show the items in that category.
    <br>
    <table border>
      <tr>
        <th>Category</th>
        <th>Display Products</th>
        <th>Delete Entire Category</th>
      </tr>!;
             
$sc_category_display_row = qq!

    <\!-- sc_category_display_row -->
    <form method = "post" action="$sc_store.cgi">
      <input type = "hidden" name="page" value="../frames_frontpage.html">
      <input type = "hidden" name="p_cat_id" value="%%p_cat_id%%">
      <tr>
        <td>%%p_cat_id%%</td>
        <td><input type="submit" name="category_display_button"
            value="Display Products"></td>
        <td><input type="submit" name="category_delete_button"
            value="Delete Category"></td>
      </tr>
    </form>!;

$sc_category_display_trailer = qq!
    <\!-- sc_category_display_trailer -->
    </table>
    <table border="1">
      <form method = "post" action="$sc_store.cgi">
        <input type = "hidden" name="page" value="../frames_frontpage.html">
        <tr>
          <th><a href="$sc_store.cgi?page=help_category.html&d_product_cat=%%d_product_cat%%" target="_help">New Product Category</a>
          <th>Add Category
        <tr>
          <td valign="top"><input type="text" name="p_cat_id" value="">
          <td valign="top"><input type="submit" name="category_add_button"
              value="Add Category">
        </tr>
      </form>
    </table>
!;
#######################################################################
# Data Item display controls                                   jxlrw
#######################################################################
$sc_item_display_none= qq!
    <p>You have no data items in the '%%p_cat_id%%' product category.<p>
    <form method = "post" action="$sc_store.cgi">
      <input type = "hidden" name="page" value="../frames_frontpage.html">
      <input type = "hidden" name="p_cat_id" value="%%p_cat_id%%">
      <center>
        <input TYPE="submit" NAME="item_display_button" VALUE="Add Item">
        <input type="submit" name="categories_display_button" value="Categories">
      </center>
    </form>
       !;

$sc_item_display_header = qq!

    <\!-- sc_item_display_header -->
    <br><b>Company ID:</b> $sc_product_control_id
    <br>Click the "<b>Select</b>" button to
       show the %%p_cat_id%% item details.
    <br>
    <table border>
      <tr>
        <th>%%p_cat_id%% ID:</th>
        <th>Item Type</th>
        <th>Item Name</th>
        <th>Price</th>
        <th>Display</th>
        <th>Delete</th>
      </tr>!;
             
$sc_item_display_row = qq!

    <\!-- sc_item_display_row -->
    <form method = "post" action="$sc_store.cgi">
      <input type = "hidden" name="d_product_cat" value="%%d_product_cat%%">
      <input type = "hidden" name="page" value="../frames_frontpage.html">
      <input type = "hidden" name="p_cat_id" value="%%p_cat_id%%">
      <input type = "hidden" name="p_item_id" value="%%p_item_id%%">
      <input type = "hidden" name="p_item_name" value="%%p_item_name%%">
      <tr>
        <td>%%p_item_id%%</td>
        <td>%%p_cat_name%%</td>
        <td>%%p_item_name%%</td>
        <td align="right">%%p_saleprice%%</td>
        <td><input type="submit" name="item_display_button" value="Display Item"></td>
        <td><input type="submit" name="item_delete_button" value="Delete Item"></td>
      </tr>
    </form>!;

$sc_item_display_trailer = qq!
    <\!-- sc_item_display_trailer -->
    </table>
    <center>
      <form method = "post" action="$sc_store.cgi">
        <input type = "hidden" name="d_product_cat" value="%%d_product_cat%%">
        <input type = "hidden" name="p_cat_id" value="%%p_cat_id%%">
        <input type = "hidden" name="p_item_id" value="">
        <input type="submit" name="categories_display_button" value="Display Product Categories">
        <input TYPE="submit" NAME="item_display_button" VALUE="Add New Item">
      </form>
    </center>
!;
############################################################################
# jxlrw  Data base definition file for OTHER data base
# jxlrw  If the OTHER data base structure ever changes, then this sturcture
# jxlrw  MUST have the same changes.
# jxlrw  These names MUST also be defined in sv_vars
# jxlrw  These names MUST be unique so that they do not conflict with
# jxlrw  any variable field names in this web store.
############################################################################
@sc_item2_db_fields=
( 'd_product_id,req',         # jxlrw  req field name
  'd_product_cat,req',        # jxlrw  req field name
  'd_restid,req',
  'd_price_avg,req',
  'd_type,req',
  'd_name,req',
  'd_street,req',
  'd_city,req',
  'd_state,req',
  'd_zip,req',
  'd_phone_area,req',
  'd_phone_pfx,req',
  'd_phone_num,req',
  'd_fax_area,req',
  'd_fax_pfx,req',
  'd_fax_num,req',
  'd_hours_from,req',
  'd_hours_to,req',
  'd_days_open,req',
  'd_link,req',
  'd_image_url,opt',
  'd_description,req',
  'd_keywords,req',
  'commission_ids,req',
  'commission_amts,req',
  'commission_default,req',
  'd_spare1,opt',
  'd_spare2,opt',
  'd_options,opt'
);
############################################################################
# jxlrw  Routine to copy a Restaurant's data file into $form_data{}
############################################################################
$sc_special_code='copy_data';
sub copy_data
{ local($zdfn,$zdb_entry,$zval,$ztmp,$zfield,$zkey,$zoper);
  local(@zval);
  local($zproduct,$zproduct_id);

  $zproduct_cat =$form_data{'d_product_cat'};
  $zproduct_id  =$sc_store;
  if($zproduct_cat eq ''
   ||$zproduct_id  eq '')
  { return;
  }
  $zdfn="./$sc_main_store/Data_files/df_"."$zproduct_cat";
  if(!open (DATADB, "<$zdfn"))
  { $error_msg="<p>Unable to open data file $zdfn for read.\n".
               "<br>Send an email about this error to $sc_admin_email.\n";
  }
  else
  { $error_msg="<p>Unable to find $zproduct_id in $zdfn.\n";
    while($zdb_entry=<DATADB>)
    { chop($zdb_entry);
      @zval=split(/\|/,$zdb_entry);
      foreach $zfield(@sc_item2_db_fields)
      { $ztmp=shift(@zval);
        ($zkey,$zoper)=split(/,/,$zfield,2);
        $form_data{$zkey}="$ztmp";
      }
      if($form_data{'d_product_cat'} eq $zproduct_cat
       &&$form_data{'d_product_id'} eq $zproduct_id)
      { $error_msg='';
        last;
      }
    }
    close(DATADB);
  }
  if($error_msg ne '')
  { &display_page("$sc_error_msg_path", 'copy_data',
      __FILE__, __LINE__,'y');
    exit;
  }
  $sc_order_email_subject="1-($form_data{'d_fax_area'})-$form_data{'d_fax_pfx'}-$form_data{'d_fax_num'}";
  $sc_customer_email_subject="$form_data{'d_name'} Order";
  $sc_product_control_id="$form_data{'d_restid'}";
}
############################################################################
1; # Libraries always end this way so that they return true to require
