#!/usr/bin/perl
use strict;
use CGI qw/:standard :html3 *table/;
use LWP::UserAgent;
my $scriptname=$ENV{'SCRIPT_NAME'};
my $radio=(param('RadioGroup1'))?param('RadioGroup1'):"";
my $select=(param('select'))?param('select'):"";
my $textfield=(param('textfield'))?param('textfield'):"";
my $keyword=(param('keyword'))?param('keyword'):"";
my $excludeorg=(param('excludeorg'))?param('excludeorg'):"";
my $excludegov=(param('excludegov'))?param('excludegov'):"";
my $excludeedu=(param('excludeedu'))?param('excludeedu'):"";
my $excludecom=(param('excludecom'))?param('excludecom'):"";
my $mission=(param('mission'))?param('mission'):"";
my $values=(param('values'))?param('values'):"";
my $vision=(param('vision'))?param('vision'):"";
my $listings=(param('RadioGroup2'))?param('RadioGroup2'):"40";
my $searchengine=(param('RadioGroup3'))?param('RadioGroup3'):"www.google.com";
my $action=(param('search'))?param('search'):"";
my $url=(param('url'))?param('url'):"";
##########################################################
my ($srchresult,$buff,@buff,$nexts,$j,$count,$ban1,$ban2,$ban3);
my ($error,$string,$m,$checked);
$checked="";
$checked="checked" if ($action eq "");
$ban1=""; $ban2=""; $ban3="";
if (open(B,"banner1.tpl")) {
@buff=;
close(B);
$ban1=join '',@buff;
}
if (open(B,"banner2.tpl")) {
@buff=;
close(B);
$ban2=join '',@buff;
}
if (open(B,"banner3.tpl")) {
@buff=;
close(B);
$ban3=join '',@buff;
}
my %selectbox = (
"aerospace OR Aviation OR Defense" => "Aerospace Aviation and Defense",
"agency" => "Agency",
"agricultural OR farm" => "Agriculture",
"architectural" => "Architecture",
"automotive" => "Automotive",
"chemical OR solvent OR paint" => "Chemicals and Allied Products",
"church OR religious" => "Church and Religious",
"communications OR networking OR telecommunications OR LAN" => "Communications and Networking",
"computer OR software OR information technology" => "Computers & Information Technology",
"construction OR builder OR engineering" => "Construction and Engineering",
"consumer electronics" => "Consumer Electronics",
"convention OR trade show" => "Conventions and Trade Shows",
"distribution OR distributor" => "Distribution",
"education OR university OR high school OR grade school" => "Education",
"electrical contractor OR electrician" => "Electrical Contractor",
"electronic commerce OR ecommerce OR ebusiness" => "Electronic Commerce",
"entertainment OR hospitality" => "Entertainment and Hospitality Industry",
"environmental" => "Environment",
"financial services" => "Financial Services",
"floral OR florist" => "Florist",
"food OR beverage OR provisioning OR bottling" => "Food and Beverage",
"fundraising" => "Fundraising",
"health care OR hospital OR laboratory" => "Health Care",
"heating OR air conditioning OR HVAC" => "Heating and Air Conditioning",
"cleaning OR maid OR home repair OR plumbing OR window OR roofing" => "Home services",
"industrial supplies" => "Industrial Supplies",
"catalog OR mail order" => "Mail Order and Catalog Sales",
"manufacturing" => "Manufacturing",
"marketing OR advertising" => "Marketing and Advertising",
"news OR media" => "News and Media",
"office supply OR equipment" => "Office Supplies and Equipment",
"energy OR oil OR gas OR coal OR mining" => "Oil and Energy",
"pharmaceutical OR drug" => "Pharmaceutical",
"plumbing contractor OR plumber" => "Plumbing",
"consulting OR consultancy" => "Prof Svcs - Consulting",
"design firm OR design" => "Prof Svcs - Design",
"training OR development" => "Prof Svcs - Training and Development",
"professional services" => "Professional Services",
"publishing OR printing" => "Publishing and Printing",
"real estate OR realty" => "Real Estate",
"research and development" => "Research and Development",
"retail" => "Retail",
"security OR investigative services" => "Security & Investigative Services",
"shipping OR transportation OR logistic" => "Shipping & Transportation",
"software consultant" => "Software Consultant",
"software publisher OR software development" => "Software Developer or Publisher",
"sports OR baseball OR football OR soccer OR basketball" => "Sports Team",
"systems integration" => "Systems Integrator",
"telecommunications OR telephone" => "Telecommunications",
"travel" => "Travel",
"trucking" => "Trucking",
"internet OR web" => "Web and Internet",
"wholesale" => "Wholesale"
);
if ($url ne "" || $action ne "") {
if ($url eq "" ) {
if ($radio eq ""){
# EDIT HERE THE ERROR IN HTML FORMAT
$error= qq|