var hasCookie;

hasCookie = Get_Cookie( "SA_USER_OLC" );

function Get_Cookie( name )
{
	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 );
}

function Write_Login()
{
	if( hasCookie == false )
	{			document.write( '<table width="90%" cellpadding="0" cellspacing="0" border="0" align="center"  id="signinForm">' );
              	document.write( '<FORM name="loginout" ACTION="/olc/pub/WLS/login/app.sph/olclogin.app" METHOD="post">' );
				document.write( '<tr>' );
				document.write( '	<td><font size="-1"><img src="/olc/images/WLS/signin_form.gif" width="62" height="16"></font></td>' );
				document.write( '</tr>' );
			  	document.write( '<tr>' );
				document.write( '	<td><p><font size="-1">Username</font><br><INPUT NAME="username" TYPE=text VALUE="" SIZE=15 maxlength=20></p></td>' );
				document.write( '</tr>' );
              	document.write( '<tr>' );
				document.write( '	<td NOWRAP><p><font size="-1">Password</font><br><INPUT NAME="password" TYPE=password VALUE="" SIZE=15 maxlength=20>&nbsp;<INPUT TYPE="IMAGE" SRC="/olc/images/WLS/go.gif"></p></td>' );
				document.write( '</tr>' );
				document.write( '<tr>' );
				document.write( '	<td><font size="-1"><br></font></td>' );
				document.write( '</tr>' );
				document.write( '<tr>' );
				document.write( '	<td><p><font size="-1"><a href="https://www.alumniconnections.com/olc/pub/WLS/forgot/forgot.cgi">Forgot your password?</a></font></p></td>' );
				document.write( '</tr>' );
				document.write( '	<td><p><font size="-1"><a href="http://www.alumniconnections.com/olc/pub/WLS/register/register.cgi">Register Now!</a></font></p></td>' );
				document.write( '</tr>' );	
            	document.write( '</table>' );
				document.write( '<INPUT TYPE="hidden" NAME="referer" VALUE="">' );
				document.write( '<INPUT TYPE="hidden" NAME="SaFormName" VALUE="SubmitLogin__Floginform_html">' );
				document.write( '</FORM>' );				
	}
}


function Write_Login_Top()
{
	if( hasCookie == false )
	{	
		document.write( '<a href="http://www.wellesley.edu/Alum/"><img src="/olc/images/WLS/WCAA.gif" alt="Wellesley College Alumnae Association" width="500" height="30" border="0"></a><a  href="/olc/membersonly/WLS/hsearch"><img src="/olc/images/WLS/search.gif" alt="Search" width="220" height="30" border="0"></a><a href="http://www.alumniconnections.com/olc/pub/WLS/login/app.sph/olclogin.app">' );
		document.write( '<img src="/olc/images/WLS/signin.gif" alt="Sign In" width="80" height="30" border="0"></a>' );
	}
	else
	{
		document.write( '<a href="http://www.wellesley.edu/Alum/"><img src="/olc/images/WLS/WCAA.gif" alt="Wellesley College Alumnae Association" width="500" height="30" border="0"></a><a href="/olc/membersonly/WLS/hsearch"><img src="/olc/images/WLS/search.gif" alt="Search" width="220" height="30" border="0"></a><a href="http://www.alumniconnections.com/olc/pub/WLS/login/app.sph/olclogin.app">' );	
		document.write( '<img src="/olc/images/WLS/signout.gif" alt="Sign Out" width="80" height="30" border="0"></a>' );
	}
}