﻿var newsLetter = {
fetch: function(){

    var showNewsLetter = $.query.get('showNewsLetter');
    
    if(showNewsLetter!=null && showNewsLetter == "true")
    {
    var html = [];
         html[html.length]='<table cellspacing="0" cellpadding="5" border="0" width="210px" height"500px">';
                    html[html.length]='    <tr>';
                    html[html.length]='        <td class="edit-title" width="100%">';
                    html[html.length]='            Act Now</td>';
                    html[html.length]='        <td class="edit-title" align="right">';
                    html[html.length]='            <input type="button" value=" x " onclick="shadow.hide();" /></td>';
                    html[html.length]='    </tr>';
                    html[html.length]='    <tr>';
                    html[html.length]='        <td colspan="2" align="center">';
                    
                    html[html.length]='         <table width="180" cellpadding="0" cellspacing="0" border="0" id="Table2">';
                    html[html.length]='         <tr>';
                    html[html.length]='               <td colspan="2" rowspan="2"><img src="NewsLetterImages/callout_tl.gif" width="10" height="10" border="0"></td>';
                    html[html.length]='               <td bgcolor="#d8e0ec"><img src="NewsLetterImages/dot.gif" width="1" height="2" border="0"></td>';
                    html[html.length]='               <td colspan="2" rowspan="2"><img src="NewsLetterImages/callout_tr.gif" width="10" height="10" border="0"></td>';
                    html[html.length]='         </tr>';
                    html[html.length]='         <tr>';
                    html[html.length]='               <td><img src="NewsLetterImages/dot.gif" width="160" height="8" border="0"></td>';
                    html[html.length]='         </tr>';
                    html[html.length]='         <tr>';
                    html[html.length]='               <td bgcolor="#d8e0ec"><img src="NewsLetterImages/dot.gif" width="2" height="1" border="0"></td>';
                    html[html.length]='               <td><img src="NewsLetterImages/dot.gif" width="8" height="1" border="0"></td>';
                    html[html.length]='               <td style="font-family:arial,helvetica;font-size:12px;" align="center">';
                    html[html.length]='                   <table cellpadding="3" cellspacing="0" border="0">';
                    html[html.length]='                       <tr>';
                    html[html.length]='                           <td>';
                    html[html.length]='                               <img style="cursor:default;" src="NewsLetterImages/actnow.jpg" width="165" height="82" border="0">';
                    html[html.length]='                           </td>';
                    html[html.length]='                       </tr>';
                    html[html.length]='                       <tr>';
                    html[html.length]='                           <td align="center">';
                    html[html.length]='                               <a href="http://www.pencil.org/page.htm?id=17"><img alt="Start a PENCIL Partnership" src="NewsLetterImages/partner.gif" width="148" height="45" border="0"></a>';
                    html[html.length]='                           </td>';
                    html[html.length]='                       </tr>';
                    html[html.length]='                       <tr>';
                    html[html.length]='                           <td align="center">';
                    html[html.length]='                               <a href="http://www.pencil.org/page.htm?id=19"><img alt="Hire a student intern" src="NewsLetterImages/hire.gif" width="148" height="45" border="0"></a>';
                    html[html.length]='                           </td>';
                    html[html.length]='                       </tr>';
                    html[html.length]='                       <tr>';
                    html[html.length]='                           <td align="center">';
                    html[html.length]='                               <a href="http://www.pencil.org/page.htm?id=294"><img alt="Refer a colleague" src="NewsLetterImages/refer.gif" width="148" height="45" border="0"></a>';
                    html[html.length]='                           </td>';
                    html[html.length]='                       </tr>';
                    html[html.length]='                       <tr>';
                    html[html.length]='                           <td align="center">';
                    html[html.length]='                               <a href="http://www.pencil.org/page.htm?id=4"><img alt="DONATE today" src="NewsLetterImages/donation.gif" width="148" height="45" border="0"></a>';
                    html[html.length]='                           </td>';
                    html[html.length]='                       </tr>';
                    html[html.length]='                   </table>';
                    html[html.length]='               </td>';
                    html[html.length]='               <td><img src="NewsLetterImages/dot.gif" width="8" height="1" border="0"></td>';
                    html[html.length]='               <td bgcolor="#d8e0ec"><img src="NewsLetterImages/dot.gif" width="2" height="1" border="0"></td>';
                    html[html.length]='         </tr>';
                    html[html.length]='         <tr>';
                    html[html.length]='               <td colspan="2" rowspan="2"><img src="NewsLetterImages/callout_bl.gif" width="10" height="10" border="0"></td>';
                    html[html.length]='               <td><img src="NewsLetterImages/dot.gif" width="160" height="8" border="0"></td>';
                    html[html.length]='               <td colspan="2" rowspan="2"><img src="NewsLetterImages/callout_br.gif" width="10" height="10" border="0"></td>';
                    html[html.length]='         </tr>';
                    html[html.length]='         <tr>';
                    html[html.length]='               <td bgcolor="#d8e0ec"><img src="NewsLetterImages/dot.gif" width="1" height="2" border="0"></td>';
                    html[html.length]='         </tr>';
                    html[html.length]='         <tr>';
                    html[html.length]='               <td colspan="5"><img src="NewsLetterImages/dot.gif" width="1" height="10" border="0"></td>';
                    html[html.length]='         </tr>';
                    html[html.length]='         </table>';

                    
                    html[html.length]='        </td>';
                    html[html.length]='    </tr>';
                    html[html.length]='    <tr>';
                    html[html.length]='        <td colspan="2" class="edit-title" align="right">';
                    html[html.length]='            &nbsp;';
                    html[html.length]='                </td>';
                    html[html.length]='    </tr>';
                    html[html.length]='</table>';

                    
                    
                    var editSummary = document.getElementById('newsLetterDiv')
                    if (editSummary) {
                        while (editSummary.hasChildNodes()) {
                            editSummary.removeChild(editSummary.firstChild);
                        }
                        editSummary.innerHTML = html.join('');
                        shadow.show(editSummary, false);
                    } 
    }
}
}
newsLetter.fetch()