#!/usr/local/bin/perl

use CGI qw(:standard);
#use DBI;

#require "sub_html.pl";  #needed for sub print_copyright_notice
require "../bin/geneloc/variables";
#require "../geneloc/variables";
#get user parameters

my $query;  #query object to be entered through the form

$query = new CGI;

my $gc_id = $query->param('gc_id');
my $contig = $query->param('contig');
my $chr_nr = substr($gc_id, 2, 2);
if ($chr_nr =~ /^0/) {
    $chr_nr = $';
}
#show results on the Web output as they come out

$| = 1;  

#colors in display

$page_bg_color = "\"#FFFFFF\"";        #bg means background
$table_headings_bg_color = "\"#66CCCC\"";
$titles_font_color = "\"#990033\"";
$labels_font_color = "\"#117C7C\"";

#URLs

$this_script = 'display_map_geneloc.pl';
$this_url = "$URL_CGI_SCRIPTS/$CURRENT/$this_script";
$gl_homepage_url = "$URL_STATIC_HTML_PAGES/$CURRENT";
$gc_id_link = "$URL_CGIBIN/AboutGCids.cgi?gc_id=";
$redirect_link = "display_map.pl?chr_nr=$chr_nr&range_type=gc_id&gc_id=$gc_id&contig=$contig";
#start HTML page

print $query->redirect("$redirect_link");

print start_html(-title  =>  'GeneLoc Integrated Map',
                 -bgcolor => 'white');

#print_copyright_notice ("html");

#print header

my $header = 
"
<TABLE>
<TR>
<TD>
<IMG SRC=\"$URL_STATIC_HTML_PAGES/$CURRENT/graphics/logo.gif\" alt=\"Logo\">
</TD>
<TD ALIGN=\"CENTER\">
<H2><FONT COLOR=\"GREEN\">The Unified Database
for Human Genome Mapping</FONT></H2>
<H3><FONT COLOR=\"GREEN\">Enhanced with the GeneLoc algorithm</FONT></H3>
<a href=\"http://bioinfo.weizmann.ac.il\">Bioinformatics and Biological Computing</a>
&
<a href=\"http://bioinfo.weizmann.ac.il/genome_center\">Crown Human Genome Center</a>

<BR>
<a href=\"http://www.weizmann.ac.il\">Weizmann Institute of Science</a>
</TD>
</TR></TABLE>
<HR>
";

print $header, p;

#print under construction

print "<CENTER><IMG SRC=\"$URL_STATIC_HTML_PAGES/$CURRENT_UDB/graphics/construction.gif\" alt=\"Under Construction\"></CENTER><HR><P>\n";
    
#print message

$gc_id_link .= $gc_id;

my $message = 
"
The GeneLoc algorithm integrates gene positional information from external human
genome databases thus creating a comprehensive, non-redundant, gene index with
absolute location for each gene. Each gene is assigned a meaningful,
location-based identifier, which also serves as its
<a href=\"${gc_id_link}\">GeneCards ID</a>.
<P>
GeneLoc's positional information will soon be
incorporated into the UDB search engine and result display, and unified with
marker and contig locations. All locations are on NCBI's human genome sequence assembly (currently build
30).";

print $message, p;

#end HTML page

print end_html;
