var loggedIn = getCookie('SMSESSION');

if (loggedIn != null && loggedIn != '' && loggedIn != 'LOGGEDOFF') {
    document.write("<a href='https://www.ieee.org/portal/myieee/index.html' target='_blank' title=''>\n" +
    "    <img alt='myIEEE' border='0' height='99' src='" + httpWebRoot + "groups/public/@ieee/@web/@org/@globals/documents/images/ieee_myieeelogin.jpg' usemap='#Map' width='172'>\n" +
    "</a>\n" +
    "<map id='Map' name='Map'>\n" +
    "    <area alt='Login into myIEEE' coords='57,48,126,76' href='https://www.ieee.org/portal/myieee/index.html' shape='rect'>\n" +
    "    <area alt='Requires IEEE Web Account' coords='26,80,156,100' href='http://www.ieee.org/web/web/accounts/index.html' shape='rect'>\n" +
    "</map>");
} else {
    document.write("<form name='LoginForm' method='post' action='https://origin.www.ieee.org/forms/myIEEE.fcc'>\n" +
    "    <input type='hidden' name='TARGET' value='https://www.ieee.org/portal/myieee/index.html'>\n" + 
    "    <table class='nogrid' border='0' cellpadding='0' cellspacing='0'>\n" + 
    "        <tbody>\n" + 
    "            <tr>\n" + 
    "                <td rowspan='3'><img src='" + httpWebRoot + "groups/public/@ieee/@web/@org/@globals/documents/images/ieee_gifspacer.gif' alt='' height='1' width='1'></td><td ><img src='" + httpWebRoot + "groups/public/@ieee/@web/@org/@globals/documents/images/ieee_gifspacer.gif' alt='' height='1' width='140'></td><td rowspan='3' ><img src='" + httpWebRoot + "groups/public/@ieee/@web/@org/@globals/documents/images/ieee_gifspacer.gif' alt='' height='1' width='1'></td>\n" +
    "            </tr>\n" + 
    "            <tr>\n" + 
    "                <td>\n" +
    "                    <table class='nogrid' align='center' border='0' cellpadding='1' cellspacing='0' width='100%'>\n" + 
    "                    <tbody>\n" + 
    "                        <tr>\n" + 
    "                            <td colspan='2' valign='top'>\n" + 
    "                                <table class='nogrid'><tr><td>\n" + 
    "                                    <img src='" + httpWebRoot + "groups/public/@ieee/@web/@org/@about/documents/images/20040379.jpg' alt='myIEEE' >\n" +
    "                                </td>\n" + 
    "                                </tr></table>\n" +
    "                                <br/>" +                   
    "                            </td>\n" + 
    "                        </tr>\n" + 
    "                        <tr>\n" + 
    "                            <td>\n" + 
    "                                <table class='nogrid' border='0' cellpadding='1' cellspacing='0'>\n" + 
    "                                    <tr>\n" + 
    "                                        <td align='right'><p><strong>Username:&nbsp;</strong></p></td>\n" +
    "                                        <td valign='top'><div align='left'><input class='border' type='text' size='13' name='USERNAME' style='width:80px;'></div></td>\n" + 
    "                                    </tr>\n" + 
    "                                    <tr>\n" + 
    "                                        <td align='right'><p><strong>Password:&nbsp;</strong></p></td>\n" +
    "                                        <td valign='top'><div align='left'><input class='border' type='password' size='13' name='PASSWORD' style='width:80px;'></div></td>\n" + 
    "                                    </tr>\n" + 
    "                                    <tr>\n" + 
    "                                        <td colspan='2' valign='top'><div align='center'>\n" +
    "                                            <input type='image' border='0' name='login' src='" + httpWebRoot + "groups/public/@ieee/@web/@org/@globals/documents/images/20040121.gif' alt='Log In'>\n" + 
    "                                        </div><br/></td>\n" + 
    "                                    </tr>\n" + 
    "                                </table>\n" + 
    "                            </td>\n" + 
    "                        </tr>\n" + 
    "                    </tbody></table>\n" + 
    "                </td>\n" + 
    "            </tr>\n" + 
    "            <tr>\n" + 
    "                <td ><img src='" + httpWebRoot + "groups/public/@ieee/@web/@org/@globals/documents/images/ieee_gifspacer.gif' alt='' height='1' width='1'></td>\n" + 
    "            </tr>\n" + 
    "        </tbody>\n" + 
    "    </table>\n" + 
    "</form>");
}
