<!-- //

function login()
{
  if (getCookie('Ticket')) { displayLogout(); }
  else { displayLogin(); }
}

function tryNewsCom()
{
  if (! getCookie('Ticket')) { displayTryNewsCom(); }
}

function register()
{
  if (! getCookie('Ticket')) { 
	displayRegister(); 
  } else {
	displayNoRegister();
  } 
}

function ncfotona()
{
  if (!getCookie('Ticket')) { displayNcfotona(); }
}

function displayNcfotona() {
  document.write('<table align="left" border="0" cellpadding="10" cellspacing="0" width="100%">');
  document.write('<tbody><tr>' +
    '<td align="left" valign="top"><font class="medText">TRY NEWSCOM</font><br><font color="#C0C0C0">---------------------</font>' +
    '<p class=smallText>Please use our guest login to preview Newscom\'s vast collection of content.<br><br>Username:  NCFOTONA<br>Password:  Guest<br>' + 
    '</div></td>' +
  '</tr>' +
'</tbody></table>');
}

//function blaster()
//{
//  if (!getCookie('Ticket')) { displayBlaster(); }
//}

//function displayBlaster() {
//  document.write('<table align="left" border="0" cellpadding="0" cellspacing="0" width="151">');
//  document.write('<tbody><tr>' +
//    '<td align="left" valign="top"><div id="blasterad"><a href="http://www.blastimages.com" target=_><img src="/nc/images/n/blaster_logo_151.png" height="91" width="151" border="0"></a>' +
//    '<p>We&#8217;re building a media network with savvy, smart independent publishers like you in mind. <br>' + 
//     '<a href="http://www.blastimages.com" target=_>visit site &gt;&gt;</a></p>' + 
//    '</div></td>' +
//  '</tr>' +
//'</tbody></table>');
//}

function displayRegister()
{
    document.write('<a href="/nc/n/register.htm"> ');
    document.write('<img width="531" height="38" alt="Sign Up For Newscom" src="/nc/images/n/newsAd.gif" border="0"/></a>');
    //document.write('<a href="/nc/n/twitter.htm"> ' + '<img width="531" height="38" alt="Sign Up For Newscom" src="/nc/images/n/twitterAd.gif" border="0"/></a>');
}

function displayNoRegister()
{
    document.write('<br style="line-height:18px"/>');
}


function displayLoggedInUserLinks()
{
    /*
    document.write('<a href="/cgi-bin/members/s?f=NCOM/accstatus" '
	+ ' class="NavigationBold">MY ACCOUNT</a>&nbsp;&nbsp;' 
	+ '<span class="NavigationBold">:</span>&nbsp;&nbsp;'
	+ '<a href="/cgi-bin/members/s?f=NCOM/lbox"'
	+ ' class="NavigationBold">MY LIGHTBOX</a>');
    */
    if (getCookie('Ticket')) {
    document.write('<!--img src="/nc/images/n/Newscom_Icons_myaccount.gif" '
	+ ' align="absmiddle" border="0"--> '
	+ '<a href="/cgi-bin/members/s?f=NCOM/accstatus" class="subhead">'
	+ 'My Account' + '</a><br/><br/>');
    document.write('<!--img src="/nc/images/n/Newscom_Icons_lightbox.gif" '
	+ ' align="absmiddle" border="0"--> '
	+ '<a href="/cgi-bin/members/s?f=NCOM/lbox" class="subhead">'
	+ 'My Lightboxes' + '</a><br/><br/>');
    document.write('<!--img src="/nc/images/n/Newscom_Icons_subscriptions.gif" '
	+ ' align="absmiddle" border="0"--> '
	+ '<a href="/cgi-bin/members/s?f=NCOM/search&nav=My_Subscriptions&path=My_Subscriptions" class="subhead">'
	+ 'My Subscriptions' + '</a><br/><br/>');
    document.write('<font color="#C0C0C0">---------------</font><br/>');
    }
}

function displayTryNewsCom()
{
    document.write(' <img src="/nc/images/rebrand/tryNewscom.gif" width="192" height="130" border="0" usemap="#Map2"> ');
    document.write(' <map name="Map2"> ');
    document.write(' <area shape="rect" coords="141,2,193,30" href="/GetLogin"> ');
    document.write(' </map>');

    document.write ('<table width="100%" height="10"  border="0" cellpadding="0" cellspacing="0">');
    document.write ('<tr> <td></td> </tr>');
    document.write ('<tr> <td></td> </tr>');
    document.write ('<tr> <td></td> </tr>');
    document.write ('</table>');
}

function displayLogin()
{
    document.write('<table border="0" cellpadding="1" cellspacing="0" width="158">');
    document.write('<tr><td>&nbsp;</td></tr>');
    document.write('<tr><td>&nbsp;</td></tr>');
    document.write('<tr>');
    document.write('    <td width="150"><div align="center">');
    document.write('      <span class="medText"><a href="/cgi-bin/members/s">Sign In</a> | <a href="/form/newscom">Register</a></span><br/>');
    document.write('      </div>');
    document.write('    </td>');
    document.write('</tr>');
    document.write('</table>');

}

function displayLoginOld()
{
    document.write('<form action="/GetLogin" method="post" name="loginForm" onsubmit="return validate(loginForm)">');

    document.write('<table border="0" cellpadding="1" cellspacing="0" width="158">');
    document.write('<tbody>');
    document.write('<tr>');
    document.write('    <td width="76"><div align="right">');
    document.write('      <span class="medText">Username</span><br/>');
    document.write('      </div>');
    document.write('    </td>');
    document.write('    <td width="74"><div align="right">');
    document.write('         <input type="text" class="smallLinks" name="user" value="" size="12">');
    document.write('    </div></td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('    <td width="76"><div align="right">');
    document.write('      <span class="medText">Password</span></br>');
    document.write('    </div></td>');
    document.write('    <td width="74"> ');
    document.write('      <div align="right"> ');
    document.write('        <input type="password" class="smallLinks" name="password" size="12" value=""> ');
    document.write('      </div>');
    document.write('    </td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td colspan="2"><div align="right"><input type="image" name="search" src="/nc/images/n/login.gif" alt="login" border="0" height="21" width="64"><!--a href="javascript:document.loginForm.submit()">Login</a--></div></td>');
    document.write('</tr>');
    document.write('</tbody>');
    document.write('</table>');
    document.write('</form>');
}

function displayLogout()
{
    document.write('<table width="158" height="70" border="0" align="right" cellpadding="0" cellspacing="0">');
    document.write('<tr>');
    document.write('    <td width="150" rowspan="2" valign="bottom" align="right">');
    document.write('      <a href="/cgi-bin/logout.n" style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10px;font-weight:normal;">');
    document.write('         Logout');
    document.write('      </a>');
    document.write('    </td> ');
    document.write('</tr>');
    document.write('<tr>');
    document.write('    <td align="top"> ');
    document.write('      <div align="right">&nbsp;');
    document.write('      </div>');
    document.write('    </td>');
    document.write('</tr>');
    document.write('</table>');
}

function validate(loginForm) {
        if (loginForm.user.value == "") {
                alert("Please enter your User Name.");
                return false;
        } else if (loginForm.password.value == "") {
                alert("Please enter your Password.");
                return false;
        } else {
                return true;
        }
}

// -->
