function dataEntrylogin()
{
	var lStatus1=validationlogin();

	if(lStatus1==true)
	{
		document.login.action="/webapp/dadp/servlet/LoginDADP";
		document.login.submit();
	}
}

function validationlogin()
{
	var lValid=true;

	if(document.login.USERNAME.value=="")
	{
		alert("Please Enter User Name");
		document.login.USERNAME.focus();
		lValid=false;
		return lValid;
	}
	if(document.login.PASSWORD.value=="")
	{
		alert("Please Enter Password");
		document.login.PASSWORD.focus();
		lValid=false;
		return lValid;
	}
	return lValid;
}

function getCookie(Name) 
{
	var search = Name + "="
	if (document.cookie.length > 0)
	{ 
        offset = document.cookie.indexOf(search)

        if (offset != -1)
		{ 
            offset += search.length

            end = document.cookie.indexOf(";", offset)

            if (end == -1)
				end = document.cookie.length

			return unescape(document.cookie.substring(offset, end))
		}
	}
}

// End hiding -->
function deleteCookie (Name)
{
    document.cookie = Name + "=" + getCookie(Name) + "; expires=" + (new Date()).toGMTString() + ";";
}

var lServletCookie = getCookie('sessionid');


if(lServletCookie!=null)
{
	document.write('<table width="100%" height="98%" border="0" cellpadding="0" cellspacing="0" class="bggreen">');
	document.write('<tr> ');
	document.write('<td width="3">&nbsp;</td>');
	document.write('</tr>');

	document.write('<tr> ');
	document.write('<td width="9%" rowspan="4"><img src="/dadp/images/spacer.gif" width="14" height="1"></td>');
	document.write('</tr>');

	document.write('<tr> ');
	document.write('<td height="30%" colspan="4"><img src="/dadp/images/bullettri.gif" width="3" height="5">&nbsp;&nbsp;&nbsp;<span class="smallbluetxt"><a href="/webapp/dadp/jsp/dadp/ChangePassword.jsp">Change Password</a></span></td>');
	document.write('</tr>');
	document.write('<tr> ');
	document.write('<td height="30%" colspan="4"><img src="/dadp/images/bullettri.gif" width="3" height="5">&nbsp;&nbsp;&nbsp;<span class="smallbluetxt"><a href="/webapp/dadp/servlet/EditProfile?MODULENAME_ACTION=DF">Edit Profile</a></span></td>');
	document.write('</tr>');
	document.write('<tr> ');
	document.write(' <td height="30%" colspan="4"><img src="/dadp/images/bullettri.gif" width="3" height="5">&nbsp;&nbsp;&nbsp;<span class="smallbluetxt"><a href="/webapp/dadp/servlet/LogoutDADP">Logout</a></span></td>');
	document.write('</tr>');
/*
	document.write('<tr> ');
	document.write('<td width="3"><img src="/dadp/images/spacer.gif" width="1" height="18">&nbsp;</td>');
	document.write('</tr> ');
*/
	document.write('</table>');
}
else
{
	document.write('<table width="100%" height="98%" border="0" cellpadding="0" cellspacing="0" class="bggreen">');
	document.write('<tr> ');
	document.write('<td width="9%" rowspan="4"><img src="/dadp/images/spacer.gif" width="14" height="1"></td>');
	document.write('<td width="30%" height="19" class="headingred">Username</td>');
	document.write('<td width="3%">&nbsp;</td>');
	document.write('<td width="33%"> <input name="USERNAME" type="text" class="txtbox" size="10"></td>');
	document.write('<td width="25%">&nbsp;</td>');
	document.write('</tr>');
	document.write('<tr> ');
	document.write('<td height="19" class="headingred">Password</td>');
	document.write('<td>&nbsp;</td>');
	document.write('<td><input name="PASSWORD" type="password" class="txtbox" size="10"></td>');
	document.write('<td><span class="headingblk"><strong>&nbsp;</strong></span><strong><a href="javascript:dataEntrylogin();"><img src="/dadp/images/go.gif" width="18" height="16" border="0" ></a></strong></td>');
	document.write(' </tr>');
	document.write('<tr> ');
	document.write('<td height="19" colspan="4"><img src="/dadp/images/bullettri.gif" width="3" height="5">&nbsp;&nbsp;&nbsp;<span class="smallbluetxt"><a href="/webapp/dadp/jsp/dadp/DADeveloperReg.jsp">New User</a></span></td>');
	document.write('</tr>');
	document.write('<tr> ');
	document.write(' <td height="19" colspan="4"><img src="/dadp/images/bullettri.gif" width="3" height="5">&nbsp;&nbsp;&nbsp;<span class="smallbluetxt"><a href="/webapp/dadp/jsp/dadp/ForgotPassword.jsp">Forgot password</a></span></td>');
	document.write('</tr>');
	document.write('</table>');
}