// common shared JavaScript functions for Science Directorate web sites version 01
// author: Jay Madigan
// revision date:  2008.09.22
// DO NOT EDIT WITHOUT PERMISSION

var monthsLONG = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var messageCODE = "";

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_leave() {
	return confirm('Thank you for visiting our NASA web site.\n\nYou are now leaving this site to enter a web site that is NOT maintained by the National Aeronautics and Space Administration (NASA).\n\nClick Cancel if you want to stay.');
}

function Disclaimer() {
	alert("\nYou are now leaving the NASA web domain (.nasa.gov)\n");
}
function CustomDepartureNote(messageCODE) {
    if(messageCODE=="SCOOL"){
	alert("\nYou are now leaving the site of the Science Directorate at NASA Langley Research Center\nand are about to enter the site of NASA’s Student Cloud Observations On-Line\n");
    
    }
    else if(messageCODE=="NEWS"){
        alert("\nYou are now leaving the site of the Science Directorate at NASA Langley Research Center.\nYou are about to enter the News section of the nasa.gov site\nwhere you will find news and feature stories about the projects underway in the Science Directorate.\n"); 
    }
    else if(messageCODE=="ASDC"){
        alert("\nYou are now leaving the site of the Science Directorate at NASA Langley Research Center.\nYou are about to enter the site of the Atmospheric Science Data Center\nwhere you will find Earth science data in the following disciplines: Radiation Budget, Clouds, Aerosols and Tropospheric Chemistry.\n"); 
    }
    else if(messageCODE=="MND"){
        alert("\nYou are now leaving the site of the Science Directorate at NASA Langley Research Center\nand are about to enter My NASA Data where NASA Earth science information is made\neasily accessible to K-12 students and citizen scientists.\n"); 
    }
    else if(messageCODE=="SMD"){
        alert("\nYou are now leaving the site of the Science Directorate at NASA Langley Research Center\nand are about to enter the site of the NASA Science Mission Directorate.\nHere you will find information about Earth science, heliophysics, planets and astrophysics.\n"); 
    }
    else if(messageCODE=="LaRC"){
        alert("\nYou are now leaving the site of the NASA Science Directorate\nand are about to enter the site of the NASA Langley Research Center.\nHere you will find information about Langley aeronautics and exploration research,\ncurrent events and Langley history.\n"); 
    }
    else if(messageCODE=="text5"){
        alert("\n  \n"); 
    }
    else if(messageCODE=="text6"){
        alert("\n  \n"); 
    }
    else{ alert("\nINVALID MESSAGE CODE!\n")}
}

function CreateFeedbackMailLink(){
    //function for dynamic creation of Feedback Email link to hide it from SPAM SCANNERS and EMAIL HARVESTERS
    document.write('<a href="mailto:larc-feedback-sciencedirectorate@lists.nasa.gov?subject=SD-CSQ Query">Please CLICK HERE to send us your query via e-mail.</a>');
}
function CreateFeedbackMailImageLink(){
    //function for dynamic creation of Feedback Email Image link to hide it from SPAM SCANNERS and EMAIL HARVESTERS
    document.write('<a href="mailto:larc-feedback-sciencedirectorate@lists.nasa.gov?subject=SD-CSQ Query"><img src="images/Mailing.gif" alt="Please CLICK HERE to send us your query via e-mail." align=left border=0></a>');
}

// CLARREO SPECIFIC FUNCTIONS -------------------------

function CLARREOpocMailLink(){
    //function for dynamic creation of CLARREO POC Email link to hide it from SPAM SCANNERS and EMAIL HARVESTERS
    document.write('Please <a href="mailto:rosemary.r.baize@nasa.gov?subject=2008 CLARREO Workshop Query">CLICK HERE</a> to send us your query via e-mail.');
}
function CLARREOpocMailLink2(){
    //function for dynamic creation of CLARREO POC Email link to hide it from SPAM SCANNERS and EMAIL HARVESTERS
    document.write('&nbsp;<a href="mailto:rosemary.r.baize@nasa.gov?subject=CLARREO Data Retention and Destruction Policy Query">Rosemary Baize</a>.');
}
function CLARREOpocMailLink2A(){
    //function for dynamic creation of CLARREO POC Email link to hide it from SPAM SCANNERS and EMAIL HARVESTERS
    document.write('&nbsp;<a href="mailto:Rosemary.R.Baize@nasa.gov?subject=CLARREO Workshop Poster Session Query">Rosemary.R.Baize@nasa.gov</a>');
}
function CLARREOpocMailLink3(){
    //function for dynamic creation of CLARREO POC Email link to hide it from SPAM SCANNERS and EMAIL HARVESTERS
    document.write('&nbsp;<a href="mailto:Tracey.L.Silcox@nasa.gov?subject=CLARREO Workshop Poster Session Query">Tracey.L.Silcox@nasa.gov</a>');
}
function CLARREOpocMailImageLink(){
    //function for dynamic creation of CLARREO POC Email Image link to hide it from SPAM SCANNERS and EMAIL HARVESTERS
    document.write('<a href="mailto:rosemary.r.baize@nasa.gov?subject=2008 CLARREO Workshop Query"><img src="http://clarreo.larc.nasa.gov/images/Mailing.gif" alt="Please CLICK HERE to send us your query via e-mail." align=left border=0></a>');
}

function CreateFooter(){
    //template change NASA Civil Servant to actual name
    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=#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 vAlign=top align=left bgColor=#ffffff>\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; NASA Civil Servant<BR>\n'
                +'last update:&nbsp;<SCRIPT> document.write (document.lastModified); </SCRIPT>\n'
		+'</TD></TR>\n'
                +'<TR bgColor=#ffffff>\n'
                +'<TD width=10><IMG height=1\n' 
                +'src="http://science.larc.nasa.gov/common/spacer.gif" \n'
                +'width=10></TD>\n'
                +'<TD width=330><IMG height=1\n' 
                +'src="http://science.larc.nasa.gov/common/spacer.gif" \n'
                +'width=330></TD>\n'
                +'<TD width=52><IMG height=1\n' 
                +'src="http://science.larc.nasa.gov/common/spacer.gif" \n'
                +'width=52></TD>\n'
                +'<TD width=10><IMG height=1\n' 
                +'src="http://science.larc.nasa.gov/common/spacer.gif" \n'
                +'width=10></TD>\n'
                +'<TD width=189><IMG height=1 \n'
                +'src="http://science.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>');
}
function CreateFooterBMB(){
    //template change NASA Civil Servant to actual name
    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; Dr. Joel S. Levine<BR>\n'
                +'last update:&nbsp;<SCRIPT> document.write (document.lastModified); </SCRIPT>\n'
		+'</TD></TR>\n'
                +'<TR 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 width=330><IMG height=1\n' 
                +'src="http://science.larc.nasa.gov/common/spacer.gif" \n'
                +'width=330></TD>\n'
                +'<TD width=52><IMG height=1\n' 
                +'src="http://science.larc.nasa.gov/common/spacer.gif" \n'
                +'width=52></TD>\n'
                +'<TD width=10><IMG height=1\n' 
                +'src="http://science.larc.nasa.gov/common/spacer.gif" \n'
                +'width=10></TD>\n'
                +'<TD width=189><IMG height=1 \n'
                +'src="http://science.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>');
}
