
var hasCookie = Get_OLC_Cookie();



function Get_OLC_Cookie( )

{

	var name = "SA_USER_OLC";

	var start = document.cookie.indexOf( name + "=" );

	var len = start + name.length + 1;



	if ( ( !start ) &&

		( name != document.cookie.substring( 0, name.length ) ) )

	{

		return false;

	}

	if ( start == -1 )

	{

		return false;

	}

	return true;

}



if( hasCookie == false )

{

	// show login link

document.write( '<div class="rightBlock"><FORM ACTION="https://post.harvard.edu/olc/pub/HAA/login/app.sph/olclogin.app" METHOD="post" > ');

document.write( '<table cellpadidng=0 cellspacing=0> ');

document.write( '<tr><td>User ID</td></tr> ');

document.write( '<tr><td><input NAME="username" TYPE=text VALUE="" size="15" maxlength=20 tabindex=1></td></tr> ');


document.write( '<tr><td>Password</td></tr> ');

document.write( '<tr><td><input NAME="password" TYPE=password VALUE=""  size="15" maxlength=20 tabindex=2></td></tr> ');

document.write( '<tr><td><input type=checkbox name="permanent" value="Y"> Remember Me</td></tr> ');

document.write( '<tr><td><input type=submit value="Submit"></td></tr> ');

document.write( '</table><br/>');

document.write( '<dt><a>&#8226;</a> <a class="logLink" href=https://post.harvard.edu/olc/pub/HAA/register/register.cgi>Register</a></dt> ');

document.write( '<dt><a>&#8226;</a> <a class="logLink" href=https://post.harvard.edu/olc/pub/HAA/forgot/forgot.cgi>Forgotten Password</a></dt>');

document.write( '<dt><a>&#8226;</a> <a class="logLink" href=http://post.harvard.edu/harvard/help/html/helpmain.html>Help</a></dt></ul> ');

document.write( '<INPUT TYPE="hidden" NAME="referer" VALUE="/olc/pub/HAA/memberservices.html"> ');

document.write( '<INPUT TYPE="hidden" NAME="SaFormName" VALUE="SubmitLogin__Floginform_html"> </FORM> </div>');

}

else

{

	// show logout link

	document.write( '<p class="rightBlock">You are currently logged in to Post.Harvard.');

	document.write( '<br /><a href="/olc/pub/HAA/login/app.sph/olclogin.app?FNC=LogOut__Alogindefault_html" target="_top">Click here to Logout</a></p>' );

}
