// JavaScript Document

function window_onload(){
	SetFormFocus();
}

//sets the focus to the first text input of a form
function SetFormFocus() {
	if (document.forms[0]) {
		for (count = 0; count < document.forms[0].length; count++) {
			if (document.forms[0].elements[count].type == "Text" || document.forms[0].elements[count].type == "text" || document.forms[0].elements[count].type == "Password" || document.forms[0].elements[count].type == "password") {
				if ( document.forms[0].elements[count].readonly != true ){
					document.forms[0].elements[count].focus();
					break;
				}
			}
		}
	}
}

function printStats(){
	document.print();
}
function setValue(sElement, sValue){
//	document.getElementById(sElement).value = sValue;
	var el = document.getElementById(sElement);
	el.value = sValue;
}
function getValue(sElement){
	var el = document.getElementById(sElement);
	return el.value;
}
function disEnable(sElement, fEnabled){
	document.getElementById(sElement).readOnly = fEnabled;
	document.getElementById(sElement).disabled = fEnabled;		
}
function mOver(oImg){
	oImg.src = oImg.src.replace("_init", "_over");
}
function mOut(oImg){
	oImg.src = oImg.src.replace("_over", "_init");
}
function show(sElement){
	document.getElementById(sElement).style.display = 'inline';
}
function showBlock(sElement){
	document.getElementById(sElement).style.display = 'block';
}
function hide(sElement){
	document.getElementById(sElement).style.display = 'none';
}