// print page popup
function DoPrint() {
	var loc = location.href;
	var pri = "?print=1";
	if (loc.indexOf("?")>0) {
		pri = "&print=1";
	}
	window.open(loc+pri, "", "toolbar=1,location=0,directories=0,status=0,menubar=yes,scrollbars=yes,resizable=yes,width=720,height=400");
}

function hasPressedEnter()
{
	if(event.keyCode==13) {
		return true;
	}
	return false;
}

function Search() {
	document.forms[0].action = '/site tools/search.aspx?q=' + document.forms[0].searchfield.value;
	document.forms[0].submit();
}

function ClearLogin() {
	document.forms[0].username.value = '';
	document.forms[0].password.value = '';
}

function SubmitForm(action) {
	document.forms[0].action = action;
	document.forms[0].submit();
}

function showSendPass() {
document.getElementById('thisline').style.display = 'none';
document.getElementById('getpass').style.display = 'inline';
document.getElementById('sendusername').focus();
}

function SendLink(o) {
	var isValid = true;
	var oe = o.elements;
	if (oe["sendusername"].value=="") {
		isValid = false;
	}
	if (isValid) {
		location.href = "/layouts/Sendnewpassword.aspx?refpath="+oe["thisid"].value+"&varpath="+oe["hiddenpath"].value+"&username="+oe["sendusername"].value;
		return true;
	}
	return false;
}

function ShowError(oID) {
	document.getElementById("error"+oID).style.display = "inline";
}

function HideError(oID) {
	document.getElementById("error"+oID).style.display = "none";
}
