// common shared JavaScript functions for science-edu
// file date: 03/13/2009 version 3.0.0
// author: Jay Madigan
// DO NOT EDIT WITHOUT PERMISSION


var monthsLONG = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var language="en";  // default language is English


function MakeDateString(datecode) {
    //20060908
    //01234567
//    alert(datecode);
    var year = datecode.substr(0,4);
//    var month = parseInt(date.substr(4,2));
    var month = datecode.substr(4,2)-1;
//    var day = parseInt(date.substr(6,2));
    var day = datecode.substr(6,2);
 //   alert(day);
    var DateString =  monthsLONG[month]+" "+day+", "+year;
    return DateString;
}

function confirm_transport_to_Jetstream() {
	return confirm('You are now being transported to\nThe NWS JetStream MAX Interactive Cloud Chart.\n\nClick OK if you wish to proceed.');
}
function confirm_download() {
	return confirm('The file that you are about to access is 16MB in size.\n\nDependent upon your connection speed,\nthe download may take several minutes.\n\nClick OK if you wish to proceed.');
}

function Disclaimer() {
	alert("\nYou are now leaving the NASA web domain (.nasa.gov)\n");
}


function CreateNASAheaderBLUE() {
document.write('<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" WIDTH="100%" BGCOLOR="#c7eafb">');
document.write('    <TR>');
document.write('        <TD VALIGN="middle" WIDTH="510"><A HREF="http://www.nasa.gov"><IMG SRC="http://science-edu.larc.nasa.gov/common/new_logo_nasa.gif" WIDTH="288" HEIGHT="51" ALT="NASA - National Aeronautics and Space Administration" BORDER="0"></A><BR /></TD>');
document.write('        <TD VALIGN="middle" HEIGHT="65" WIDTH="186">');
document.write('            <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">');
document.write('                <TR>');
document.write('                    <TD BGCOLOR="#c7eafb" WIDTH="1"><IMG BORDER="0" ALT=" " HEIGHT="45" WIDTH="1" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
document.write('                    <TD WIDTH="19"><IMG BORDER="0" ALT="" HEIGHT="1" WIDTH="1" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
document.write('                    <TD BGCOLOR="#c7eafb" VALIGN="middle" ALIGN="right" HEIGHT="65" WIDTH="278">');
document.write('                        <TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">');
document.write('                            <TR>');
document.write('                                <TD ROWSPAN="2" WIDTH="30" ALIGN="right"><IMG BORDER="0" ALT="" HEIGHT="1" WIDTH="10" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
document.write('                                <TD COLSPAN="3">');
document.write('                                    <LABEL FOR="searchfield"><B><FONT SIZE="2">FIND IT @ NASA</FONT></B>');
document.write('                                </TD>');
document.write('                            </TR>');
document.write('                            <TR>');
document.write('                                <TD VALIGN="top" ALIGN="right">');
document.write('                                    <FONT SIZE="2" FACE="arial">');
document.write('                                        <FORM id="search" name="search" action="http://search.nasa.gov/nasasearch/search/search.jsp" method="get" target="search">');
//document.write('                                            <INPUT TYPE="hidden" NAME="boolean" VALUE="as a phrase" />');
document.write('                                            <INPUT id=searchfield title=searchfield name=nasaInclude SIZE="20" /><FONT SIZE="3">');

//document.write('                                        </FORM>');
document.write('                                    </FONT>');
document.write('                                <TD WIDTH="8"><IMG BORDER="0" ALT="" HEIGHT="1" WIDTH="5" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
//                                              <INPUT title=Go type=image height=20 alt=Go width=38 src="common/button_go.gif" border=0>
document.write('                                <TD VALIGN="middle"><INPUT title="Go" type="image" SRC="http://science-edu.larc.nasa.gov/common/button_go_C7EAFB.gif" WIDTH="38" HEIGHT="20" ALT="Go" BORDER="0"></TD>');
document.write('                                <TD WIDTH="8"><IMG BORDER="0" ALT="" HEIGHT="1" WIDTH="5" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
document.write('                            </TR>');
document.write('                                        </FORM>');
document.write('                        </TABLE>');
document.write('                    </TD>');
document.write('                </TR>');
document.write('            </TABLE>');
document.write('        </TD>');
document.write('    </TR>');
//document.write('    <TR>');
//document.write('        <TD COLSPAN="2" HEIGHT="2" BGCOLOR="#000000"></TD>');
//document.write('    </TR>');
document.write('</TABLE>');
}



function CreateSCOOLheader() {
document.write('<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" WIDTH="100%" BGCOLOR="#c7eafb">');
document.write('    <TR>');
document.write('        <TD VALIGN="middle" WIDTH="510"><A HREF="http://www.nasa.gov"><IMG SRC="http://science-edu.larc.nasa.gov/common/new_logo_nasa.gif" WIDTH="288" HEIGHT="51" ALT="NASA - National Aeronautics and Space Administration" BORDER="0"></A><BR /></TD>');
document.write('        <TD VALIGN="middle" HEIGHT="65" WIDTH="186">');
document.write('            <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">');
document.write('                <TR>');
document.write('                    <TD BGCOLOR="#c7eafb" WIDTH="1"><IMG BORDER="0" ALT=" " HEIGHT="45" WIDTH="1" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
document.write('                    <TD WIDTH="19"><IMG BORDER="0" ALT="" HEIGHT="1" WIDTH="1" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
document.write('                    <TD BGCOLOR="#c7eafb" VALIGN="middle" ALIGN="right" HEIGHT="65" WIDTH="278">');
document.write('                        <TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">');
document.write('                            <TR>');
document.write('                                <TD ROWSPAN="2" WIDTH="30" ALIGN="right"><IMG BORDER="0" ALT="" HEIGHT="1" WIDTH="10" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
document.write('                                <TD COLSPAN="3">');
document.write('                                    <LABEL FOR="searchfield"><B><FONT SIZE="2">FIND IT @ S\'COOL</FONT></B>');
document.write('                                </TD>');
document.write('                            </TR>');
document.write('                            <TR>');
document.write('                                <TD VALIGN="top" ALIGN="right">');
document.write('                                    <FONT SIZE="2" FACE="arial">');
document.write('                                        <FORM NAME="search" METHOD="post" ACTION="http://asd-www.larc.nasa.gov/cgi-bin/SCOOL_websearch.pl">');
document.write('                                            <INPUT TYPE="hidden" NAME="boolean" VALUE="as a phrase" />');
document.write('                                            <INPUT TYPE=TEXT NAME="terms" SIZE="20" /><FONT SIZE="3">');
document.write('                                            <INPUT TYPE="hidden" NAME="boolean" VALUE="all terms" />');
document.write('                                            <INPUT TYPE="hidden" NAME="case" VALUE="insensitive" />');
document.write('                                            <INPUT TYPE="hidden" NAME="hits" VALUE="25" />');
document.write('                                        </FORM>');
document.write('                                    </FONT>');
document.write('                                <TD WIDTH="8"><IMG BORDER="0" ALT="" HEIGHT="1" WIDTH="5" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
document.write('                                <TD VALIGN="middle"><A HREF="javascript:document.search.submit();"><IMG name="Go" SRC="http://science-edu.larc.nasa.gov/common/button_go_C7EAFB.gif" WIDTH="38" HEIGHT="20" ALT="Go" BORDER="0"></A></TD>');
document.write('                                <TD WIDTH="8"><IMG BORDER="0" ALT="" HEIGHT="1" WIDTH="5" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
document.write('                            </TR>');
document.write('                        </TABLE>');
document.write('                    </TD>');
document.write('                </TR>');
document.write('            </TABLE>');
document.write('        </TD>');
document.write('    </TR>');
//document.write('    <TR>');
//document.write('        <TD COLSPAN="2" HEIGHT="2" BGCOLOR="#000000"></TD>');
//document.write('    </TR>');
document.write('</TABLE>');
}

function CreateSCOOLheaderInternational(language) {
document.write('<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" WIDTH="100%" BGCOLOR="#c7eafb">');
document.write('    <TR>');
document.write('        <TD VALIGN="middle" WIDTH="510"><A HREF="http://www.nasa.gov"><IMG SRC="http://science-edu.larc.nasa.gov/common/new_logo_nasa.gif" WIDTH="288" HEIGHT="51" ALT="NASA - National Aeronautics and Space Administration" BORDER="0"></A><BR /></TD>');
document.write('        <TD VALIGN="middle" HEIGHT="65" WIDTH="186">');
document.write('            <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">');
document.write('                <TR>');
document.write('                    <TD BGCOLOR="#c7eafb" WIDTH="1"><IMG BORDER="0" ALT=" " HEIGHT="45" WIDTH="1" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
document.write('                    <TD WIDTH="19"><IMG BORDER="0" ALT="" HEIGHT="1" WIDTH="1" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
document.write('                    <TD BGCOLOR="#c7eafb" VALIGN="middle" ALIGN="right" HEIGHT="65" WIDTH="278">');
document.write('                        <TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">');
document.write('                            <TR>');
document.write('                                <TD ROWSPAN="2" WIDTH="30" ALIGN="right"><IMG BORDER="0" ALT="" HEIGHT="1" WIDTH="10" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
document.write('                                <TD COLSPAN="3" align="left">');

if (language=="en"){
    document.write('                                    <LABEL FOR="searchfield"><B><FONT SIZE="2">FIND IT @ S\'COOL</FONT></B>');
}

if (language=="fr"){
    document.write('                                    <LABEL FOR="searchfield"><B><FONT SIZE="2">RECHERCHE @ S\'COOL</FONT></B>');
}

if (language=="sp"){
    document.write('                                    <LABEL FOR="searchfield"><B><FONT SIZE="2">BUSCAR @ S\'COOL</FONT></B>');
}

if (language=="ge"){
    document.write('                                    <LABEL FOR="searchfield"><B><FONT SIZE="2">SUCHEN @ S\'COOL</FONT></B>');
}

if (language=="it"){
    document.write('                                    <LABEL FOR="searchfield"><B><FONT SIZE="2">CERCA @ S\'COOL</FONT></B>');
}

document.write('                                </TD>');
document.write('                            </TR>');
document.write('                            <TR>');
document.write('                                <TD VALIGN="middle" ALIGN="right">');
document.write('                                    <FONT SIZE="2" FACE="arial">');
document.write('                                        <FORM NAME="search" METHOD="post" ACTION="http://asd-www.larc.nasa.gov/cgi-bin/SCOOL_websearch.pl">');
document.write('                                            <INPUT TYPE="hidden" NAME="boolean" VALUE="as a phrase" />');
document.write('                                            <INPUT TYPE=TEXT NAME="terms" SIZE="20" /><FONT SIZE="3">');
document.write('                                            <INPUT TYPE="hidden" NAME="boolean" VALUE="all terms" />');
document.write('                                            <INPUT TYPE="hidden" NAME="case" VALUE="insensitive" />');
document.write('                                            <INPUT TYPE="hidden" NAME="hits" VALUE="25" />');
document.write('                                        </FORM>');
document.write('                                    </FONT>');
document.write('                                <TD WIDTH="8" VALIGN="middle"><IMG BORDER="0" ALT="" HEIGHT="1" WIDTH="5" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
document.write('                                <TD VALIGN="middle"><A HREF="javascript:document.search.submit();"><IMG name="Go" SRC="http://science-edu.larc.nasa.gov/common/button_go_C7EAFB.gif" WIDTH="38" HEIGHT="20" ALT="Go" BORDER="0"></A></TD>');
document.write('                                <TD WIDTH="8" VALIGN="middle"><IMG BORDER="0" ALT="" HEIGHT="1" WIDTH="5" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
document.write('                            </TR>');
document.write('                        </TABLE>');
document.write('                    </TD>');
document.write('                </TR>');
document.write('            </TABLE>');
document.write('        </TD>');
document.write('    </TR>');
//document.write('    <TR>');
//document.write('        <TD COLSPAN="2" HEIGHT="2" BGCOLOR="#000000"></TD>');
//document.write('    </TR>');
document.write('</TABLE>');
}



//function CreateSCOOLheaderInternational933(language) {
// THIS IS THE OLD VERSION OF THIS FUNCTION PRIOR TO MARCH 13, 2009    
//document.write('    <table width="933" cellpadding="3" cellspacing="0" border="0">');
//document.write('    <tr>');
//document.write('        <td bgcolor="#C7EAFB"><a href="http://www.nasa.gov/"><img src="http://science-edu.larc.nasa.gov/common/nasabannerBLUE2A.gif" alt="NASA Logo - National Aeronautics and Space Administration" border="0"></td>');
//document.write('        <td width="300" bgcolor="#C7EAFB"><img src="http://science-edu.larc.nasa.gov/common/spacer.gif" alt="for formatting only" width=300 height=0></td>');
//document.write('');
//document.write('        <!-- BEGIN SEARCH BLOCK -->');
//document.write('        <td width="333" bgcolor="#C7EAFB" align="right" valign="middle"><label for class="sectionLnk""searchÞeld">');
//
//if (language=="en"){
//    document.write('        <span class="verdana08">FIND IT @ S\'COOL\&nbsp;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;</span></label>');
//}
//
//if (language=="fr"){
//    document.write('        <span class="verdana08">RECHERCHE @ S\'COOL\&nbsp;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;</span></label>');
//}
//
//if (language=="sp"){
//    document.write('        <span class="verdana08">BUSCAR @ S\'COOL\&nbsp;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;</span></label>');
//}
//
//if (language=="ge"){
//    document.write('        <span class="verdana08">SUCHEN @ S\'COOL\&nbsp;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;</span></label>');
//}
//
//if (language=="it"){
//    document.write('        <span class="verdana08">CERCA @ S\'COOL\&nbsp;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;</span></label>');
//}
//
//
//document.write('        <FORM NAME="search" METHOD="post" ACTION="http://asd-www.larc.nasa.gov/cgi-bin/SCOOL_websearch.pl">');
//document.write('        <INPUT TYPE=TEXTBOX NAME="terms" id="searchÞeld" size="20" maxlength="200" value="">');
//document.write('        <INPUT TYPE="hidden" NAME="boolean" VALUE="all terms"><INPUT TYPE="hidden" NAME="case" VALUE="insensitive"><INPUT TYPE="hidden" NAME="hits" VALUE="25"> ');
//document.write('        <input alt="SEARCH" type="image" height="18" width="17" src="http://science-edu.larc.nasa.gov/common/head_searchgo2.gif" name="search" border="0">');
//document.write('        </td>');
//document.write('        <!-- END SEARCH BLOCK -->');
//document.write('');
//document.write('        </tr>');
//document.write('        </table></FORM>');
//
//  
//}


function CreateSCOOLheaderInternational933(language) {
    
document.write('<table width="933" cellpadding="3" cellspacing="0" border="0">');
document.write('    <tr>');
document.write('        <td bgcolor="#C7EAFB"><a href="http://www.nasa.gov/"><img src="http://science-edu.larc.nasa.gov/SCOOL/common/nasabannerBLUE2A.gif" alt="NASA Logo - National Aeronautics and Space Administration" border="0"></td>');
document.write('        <td width="300" bgcolor="#C7EAFB"><img src="common/spacer.gif" alt="for formatting only" width=300 height=0></td>');
document.write(' ');
document.write('        <!-- BEGIN SEARCH BLOCK -->');
document.write('    <td width="333" bgcolor="#C7EAFB" align="right" valign="middle">');
document.write('     <form name="SearchFormTop"  action="search/script/sessearch.php">');

if (language=="en"){
 document.write('     <span class="verdana08">FIND IT @ S&acute;COOL:');
 document.write('     <input type="text" name="q" size="20">');
 document.write('     <input alt="SEARCH" type="image" height="18" width="17" src="http://science-edu.larc.nasa.gov/common/head_searchgo2.gif" name="SearchFormTop" border="0">');
 document.write('     <br>');
 document.write('     <input type="radio" name="op" value="and" checked>all words</input>');
 document.write('     <input type="radio" name="op" value="or">any words</input>');
 document.write('     <input type="radio" name="op" value="ph">exact phrase</input>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
 document.write('     </span>');
}

if (language=="fr"){
 document.write('     <span class="verdana08">RECHERCHE @ S&acute;COOL:');
 document.write('     <input type="text" name="q" size="20">');
 document.write('     <input alt="SEARCH" type="image" height="18" width="17" src="http://science-edu.larc.nasa.gov/common/head_searchgo2.gif" name="SearchFormTop" border="0">');
 document.write('     <br>');
 document.write('     <input type="radio" name="op" value="and" checked>Tous mots</input>');
 document.write('     <input type="radio" name="op" value="or">Un des mots</input>');
 document.write('     <input type="radio" name="op" value="ph">Phrase exacte</input>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
 document.write('     </span>');
}

if (language=="it"){
 document.write('     <span class="verdana08">CERCA @ S&acute;COOL:');
 document.write('     <input type="text" name="q" size="20">');
 document.write('     <input alt="SEARCH" type="image" height="18" width="17" src="http://science-edu.larc.nasa.gov/common/head_searchgo2.gif" name="SearchFormTop" border="0">');
 document.write('     <br>');
 document.write('     <input type="radio" name="op" value="and" checked>tutte le parole</input>');
 document.write('     <input type="radio" name="op" value="or">qualunque parola</input>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>');
// document.write('     <span style="margin-right:55px"><input type="radio" name="op" value="ph">frase esatta</input></span>');
 document.write('     <input type="radio" name="op" value="ph">frase esatta</input>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
 document.write('     </span>');
}

if (language=="ge"){
 document.write('     <span class="verdana08">SUCHEN @ S&acute;COOL:');
 document.write('     <input type="text" name="q" size="20">');
 document.write('     <input alt="SEARCH" type="image" height="18" width="17" src="http://science-edu.larc.nasa.gov/common/head_searchgo2.gif" name="SearchFormTop" border="0">');
 document.write('     <br>');
 document.write('     <input type="radio" name="op" value="and" checked>Alle Worte</input>');
 document.write('     <input type="radio" name="op" value="or">Irgendwelche Worte</input>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>');
 document.write('     <input type="radio" name="op" value="ph">Genaue Phrase</input>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
 document.write('     </span>');
}

if (language=="sp"){
 document.write('     <span class="verdana08">BUSCAR @ S&acute;COOL:');
 document.write('     <input type="text" name="q" size="20">');
 document.write('     <input alt="SEARCH" type="image" height="18" width="17" src="http://science-edu.larc.nasa.gov/common/head_searchgo2.gif" name="SearchFormTop" border="0">');
 document.write('     <br>');
 document.write('     <input type="radio" name="op" value="and" checked>todas las palabras</input>');
 document.write('     <input type="radio" name="op" value="or">cualquier palabra</input>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>');
 document.write('     <input type="radio" name="op" value="ph">frase exacta</input>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
 document.write('     </span>');
}





document.write('     </form>');
document.write('    </td> ');   
document.write('        <!-- END SEARCH BLOCK -->');
document.write(' ');
document.write('        </tr>');
document.write('        </table>');

    
}






function CreateSCOOLheaderInternational_LEFT(language) {
document.write('<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" WIDTH="100%" BGCOLOR="#c7eafb">');
document.write('    <TR>');
document.write('        <TD VALIGN="middle" WIDTH="510"><A HREF="http://www.nasa.gov"><IMG SRC="http://science-edu.larc.nasa.gov/common/new_logo_nasa.gif" WIDTH="288" HEIGHT="51" ALT="NASA - National Aeronautics and Space Administration" BORDER="0"></A><BR /></TD>');
document.write('        <TD VALIGN="middle" HEIGHT="65" WIDTH="186">');
document.write('            <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">');
document.write('                <TR>');
document.write('                    <TD BGCOLOR="#c7eafb" WIDTH="1"><IMG BORDER="0" ALT=" " HEIGHT="45" WIDTH="1" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
document.write('                    <TD WIDTH="19"><IMG BORDER="0" ALT="" HEIGHT="1" WIDTH="1" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
document.write('                    <TD BGCOLOR="#c7eafb" VALIGN="middle" ALIGN="right" HEIGHT="65" WIDTH="278">');
document.write('                        <TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">');
document.write('                            <TR>');
document.write('                                <TD ROWSPAN="2" WIDTH="30" ALIGN="right"><IMG BORDER="0" ALT="" HEIGHT="7" WIDTH="35" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
document.write('                                <TD COLSPAN="4" align="left" height=30 vAlign="bottom">');

if (language=="en"){
    document.write('                                    <LABEL FOR="searchfield"><B><FONT SIZE="2">FIND IT @ S\'COOL</FONT></B>');
}

if (language=="fr"){
    document.write('                                    <LABEL FOR="searchfield"><B><FONT SIZE="2">RECHERCHE @ S\'COOL</FONT></B>');
}

if (language=="sp"){
    document.write('                                    <LABEL FOR="searchfield"><B><FONT SIZE="2">BUSCAR @ S\'COOL</FONT></B>');
}

if (language=="ge"){
    document.write('                                    <LABEL FOR="searchfield"><B><FONT SIZE="2">SUCHEN @ S\'COOL</FONT></B>');
}

if (language=="it"){
    document.write('                                    <LABEL FOR="searchfield"><B><FONT SIZE="2">CERCA @ S\'COOL</FONT></B>');
}

document.write('                                </TD>');
document.write('                            </TR>');
document.write('                            <TR>');
document.write('                                <TD VALIGN="baseline" ALIGN="right">');
document.write('                                    <FONT SIZE="2" FACE="arial">');
document.write('                                        <FORM NAME="search" METHOD="post" ACTION="http://asd-www.larc.nasa.gov/cgi-bin/SCOOL_websearch.pl">');
document.write('                                            <INPUT TYPE="hidden" NAME="boolean" VALUE="as a phrase" />');
document.write('                                            <INPUT TYPE=TEXT NAME="terms" SIZE="20" /><FONT SIZE="3">');
document.write('                                            <INPUT TYPE="hidden" NAME="boolean" VALUE="all terms" />');
document.write('                                            <INPUT TYPE="hidden" NAME="case" VALUE="insensitive" />');
document.write('                                            <INPUT TYPE="hidden" NAME="hits" VALUE="25" />');
document.write('                                        </FORM>');
document.write('                                    </FONT>');
document.write('                                    </TD>');
document.write('                                <TD  ROWSPAN=2 WIDTH="8" VALIGN="baseline"><IMG BORDER="0" ALT="" HEIGHT="20" WIDTH="8" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
document.write('                                <TD  ROWSPAN=2 VALIGN="baseline"><A HREF="javascript:document.search.submit();"><IMG name="Go" SRC="http://science-edu.larc.nasa.gov/common/button_go_C7EAFB.gif" WIDTH="38" HEIGHT="20" ALT="Go" BORDER="0"></A></TD>');
document.write('                                <TD  ROWSPAN=2 WIDTH="8" VALIGN="baseline"><IMG BORDER="0" ALT="" HEIGHT="20" WIDTH="8" SRC="http://science-edu.larc.nasa.gov/common/spacer.gif"></TD>');
document.write('                            </TR>');
document.write('                        </TABLE>');
document.write('                    </TD>');
document.write('                </TR>');
document.write('            </TABLE>');
document.write('        </TD>');
document.write('    </TR>');
//document.write('    <TR>');
//document.write('        <TD COLSPAN="2" HEIGHT="2" BGCOLOR="#000000"></TD>');
//document.write('    </TR>');
document.write('</TABLE>');
}

function CreateFooter(){
    document.write('<TABLE cellSpacing=0 cellPadding=0 width=730 align=center bgColor=#ffffff border=0>'        
                +'<TBODY>\n'
                +'<TR bgColor=#ffffff>\n'
                +'<TD colSpan=2><IMG height=1 src="http://science.larc.nasa.gov/common/spacer.gif" width=175></TD>\n'
                +'<TD vAlign=center align=right width=433><BR><IMG height=1 alt=spacer \n'
                +'src="http://science.larc.nasa.gov/common/spacer.gif" width=433> </TD></TR></TBODY></TABLE><!-- White space ends here --><!-- footer starts here --><!-- Footer starts -->\n'
                +'<TABLE cellSpacing=0 cellPadding=0 width=730 align=center border=0>\n'
                +'<TBODY>\n'
                +'<TR bgColor=#ffffff>\n'
                +'<TD width=10>&nbsp;</TD>\n'
                +'<TD width=330>&nbsp;</TD>\n'
                +'<TD width=52>&nbsp;</TD>\n'
                +'<TD width=10>&nbsp;</TD>\n'
                +'<TD width=189>&nbsp;</TD></TR>\n'
                +'<TR bgColor=#cccccc>\n'
                +'<TD width=10>&nbsp;</TD>\n'
                +'<TD width=330>&nbsp;</TD>\n'
                +'<TD width=52>&nbsp;</TD>\n'
                +'<TD width=10>&nbsp;</TD>\n'
                +'<TD width=189>&nbsp;</TD></TR>\n'
                +'<TR vAlign=top align=left bgColor=#cccccc>\n'
                +'<TD width=10><IMG height=1 \n'
                +'src="http://science.larc.nasa.gov/common/spacer.gif" \n'
                +'width=10> </TD>\n'
                +'<TD vAlign=top width=330 class="footer"><A class=footerLnk\n' 
                +'href="javascript:openNASAWindow(\'http://www.hq.nasa.gov/office/pao/FOIA/agency/\')">&#43;\n' 
                +'Freedom of Information Act</A> <BR><A class=footerLnk\n' 
                +'href="javascript:openNASAWindow(\'http://www.nasa.gov/about/budget/index.html\')">&#43; \n'
                +'Budgets, Strategic Plans and Accountability Reports</A> <BR><A class=footerLnk \n'
                +'href="javascript:openNASAWindow(\'http://www.nasa.gov/about/highlights/HP_Management.html\')">&#43;\n'
                +'The President\'s Management Agenda</A> <BR><A class=footerLnk \n'
                +'href="javascript:openNASAWindow(\'http://www.nasa.gov/about/highlights/HP_Privacy.html\')">&#43;\n' 
                +'Privacy Policy and Important Notices</A> <BR><A class=footerLnk \n'
                +'href="javascript:openNASAWindow(\'http://www.hq.nasa.gov/office/oig/hq/hotline.html\')">&#43;\n' 
                +'Inspector General Hotline</A> <BR><A class=footerLnk \n'
                +'href="javascript:openNASAWindow(\'http://www.hq.nasa.gov/office/codee/nofear.html\')">&#43;\n' 
                +'Equal Employment Opportunity Data Posted<BR><IMG height=1 alt="" \n'
                +'src="http://science.larc.nasa.gov/common/spacer.gif" \n'
                +'width=9 border=0>Pursuant to the No Fear Act</A> <BR><A \n'
                +'class=footerLnk \n'
                +'href="javascript:openNASAWindow(\'http://www.nasa.gov/about/contact/information_inventories_schedules.html\')">&#43;\n' 
                +'Information-Dissemination Priorities and Inventories</A> <BR><A \n'
                +'class=footerLnk href="javascript:openNASAWindow(\'http://www.usa.gov/\')">&#43;\n' 
                +'USA.gov</A> <BR><A class=footerLnk \n'
                +'href="javascript:openNASAWindow(\'http://www.whitehouse.gov/omb/expectmore/\')">&#43;\n' 
                +'ExpectMore.gov</A> <BR></TD>\n'
                +'<TD vAlign=top width=52><A class=footerLnk\n' 
                +'href="javascript:openNASAWindow(\'http://www.nasa.gov/home/index.html\')"><IMG \n'
                +'height=63 alt=NASA src="http://science.larc.nasa.gov/common/nasa_footer_03.gif" \n'
                +'width=52 border=0></A> </TD>\n'
                +'<TD width=10><IMG height=1 \n'
                +'src="http://science.larc.nasa.gov/common/spacer.gif" \n'
                +'width=10> </TD>\n'
                +'<TD class=footerlight width=189>&nbsp; <BR>Curator: <A class=footerLnk\n' 
                +'href="mailto:ANTISPAM.j.j.madigan@larc.nasa.gov">Jay Madigan</A> \n'
                +'<BR>NASA Responsible Official:<BR>&nbsp;&nbsp;Lin Chambers<BR>\n'
                +'last update:&nbsp;<SCRIPT> document.write (document.lastModified); </SCRIPT>\n'
		+'<BR><A class=footerLnk href="mailto:scool@larc.nasa.gov">&#43; Contact S\'COOL</A>\n'
		+'</TD></TR>\n'
                +'<TR bgColor=#cccccc>\n'
                +'<TD width=10><IMG height=1\n' 
                +'src="http://science-edu.larc.nasa.gov/common/spacer.gif" \n'
                +'width=10></TD>\n'
                +'<TD width=330><IMG height=1\n' 
                +'src="http://science-edu.larc.nasa.gov/common/spacer.gif" \n'
                +'width=330></TD>\n'
                +'<TD width=52><IMG height=1\n' 
                +'src="http://science-edu.larc.nasa.gov/common/spacer.gif" \n'
                +'width=52></TD>\n'
                +'<TD width=10><IMG height=1\n' 
                +'src="http://science-edu.larc.nasa.gov/common/spacer.gif" \n'
                +'width=10></TD>\n'
                +'<TD width=189><IMG height=1 \n'
                +'src="http://science-edu.larc.nasa.gov/common/spacer.gif" \n'
                +'width=189></TD></TR>\n'
                +'<TR bgColor=#cccccc>\n'
                +'<TD width=10>&nbsp;</TD>\n'
                +'<TD width=330>&nbsp;</TD>\n'
                +'<TD width=52>&nbsp;</TD>\n'
                +'<TD width=10>&nbsp;</TD>\n'
                +'<TD width=189>&nbsp;</TD>\n'
                +'</TR>\n'
                +'</TBODY></TABLE>');
}






//
// CORE NASA JavaScript FUNCTIONS BELOW: ---------------------------
// formerly content of 45193main_nes-common.js
// things such as common NASA footer and header will not work without these
//
function UA(){
  var v = navigator.appVersion.toLowerCase(), u = navigator.userAgent.toLowerCase(), n = navigator.appName;
  this.mac = (v.indexOf("mac")+1);
  this.win = (v.indexOf("win")+1);
  this.nn = (n == "Netscape");
  this.ie = (n == "Microsoft Internet Explorer");
  this.aol = (u.indexOf("aol")+1);
  this.opera = (u.indexOf("opera")+1);
  this.ver = (this.ie) ? parseFloat(v.split('msie ')[1]) : parseFloat(v);
  this.major = this.ver.toString().split('.')[0];
	this.minor = this.ver.toString().split('.')[1];
	this.v4 = (this.major == 4);
	this.os = (this.mac) ? 'mac' : (this.win) ? 'win' : navigator.platform;
  this.name = (this.nn) ? 'nn' : (this.ie) ? 'ie' : n;
  this.codeName = this.name +'_'+ parseInt(this.ver) + '_'+ this.os;
}
var ua = new UA();

var onloadHandlers = [];
function loadEvents() {
  for(var i=0; i<onloadHandlers.length; i++) {
    eval(onloadHandlers[i]);
  }
}
window.onload = loadEvents;

var onresizeHandlers = [];
function resizeEvents() {
  for(var i=0; i<onresizeHandlers.length;i++) {
    eval(onresizeHandlers[i]);
  }
}
window.onresize = resizeEvents;

function handleResize(init) {
  if(!(document.layers)) return;
  if(init==true) with (navigator) {
    document.pgW=innerWidth;
    document.pgH=innerHeight;
    onresizeHandlers[onresizeHandlers.length] = 'handleResize()';
  }
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}
handleResize(true);

function getObjByName(name,doc) {
  var o = 0;
  if(!doc) doc = document;
  if(doc[name]) o=doc[name];
  if(document.all && doc.all[name]) o=doc.all[name];
  if(o) {
    if(!o.getElementsByTagName) o.getElementsByTagName = getElementsArray;
    return o;
  }
  if(document.layers) {
    for(var i=0;i < doc.layers.length;i++){
      var lyrdoc = doc.layers[i].document;
      if(lyrdoc[name]) return lyrdoc[name];
      if(lyrdoc.layers.length > 0) {
        var o = getObjByName(name,lyrdoc);
        if(o) return o;
      }
    }
  }
  return 0;
}
if(!document.getElementById) document.getElementById = getObjByName;

function getElementsArray(el) {
  if(document.layers) {
    var doc = (this == document) ? document : this.document;
    switch(el) {
      case 'img' : return doc.images;
      case 'a' : return doc.links;
      case 'div' : return doc.layers;
      case 'form' : return doc.forms;
      default : return 0;
    }
  }
  if(document.all) return this.all.tags(el);
  return 0;
}
if(!document.getElementsByTagName) document.getElementsByTagName = getElementsArray;
if(document.layers) Layer.prototype.getElementsByTagName = getElementsArray;

function show(div){
  if(document.all) window.document.all[div].style.visibility = 'visible';
  else if(document.layers) getObjByName(div).visibility = 'show';
  else document.getElementById(div).style.visibility = 'visible';
}
function hide(div){
  if(document.all) window.document.all[div].style.visibility = 'hidden';
  else if(document.layers) getObjByName(div).visibility = 'hide';
  else document.getElementById(div).style.visibility = 'hidden';
}

function swapImg() {
  if(!document.images) return;
  var args = swapImg.arguments;
  for(var i=0;i < args.length;i+=2) {
    var imgSrc = (args[i + 1].indexOf('[') != -1) ? eval(args[i + 1] + '.src') : args[i + 1];
    if(getObjByName(args[i])) getObjByName(args[i]).src = imgSrc;
  }
}

function setCookie(name,value,expires) {
  document.cookie = escape(name)+'='+escape(value)+'; expires='+expires.toGMTString();
}

function getCookie(name) {
  var value,nl,cl,i,j,e;
  name+='=';
  value = 0;
  nl = name.length;
  cl = document.cookie.length;
  i = 0;
  while (i < cl) {
    j = i+nl;
    if(document.cookie.substring(i,j) == name) {
      e = document.cookie.indexOf(';',j);
      if(e == -1) e = document.cookie.length;
      value = unescape(document.cookie.substring(j,e));
      break;
    }
    i = document.cookie.indexOf(' ', i) + 1;
    if (i == 0) break;
  }  
  return value;
}

function openNASAWindow(url)
{
  if (url != "#")
  {
    var positionX = screen.width;
    var positionY = ((screen.height)/2);

    var sizeX = 720;
    var sizeY = 640;
    
    var strWindowFeatures = "";
    strWindowFeatures += 'menubar=yes,location=yes,toolbar=yes,directories=yes,scrollbars=yes,status=yes,resizable=yes,outerWidth='+720+',outerHeight='+640+',width='+720+'height='+640+',left='+80+',top='+60+'screenX='+80+',screenY='+60;
    winPopupWindow = window.open(url, "nasawindow", strWindowFeatures);
    winPopupWindow.focus();
  }
}

function preLoad(a) {
  var o = [];
  for(var i=0; i<a.length; i++) {
    o[i] = new Image();
    o[i].src = '/images/'+a[i]+'_1.gif';
  }
}

//preLoad('placeholder/navigation/topnav/nav_top_0','placeholder/navigation/topnav/nav_top_1','placeholder/navigation/topnav/nav_top_2','placeholder/navigation/topnav/nav_top_3','placeholder/navigation/topnav/nav_top_4','placeholder/navigation/topnav/nav_top_5');


