function LocalLoad()
{
	//if user entered incorrect login info, we keep them on _intro.aspx, but
	//we show them tblLogin instead of tblFindRest
	if (document.getElementById("tblLogin").style.display != "inline")
	{
		document.getElementById("txtStAddress").focus();
	}
	else
	{
		document.getElementById("email").focus();
	}
	
	//user would want to see the login screen if they were coming to this page from ChangePass_conf.aspx
	if (window.location.search.indexOf("loginscreen") != -1)
	{
		SwitchToLogin();
	}
		
}

function SwitchToLogin()
{
	document.getElementById("tblLogin").style.display = "block";
	document.getElementById("tblFindRest").style.display = "none";
	document.getElementById("email").focus();
}

function SwitchToFindRest()
{
	document.getElementById("tblFindRest").style.display = "block";
	document.getElementById("tblLogin").style.display = "none";
	document.getElementById("txtStAddress").focus();
}

function AboutCoolOrder()
{
	var winl = (screen.width - 460) / 2;
	var wint = (screen.height - 247) / 2 - 70;
	window.open("AboutCoolOrder.aspx","","top=" + wint + ",left=" + winl +
		",height=247,width=460,status=no,toolbar=no,resizable=yes");
}

function Demo()
{
	var winl = (screen.width - 490) / 2;
	var wint = (screen.height - 325) / 2 - 70;
	window.open("Demo.aspx","","top=" + wint + ",left=" + winl +
		",height=212,width=445,status=no,toolbar=no,resizable=yes");
}

function Feedback()
{
	var winl = (screen.width - 700) / 2;
	var wint = 10;
	window.open("Feedback.aspx","","top=" + wint + ",left=" + winl +
		",height=" + (screen.height-100) + ",width=700,status=no,toolbar=no,resizable=yes,scrollbars=yes");
}

function Menu()
{
	var winl = (screen.width - 700) / 2;
	var wint = 10;
	window.open("Other/SicilyMenu.pdf","","top=" + wint + ",left=" + winl +
		",height=" + (screen.height-100) + ",width=700,status=no,toolbar=no,resizable=yes,scrollbars=yes");
}

function ForgotPass()
{
	//window.showModalDialog("EmailPass.aspx","","center:yes;help:no;status:no;resizable:no;dialogHeight:230px;dialogWidth:280px;");

	var winl = (screen.width - 300) / 2;
	var wint = (screen.height - 200) / 2 - 70;
	window.open("EmailPass.aspx","","height=245,width=300,top=" + wint +
		",left=" + winl + ",status=no,toolbar=no,resizable=no");
}

function CheckFieldsAddress(element)
{
	if (document.getElementById("txtStAddress").value == "" || document.getElementById("txtCityStateZip").value == "")
	{
		window.alert("Please fill in both the \"Street Address\" and the \"City and State or Zip Code\" fields to continue.");
		document.getElementById("txtStAddress").focus();
		return false;
	}
	else
	{
		element.value = "Please Wait...";
		return true;
	}

}

function CheckFieldsLogin(element)
{
	if (document.getElementById("email").value == "" || document.getElementById("password").value == "")
	{
		window.alert("Please fill in both the \"e-Mail Address\" and the \"Password\" fields to continue.");
		document.getElementById("email").focus();
		return false;
	}
	else
	{
		element.value = "Please Wait...";
		return true;
	}

}