﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:variable name="ItemID" select="AjaxRequest/Params/SourceID"></xsl:variable>
    <xsl:variable name="ItemName" select="AjaxRequest/Params/SourceName"></xsl:variable>
    <xsl:variable name="DivID" select="AjaxRequest/Params/DivID"></xsl:variable>
    <xsl:variable name="Mode" select="AjaxRequest/Params/Mode"></xsl:variable>

    <xsl:template match="/">
        <xsl:if test="$Mode= 'Brand'">
            <div id="divHead" class="overlapLeft" style="display: table;">
                <span class="labelHeader overlapLeftText">E-mail</span>
            </div>
        </xsl:if>
        <div id="divCommunitySearch" style="margin:5px;text-align:right;">
            <!--<xsl:if test ="$Mode = 'Community'">
                <span class="link" onclick='FlipDivs();'>[ X ]</span>
            </xsl:if>
            <xsl:if test ="$Mode = 'Goal'">-->
                <span class="link" onclick="Email_CloseControl('{$DivID}');">[ X ]</span>
            <!--</xsl:if>
            <xsl:if test ="$Mode = 'DashBoard'">
                <span>&#xa0;</span>
            </xsl:if>-->
        </div>
        <div style="padding-top: 40px; padding-bottom: 25px; padding-left: 25px; padding-right: 25px;">
            <table style="width:100%;">
                <tr>
                    <tr>
                        <td>
                            <span class="label">To:</span>
                        </td>
                        <td>
                            <textarea id="recipient_list_{$ItemID}" name="recipients" rows="2" style="width:100%;"></textarea>
                            <a href="#" onclick="showPlaxoABChooser('recipient_list_{$ItemID}', '/plaxo_cb.htm'); return false">
                                <img src="http://www.plaxo.com/images/abc/buttons/add_button.gif" alt="Add from my address book" style="border:0; margin-bottom:10px;"/>
                            </a>

                            <textarea id="emailContent_{AjaxRequest/TimeStamp}_{$ItemID}" name="emailContent" class="textAreaBox mceEditor" rows="2" style="width:100%; height:300px;"></textarea>
                            <input type="button" class="button" value="Invite" style="margin-top:10px;" onclick="Email_InviteUsers('recipient_list_{$ItemID}', 'emailContent_{AjaxRequest/TimeStamp}_{$ItemID}', 
                                   {$ItemID},'{$Mode}','{$ItemName}','{$DivID}');"></input>
                             <input type="button" class="button" value="Cancel" style="margin-top:10px;margin-left:10px;" 
                                    onclick="Email_CloseControl('{$DivID}');"></input>
                        </td>
                    </tr>
                </tr>
            </table>
        </div>
    </xsl:template>
</xsl:stylesheet>
