var hidSubmitSignOnForm = document.getElementById("Banner_hidSubmitSignOnForm");
var MenubarSignOnFormErrorMessage = document.getElementById("Banner_objSignIn_Message");

HideSignOnForm();

//Display Menubar Sign On Form on reload;

if (MenubarSignOnFormErrorMessage) {
	if (Trim(MenubarSignOnFormErrorMessage.innerHTML) != "" && hidSubmitSignOnForm.value == "SubmitSignOnForm")
	{
		ShowSignOnForm();
	}
}
/******************************************************************/

function ShowSignOnForm() {
	var MenuBarSignOnForm = document.getElementById("MenuBarSignOnForm");
	var LogOnOffLink = document.getElementById("LogOnOffLink");
	var PageContentCell = document.getElementById("PageContentCell");
	
	if (PageContentCell && MenuBarSignOnForm) {
	
		if (PageContentCell.offsetWidth > 0) {
			if (MenuBarSignOnForm.style.display != "block") {
				// Display Sign On Form
				MenuBarSignOnForm.style.display = "block";

				MenuBarSignOnForm.style.left = PageContentCell.offsetLeft + PageContentCell.offsetWidth - MenuBarSignOnForm.offsetWidth;

				//Brower Check
				if (!checkIt('compatible'))
				{
					MenuBarSignOnForm.style.top = LogOnOffLink.offsetTop + LogOnOffLink.offsetHeight + 3;
				} else {
					MenuBarSignOnForm.style.top = LogOnOffLink.offsetTop + LogOnOffLink.offsetHeight + 69;
				}
				
				hidSubmitSignOnForm.value = "SubmitSignOnForm";
			}
						
			//MenuBarSignOnForm.scrollIntoView(false);
			window.scroll(0,0);
		} else {
			window.setTimeout("ShowSignOnForm()", 250);
		}
	} else {
		window.setTimeout("ShowSignOnForm()", 250);
	}
}

// Close Sign On Form
function CloseSignOnForm() {
	hidSubmitSignOnForm.value = "";
	
	var txtLogin = document.getElementById("Banner_objSignIn_txtLogin");
	var txtPassword = document.getElementById("Banner_objSignIn_txtPassword");

	txtLogin.value = "";
	txtPassword.value = "";
	
	MenubarSignOnFormErrorMessage.style.display = "none";
	
	HideSignOnForm();
}

// Hide Sign On Form
function HideSignOnForm() {
	var MenuBarSignOnForm = document.getElementById("MenuBarSignOnForm");
	MenuBarSignOnForm.style.display = "none";
}