#!/usr/bin/perl

#use utf8;
use strict;
use CGI;

use Opals::Context;#use MARC::File::USMARC;
#use MARC::File::XML;
#use XML::XPath;
#use XML::XPath::XMLParser;

use POSIX qw(
    ceil
);
use POSIX qw(
    ceil
    floor
);
use Opals::Template qw(
    tmpl_rangedPageList
    tmpl_read
    tmpl_write
    tmpl_redirect
);

use Opals::Context;#use MARC::File::USMARC;
use Opals::MarcXmlParser;
use Opals::SolrIndex qw(
    slr_search
    slr_buildSearchQuery
    slr_buildSearchQuery_ARL
    slr_getSuggestion
    slr_browseAuthor_keyword
    slr_browseSubject_keyword
    slr_browseSubject_beginWith
        
);
use Opals::Rating qw(
    cmntRating_getAvgRating
    cmntRating_numOfRating
);

use Opals::Search qw(
    srch_searchRecordSQL
    srch_searchAuthorSQLs 
    srch_searchSubjectStartWithSQLs
    srch_searchSubjectContainWithSQLs

    srch_zTab
    srch_buildSchTitleStartWithSQLs
);

use Opals::BookCover qw(
    bookCover_getUrl
    bookCover_amazon
    bookCover_google
    bookCover_syndetics

);
use Opals::RecordInfoHTML qw(
    rinfo_getPageNavForm_search
);
use Opals::Constant;

use Opals::Locale qw(
    loc_getMsgFile
    loc_write
);
use JSON;
my $dbh = Opals::Context->dbh();
END { $dbh->disconnect(); }

my $cgi = CGI->new;
my $input = $cgi->Vars();
my ($permission, $cookie, $template) = tmpl_read(
        {
            dbh             => $dbh,
            cgi             => $cgi,
            tmplFile        => 'search/beginner.tmpl',
        }
);
my @cookieList = (@$cookie);
my $sCategory='' ;
my $lang =$ENV{'curLang'};
my $pageEdit = (defined $input->{'pageEdit'} && $input->{'pageEdit'} ==1)? 1:0;
$template->param( pageEdit=> $pageEdit);
if ($permission && $permission->{'pref_edit'}) {
     $template->param(permEditCal=>$permission->{'pref_edit'},
                      allowEdit  =>($pageEdit>0)?1:0
                     );

}

my $showHolidays = Opals::Context->config('showHolidays');
styleBeginner($input->{'subjBgn'}, $template, $showHolidays);
$sCategory=  uc($input->{'subjBgn'});
if ($input->{'subjname'}){
   $sCategory = $sCategory ."--" .$input->{'subjname'};
}
$template->param(
    subjBgn   =>$input->{'subjBgn'},
    subjname  =>$input->{'subjname'},
    sCategory =>$sCategory,
    sortAllow=>1,
);

my @sInput;
my $iCount = 0;
foreach my $cgiInput (keys %$input) {
    $iCount++ if ($cgiInput =~ m/^sf/);
}
my ($sfOrder, $kw, $boolop);
for (my $i = 0; $i < $iCount; $i++) {
    $sfOrder= 'sf' . $i;
    $kw     = 'kw' . $i;
    $boolop = 'boolop' . $i;
    push @sInput, {
        iOrder  => "$i",
        sOrder  => "$input->{$sfOrder}",
        sKw     => "$input->{$kw}",
        sBool   => $input->{$boolop},
    };
}
$template->param(sInput => \@sInput,);


my $zid = $input->{'zid'};
($zid && $zid >= 0) || ($zid = 0);
my $cerfq;
if ($input->{'kw0'}) {
    $cerfq = $input->{'kw0'};
    $cerfq =~ s/\|/ or /g;
}
my ($sfOrder, $kw, $boolop);
my @sInput;
my ($query, $pqf, $sTerm);
my $iCount = 0;
my $query  = $input->{'kw0'};
($input->{'sf0'}) || ($input->{'sf0'} = 1016);
my $sfield= $input->{'sf0'};
$sfield = 1016 if(!$sfield);
 
$template->param(
    highlightString => $input->{'highlightString'},
);

    writeSortParam2tmpl($input);
    setPageNavForm($cgi);
my $pageNavForm =rinfo_getPageNavForm_search($cgi);
    $template->param(pageNavForm=>$pageNavForm,
                     hlpUrl     => HELP_URL->{"beginner"}
                     );

#---------------------- SEARCH --------------------
    my  $showLocation =Opals::Context->preference('showLocation');
    #my  $srchLoc      =Opals::Context->preference('OWLsrchLocation');
    my  $srchLoc      =Opals::Context->preference('beginnerSrchLocation');
    my $locList=[];
    foreach my $loc (split(",",$srchLoc)){
        push @$locList,{location=>$loc} if($loc ne "");
    }

    my $pSize   = 10;
    my $curPage = $input->{'pNum'};
    ($curPage && $curPage >= 1) || ($curPage = 1);
    my $offset      = ($curPage - 1) * $pSize ;
    my $sortAttr    = $input->{'sortAttr'};
    my $sortOrder   = $input->{'sortOrder'};
 
    my $fieldBrowse = $input->{'fBrowse'};
    my $headerStr   = 'Subject';
    $headerStr = 'Sujet' if ($lang eq 'fr' );
    my($sql,$sqlCount)=("","");
    my ($hits,$recList) =(0,undef);
    my $rs=undef;

    if($fieldBrowse && $fieldBrowse ne ""){
        my $srchTerm=$input->{'kw0'};
        $pSize=30;
        my $numCol=($fieldBrowse eq 'author')?3:2;
        doBrowse($fieldBrowse,$srchTerm, $offset, $pSize,$numCol);
    }
    else{
        doSearch();
    } 
       

$template->param(searchByCat=>($sCategory ne '') ?  1:0);
$template->param(notShowTerm=>($sCategory ne '') ?  1:0);
$template->param(showHolidays=>(lc($showHolidays) eq 'y'));
$template->param(locList=>$locList);

if($sfield eq '4'){
        $template->param(searchByTitle =>1,
                         bgcolor       =>"#D6FF86",
                         sf0           => $sfield,
                         );
       
}
elsif($sfield eq '1003'){
        $template->param(searchByAuthor =>1,
                         bgcolor        =>"#B4E5FF",
                         sf0            => $sfield,
                        );
}
elsif($sfield eq '21'){
        $template->param(searchBySubject =>1,
                         bgcolor         =>"#FF999B",
                         sf0             => $sfield,
                         notShowTerm     =>1,
                        );
}
else{
        $template->param(searchByKeyword =>1,
                         bgcolor         =>"#FEED8B",
                         sf0             => $sfield,
                        );

        
       # if($resultSize >6){
                $template->param(targetSubjSrch =>1,);
        #}
}

$template->param( srchBgn =>1);

my $msgValMap=();
my $stdMsgMap  =loc_getMsgFile('search/beginner.msg',$msgValMap);
loc_write($template,$stdMsgMap);
if ($zid) {
    my $infoMsgMap = loc_getMsgFile('record/bib_info.msg');
    loc_write($template, $infoMsgMap);
}

tmpl_write($dbh, $cgi, \@cookieList, $template);

