function hide(id) {
	document.getElementById(id).style.display = 'none';
}
function logoutConfirm() {
	var confirmMessage = "Changes that are not saved will be lost!  \n\n Do you want to logout ?";
	return confirm(confirmMessage);
}

function autoLogout() {
	document.logoutform.submit();
}

function setFlexAppHeight(newHeight) {
	if (window.document.CCHT) {
		window.document.CCHT.height = newHeight;
		scrollToTop();
	}
}

function setFocus() {
	// Bring the window back to front
	window.focus();
}
function setFocusToCchtMovie() {
	if (window.document.CCHT) {
		window.document.CCHT.focus();
		scrollToTop();
	}
}

function scrollToTop() {
	window.scrollTo(0, 0);
}

function expandOrCollapseIt(elementName) {
	var whichEl = document.getElementById(elementName);
	if (whichEl != null) {
		whichEl.style.display = (whichEl.style.display == "inline") ? "none"
				: "inline";
	}
}

function loadMovi() {

	File = "movi.exe";
	WSH = new ActiveXObject("WScript.Shell");
	WSH.run(File);
}

function loginClicked() {
	document.loginForm.loginSubmit.value = true;
}

function setUIFocus() {
	if (document.getElementById('error').firstChild) {
		document.getElementById('error').firstChild.focus();
	} else {
		document.loginForm.username.focus();
	}
}


	


