var authCookie = WM_readCookie('NetChant::Auth::AuthCookie_NetChant');
var myLocation = self.location.pathname + "";
var inAuthArea = myLocation.match(/^\/auth\//);
var strLogHTML;
 
if (authCookie == false || authCookie == 'error001')
 {
strLogHTML = '<form action="/auth/NetChantLOGIN" method="post">';
strLogHTML += '<INPUT TYPE="hidden" NAME="destination" VALUE="/page/aviation_safety_network.html">';
strLogHTML += 'Username:<br><input type="text" name="credential_0" size="26">';
strLogHTML += '<br>Password:<br><input type="password" name="credential_1" size="26"><br>';
strLogHTML += '<div align="left" style="line-height: 0.5;"><br><input class="button" type="submit" name="submit" value="Login"></div>';
strLogHTML += '</form>';

 }
else
 {
 
strLogHTML  = '<form border="0" name="form1" method="post" action="/auth/NetChantLOGOUTPAGE">';
strLogHTML += '<input type=hidden name=destination value="/page/aviation_safety_network.html">';
strLogHTML += '<center>&nbsp;You are currently <br>logged in<br></center><br>&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; ';
strLogHTML += '<input align="right" name="Logout" type="submit" class="button" value="Logout">';
strLogHTML += '</form>';
 
}

document.write(strLogHTML);



			