#=======================================================
sub doSearch{
    my  $viewStyle = "list";
    if($cgi->cookie('viewStyle_search') && $cgi->cookie('viewStyle_search') eq 'gallery'){
        $viewStyle='gallery';
    }
    $viewStyle = "list";

    my $pageReq="searchPage";
    my $hideDbList=0;
    if(!keys %$input){
        $template->param(initSearch=>1);
        $hideDbList=1;
    }

    my $rs = search_localDb();
    my ($hits,$recList) = ($rs->{'hits'},$rs->{'recordList'});
    if($hits >0){
            getBookCover($recList);
            getRating($recList);
            if ($hits - $offset + 1 <= 0) {
                my $availRange = $hits % $pSize;
                $availRange = $pSize if ($availRange == 0); 
                $offset = $hits - $availRange + 1;
                $curPage = ($offset - 1) / $pSize + 1;
            }
            my $recRsPos =$offset;                
            my $bkShelfMidCallno="";
            my $bkShelfMidRecId=0;
        my $titleFm ='';my $subtitleFm ='';
            foreach my $rec(@$recList){
                $rec->{'callnumber'} =~ s/[\s]+/<br>/g; 
                $rec->{'recRsPos'}=$recRsPos++; 
                
                    
                if($bkShelfMidCallno eq '' && $rec->{'callNum1St'} ne '' ){
                    $bkShelfMidCallno = $rec->{'callNum1St'};
                    $bkShelfMidRecId = $rec->{'rid'};
                }             
                $rec->{'callNum1St'} =~ s/ +/<br>/g; 
                $titleFm = $rec->{'title'};
                $titleFm=~ s/[\:]+$//g;
                $titleFm=~ s/[\/]+$//g;
                $rec->{'titleFm'} = $titleFm;
                if($rec->{'subtitle'} && $rec->{'subtitle'} ne ''){
                    $subtitleFm = $rec->{'subtitle'};
                    $subtitleFm=~ s/[\/]+$//g;
                    $rec->{'subtitleFm'} = $subtitleFm;
                }
            }
            my $pRange = 10;
            my @rangedPageList = tmpl_rangedPageList($hits, $curPage, $pSize, $pRange);
            my $recTo =  $offset  + $pSize ;
            if($recTo > $hits) {
                $recTo = $hits;
            }
$template->param(galleryView =>1) if($viewStyle eq 'gallery');
 $template->param(listRs =>1) if(scalar(@$recList) || $pageReq =~ m/newItemPage|reviewPage/ );
    $template->param(hideDbList          =>$hideDbList);

            $template->param(
                recFrom             => $offset +1,
                recTo               => $recTo ,
                rec_start           => $offset +1,
                rec_end             => ($offset + 1 +$#$recList ),
                rangedPageList      => \@rangedPageList,
                bkShelfMidCallno    =>$bkShelfMidCallno,
                bkShelfMidRecId     =>$bkShelfMidRecId,
            "sortAttr_$sortAttr"=>1 , 
               );
       
        }#if($hits >0)
        else{
            $template->param(
                    suggestion=>$rs->{'suggestion'}->{'term'}  ,
                    sugField  =>$rs->{'suggestion'}->{'field'}
            );
        
        }
    $template->param(
        bibliography        => (($#$recList >= 0) ? 1:0),
        hits                => $hits,
        rs                  => $recList,
        rs_json=>to_json($recList,{pretty=>1}),
        sTerm               => $sTerm,
        srchBgn             => 1,
        showLocation        => ($showLocation eq '1')?1:0,
       );
    
    $template->param(btnFontSize=>'10pt') ;
    if($lang && ($lang eq 'es' || $lang eq 'pt')){ 
        $template->param(btnFontSize=>'9pt');
    }


my @siteList = srch_zTab($dbh, $zid);
$template->param(
    zid => $zid,
    q   => $query,
    siteList            => \@siteList,
    cerfq =>$cerfq,
    pqf => $pqf,
    subjBgnMain => (($query || $input->{'subjBgn'} || $input->{'sbjSrch'}) ? 0:1),
);


}
#=======================================================
sub doBrowse{
    my ($fieldBrowse,$srchTerm, $offset, $pSize,$numCol)=@_;
    my ($hits,$browseList);
    my @result;
    my $headerStr;
    if($fieldBrowse eq "author"){
         ($hits,$browseList)=slr_browseAuthor_keyword($srchTerm,$offset,$pSize);
    }
    elsif($fieldBrowse eq "subjectContain" ){
         ($hits,$browseList)=slr_browseSubject_keyword($srchTerm,$offset,$pSize);
    }
    elsif($fieldBrowse eq "subjectbeginWith"){ 
         ($hits,$browseList)=slr_browseSubject_beginWith($srchTerm,$offset,$pSize);
    }
    $numCol=1 if(!$numCol);
    my $colSize=ceil($pSize/$numCol);
    my $j=-1;
    for(my $i=0; $i <scalar(@$browseList);$i++){
        if($i % $colSize ==0){
            push @result,{itemList=>[]};
            $j++;
        }
        push @{@result[$j]->{'itemList'}},{item=>@$browseList[$i]};
    }
   my $pRange = 10;
            my @rangedPageList = tmpl_rangedPageList($hits, $curPage, $pSize, $pRange);
   
    $template->param( srchBrowse            => 1,
                      q                     => $query,
                      "Browse_$fieldBrowse" => 1,
                      rangedPageList        => \@rangedPageList,
                      rs                    => \@result,
                      headerStr             => $headerStr,
                      fBrowse               => $fieldBrowse,);

}


#=======================================================
sub getBookCover{
    my($recList)=@_;
    my  $awsId =Opals::Context->preference('amazonId');
    my  $awsSecretKey =Opals::Context->preference('amazonSecreteKey');
    my  $syndeticsId =Opals::Context->preference('syndeticsId');
    if($syndeticsId ne''){
        bookCover_syndetics($recList);
    }
    elsif($awsId ne '' && $awsSecretKey ne ''){
        bookCover_amazon($recList,$awsId,$awsSecretKey);
    }
    else{
        bookCover_google($recList);
    }

}
#////////////////////////////////////////////////////////////////////////////
sub getRating{
    my ($recList)=@_;
    my  $rating =Opals::Context->preference('rating');
    if($rating && $rating ==2 ){
        foreach my $rec(@$recList){
            my $noReview  = cmntRating_numOfRating($dbh,$rec->{'rid'});
            my $avgRating = cmntRating_getAvgRating($dbh,$rec->{'rid'});
            my $numOfStars =floor($avgRating);
            my $fraction= $avgRating - $numOfStars ;
            if($fraction >0.25 && $fraction<0.75){
                $numOfStars += 0.5;
            }
            elsif($fraction >0.75){
                $numOfStars += 1;
            }

            my $avgRating = sprintf("%.2f", $avgRating);
            $rec->{'rateRec'} = $avgRating;
            $rec->{'numReview'} = $noReview;
            $rec->{'numOfStars'} = $numOfStars;
           }
    }
}

##=======================================================
sub search_localDb{
    my @recType     = $cgi->param('recType');
    my @location    = $cgi->param('location');
    my $filter;
    $filter->{'location'}=\@location;
    $filter->{'recType'}=\@recType;
    $rs =searchSolr($input,$filter);
    my $suggestion=undef;
    my $sfCount=0;

    if(!$rs->{'hits'}>0){
        foreach my $cgiInput (keys %$input) {
            $sfCount++ if ($cgiInput =~ m/^sf[\d]+/);
        }
     #   if ($sfCount ==1 ) {
            my $fieldSrch = $input->{'sf0'};
            ($fieldSrch && $fieldSrch ne '')||($fieldSrch = 'title');

            my $s= slr_getSuggestion($fieldSrch ,$input->{'kw0'});
            if($s ne ""){
                $suggestion={field=>$fieldSrch,term=>$s};
            }
      #  }

    }
    return { hits=>$rs->{'hits'},
             recordList=>$rs->{'recordList'},
             suggestion=>$suggestion
           };
}
#=======================================================
sub searchSolr{
    my ($input,$filter) =@_;
    my $lQuery=slr_buildSearchQuery($input,$filter);

    my $rs=undef;
    if($lQuery ne ''){
        $rs = slr_search({lQuery=>$lQuery,recFormat=>'brief',
                             sortAttr=>$sortAttr,sortDir=>$sortOrder,
                             offset=>$offset,size=>$pSize,
                             incCircStatus=>1});  
    }
    return $rs;
}

#=======================================================
# Fri, Oct 24, 2008 @ 09:16:19 EDT

sub writeSortParam2tmpl{
    my ($input) =@_;
    my $sortAttr = $input->{'sortAttr'};
    my $sortOrder = $input->{'sortOrder'};
    $sortAttr=undef if ($zid != 0);
    if(!$sortAttr &&  $input->{'sf0'} eq '5006'){
        $sortAttr=4;
    }

   $template->param(
    sortOrder => $sortOrder,
    sortAttr => $sortAttr,
    sortCallNum1st      => ($sortAttr == 5001)              ? 1 : 0,
    sort852c            => ($sortAttr == 8008)              ? 1 : 0,
    sortTitle           => ($sortAttr == 4)                 ? 1 : 0,
    sortAuthor          => ($sortAttr == 1003)              ? 1 : 0,
    sortPubDateSort     => ($sortAttr == 31)                ? 1 : 0,
    sortOrderReverse    => ($sortOrder && $sortOrder == 1)  ? 2 : 1,
    sortDown            => ($sortOrder && $sortOrder == 1)  ? 1 : 0,
    );



}
#=======================================================
sub setPageNavForm{
    my ($cgi,)=@_;
    my $input=$cgi->Vars();
    my @recType     = $cgi->param('recType');
    my $navFormInput=[];
    foreach my $iName(keys %$input){
        push @$navFormInput,{name=>$iName, value=>$input->{$iName}};
    }
    my @recType     = $cgi->param('recType');
    foreach my $rType(@recType){
        push @$navFormInput,{name=>'recType', value=>$rType};
    }
    my @fieldArr =qw(languageFilter formatFilter authorFilter subjectFilter deweyFilter eraFilter genreFilter);
    foreach my $f(@fieldArr){
        if(!defined $input->{$f}){
            push @$navFormInput,{name=>$f, value=>''};
        }
    }
    if(!defined $input->{'pNum'}){
        push @$navFormInput,{name=>'pNum', value=>1 };
    }
    $template->param(navFormInput => $navFormInput);
}
##############################################
sub getSubjectCount{
    my ($dbh,$term)=@_;
    my ($dbh,$term,$offset,$size)=@_;
    my $retval=0;
    my $sql = "select count(*) as count from opl_subjects where ";
    if (length($term) == 1) {
        $sql .= "subject like '$term%'  && recCount>0 ";
    }
    elsif (length($term) > 1) {
        if ($term =~ m/"([^\"]+)"/) {
            while ($term =~ s/"([^\"]+)"//) {
                $sql .= "subject like '%$1%' && ";
            }
        }
        
        $term =~ s/[\s]+/ /g;
        $term =~ s/(^ | $)//g;
        if ($term) {
            $term= " $term";
            $term =~ s/ / \+/g;
            $sql .= "match(subject) against('$term' in boolean mode) && ";
        }

        $sql .= "recCount > 0";
    }
    my $sth =$dbh->prepare($sql);
    $sth->execute();
    my $rec = $sth->fetchrow_hashref;
    if($rec) {
        $retval=$rec->{'count'};
    }
    return $retval;
        

}

#////////////////////////////////////////////////////////////////////////////////////////////////////
sub getSubjectList_bk{
    my ($dbh,$term,$offset,$size)=@_;
    my @retval;
    $term =~ s/^ +| +$//g;
    my $sql;
    if(length($term)==1){
        $sql="select id,subject from opl_subjects where subject like '$term%'  && recCount>0 order by subject limit $offset,$size";
    }
    elsif(length($term) >1){
        $term= " $term";
        $term =~ s/ +/ \+/g;
        $sql="select id,subject from opl_subjects where match(subject) against('$term' in boolean mode) && recCount>0 order by subject limit $offset,$size";
    }
    my $sth =$dbh->prepare($sql);
    $sth->execute();
    while( my $rec =$sth->fetchrow_hashref){
	$rec->{'subject'} =~ s/\'/\&#39/g;    
        push @retval,$rec;
    }
    $sth->finish;
    return \@retval;

    
}

#//////////////////////////////////////////////////////////////
sub getSubjectList{
    my ($dbh,$term,$offset,$size)=@_;
    my @retval;
    my $sql = 'select id,subject from opl_subjects where ';
    #$term =~ s/[\']+/''/g;

    if (length($term) == 1) {
        $term =~ s/[\']+/''/g;
        $sql .= "subject like '$term%'  && recCount>0 order by subject limit $offset,$size";
    }
    elsif (length($term) > 1) {
        if ($term =~ m/"([^\"]+)"/) {
            while ($term =~ s/"([^\"]+)"//) {
                my $tmp = $1;
                $tmp =~ s/[\']+/''/g;
                $tmp =~ s/(^ | $)//g;
                $sql .= "subject like '%$tmp%' && ";
            }
        }
        
        $term =~ s/[\s]+/ /g;
        $term =~ s/[\']+/''/g;
        $term =~ s/(^ | $)//g;
       if ($term) {
            $term= " $term";
            my @arrTerm = split(' ',$term);
            my $arg="" ;
            foreach my $t(@arrTerm){
                $arg .= " +(" . $t ." " .$t ."''s)";
            }
            $sql .= "match(subject) against('$arg' in boolean mode) && ";
        }
        
        $sql .= "recCount > 0 order by subject limit $offset, $size";
    }

    
    my $sth =$dbh->prepare($sql);
    $sth->execute();
    while (my $rec =$sth->fetchrow_hashref) {
	    $rec->{'subject'} =~ s/\'/\&#39/g;    
        push @retval,$rec;
    }
    $sth->finish;
    return \@retval;

    
}
#################################################################################
sub styleBeginner {
    my ($subject, $template, $showHolidays) = @_;
    my $categoryList = categoryList($showHolidays,$lang);

    $template->param(
        styleBeginner  => 1,
        categoryList   => $categoryList,
    );

    if ($subject) {
        foreach my $subj (@$categoryList) {
            if ($subj->{'subject'} eq $subject) {
                $template->param(
                    subjLevel1 => $subj->{'subjLevel1'},
                );
                $subj->{'current'} = 1;
                last;
            }
        }
        
        $template->param(
            subjectSelected => $subject,
            subjArt         => ($subject eq 'arts')             ? 1: 0,
            subjHealth      => ($subject eq 'health')           ? 1: 0,
            subjCountry     => ($subject eq 'countries')        ? 1: 0,
            subjHistory     => ($subject eq 'history')          ? 1: 0,
            subjFamousPpl   => ($subject eq 'famouspeople')     ? 1: 0,
            subjStory       => ($subject eq 'stories')          ? 1: 0,
            subjTale        => ($subject eq 'fairyfolktales')   ? 1: 0,
#            subjHoliday     => ($subject eq 'holidays')         ? 1: 0,
            subjMachine     => ($subject eq 'machines')         ? 1: 0,
            subjNature      => ($subject eq 'nature')           ? 1: 0,
            subjScience     => ($subject eq 'science')          ? 1: 0,
            subjSport       => ($subject eq 'sports')           ? 1: 0,
        );
    }
}
#################################################################################

sub categoryList {
    my ($showHolidays,$lang) = @_;

#    my $categoryList =
#    [
    my @categoryList;
     push @categoryList,
        {
            subject => 'arts',
            subjectTxt=>'Arts',
            subjectTxt_fr=>'Arts',
            subjectTxt_es=>'Artes',
            subjLevel1  => [
                {
                    subjName    => 'Film',
                    subjName_es => 'Film',
                    subjName_fr  => 'Cinéma',
                    icon        => 'Film.gif',
                    term        => 'cinematography OR cinema OR movies OR films',
                    term_es     => 'cinematography OR cinema OR movies OR films',
                    term_fr     => 'cinématogrphie OR cinéma',
                    type        => 'su',
                },
                {
                    subjName    => 'Music',
                    subjName_es => 'Music',
                    subjName_fr  => 'Musique',
                    icon        => 'Music.gif',
                    term        => 'choirs OR songs OR singing OR rhymes OR jazz OR orchestra OR music',
                    term_es     => 'choirs OR songs OR singing OR rhymes OR jazz OR orchestra OR music',
                    term_fr     => 'choeur OR chorale OR chante OR jazz OR orchestre OR musique ',
                    type        => 'kwd',
     
                },
                {
                    subjName    => 'Painting & Drawing',
                    subjName_es => 'Painting & Drawing',
                    subjName_fr  => 'Peinture',
                    icon        => 'PaintingDrawing.gif',
                    term        => 'painting OR painters OR drawing OR art OR artists OR illustration OR illustrators OR designers',
                    term_es     => 'painting OR painters OR drawing OR art OR artists OR illustration OR illustrators OR designers',
                    term_fr     => 'peinture OR peintres arts OR artistes OR illustration OR illustrateurs OR concepteurs',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Photography',
                    subjName_es => 'Photography',
                    subjName_fr => 'Photographie',
                    icon        => 'Photography.gif',
                    term        => 'cameras OR photography OR photographers',
                    term_es     => 'cameras OR photography OR photographers',
                    term_fr     => 'caméra OR caméras OR photographie OR phtographe',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Sculpture',
                    subjName_es => 'Sculpture',
                    subjName_fr  => 'Sculpture',
                    icon        => 'Sculpture.gif',
                    term        => 'sculpture OR sculptors OR carvers OR carving',
                    term_es     => 'sculpture OR sculptors OR carvers OR carving',
                    term_fr     => 'sculpture OR sculpteurs',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Singing',
                    subjName_es => 'Singing',
                    subjName_fr  => 'Chant',
                    icon        => 'Singing.gif',
                    term        => 'choirs OR choral OR chorus OR tunes OR singing OR songs OR rhymes OR opera OR operetta',
                    term_es     => 'choirs OR choral OR chorus OR tunes OR singing OR songs OR rhymes OR opera OR operetta',
                    term_fr     => 'choeurs OR choral OR choeur OR airs OR chant OR chansons OR rimes OR opéra',
                    type        => 'kwd',
     
                },
                {
                    subjName    => 'Stage',
                    subjName_es => 'Stage',
                    subjName_fr  => 'Théâtre',
                    icon        => 'Stage.gif',
                    term        => 'acting OR costume OR drama OR plays OR theater OR theatre stage',
                    term_es     => 'acting OR costume OR drama OR plays OR theater OR theatre stage',
                    term_fr     => 'acteurs OR actrices OR acteur OR actrice OR pièce OR pièces OR oeuvres OR costumier',
                    type        => 'su',
                },
            ],
        };
    push @categoryList,
        {
            subject => 'health',
            subjectTxt=>'Health',
            subjectTxt_es=>'Salud',
            subjectTxt_fr=>'Santé',
            subjLevel1  => [
                {
                    subjName    => 'Brain and Nerves',
                    subjName_es => 'Brain and Nerves',
                    subjName_fr => 'Cerveau & Système nerveux',
                    icon        => 'Brain-and-Nerves.gif',
                    term        => 'nerves OR brain OR nervous',
                    term_es     => 'nerves OR brain OR nervous',
                    term_fr     => 'nerfs OR cerveau OR nerveux',
                    type        => 'su',
                },
                {
                    subjName    => 'Eating and Digestion',
                    subjName_es => 'Eating and Digestion',
                    subjName_fr => 'Nutrition - Système digestif',
                    icon        => 'Eating-and-Digestion.gif',
                    term        => 'eating OR digestion OR digestive OR gastrointestinal OR nutrition OR food',
                    term_es     => 'eating OR digestion OR digestive OR gastrointestinal OR nutrition OR food',
                    term_fr     => 'manger OR digestion OR digestif OR gastro-intestinal OR nutrition OR nourriture',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Getting Sick',
                    subjName_es => 'Getting Sick',
                    subjName_fr => 'Maladies',
                    icon        => 'Getting-Sick.gif',
                    term        => 'diseases OR bacteria OR viruses OR germs OR diseases OR infections OR illness OR sick OR immunization OR hospitals OR medicine',
                    term_es     => 'diseases OR bacteria OR viruses OR germs OR diseases OR infections OR illness OR sick OR immunization OR hospitals OR medicine',
                    term_fr     => 'les maladies OR bactéries OR virus OR germes OR maladies OR infections OR maladie OR malade OR immunization OR médecine OR hôpitaux OR hôpital',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Human body',
                    subjName_es => 'Human body',
                    subjName_fr => 'Corps humain',
                    icon        => 'Human-body.gif',
                    term        => '"Human body" OR anatomay OR physiology OR skeleton OR heart OR lung OR eyes OR nervous OR digestion OR muscles OR senses',
                    term_es     => '"Human body" OR anatomay OR physiology OR skeleton OR heart OR lung OR eyes OR nervous OR digestion OR muscles OR senses',
                    term_fr     => 'anatomie OR physiologie OR squelette OR coeur OR poumon OR yeux OR nerveux OR digestion OR muscles OR sondeses',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Immune system',
                    subjName_es => 'Immune system',
                    subjName_fr => 'Système immunitaire',
                    icon        => 'Immune-system.gif',
                    term        => '"immune system" OR immunity OR immunization OR vaccine OR germs OR infection OR bacteria OR hygiene',
                    term_es     => '"immune system" OR immunity OR immunization OR vaccine OR germs OR infection OR bacteria OR hygiene',
                    term_fr     => 'immunité OR immunisation OR vaccin OR germes OR infection OR bactéries OR hygiène',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Staying Healthy',
                    subjName_es => 'Staying Healthy',
                    subjName_fr => 'Santé',
                    icon        => 'Staying-Healthy.gif',
                    term        => 'fitness OR nutrition OR hygiene OR food OR fruit OR vegetables OR exercise',
                    term_es     => 'fitness OR nutrition OR hygiene OR food OR fruit OR vegetables OR exercise',
                    term_fr     => 'nutrition OR hygiène OR nourriture OR fruits OR légumes OR exercice',
                    type        => 'kwd',
                },
            ],
        };
    push @categoryList,
        {
            subject => 'countries',
            subjectTxt=>'Countries',
            subjectTxt_es=>'Países',
            subjectTxt_fr=>'Pays',
            subjLevel1  => [
                {
                    subjName    => 'Africa',
                    subjName_es    => 'Africa',
                    subjName_fr => 'Afrique',
                    icon        => 'africa.gif',
                    term        => 'africa',
                    term_es     => 'africa',
                    term_fr     => 'afrique',
                    Type        => 'kwd',
                    subjLevel2       => [
                        {
                            subjLevel2Name  => 'Central & East Africa',
                            subjLevel2Name_es  => 'Central & East Africa',
                            subjLevel2Name_fr  => 'l\'Afrique Central & de l\'Est',
                            term            => '"African Republic" OR Burundi OR Somalia OR Djibouti OR Kenya OR Rwanda OR Uganda OR Zaire ',
                            term_es            => '"African Republic" OR Burundi OR Somalia OR Djibouti OR Kenya OR Rwanda OR Uganda OR Zaire ',
                            term_fr         => 'Burundi OR Somalie OR Djibouti OR Kenya OR Rwanda OR l\'Ouganda OR Zaïre',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name  => 'North Africa',
                            subjLevel2Name_es  => 'North Africa',
                            subjLevel2Name_fr  => 'L\'Africque du Nord',
                            term            => '"Western Sahara" OR Morocco OR Algeria OR Libya OR Egypt OR Mali OR Niger OR Chad OR Sudan OR Ethiopia',
                            term_es            => '"Western Sahara" OR Morocco OR Algeria OR Libya OR Egypt OR Mali OR Niger OR Chad OR Sudan OR Ethiopia',
                            term_fr         => 'La Sahara occidental OR Maroc OR l\'Algérie OR Libye OR l\'Egypte OR Mali OR Niger OR Tchad OR Soudan OR l\'Ethiopie',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name  => 'Southern Africa',
                            subjLevel2Name_es  => 'Southern Africa',
                            subjLevel2Name_fr  => 'L\'Africque du Sud',
                            term            => 'Africa OR Angola OR Botswana OR Lesotho OR Madagascar OR Malawi OR Mozambique OR Swaziland OR Zambia OR Zimbabwe ',
                            term_es            => 'Africa OR Angola OR Botswana OR Lesotho OR Madagascar OR Malawi OR Mozambique OR Swaziland OR Zambia OR Zimbabwe ',
                            term_fr         => 'L\'Afrique OR l\'Angola OR Botswana OR Lesotho OR Madagascar OR Malawi OR Mozambique OR Souaziland OR Zambie OR Zimbabwe',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name  => 'West Africa',
                            subjLevel2Name_es  => 'West Africa',
                            subjLevel2Name_fr  => 'L\'Afrique de l\'Ouest',
                            term            => 'Benin OR Cameroon OR Congo OR Ghana OR Gambia OR Guinea OR Liberia OR Nigeria OR Senegal OR Leone OR Togo OR Burkina OR Faso',
                            term_es            => 'Benin OR Cameroon OR Congo OR Ghana OR Gambia OR Guinea OR Liberia OR Nigeria OR Senegal OR Leone OR Togo OR Burkina OR Faso',
                            term_fr         => 'Le Bénin OR Cameroun OR Congo OR Ghana OR Gambie OR Guinée OR Libéria OR Nigéria OR Sénégal OR leone OR Togo OR Burkina OR Faso',
                            type            => 'kwd',
                        },
                    ],
                },
                {
                    subjName    => 'Asia',
                    subjName_es    => 'Asia',
                    subjName_fr => 'L\'Asie',
                    icon        => 'asia.gif',
                    term        => 'asia',
                    term_es        => 'asia',
                    term_fr     => 'asie OR l\'asie',
                    type        => 'kwd',
                    subjLevel2       => [
                        {
                            subjLevel2Name  => 'Central Asia ',
                            subjLevel2Name_es  => 'Central Asia ',
                            subjLevel2Name_fr  => 'L\'Asie Centrale ',
                            term            => '"Georgia Republic" OR Armenia OR Azerbaijan OR Kazakhstan OR Russiakyrgyzstan OR Tajikistan OR Turkey OR Turkmenistan OR Uzbekistan',
                            term_es            => '"Georgia Republic" OR Armenia OR Azerbaijan OR Kazakhstan OR Russiakyrgyzstan OR Tajikistan OR Turkey OR Turkmenistan OR Uzbekistan',
                            term_fr         => 'République de Géorgie OR l\'Arménie OR l\'Azerbaïdjan OR Kazakhstan OR Russiakyrgyzstan OR Tajikistan OR Turquie OR Turkmenistan OR Uzbekistan',
                            type            => 'su',
                        },
                        {
                            subjLevel2Name  => 'East Asia ',
                            subjLevel2Name_es  => 'East Asia ',
                            subjLevel2Name_fr  => 'L\'Asie de l\'est ',
                            term            => 'China OR Japan OR Macau OR Mongolia OR Korea OR Taiwan ',
                            term_es            => 'China OR Japan OR Macau OR Mongolia OR Korea OR Taiwan ',
                            term_fr         => 'La Chine OR Japon OR Macao OR Mongolie OR Corée OR Taiwan',
                            type            => 'su',
                        },
                        {
                            subjLevel2Name  => 'Near and Middle East ',
                            subjLevel2Name_es  => 'Near and Middle East ',
                            subjLevel2Name_fr  => 'Proche et Moyn-Orient ',
                            term            => 'Kuwait OR Bahrain OR Qatar OR "Oman Emirate" OR Yemen OR Cyprus OR Egypt OR Iran OR Iraq OR Israel OR Jordan OR Lebanon OR Syria OR "Saudi Arabia"',
                            term_es            => 'Kuwait OR Bahrain OR Qatar OR "Oman Emirate" OR Yemen OR Cyprus OR Egypt OR Iran OR Iraq OR Israel OR Jordan OR Lebanon OR Syria OR "Saudi Arabia"',
                            term_fr         => 'Emirat du Kowéit OR du Bahrain OR du Qatar OR de l\'Oman OR Yémen OR Chypre OR l\'Egypte OR l\'Iran OR l\'Irak OR l\'Israël OR Jordanie OR Liban OR Syrie OR l\'Arabie Saoudite ',
                            type            => 'su',
                        },
                        {
                            subjLevel2Name  => 'South Asia ',
                            subjLevel2Name_es  => 'South Asia ',
                            subjLevel2Name_fr  => 'Asie du sud ',
                            term            => 'Afghanistan OR Bangladesh OR Bhutan OR Cocos OR India OR Maldives OR Nepal OR Pakistan OR "Sri Lanka"',
                            term_es            => 'Afghanistan OR Bangladesh OR Bhutan OR Cocos OR India OR Maldives OR Nepal OR Pakistan OR "Sri Lanka"',
                            term_fr         => 'L\'Afghanistan OR Bangladesh OR Bhutan OR les Cocos OR l\'Inde OR les Maldives OR Népal OR Pakistan OR Sri Lanka',
                            type            => 'su',
                        },
                        {
                            subjLevel2Name  => 'Southeast Asia ',
                            subjLevel2Name_es  => 'Southeast Asia ',
                            subjLevel2Name_fr  => ' L\'Asie du Sud-Est ',
                            term            => 'Brunei OR Burma OR Myanmar OR Cambodia OR Indonesia OR Korea OR Laos OR Malaysia OR Philippines OR Singapore OR Thailand OR Vietnam ',
                            term_es            => 'Brunei OR Burma OR Myanmar OR Cambodia OR Indonesia OR Korea OR Laos OR Malaysia OR Philippines OR Singapore OR Thailand OR Vietnam ',
                            term_fr         => 'Le Brunei OR Birmanie OR Myanmar OR Cambodge OR l\'Indonésie OR Corée OR les Laotiens OR Malaisie OR les Philippines OR Singapour OR Thaïlande OR Vietnam ',
                            type            => 'su',
                        },
                    ],
                },
                {
                    subjName    => 'Australia & New Zealand',
                    subjName_es    => 'Australia & New Zealand',
                    subjName_fr    => 'L\'Australie & La Nouvelle Zélande',
                    icon        => 'Australia-&-New-Zealand.gif',
                    term        => 'Australia OR Zealand',
                    term_es        => 'Australia OR Zealand',
                    term_fr     => 'L\'Australie OR Zélande',
                    type        => 'su',
                },
                {
                    subjName    => 'Central America',
                    subjName_es    => 'Central America',
                    subjName_fr => 'L\' Améerique Central',
                    icon        => 'Central-America.gif',
                    term        => 'Rica OR Guatemala OR Belize OR Salvador OR Honduras OR Nicaragua OR Panama',
                    term_es        => 'Rica OR Guatemala OR Belize OR Salvador OR Honduras OR Nicaragua OR Panama',
                    term_fr     => 'Rica OR Guatemala OR Belize OR Salvador OR Honduras OR Nicaragua OR Panama ',
                    type        => 'su',
                },
                {
                    subjName    => 'Europe',
                    subjName_es    => 'Europe',
                    subjName_fr => 'L\'Europe',
                    icon        => 'Europe.gif',
                    term        => 'europe',
                    term_es     => 'europe',
                    term_fr     => 'europe OR l\'europe',
                    type        => 'su',
                    subjLevel2       => [
                        {
                            subjLevel2Name  => 'Central Europe ',
                            subjLevel2Name_es  => 'Central Europe ',
                            subjLevel2Name_fr  => 'L\'Europe Centrale ',
term   =>'Andorra OR Austria OR Belarus OR Belgium OR Czech OR Slovakia OR Germany OR Poland OR Ukraine OR Moldova OR Switzerland OR Liechtenstein OR Romania OR Hungary OR France',
term_es   =>'Andorra OR Austria OR Belarus OR Belgium OR Czech OR Slovakia OR Germany OR Poland OR Ukraine OR Moldova OR Switzerland OR Liechtenstein OR Romania OR Hungary OR France',
term_fr=>'L\'Andorre OR l\'Autriche OR Belarus OR Belgique OR Tchèque OR Slovaquie OR l\'Allemagne OR Pologne OR l\'Ukraine OR Moldau OR Suisse OR Liechtenstein OR Roumanie OR France  OR Hongrie',  
                            type            => 'su',
     
                        },
                        {
                            subjLevel2Name  => 'Northern Europe ',
                            subjLevel2Name_es  => 'Northern Europe ',
                            subjLevel2Name_fr  => 'l\'Europe du Nord ',
term   =>'Iceland OR Norway OR Denmark OR Sweden OR Finland OR Estonia OR Latvia OR Lithuania',
term_es   =>'Iceland OR Norway OR Denmark OR Sweden OR Finland OR Estonia OR Latvia OR Lithuania',
term_fr=>'Norvège OR Danemark OR Suède OR Finlande OR l\'Estonie OR Lettonie OR Lithuanie',  
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name  => 'Southern Europe ',
                            subjLevel2Name_es  => 'Southern Europe ',
                            subjLevel2Name_fr  => 'L\'Europe du Sud ',
term   =>'Marino OR Portugal OR Spain OR Andorra OR Bosnia OR Herzegovina OR Bulgaria OR Croatia OR  OR Macedonia OR Yugoslavia OR Italy OR Albania OR Greece OR Slovenia',
term_es   =>'Marino OR Portugal OR Spain OR Andorra OR Bosnia OR Herzegovina OR Bulgaria OR Croatia OR  OR Macedonia OR Yugoslavia OR Italy OR Albania OR Greece OR Slovenia',
term_fr=>'Marino OR Portugal OR l\'Espagne OR l\'Andorre OR Bosnie OR Herzégovine OR Bulgarie OR Croatie OR OU Macédoine OR Yougoslavie OR l\'Italie OR l\'Albanie OR Grèce OR Slovénie
',  
                            type            => 'sub',
                        },
                        {
                            subjLevel2Name  => 'United Kingdom (Great Britain) ',
                            subjLevel2Name_es  => 'United Kingdom (Great Britain) ',
                            subjLevel2Name_fr  => 'Royaume Uni (Grande Bretagne) ',
term   =>'Ireland OR Scotland OR Wales OR England OR Britain',
term_es   =>'Ireland OR Scotland OR Wales OR England OR Britain',
term_fr=>'L\'Irlande OR l\'Ecosse OR Pays de Galles OR l\'Angleterre OR Grande-Bretagne 
',  
                            type            => 'su',
                        },
                    ],
                },
                {
                    subjName    => 'Islands',
                    subjName_es    => 'Islands',
                    subjName_fr => 'Les Iles',
                    icon        => 'Islands.gif',
term   =>'islands OR Caribbean OR Samoa OR Fiji OR Tahiti',
term_es   =>'islands OR Caribbean OR Samoa OR Fiji OR Tahiti',
term_fr=>'îles OR Caraïbe OR Samoa OR Fiji OR Tahiti ',  
                    type        => 'kwd',
                },
                {
                    subjName    => 'Maps',
                    subjName_es    => 'Maps',
                    subjName_fr => 'Cartes',
                    icon        => 'maps.gif',
term=>'map OR maps OR atlas OR cartography',
term_es=>'map OR maps OR atlas OR cartography',
term_fr=>'carte OR atlas OR cartographie ',  
                    type        => 'kwd',
                },
                {
                    subjName    => 'North America',
                    subjName_es    => 'North America',
                    subjName_fr => 'Amérique du Nord',
                    icon        => 'North-America.gif',
term=>'United OR States OR Canada OR Mexico OR Greenland',
term_es=>'United OR States OR Canada OR Mexico OR Greenland',
term_fr=>'Uni OR états OR Canada OR Mexique OR Groenland ',  
                    type        => 'su',
                },
                {
                    subjName    => 'Polar Regions',
                    subjName_es    => 'Polar Regions',
                    subjName_fr => 'Régions Polaires',
                    icon        => 'Polar-Regions.gif',
term=>'arctic OR polar OR Antarctica OR Greenland',
term_es=>'arctic OR polar OR Antarctica OR Greenland',
term_fr=>'',  
                    type        => 'kwd',
                },
                {
                    subjName    => 'South America',
                    subjName_es    => 'South America',
                    subjName_fr => 'Amérique du Sud',
                    icon        => 'South-America.gif',
term=>'French OR Guiana OR Colombia OR Ecuador OR Peru OR Bolivia OR Venezuela OR Tobago OR Trinidad OR Guyana OR Surinam OR Brazil OR Paraguay OR Chile OR Argentina OR Uruguay OR Falkland',
term_es=>'French OR Guiana OR Colombia OR Ecuador OR Peru OR Bolivia OR Venezuela OR Tobago OR Trinidad OR Guyana OR Surinam OR Brazil OR Paraguay OR Chile OR Argentina OR Uruguay OR Falkland',
term_fr=>'Français OR Guyane OR Colombie OR l\'Equateur OR Pérou OR Bolivie OR Venezuela OR Tobago OR Trinidad OR Guyane OR Surinam OR Brésil OR Paraguay OR Chili OR l\'Argentine OR l\'Uruguay OR Malouines ',  
                    type        => 'kwd',
                },
            ],
        };
    push @categoryList,
        {
            subject => 'history',
            subjectTxt=>'History',
            subjectTxt_es=>'Historia',
            subjectTxt_fr=>'Histoire',
            subjLevel1  => [
                {
                    subjName    => 'African American',
                    subjName_es    => 'African American',
                    subjName_fr => 'Afro-américain ',
                    icon        => 'African-American.gif',
term   =>'African OR Afro OR rights OR blacks OR slavery OR emancipation',
term_es   =>'African OR Afro OR rights OR blacks OR slavery OR emancipation',
term_fr=>'Africain OR Afro OR droits OR noirs OR esclavage OR émancipation',
                    type        => 'su',
                },
                {
                    subjName    => 'Ancient World',
                    subjName_es    => 'Ancient World',
                    subjName_fr => 'Histoire Antique',
                    icon        => 'Ancient-World.gif',
term=>'ancient OR Greece OR Rome OR Indus OR Zimbabwe OR Aksum OR Maya OR Aztec OR Inca OR China OR Babylon OR Egypt OR Timbuktu',
term_es=>'ancient OR Greece OR Rome OR Indus OR Zimbabwe OR Aksum OR Maya OR Aztec OR Inca OR China OR Babylon OR Egypt OR Timbuktu',
term_fr=>'ancienne OR Grèce OR Rome OR l\'Indus OR Zimbabwe OR l\'Aksum OR Maya OR l\'Aztèque OR l\'Inca OR Chine OR Babylone OR l\'Egypte OR Timbuktu ',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Middle Ages',
                    subjName_es    => 'Middle Ages',
                    subjName_fr => 'Moyens Âges ',
                    icon        => 'Middle-Ages.gif',
term=>'medieval OR renaissance OR armor OR armour OR knights OR chivalry OR minstrels OR castle OR crusades',
term_es=>'medieval OR renaissance OR armor OR armour OR knights OR chivalry OR minstrels OR castle OR crusades',
term_fr=>'médiéval OR Renaissance OR armure OR armure OR chevaliers OR chevalerie OR troubadours OR château OR croisades ',
                    type        => 'su',
                },
                {
                    subjName    => 'Renaissance',
                    subjName_es    => 'Renaissance',
                    subjName_fr => 'Renaissance',
                    icon        => 'Renaissance.gif',
term=>'renaissance OR Florence OR Venice OR Michelangelo OR Leonardo OR Galileo OR Medici OR Elizabethan OR Reformation OR Tudors',
term_es=>'renaissance OR Florence OR Venice OR Michelangelo OR Leonardo OR Galileo OR Medici OR Elizabethan OR Reformation OR Tudors',
term_fr=>'Florence OR Venise OR Michaël Angelo OR Leonardo OR Galilée OR Medici OR Elizabethan OR réforme OR Tudors
=',
                    type        => 'su',
                },
                {
                    subjName    => 'Canada & United States',
                    subjName_es    => 'Canada & United States',
                    subjName_fr => 'Canada & Etats Unis',
                    icon        => 'United-States-&-Canada.gif',
term=>'\"United States\" OR Canada',
term_es=>'\"United States\" OR Canada',
term_fr=>'Etats Unis OR Canada',
                    type        => 'su',
                },
                {
                    subjName    => 'Wars',
                    subjName_es    => 'Wars',
                    subjName_fr => 'Guerres',
                    icon        => 'Wars.gif',
term=>'war OR warfare OR military OR militia OR weapons OR battle OR battles OR guns OR tank OR tanks OR artillery OR cannon OR cannons OR sword OR swords OR spear OR spears OR shield OR catapult OR catapults OR bombs OR atomic OR army OR armies OR soldier OR navy OR airforce',
term_es=>'war OR warfare OR military OR militia OR weapons OR battle OR battles OR guns OR tank OR tanks OR artillery OR cannon OR cannons OR sword OR swords OR spear OR spears OR shield OR catapult OR catapults OR bombs OR atomic OR army OR armies OR soldier OR navy OR airforce',
term_fr=>'guerre OR militaires OR milice OR armes OR bataille OR batailles OR pistolets OR réservoir OR réservoirs OR artillerie OR canon OR canons OR épée OR épées OR lance OR lances OR bouclier OR catapulte OR catapultes OR bombes OR atomique OR armée OR armées OR soldat OR marine',
                    type        => 'kwd',
                },
                {
                    subjName    => 'World history',
                    subjName_es    => 'World history',
                    subjName_fr => 'Histoire du monde',
                    icon        => 'World-history.gif',
term=>'Austria OR Belgium OR Germany OR Italy OR Netherlands OR Switzerland OR Britain OR Spain OR Portugal OR Russia OR China OR India OR Japan OR Canada OR Mexico OR Brazil OR Argentina OR Bolivia OR Peru',
term_es=>'Austria OR Belgium OR Germany OR Italy OR Netherlands OR Switzerland OR Britain OR Spain OR Portugal OR Russia OR China OR India OR Japan OR Canada OR Mexico OR Brazil OR Argentina OR Bolivia OR Peru',
term_fr=>'L\'Autriche OR Belgique OR l\'Allemagne OR l\'Italie OR les Pays Bas OR Suisse OR Grande-Bretagne OR l\'Espagne OR Portugal OR Russie OR Chine OR l\'Inde OR Japon OR Canada OR Mexique OR Brésil OR l\'Argentine OR Bolivie OR Pérou
',
                    type        => 'su',
                },
            ],
        };
    push @categoryList,
        {
            subject => 'famouspeople',
            subjectTxt=>'Famous People',
            subjectTxt_es=>'Personajes Famosos',
            subjectTxt_fr=>'Grands personnages',
            subjLevel1  => [
                {
                    subjName    => 'Actors',
                    subjName_es    => 'Actors',
                    subjName_fr => 'Acteurs - Actrices',
                    icon        => 'Actors.gif',
term=>'actors OR actresses',
term_es=>'actors OR actresses',
term_fr=>'acteurs OR actrices',
                    type        => 'kwd',
                },
                {
                    subjName    => 'African Americans',
                    subjName_es    => 'African Americans',
                    subjName_fr => 'Afro-américains',
                    icon        => 'African-Americans.gif',
term=>'african OR Luther OR Parks OR Ellington OR Mays OR Shaquille OR Olajuwon OR Jackie OR Tillage OR Carver OR Sojourner OR Tubman OR Booker OR Remus OR Garvey',
term_es=>'african OR Luther OR Parks OR Ellington OR Mays OR Shaquille OR Olajuwon OR Jackie OR Tillage OR Carver OR Sojourner OR Tubman OR Booker OR Remus OR Garvey',
term_fr=>'african OR Luther OR Parks OR Ellington OR Mays OR Shaquille OR Olajuwon OR Jackie OR Tillage OR Carver OR Sojourner OR Tubman OR Booker OR Remus OR Garvey',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Astronauts & Pilots',
                    subjName_es    => 'Astronauts & Pilots',
                    subjName_fr => 'Astronautes - Pilotes',
                    icon        => 'Astronauts-&-Pilots.gif',
term=>'Astronaut OR Pilot OR Astronauts OR Pilots OR NASA OR shuttle OR spacecraft OR spaceflight',
term_es=>'Astronaut OR Pilot OR Astronauts OR Pilots OR NASA OR shuttle OR spacecraft OR spaceflight',
term_fr=>'Astronaute OR pilote OR astronautes OR pilotes OR NASA OR navette OR vaisseau spatial OR vol spatial',
                    type        => 'kwd',
                },
 
                {
                    subjName    => 'Athletes',
                    subjName_es    => 'Athletes',
                    subjName_fr => 'Athlètes',
                    icon        => 'Athletes.gif',
term=>'athletes OR players OR cyclists OR rowers OR skiers OR swimmers OR Olympic OR Olympics OR NBA OR NHL OR NFL OR Cooperstown OR triathlon OR baseball OR basketball OR football OR hockey',
term_es=>'athletes OR players OR cyclists OR rowers OR skiers OR swimmers OR Olympic OR Olympics OR NBA OR NHL OR NFL OR Cooperstown OR triathlon OR baseball OR basketball OR football OR hockey',
term_fr=>'athlètes OR joueurs OR cyclistes OR rameurs OR rameuses OR skieurs OR skieuses OR nageurs OR nageuses OR olympique OR Jeux Olympiques OR NBA OR NHL OR NFL OR Cooperstown OR triathlon OR base-ball OR basket-ball OR football OR hockey',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Authors',
                    subjName_es    => 'Authors',
                    subjName_fr => 'Auteurs',
                    icon        => 'Authors.gif',
term=>'authors OR writers OR poet OR poets OR playwright OR playwrights',
term_es=>'authors OR writers OR poet OR poets OR playwright OR playwrights',
term_fr=>'auteurs OR auteurs OR poèt OR poèts OR dramaturge OR dramaturges',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Explorers',
                    subjName_es    => 'Explorers',
                    subjName_fr => 'Explorateurs',
                    icon        => 'Explorers.gif',
term=>'explorer OR explorers OR exploration',
term_es=>'explorer OR explorers OR exploration',
term_fr=>'exploration OR exploreurs OR exploreur',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Inventors',
                    subjName_es    => 'Inventors',
                    subjName_fr => 'Inventeurs',
                    icon        => 'Inventors.gif',
term=>'inventor OR inventors OR invention OR inventions OR innovation',
term_es=>'inventor OR inventors OR invention OR inventions OR innovation',
term_fr=>'inventeur OR inventeurs OR invention OR inventions OR innovation',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Political leaders',
                    subjName_es    => 'Political leaders',
                    subjName_fr => 'Gouvernement, chefs',
                    icon        => 'Political-leaders.gif',
term=>'premiers OR president OR presidents OR governor OR governors OR premiers OR congress OR congressman OR congresswoman OR parliament OR commons OR senate OR senators OR reformers OR activists OR rights OR queen OR queens OR king OR kings OR politician OR politicians',
term_es=>'premiers OR president OR presidents OR governor OR governors OR premiers OR congress OR congressman OR congresswoman OR parliament OR commons OR senate OR senators OR reformers OR activists OR rights OR queen OR queens OR king OR kings OR politician OR politicians',
term_fr=>'ministres OR président OR présidents OR gouverneur OR gouverneurs OR ministres OR congrès OR membre du Congrès OR membre du Congrès OR parlement OR terrains communaux OR sénat OR sénateurs OR réformateurs OR activistes OR droits OR reine OR reines OR roi OR rois OR politicien',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Presidents',
                    subjName_es    => 'Presidents',
                    subjName_fr => 'Présidents',
                    icon        => 'Presidents.gif',
term=>'presidents OR democrats OR republicans',
term_es=>'presidents OR democrats OR republicans',
term_fr=>'démocrates OR républicains',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Royalty',
                    subjName_es    => 'Royalty',
                    subjName_fr => 'Royauté',
                    icon        => 'Royalty.gif',
term=>'kings OR prince OR princes OR princess OR queens OR queen OR monarchy OR aristocrats OR aristocracy',
term_es=>'kings OR prince OR princes OR princess OR queens OR queen OR monarchy OR aristocrats OR aristocracy',
term_fr=>'rois OR prince OR princes OR princesse OR reines OR reine OR monarchie OR aristocrates OR aristocratie',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Scientists',
                    subjName_es    => 'Scientists',
                    subjName_fr => 'Scientifiques',
                    icon        => 'Scientists.gif',
term=>'scientist OR scientists OR researchers OR astronomers OR geologist OR geologists OR chemist OR chemists OR physicist OR physicists OR meteorologist OR meteorologists OR environmentalist OR environmentalists OR biologist OR biologists',
term_es=>'scientist OR scientists OR researchers OR astronomers OR geologist OR geologists OR chemist OR chemists OR physicist OR physicists OR meteorologist OR meteorologists OR environmentalist OR environmentalists OR biologist OR biologists',
term_fr=>'scientifique OR scientifiques OR chercheur OR astronomes OR géologue OR géologues OR chimiste OR chimistes OR physicien OR physiciens OR météorologiste OR météorologistes OR écologiste OR écologistes OR biologiste OR biologistes',
                    type        => 'kwd',
                },
            ],
        };
    push @categoryList,
        {
            subject => 'stories',
            subjectTxt=>'Stories',
            subjectTxt_es=>'Cuentos',
            subjectTxt_fr=>'Contes',
            subjLevel1  => [
                {
                    subjName    => 'ABCs & Counting',
                    subjName_es    => 'ABCs & Counting',
                    subjName_fr => 'ABCs & Numéros',
                    icon        => 'ABCs-&-Counting.gif',
term=>'ABC OR alphabet OR phonics OR phonetics OR counting OR numeracy OR numbers OR arithmetic',
term_es=>'ABC OR alphabet OR phonics OR phonetics OR counting OR numeracy OR numbers OR arithmetic',
term_fr=>'ABC OR alphabet OR acoustique OR compte OR capacité de calculer OR nombres OR arithmétique',
                    type        => 'kwd',  
                },
                {
                    subjName    => 'Adventure',
                    subjName_es    => 'Adventure',
                    subjName_fr => 'Aventure',
                    icon        => 'Adventure.gif',
term=>'adventure OR adventurers OR exploration OR explorers OR frontier OR pioneer',
term_es=>'adventure OR adventurers OR exploration OR explorers OR frontier OR pioneer',
term_fr=>'aventure OR aventuriers OR exploration OR explorateurs OR frontière OR pionnier',
                    type        => 'kwd',  
                },
                {
                    subjName    => 'Humor',
                    subjName_es    => 'Humor',
                    subjName_fr => 'Humeur',
                    icon        => 'Humor.gif',
term=>'humor OR humour OR comedy OR comedies OR riddles OR rebus OR nonsense OR verses',
term_es=>'humor OR humour OR comedy OR comedies OR riddles OR rebus OR nonsense OR verses',
term_fr=>'humeur OR humeur OR comédie OR comédies OR énigmes OR rébus OR non-sens',
                    type        => 'kwd',  
                },
                {
                    subjName    => 'Mystery',
                    subjName_es    => 'Mystery',
                    subjName_fr => 'Mystère',
                    icon        => 'Mystery.gif',
term=>'mystery OR mysteries OR detective OR horror OR haunt OR haunted OR murder',
term_es=>'mystery OR mysteries OR detective OR horror OR haunt OR haunted OR murder',
term_fr=>'mystère OR mystères OR détective OR horreur OR retraite OR hanté OR meurtre',
                    type        => 'kwd',  
                },
                {
                    subjName    => 'Novels',
                    subjName_es    => 'Novels',
                    subjName_fr => 'Romains',
                    icon        => 'novels.gif',
term=>'novel OR novels OR novellas',
term_es=>'novel OR novels OR novellas',
term_fr=>'roman OR romans',
                    type        => 'kwd',  
                },
                {
                    subjName    => 'Plays',
                    subjName_es    => 'Plays',
                    subjName_fr => 'Théatre',
                    icon        => 'play.gif',
term=>'plays OR drama OR theater OR theatre OR stage OR puppets OR playwright OR playwrights',
term_es=>'plays OR drama OR theater OR theatre OR stage OR puppets OR playwright OR playwrights',
term_fr=>'jeux OR drame OR théâtre OR théâtre OR étape OR marionnettes OR dramaturge OR dramaturges',
                    type        => 'kwd',  
                },
                {
                    subjName    => 'Poetry',
                    subjName_es    => 'Poetry',
                    subjName_fr => 'Poésie',
                    icon        => 'Poetry.gif',
term=>'Poem OR poet OR rhymes OR Haiku',
term_es=>'Poem OR poet OR rhymes OR Haiku',
term_fr=>'Poésie OR poèt OR rimes OR Haiku',
                    type        => 'kwd',  
                },
                {
                    subjName    => 'Science Fiction',
                    subjName_es    => 'Science Fiction',
                    subjName_fr => 'Science Fiction',
                    icon        => 'Science-Fiction.gif',
term=>'Asimov OR Coville OR Verne OR Crichton OR Trek',
term_es=>'Asimov OR Coville OR Verne OR Crichton OR Trek',
term_fr=>'Asimov OR Coville OR Verne OR Crichton',
                    type        => 'kwd',  
                },
                {
                    subjName    => 'Short Stories',
                    subjName_es    => 'Short Stories',
                    subjName_fr => 'Histoires courtes',
                    icon        => 'Short-Stories.gif',
term=>'Stories OR Story',
term_es=>'Stories OR Story',
term_fr=>'Histoires OR histoire',
                    type        => 'kwd',  
                },
            ],
        };
    push @categoryList,
        {
            subject => 'fairyfolktales',
            subjectTxt=>'Fairy and Folk Tales',
            subjectTxt_es=>'Cuento Populares y de Hadas',
            subjectTxt_fr=>'Contes des fées',
            subjLevel1  => [
                {
                    subjName    => 'Fables',
                    subjName_es    => 'Fables',
                    subjName_fr => 'Légendes',
                    icon        => 'Fables.gif',
term=>'Fable OR Fables OR Legend OR Legends OR Myth OR Myths OR Mythology',
term_es=>'Fable OR Fables OR Legend OR Legends OR Myth OR Myths OR Mythology',
term_fr=>'légende OR légendes OR mythe OR mythes OR mythologie',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Folk Tales',
                    subjName_es    => 'Folk Tales',
                    subjName_fr => 'Contes folkloriques',
                    icon        => 'Folk-Tales.gif',
term=>'folklore OR folktale',
term_es=>'folklore OR folktale',
term_fr=>'contes folkloriques OR folkore',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Magic',
                    subjName_es    => 'Magic',
                    subjName_fr => 'Magie',
                    icon        => 'Magic.gif',
term=>'conjuring OR magic OR magician OR magicians OR sorcery OR sorcerer OR sorcerers OR Rowling OR Houdini OR Merlin',
term_es=>'conjuring OR magic OR magician OR magicians OR sorcery OR sorcerer OR sorcerers OR Rowling OR Houdini OR Merlin',
term_fr=>'magie OR magicien OR magiciens OR sorcellerie OR sorcier OR sorciers OR Rowling OR Houdini OR MERLIN',
                    type        => 'su',
                },
                {
                    subjName    => 'Nursery Rhymes',
                    subjName_es    => 'Nursery Rhymes',
                    subjName_fr => 'Rimes',
                    icon        => 'Nursery-Rhymes.gif',
term=>'goose OR rhymes',
term_es=>'goose OR rhymes',
term_fr=>'rimes OR mythes',
                    type        => 'su',
                },
            ],
        };
    push @categoryList,
        
        {
            subject => 'holidays',
            subjectTxt=>'Holidays',
            subjectTxt_es=>'Días Festivos',
            subjectTxt_fr=>'Fêtes',
            subjLevel1  => [
                {
                    subjName    => 'Buddhism Wesak',
                    subjName_es    => 'Buddhism Wesak',
                    subjName_fr => 'Bouddhisme - Wesak',
                    icon        => 'Buddhism---Wesak.gif',
term=>'Buddha OR Buddhism OR Wesak',
term_es=>'Buddha OR Buddhism OR Wesak',
term_fr=>'Bouddha OR bouddhisme OR Wesak',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Canada Day',
                    subjName_es    => 'Canada Day',
                    subjName_fr => 'Fête du Canada',
                    icon        => 'Canada-Day.gif',
term=>'Canada',
term_es=>'Canada',
term_fr=>'Canada',
                    type        => 'kwd',
                },
                {
                    subjName    => 'St Jean-Baptiste Day',
                    subjName_es    => 'St Jean-Baptiste Day',
                    subjName_fr => 'Fête nationale du Québec',
                    icon        => 'quebecFlag.gif',
term=>'Quebec',
term_es=>'Quebec',
term_fr=>'Quebec',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Chanukah',
                    subjName_es    => 'Chanukah',
                    subjName_fr => 'Hanukkah',
                    icon        => 'Chanukah.gif',
term=>'Chanukah OR Hanukkah',
term_es=>'Chanukah OR Hanukkah',
term_fr=>'Chanukah OR Hanukkah',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Chinese New Year',
                    subjName_es    => 'Chinese New Year',
                    subjName_fr => 'Nouvel an chinoise',
                    icon        => 'Chinese-New-Year.gif',
term=>'"Chinese New Year"',
term_es=>'"Chinese New Year"',
term_fr=>'Nouvel an chinoise',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Christmas',
                    subjName_es    => 'Christmas',
                    subjName_fr => 'Noël',
                    icon        => 'Christmas.gif',
term=>'Christmas',
term_es=>'Christmas',
term_fr=>'Noël',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Cinco de Mayo',
                    subjName_es    => 'Cinco de Mayo',
                    subjName_fr => 'Cinco de Mayo',
                    icon        => 'Cinco-de-Mayo.gif',
term=>'Cinco OR Mayo',
term_es=>'Cinco OR Mayo',
term_fr=>'Cinco OR Mayo',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Easter',
                    subjNam_ese    => 'Easter',
                    subjName_fr => 'Pâques',
                    icon        => 'Easter.gif',
term=>'Easter',
term_es=>'Easter',
term_fr=>'Pâques ',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Halloween',
                    subjName_es    => 'Halloween',
                    subjName_fr => 'Halloween',
                    icon        => 'Halloween.gif',
term=>'Halloween',
term_es=>'Halloween',
term_fr=>'Halloween',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Hindu Navaratri',
                    subjName_es    => 'Hindu Navaratri',
                    subjName_fr => 'Indou Navaratri',
                    icon        => 'Hindu---Navaratri.gif',
term=>'Hindu OR Hinduism OR Navaratri',
term_es=>'Hindu OR Hinduism OR Navaratri',
term_fr=>'Indou OR hindouisme OR Navaratri',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Islam Eid',
                    subjName_es    => 'Islam Eid',
                    subjName_fr => 'Islam Eid',
                    icon        => 'Islam---Eid.gif',
term=>'"Islam Eid"',
term_es=>'"Islam Eid"',
term_fr=>'"Islam Eid"',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Islam Ramadan',
                    subjName_es    => 'Islam Ramadan',
                    subjName_fr => 'Islam Ramadan',
                    icon        => 'Islam---Ramadan.gif',
term=>'"Islam Ramadan"',
term_es=>'"Islam Ramadan"',
term_fr=>'"Islam Ramadan"',
                    type        => 'kwd',
                },
                {
                    subjName    => 'July 4th',
                    subjName_es    => 'July 4th',
                    subjName_fr => 'Fête de l\'Indépendance Américain',
                    icon        => '4th_July.gif',
term=>'Independence',
term_es=>'Independence',
term_fr=>'L\'indépendance ',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Kwanzaa',
                    subjName_es    => 'Kwanzaa',
                    subjName_fr => 'Kwanzaa',
                    icon        => 'Kwanzaa.gif',
term=>'Kwanzaa',
term_es=>'Kwanzaa',
term_fr=>'Kwanzaa',
                    type        => 'kwd',
                },
                {
                    subjName    => 'New Year\'s Day',
                    subjName_es    => 'New Year\'s Day',
                    subjName_fr => 'Jour de l\'an',
                    icon        => 'new-years-day.gif',
term=>'"New Year"',
term_es=>'"New Year"',
term_fr=>'Nouvel an',
                    type        => 'kwd',
                },
                {
                    subjName    => 'More Holidays',
                    subjName_es    => 'More Holidays',
                    subjName_fr => 'Plus de Célébrations',
                    icon        => 'Other-Holidays.gif',
term=>'holiday OR holidays OR festival OR festivals OR celebrations',
term_es=>'holiday OR holidays OR festival OR festivals OR celebrations',
term_fr=>'fête OR fêtes OR festival OR festivals OR célébrations ',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Purim',
                    subjName_es    => 'Purim',
                    subjName_fr => 'Purim',
                    icon        => 'Purim.gif',
term=>'Purim',
term_es=>'Purim',
term_fr=>'Purim',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Rosh Hashanah',
                    subjName_es    => 'Rosh Hashanah',
                    subjName_fr => 'Rosh Hashanah',
                    icon        => 'Rosh-Hashanah.gif',
term=>'Hashanah',
term_es=>'Hashanah',
term_fr=>'Hashanah',
                    type        => 'kwd',
                },
                {
                    subjName    => 'St. Patrick\'s Day',
                    subjName_es    => 'St. Patrick\'s Day',
                    subjName_fr => 'Jour de saint Patrick',
                    icon        => 'St-Patrick.gif',
term=>'"Ireland Patrick"',
term_es=>'"Ireland Patrick"',
term_fr=>'Jour de saint Patrick',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Thanksgiving',
                    subjName_es    => 'Thanksgiving',
                    subjName_fr => 'Action de grâce',
                    icon        => 'Thanksgiving.gif',
term=>'Thanksgiving Pilgrims',
term_es=>'Thanksgiving Pilgrims',
term_fr=>'Pélerins de thanksgiving ',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Valentine\'s Day',
                    subjName_es    => 'Valentine\'s Day',
                    subjName_fr => 'Jour de Valentine',
                    icon        => 'Valentine-Day.gif',
term=>'Valentine',
term_es=>'Valentine',
term_fr=>'Valentine',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Yom Kippur',
                    subjName_es    => 'Yom Kippur',
                    subjName_fr => 'Yom Kippur',
                    icon        => 'Yom-Kippur.gif',
term=>'Kippur',
term_es=>'Kippur',
term_fr=>'Kippur',
                    type        => 'kwd',
                },
            ],
        } if ($showHolidays eq 'y');
    push @categoryList,
        {
            subject => 'machines',
            subjectTxt=>'Machines',
            subjectTxt_es=>'Máquinas',
            subjectTxt_fr=>'Technologie',
            subjLevel1  => [
                {
                    subjName    => 'Computers',
                    subjName_es    => 'Computers',
                    subjName_fr => 'Ordinateurs',
                    icon        => 'Computers.gif',
term=>'computer OR computers OR networks OR Internet OR WWW OR keyboarding OR Linux OR Microsoft OR animation OR database',
term_es=>'computer OR computers OR networks OR Internet OR WWW OR keyboarding OR Linux OR Microsoft OR animation OR database',
term_fr=>'ordinateur OR ordinateurs OR réseaux OR Internet OR WWW OR introduction au clavier OR Linux OR Microsoft OR animation OR base de données ',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Inventions',
                    subjName_es    => 'Inventions',
                    subjName_fr => 'Inventions',
                    icon        => 'Inventions.gif',
term=>'Invention OR inventions OR inventors OR researchers OR technology OR Internet OR steam OR telephone OR electricity OR cars OR flight OR airplane OR rockets OR cotton OR textiles OR printing OR plow OR Edison OR Marconi ',
term_es=>'Invention OR inventions OR inventors OR researchers OR technology OR Internet OR steam OR telephone OR electricity OR cars OR flight OR airplane OR rockets OR cotton OR textiles OR printing OR plow OR Edison OR Marconi ',
term_fr=>'Invention OR inventions OR inventeurs OR chercheurs OR technologie OR Internet OR vapeur OR téléphone OR électricité OR voitures OR vol OR avion OR fusées OR coton OR textiles OR impression OR charrue OR Edison OR Marconi',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Military',
                    subjName_es    => 'Military',
                    subjName_fr => 'Militaires',
                    icon        => 'Military.gif',
term=>'military OR army OR navy OR airforce OR weapons OR wars OR war OR radar OR jets OR ships OR battle OR battles',
term_es=>'military OR army OR navy OR airforce OR weapons OR wars OR war OR radar OR jets OR ships OR battle OR battles',
term_fr=>'les militaires OR l\'armée OR marine OR l\'armée de l\'air OR les armes OR les guerres OR guerre OR radar OR voyagent en jet OR  bateaux OR bataille OR  batailles',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Machines simples',
                    subjName_es    => 'Machines simples',
                    subjName_fr => 'Machines Simple',
                    icon        => 'Simple-Machines.gif',
term=>'gear OR gears OR pulley OR pulleys OR lever OR levers OR wedge OR wedges OR screw OR screws OR wheel OR wheels OR axle OR axles OR inclined',
term_es=>'gear OR gears OR pulley OR pulleys OR lever OR levers OR wedge OR wedges OR screw OR screws OR wheel OR wheels OR axle OR axles OR inclined',
term_fr=>'poulie OR poulies OR levier OR leviers OR cale OR cales OR vis OR vis OR roue OR roues OR axe OR axes OR incliné',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Technology & Engineering',
                    subjName_es    => 'Technology & Engineering',
                    subjName_fr => 'Technologie & Ingénierie',
                    icon        => 'Technology-&-Engineering.gif',
term=>'technology OR construction OR building OR buildings OR dams OR skyscrapers OR bridges OR tunnels OR steam OR electricity OR communications OR telephone OR transportation OR cars OR computer OR computers OR Internet OR NASA OR biotechnology OR windmills OR renewable OR steam OR Whitney OR Edison OR Deere OR ',
term_es=>'technology OR construction OR building OR buildings OR dams OR skyscrapers OR bridges OR tunnels OR steam OR electricity OR communications OR telephone OR transportation OR cars OR computer OR computers OR Internet OR NASA OR biotechnology OR windmills OR renewable OR steam OR Whitney OR Edison OR Deere OR ',
term_fr=>'technologie OR construction OR bâtiment OR bâtiments OR barrages OR gratte-ciel OR ponts OR tunnels OR vapeur OR électricité OR communications OR téléphone OR transport OR voitures OR ordinateur OR ordinateurs OR Internet OR NASA OR biotechnologie OR moulins à vent',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Transportation',
                    subjName_es    => 'Transportation',
                    subjName_fr => 'Transport',
                    icon        => 'Transportation.gif',
term=>'',
term_es=>'',
term_fr=>'',
                    type        => 'kwd',
                    subjLevel2       => [
                        {
                            subjLevel2Name  => 'Bicycles',
                            subjLevel2Name_es  => 'Bicycles',
                            subjLevel2Name_fr  => 'Bicyclettes',
term=>'bicycle OR bicycles OR cycling',
term_es=>'bicycle OR bicycles OR cycling',
term_fr=>'bicyclette OR bicyclettes OR cycliste',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name  => 'Cars, boats & Planes',
                            subjLevel2Name_es  => 'Cars, boats & Planes',
                            subjLevel2Name_fr  => 'Automobiles, Bateaux & Avions',
term=>'automobile OR car OR cars OR boat OR boats OR airplane OR planes OR jets',
term_es=>'automobile OR car OR cars OR boat OR boats OR airplane OR planes OR jets',
term_fr=>'auto OR bateau OR bateaux OR avion OR avions',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name  => 'Military',
                            subjLevel2Name_es  => 'Military',
                            subjLevel2Name_fr  => 'Militaires',
term=>'tank OR military OR helicopter OR jeep OR jets OR guns OR cannons OR artillery OR radar OR ship OR ships OR submarine OR submarines OR aircraft OR missiles OR shield OR laser OR satellite OR satellites',
term_es=>'tank OR military OR helicopter OR jeep OR jets OR guns OR cannons OR artillery OR radar OR ship OR ships OR submarine OR submarines OR aircraft OR missiles OR shield OR laser OR satellite OR satellites',
term_fr=>'militaires OR hélicoptère OR jeep OR gicleurs OR pistolets OR canons OR artillerie OR radar OR bateau OR bateaux OR sous-marin OR sous-marins OR avions OR missiles OR bouclier OR laser OR satellite OR satellites',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name  => 'Motorcycles',
                            subjLevel2Name_es  => 'Motorcycles',
                            subjLevel2Name_fr  => 'Motocyclettes',
term=>'Motorcycle OR motorcycles OR harley',
term_es=>'Motorcycle OR motorcycles OR harley',
term_fr=>'Moto OR motos OR harley',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name  => 'Ships & Boats',
                            subjLevel2Name_es  => 'Ships & Boats',
                            subjLevel2Name_fr => 'Navires & Bateaux',
term=>'Ship OR ships OR boat OR boats OR submarine OR submarines OR destroyer OR destroyers OR frigate OR frigates OR sail OR longship OR  OR ',
term_es=>'Ship OR ships OR boat OR boats OR submarine OR submarines OR destroyer OR destroyers OR frigate OR frigates OR sail OR longship OR  OR ',
term_fr=>'bateaux OR bateau OR sous-marin OR les sous-marins OR destroyer OR les destroyers OR frégate OR les frégates OR voile OR vikings',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name  => 'Space Travel',
                            subjLevel2Name_es  => 'Space Travel',
                            subjLevel2Name_fr => 'Astronautiques',
term=>'space OR astronaut OR astronauts OR challenger OR shuttle OR NASA OR rockets',
term_es=>'space OR astronaut OR astronauts OR challenger OR shuttle OR NASA OR rockets',
term_fr=>'l\'espace OR astronaute OR astronautes OR challengeur OR navette OR NASA',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name  => 'Trains',
                            subjLevel2Name_es  => 'Trains',
                            subjLevel2Name_fr  => 'Trains',
term=>'Train OR trains OR railroad OR rail OR steam OR locomotive OR locomotives',
term_es=>'Train OR trains OR railroad OR rail OR steam OR locomotive OR locomotives',
term_fr=>'trains OR chemin de fer OR rail OR vapeur OR locomotive OR les locomotives',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name  => 'Trucks',
                            subjLevel2Name_es  => 'Trucks',
                            subjLevel2Name_fr  => 'Camions',
term=>'truck OR trucks',
term_es=>'truck OR trucks',
term_fr=>'camion OR camions',
                            type            => 'kwd',
                        },
                    ],
                },
            ],
        };
    push @categoryList,
        {
            subject => 'nature',
            subjectTxt=>'Nature',
            subjectTxt_es=>'Naturaleza',
            subjectTxt_fr=>'Nature',
            subjLevel1  => [
                {
                    subjName    => 'Animals',
                    subjName_es    => 'Animals',
                    subjName_fr => 'Animaux',
                    icon        => 'animals.gif',
term=>'',
term_es=>'',
term_fr=>'',
                    type        => 'kwd',
                    subjLevel2       => [
                        {
                            subjLevel2Name     => 'Birds',
                            subjLevel2Name_es     => 'Birds',
                            subjLevel2Name_fr  => 'Oiseaux',
term=>'bird',
term_es=>'bird',
term_fr=>'oiseau OR oiseaux',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name     => 'Dinosaurs',
                            subjLevel2Name_es     => 'Dinosaurs',
                            subjLevel2Name_fr  => 'Dinosaurs',
term=>'Dinosaur',
term_es=>'Dinosaur',
term_fr=>'Dinosaur OR dinosaurs',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name     => 'Endangered & Extinct',
                            subjLevel2Name_es     => 'Endangered & Extinct',
                            subjLevel2Name_fr  => 'Espèces en Péril',
term=>'endangered OR extinct',
term_es=>'endangered OR extinct',
term_fr=>'espèces en péril',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name     => 'Insects',
                            subjLevel2Name_es     => 'Insects',
                            subjLevel2Name_fr  => 'Insectes',
term=>'Insect OR Dragonfly OR Caterpillar OR Ladybug OR spider',
term_es=>'Insect OR Dragonfly OR Caterpillar OR Ladybug OR spider',
term_fr=>'Insecte OR libellule OR Caterpillar OR coccinelle OR araignée',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name     => 'Mammals',
                            subjLevel2Name_es     => 'Mammals',
                            subjLevel2Name_fr  => 'Mammifères',
term=>'Mammal OR koala OR ape OR wolf OR bears OR lions OR pigs OR cows OR elephants OR beavers OR dogs OR cats',
term_es=>'Mammal OR koala OR ape OR wolf OR bears OR lions OR pigs OR cows OR elephants OR beavers OR dogs OR cats',
term_fr=>'Mammifère OR koala OR singe OR loup OR ours OR lions OR porcs OR vaches OR éléphants OR castors OR chiens OR chats',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name     => 'Pets',
                            subjLevel2Name_es     => 'Pets',
                            subjLevel2Name_fr  => 'Animaux domestiques',
term=>'birds OR ferrets OR fish OR dogs OR gerbil OR mice OR hamster OR dog OR cat OR fish OR frog OR rat',
term_es=>'birds OR ferrets OR fish OR dogs OR gerbil OR mice OR hamster OR dog OR cat OR fish OR frog OR rat',
term_fr=>'oiseaux OR furets OR poissons OR chiens OR gerbil OR souris OR hamster OR chien OR chat OR poissons OR grenouille OR rat',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name     => 'Reptiles',
                            subjLevel2Name_es     => 'Reptiles',
                            subjLevel2Name_fr  => 'Reptiles',
term=>'reptiles OR snakes OR turtles OR lizards OR crocodile OR alligator',
term_es=>'reptiles OR snakes OR turtles OR lizards OR crocodile OR alligator',
term_fr=>'serpents OR tortues OR lézards OR crocodile OR alligator',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name     => 'Sea Animals',
                            subjLevel2Name_es     => 'Sea Animals',
                            subjLevel2Name_fr  => 'Espèces maritimes',
term=>'fish OR octopus OR lobster OR crab',
term_es=>'fish OR octopus OR lobster OR crab',
term_fr=>'poissons OR poulpe OR langoustine OR crabe',
                            type            => 'kwd',
                        },
                    ],
                },
                {
                    subjName    => 'Astronomy',
                    subjName_es    => 'Astronomy',
                    subjName_fr => 'Astronomie ',
                    icon        => 'Astronomy.gif',
term=>'Astronomy OR telescope OR telescopes OR observatory OR planets OR stars OR milky OR Galileo OR copernicus',
term_es=>'Astronomy OR telescope OR telescopes OR observatory OR planets OR stars OR milky OR Galileo OR copernicus',
term_fr=>'Astronomie OR télescope OR télescopes OR observatoire OR planètes OR étoiles OR laiteux OR Galilée OR Copernic',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Environment',
                    subjName_es    => 'Environment',
                    subjName_fr => 'Environnement',
                    icon        => 'Environment.gif',
term=>'environment OR ecology OR sustainable OR renewable OR pollution OR ozone OR greenhouse OR recycling',
term_es=>'environment OR ecology OR sustainable OR renewable OR pollution OR ozone OR greenhouse OR recycling',
term_fr=>'environnement OR écologie OR soutenable OR renouvelable OR pollution OR ozone OR serre chaude OR réutilisation',
                    type        => 'su',
                    subjLevel2       => [
                        {
                            subjLevel2Name     => 'Desert',
                            subjLevel2Name_es     => 'Desert',
                            subjLevel2Name_fr  => 'Désert',
term=>'desert OR dune OR Sahara OR Mojave OR Gobe',
term_es=>'desert OR dune OR Sahara OR Mojave OR Gobe',
term_fr=>'désert OR dune OR Sahara OR Mojave ',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name  => 'Endangered Animals',
                            subjLevel2Name_es  => 'Endangered Animals',
                            subjLevel2Name_fr  => 'Espèces en péril',
term=>'endangered OR extinct',
term_es=>'endangered OR extinct',
term_fr=>'espèces en péril',
                            type            => 'su',
                        },
                        {
                            subjLevel2Name  => 'Forest',
                            subjLevel2Name_es  => 'Forest',
                            subjLevel2Name_fr  => 'Forêt',
term=>'forest OR rainforest',
term_es=>'forest OR rainforest',
term_fr=>'Forêt OR forêt tropicale',
                            type            => 'su',
                        },
                        {
                            subjLevel2Name  => 'Mountains',
                            subjLevel2Name_es  => 'Mountains',
                            subjLevel2Name_fr  => 'Montagnes',
term=>'mountain OR mountain OR Rockies OR Adirondack OR Laurentian OR Alps OR Himalayan OR Himalaya OR Everest',
term_es=>'mountain OR mountain OR Rockies OR Adirondack OR Laurentian OR Alps OR Himalayan OR Himalaya OR Everest',
term_fr=>'montagne OR Rocheuses OR Adirondack OR Laurentides OR Alpes OR de l\'Himalaya OR l\'Himalaya OR Everest',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name  => 'Oceans',
                            subjLevel2Name_es  => 'Oceans',
                            subjLevel2Name_fr  => 'Océans',
term=>'ocean OR oceans OR sea OR estuaries OR coast OR coastal OR coasts OR Pacific OR Atlantic OR Arctic OR Mediterranean OR Baltic',
term_es=>'ocean OR oceans OR sea OR estuaries OR coast OR coastal OR coasts OR Pacific OR Atlantic OR Arctic OR Mediterranean OR Baltic',
term_fr=>'océan OR océans OR mer OR estuaires OR côte OR côtier OR côtes OR Pacifique OR Océan atlantique OR arctique OR méditerranéen OR baltique',
                            type            => 'su',
                        },
                    ],
                },
                {
                    subjName    => 'Fossils and Rocks',
                    subjName_es    => 'Fossils and Rocks',
                    subjName_fr => 'Fossiles & Roches',
                    icon        => 'Fossils-and-Rocks.gif',
term=>'fossil OR fossils OR gem OR crystal OR mineral OR minerals OR rock OR geology OR geological OR strata OR tectonics',
term_es=>'fossil OR fossils OR gem OR crystal OR mineral OR minerals OR rock OR geology OR geological OR strata OR tectonics',
term_fr=>'fossile OR fossiles OR cristal OR minerai OR minerais OR roche OR géologie OR géologique OR strates OR tectonique',
                    type        => 'su',
                },
                {
                    subjName    => 'Plants',
                    subjName_es    => 'Plants',
                    subjName_fr => 'Plantes',
                    icon        => 'plants.gif',
term=>'botany OR botanical OR horticulture OR flower OR flowers OR plants OR leaves OR vines',
term_es=>'botany OR botanical OR horticulture OR flower OR flowers OR plants OR leaves OR vines',
term_fr=>'botanique OR jardins OR jardinage OR horticulture OR fleur OR fleurs OR plantes OR feuilles OR vignes',
                    type        => 'kwd',
                    subjLevel2       => [
                        {
                            subjLevel2Name  => 'Cactus',
                            subjLevel2Name_es  => 'Cactus',
                            subjLevel2Name_fr =>'Cactus',
term=>'cacti OR cactus OR saguaro OR peyote',
term_es=>'cacti OR cactus OR saguaro OR peyote',
term_fr=>'cactus OR saguaro OR peyotl',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name  => 'Flowers',
                            subjLevel2Name_es  => 'Flowers',
                            subjLevel2Name_fr =>'Fleurs',
term=>'flower OR flowers OR pollination OR flora OR horticulture OR garden OR gardens OR gardening OR blossom OR blossoms',
term_es=>'flower OR flowers OR pollination OR flora OR horticulture OR garden OR gardens OR gardening OR blossom OR blossoms',
term_fr=>'fleur OR fleurs OR pollinisation OR flore OR horticulture OR jardin OR jardins OR jardinage',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name  => 'Fruit and Vegetables',
                            subjLevel2Name_es  => 'Fruit and Vegetables',
                            subjLevel2Name_fr =>'Fruits & Légumes',
term=>'fruit OR fruits OR apples OR oranges OR cherry OR cherries OR kiwi OR peach OR peaches OR pear OR pears OR vegetable OR vegetables OR potato OR potatoes OR carrots OR beans OR broccoli OR lettuce OR corn OR spinach OR cauliflower OR beets',
term_es=>'fruit OR fruits OR apples OR oranges OR cherry OR cherries OR kiwi OR peach OR peaches OR pear OR pears OR vegetable OR vegetables OR potato OR potatoes OR carrots OR beans OR broccoli OR lettuce OR corn OR spinach OR cauliflower OR beets',
term_fr=>'fruit OR fruits OR pommes OR oranges OR cerise OR cerises OR kiwi OR pêche OR pêches OR poire OR poires OR légume OR légumes OR pomme de terre OR pommes de terre OR carottes OR haricots OR broccoli OR laitue OR maïs OR épinards OR chou-fleur OR betteraves',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name  => 'Gardening & Seeds',
                            subjLevel2Name_es  => 'Gardening & Seeds',
                            subjLevel2Name_fr =>'Jardinage ',
term=>'horticulture OR garden OR gardening OR botany OR farm OR farming OR seed OR seedlings OR germination',
term_es=>'horticulture OR garden OR gardening OR botany OR farm OR farming OR seed OR seedlings OR germination',
term_fr=>'horticulture OR jardin OR jardinage OR botanique OR ferme OR agriculture OR graine OR plantes OR germination',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name  => 'Trees',
                            subjLevel2Name_es  => 'Trees',
                            subjLevel2Name_fr =>'Arbres',
term=>'trees OR tree OR arboriculture OR evergreens OR conifer OR conifers OR deciduous OR timber OR maple OR birch OR oak OR poplar OR cedar OR palm OR rainforest OR forest OR forestry',
term_es=>'trees OR tree OR arboriculture OR evergreens OR conifer OR conifers OR deciduous OR timber OR maple OR birch OR oak OR poplar OR cedar OR palm OR rainforest OR forest OR forestry',
term_fr=>'arbres OR arbre OR arboriculture OR plantes vertes OR conifère OR conifères OR à feuilles caduques OR bois de construction OR érable OR bouleau OR chêne OR peuplier OR cèdre OR paume OR forêt tropicale OR forêt OR sylviculture',
                            type            => 'kwd',
                        },
                    ],
                },
                {
                    subjName    => 'Seasons',
                    subjName_es    => 'Seasons',
                    subjName_fr => 'Saisons',
                    icon        => 'seasons.gif',
term=>'seasons OR autumn OR spring OR summer OR winter',
term_es=>'seasons OR autumn OR spring OR summer OR winter',
term_fr=>'saisons OR automne OR printemps OR été OR hiver',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Weather',
                    subjName_es    => 'Weather',
                    subjName_fr => 'Climat',
                    icon        => 'weather.gif',
term=>'weather OR droughts OR meteorology OR climate OR hurricanes OR tornadoes OR rain OR snow OR sleet OR storms OR clouds OR forecasting OR barometer OR barometric',
term_es=>'weather OR droughts OR meteorology OR climate OR hurricanes OR tornadoes OR rain OR snow OR sleet OR storms OR clouds OR forecasting OR barometer OR barometric',
term_fr=>'temps OR météo OR météorologie OR sécheresse OR climat OR tornades OR pluie OR neige OR verglas OR tempête OR nuages OR baromètre OR baromètrique',
                    type        => 'kwd',
                },
            ],
        };
    push @categoryList,
        {
            subject => 'science',
            subjectTxt=>'Science',
            subjectTxt_es=>'Ciencias',
            subjectTxt_fr=>'Sciences',
            subjLevel1  => [
                {
                    subjName    => 'Astronomy',
                    subjName_es    => 'Astronomy',
                    subjName_fr => 'Astronomie',
                    icon        => 'Astronomy.gif',
term   =>'astronomy  OR constellation OR Ursa OR stellar OR telescope OR telescopes OR planets  OR NASA OR saturn OR pluto OR cosomology OR galaxies NOT fiction NOT disasters NOT ecology NOT environmental NOT fossil',
term_es=>'astronomy  OR constellation OR Ursa OR stellar OR telescope OR telescopes OR planets  OR NASA OR saturn OR pluto OR cosomology OR galaxies NOT fiction NOT disasters NOT ecology NOT environmental NOT fossil',
term_fr=>'astronomie OR constellation OR Ursa OR stellaire OR téléscope OR télescopes OR planète OR planètes OR NASA OR Saturne OR pluto OR cosomology OR galaxies NOT fiction NOT catastrophes NOT écologie NOT environnementale',
                    type        => 'kwd',
                },
 
 
                {
                    subjName    => 'Biology',
                    subjName_es    => 'Biology',
                    subjName_fr => 'Biologie',
                    icon        => 'Biology.gif',
term=>'biology OR botany OR earthworms OR cells OR genes OR genetics OR microbiology OR cytology OR zoology OR biochemistry OR organic OR bioethics',
term_es=>'biology OR botany OR earthworms OR cells OR genes OR genetics OR microbiology OR cytology OR zoology OR biochemistry OR organic OR bioethics',
term_fr=>'biologie OR botonique OR "ver de terre" OR cellule OR cellules OR gène OR gènes OR microbiologie OR cytologie OR zoologie OR biochimie OR organique OR bioéthique',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Chemistry & Physics',
                    subjName_es    => 'Chemistry & Physics',
                    subjName_fr => 'Chimie & Physique',
                    icon        => 'Chemistry-&-Physics.gif',
term=>'physics OR chemistry OR alchemy OR chemical OR experiment OR experiments OR chemicals OR atoms OR molecules OR gravity OR temperature OR metric',
term_es=>'physics OR chemistry OR alchemy OR chemical OR experiment OR experiments OR chemicals OR atoms OR molecules OR gravity OR temperature OR metric',
term_fr=>'physique OR chimie OR alchimie OR produit chimique OR expérience OR expériences OR produits chimiques OR atomes OR molécules OR pesanteur OR température OR métrique',
                    type        => 'su',
                },
                {
                    subjName    => 'Environment',
                    subjName_es    => 'Environment',
                    subjName_fr => 'Environnement',
                    icon        => 'Environment.gif',
term=>'environment OR ecology',
term_es=>'environment OR ecology',
term_fr=>'l\'environnement OR environnement OR l\'écologie OR écologie',
                    type        => 'su',
                    subjLevel2       => [
                        {
                            subjLevel2Name  => 'Desert',
                            subjLevel2Name_es  => 'Desert',
                            subjLevel2Name_fr => 'Désert',
term=>'desert OR dune OR Sahara OR Mojave OR Gobi',
term_es=>'desert OR dune OR Sahara OR Mojave OR Gobi',
term_fr=>'désert OR dune OR Sahara OR Mojave OR Gobi',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name  => 'Endangered Animals',
                            subjLevel2Name_es  => 'Endangered Animals',
                            subjLevel2Name_fr => 'Espèces en péril',
term=>'endangered OR extinct OR whales OR eagles OR grizzly OR bison OR peregrine OR crane OR wolf OR wolverine OR ',
term_es=>'endangered OR extinct OR whales OR eagles OR grizzly OR bison OR peregrine OR crane OR wolf OR wolverine OR ',
term_fr=>'espèce manacée OR baleine OR baleines OR aigle OR aigles OR grizzli OR bison OR "faucon pélerin" OR grue OR loup OR loups OR glouton',
                            type            => 'su',
                        },
                        {
                            subjLevel2Name  => 'Forest',
                            subjLevel2Name_es  => 'Forest',
                            subjLevel2Name_fr => 'Forêt',
term=>'forest OR forestry OR rainforest OR tree OR trees',
term_es=>'forest OR forestry OR rainforest OR tree OR trees',
term_fr=>'Forêt OR forêt tropicale',
                            type            => 'su',
                        },
                        {
                            subjLevel2Name  => 'Mountains',
                            subjLevel2Name_es  => 'Mountains',
                            subjLevel2Name_fr => 'Montagnes',
term=>'mountain OR mountains OR Adirondack OR Rockies OR Himalaya OR Himalayan OR Everest',
term_es=>'mountain OR mountains OR Adirondack OR Rockies OR Himalaya OR Himalayan OR Everest',
term_fr=>'montagne OR Rocheuses OR Adirondack OR Laurentides OR Alpes OR de l\'Himalaya OR l\'Himalaya OR Everest',
                            type            => 'kwd',
                        },
                        {
                            subjLevel2Name  => 'Oceans',
                            subjLevel2Name_es  => 'Oceans',
                            subjLevel2Name_fr => 'Océan',
term=>'ocean OR sea OR Atlantic OR Pacific OR Arctic OR Mediterranean OR coast OR coasts OR coastal OR estuaries OR estuary',
term_es=>'ocean OR sea OR Atlantic OR Pacific OR Arctic OR Mediterranean OR coast OR coasts OR coastal OR estuaries OR estuary',
term_fr=>'océan OR océans OR mer OR estuaires OR côte OR côtier OR côtes OR Pacifique OR Océan atlantique OR arctique OR méditerranéen OR baltique',
                            type            => 'su',
                        },
                    ],
                },
                {
                    subjName    => 'Experiments',
                    subjName_es    => 'Experiments',
                    subjName_fr => 'Expériences',
                    icon        => 'Experiments.gif',
term=>'chemistry OR physics OR biology OR experiments',
term_es=>'chemistry OR physics OR biology OR experiments',
term_fr=>'chimie OR physique OR biologie OR expérience OR expériences',
                    type        => 'su',
                },
                {
                    subjName    => 'Fun Science',
                    subjName_es    => 'Fun Science',
                    subjName_fr => 'Sciences',
                    icon        => 'Fun-Science.gif',
term=>'experiments OR microscope OR yeast OR DNA OR wintergreen OR graff OR solids OR liquids OR gases OR Bernoulli OR static OR magnets OR bubbles',
term_es=>'experiments OR microscope OR yeast OR DNA OR wintergreen OR graff OR solids OR liquids OR gases OR Bernoulli OR static OR magnets OR bubbles',
term_fr=>'expériences OR microcope OR levure OR AND OR gaulthérie OR solide OR solides OR liquide OR liquides OR gaz OR Bernoulli OR aimants OR magnétisme OR statique OR bulle OR bulles',
                    type        => 'su',
                },
                {
                    subjName    => 'Space Travel',
                    subjName_es    => 'Space Travel',
                    subjName_fr => 'Astronautiques',
                    icon        => 'Space-Travel.gif',
term=>'space OR ship OR interplanetary OR voyages OR trek OR Challenger OR NASA OR shuttle OR astronaut OR astronauts OR rocket OR rockets',
term_es=>'space OR ship OR interplanetary OR voyages OR trek OR Challenger OR NASA OR shuttle OR astronaut OR astronauts OR rocket OR rockets',
term_fr=>'espace OR interplanétaire OR voyages OR voyage OR provocateur OR NASA OR navette OR astronaute OR astronautes OR fusée OR fusées',
                    type        => 'su',
                },
                {
                    subjName    => 'Weather',
                    subjName_es    => 'Weather',
                    subjName_fr => 'Climat',
                    icon        => 'Weather.gif',
term=>'weather OR drought OR meteorology OR storms OR snow OR wind OR rain OR sleet OR thunder OR lightning OR wind OR hurricanes OR tornadoes OR floods OR clouds OR forecasting',
term_es=>'weather OR drought OR meteorology OR storms OR snow OR wind OR rain OR sleet OR thunder OR lightning OR wind OR hurricanes OR tornadoes OR floods OR clouds OR forecasting',
term_fr=>'temps OR sécheresse OR météorologie OR tempête OR tempêtes OR vent OR pluie OR tonnerre OR éclairs OR ouragan OR tornades OR inondations OR nuages ',
                    type        => 'su',
                },
            ],
        };
    push @categoryList,
        {
            subject => 'sports',
            subjectTxt=>'Sports',
            subjectTxt_es=>'Deportes',
            subjectTxt_fr=>'Sports',
            subjLevel1  => [
                {
                    subjName    => 'African American Athletes',
                    subjName_es => 'African American Athletes',
                    subjName_fr => 'Athlètes Afro-Américains',
                    icon        => 'African-American-Athletes.gif',
term=>'Globetrotters OR Kareem OR Cassius OR Shaquille OR Jackie',
term_es=>'Globetrotters OR Kareem OR Cassius OR Shaquille OR Jackie',
term_fr=>'Globetrotters OR Kareem OR Cassisu OR Shaquille OR "Jackie Robinson"',
                    type        => 'su',
                },
                {
                    subjName    => 'Athletes',
                    subjName_es => 'Athletes',
                    subjName_fr => 'Athlètes',
                    icon        => 'Athletes.gif',
term=>'athletes OR players OR cyclists OR rowers OR skiers OR swimmers OR NBA OR NFL OR NHL OR hockey OR football OR tennis OR basketball OR Olympic OR wrestlers OR sports OR runners OR divers',
term_es=>'athletes OR players OR cyclists OR rowers OR skiers OR swimmers OR NBA OR NFL OR NHL OR hockey OR football OR tennis OR basketball OR Olympic OR wrestlers OR sports OR runners OR divers',
term_fr=>'athlètes OR joueurs OR cycliste OR rameur OR rameuse OR skieur OR skieuse OR NBA OR NFL OR hockey OR football OR tennis OR basketball OR Olympique OR lutte',
                    type        => 'su',
                },
                {
                    subjName    => 'Baseball',
                    subjName_es => 'Baseball',
                    subjName_fr => 'Baseball',
                    icon        => 'Baseball.gif',
term=>'Baseball',
term_es=>'Baseball',
term_fr=>'Baseball',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Basketball',
                    subjName_es => 'Basketball',
                    subjName_fr => 'Basketball',
                    icon        => 'Basketball.gif',
term=>'Basketball',
term_es=>'Basketball',
term_fr=>'Basketball',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Football',
                    subjName_es => 'Football',
                    subjName_fr => 'Football',
                    icon        => 'Football.gif',
term=>'Football',
term_es=>'Football',
term_fr=>'Football',
                    type        => 'kwd',
                },
                {
                    subjName    => 'Games & Activities',
                    subjName_es => 'Games & Activities',
                    subjName_fr => 'Jeux - Loisirs',
                    icon        => 'Games-&-Activities.gif',
term=>'"Games Activities"',
term_es=>'"Games Activities"',
term_fr=>'Jeux - Loisirs',
                    type        => 'su',
                },
                {
                    subjName    => 'Hockey',
                    subjName_es => 'Hockey',
                    subjName_fr => 'Hockey',
                    icon        => 'Hockey.gif',
term=>'Hockey',
term_es=>'Hockey',
term_fr=>'Hockey',
                    type        => 'su',
                },
                {
                    subjName    => 'Olympic Games',
                    subjName_es => 'Olympic Games',
                    subjName_fr => 'Jeux olympiques',
                    icon        => 'Olympic-Games.gif',
term=>'Olympic OR olympian',
term_es=>'Olympic OR olympian',
term_fr=>'Olympique OR Olympien OR Olympienne',
                    type        => 'su',
                },
                {
                    subjName    => 'Soccer',
                    subjName_es => 'Soccer',
                    subjName_fr => 'Soccer ("Football")',
                    icon        => 'Soccer.gif',
term=>'Soccer',
term_es=>'Soccer',
term_fr=>'Soccer ("Football")',
                    type        => 'su',
                },
                {
                    subjName    => 'Team sports',
                    subjName_es => 'Team sports',
                    subjName_fr => 'Sports d\'équippe',
                    icon        => 'Team-sports.gif',
term=>'team OR sport OR hockey OR soccer OR lacrosse OR rugby OR skiing OR football OR basketball OR volleyball OR polo OR soccer',
term_es=>'team OR sport OR hockey OR soccer OR lacrosse OR rugby OR skiing OR football OR basketball OR volleyball OR polo OR soccer',
term_fr=>'équipe OR sports OR hockey OR soccer OR lacrosse OR rugby OR ski OR football OR basketball OR volley-ball OR polo',
                    type        => 'su',
                },
            ],
        };
        
    #only french is translated. so SP & PT are defaulted to english
    if($lang && $lang eq 'fr'){
        foreach my $cat(@categoryList){
            $cat->{'subjectTxt'}=$cat->{'subjectTxt_' . $lang };
            if($cat->{'subjLevel1'}){
                foreach my $lev(@{$cat->{'subjLevel1'}}){
                    $lev->{'subjName'} = $lev->{'subjName_' . $lang };
                    $lev->{'term'} = $lev->{'term_' . $lang };
                    if($lev->{'subjLevel2'}){
                        foreach my $lev2(@{$lev->{'subjLevel2'}}){
                            $lev2->{'subjLevel2Name'}=$lev2->{'subjLevel2Name_' . $lang};
                            $lev2->{'term'} = $lev2->{'term_' . $lang };
                        }
                    }


                }
            }
        }
    }
    return \@categoryList;
#    ];
#    
#    return $categoryList;
}
