#!/usr/npac/bin/perl

require '/project/clearmark/iwcp/cgi-bin/pl/cookie.lib'; 

   print "Content-type: text/html\n\n";
   print "\n";

if (&GetCookies('RETURNALLPARTS','ORG_GROUP','DEALER_NUM','DISTRIBUTOR_NAME','DISTRIBUTOR_NUM', 'DEALER_NAME')) {
   print "<html>\n";
   print "<head><title></title></head>\n";
   print "<BODY bgcolor=\"#FFFFFF\">\n";
   print "<form name=\"userstats\">";
   print "<input type=\"hidden\" name=\"RETURNALLPARTS\" value=\"";
   print "$Cookies{'RETURNALLPARTS'}\">";
   print "<input type=\"hidden\" name=\"ORG_GROUP\" value=\"";
   print "$Cookies{'ORG_GROUP'}\">";
   print "<input type=\"hidden\" name=\"DEALER_NUM\" value=\"";
   print "$Cookies{'DEALER_NUM'}\">";
   print "<input type=\"hidden\" name=\"DEALER_NAME\" value=\"";
   print "$Cookies{'DEALER_NAME'}\">";
   print "<input type=\"hidden\" name=\"DISTRIBUTOR_NAME\" value=\"";
   print "$Cookies{'DISTRIBUTOR_NAME'}\">";
   print "<input type=\"hidden\" name=\"DISTRIBUTOR_NUM\" value=\"";
   print "$Cookies{'DISTRIBUTOR_NUM'}\">";
   print "</form>";
   print "</body>\n";
   print "</html>\n";
}
else
{
   print "<html>\n";
   print "<head><title></title></head>\n";
   print "<BODY bgcolor=\"#FFFFFF\">\n";
   print "<form name=\"userstats\">";
   print "<input type=\"hidden\" name=\"RETURNALLPARTS\" value=\"";
   print "null\">";
   print "<input type=\"hidden\" name=\"ORG_GROUP\" value=\"";
   print "null\">";
   print "<input type=\"hidden\" name=\"DEALER_NUM\" value=\"";
   print "null\">";
   print "<input type=\"hidden\" name=\"DEALER_NAME\" value=\"";
   print "null\">";
   print "<input type=\"hidden\" name=\"DISTRIBUTOR_NAME\" value=\"";
   print "null\">";
   print "<input type=\"hidden\" name=\"DISTRIBUTOR_NUM\" value=\"";
   print "null\">";
   print "</form>";
   print "</body>\n";
   print "</html>\n";
}
exit;
