function fFocus(tthis) {
	tthis.className = "cssFocus";
}

function fBlur(tthis) {
	tthis.className = "";
}

function fMouseOut(tthis) {
	if(tthis.className != "cssFocus") {
		tthis.className = "";
	}
}

function fMouseOver(tthis) {
	if(tthis.className != "cssFocus") {
		tthis.className = "cssOver";
	}
}

function fVerifyEmail(strEmail) {
	re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/;
	if (re.test(strEmail)) {
		return true;
	} else {
		return false;
	}
}

function fVerifyInput(strID, strText) {
	var oInput = document.getElementById(strID);
	if(oInput.value == "") {
		oInput.style.background = "#ffcccc";
		return strText;
	} else {
		oInput.style.background = "";
		return "";
	}
}

function fVerifyInputLength(strID, intLength, strText) {
	var oInput = document.getElementById(strID);
	if(oInput.value.length < intLength) {
		oInput.style.background = "#ffcccc";
		return strText;
	} else {
		oInput.style.background = "";
		return "";
	}
}

function fVerifyRadio(strID, strText) {
	var oRadio = document.getElementsByName(strID);
	for(i=0; i<oRadio.length; i++) {
		if(oRadio[i].checked) {
			return "";
		}
	}
	return "Please answer " + strText + ".\n";
}

function fVerifyCheck(strID, strText) {
	var oCheck = document.getElementById(strID);
	if(oCheck.checked) {
		return "";
	}
	
	return strText + ".\n";
}

function fVerifySelect(strID, strText) {
	var oElement = document.getElementById(strID);
	if(oElement.selectedIndex == 0) {
		oElement.style.background = "#ffcccc";
		oElement.focus();
		return strText;
	} else {
		oElement.style.background = "#ffffff";
	}
	return "";
}

function fShow(strDiv) {
	document.getElementById(strDiv).style.visibility = "visible";
	document.getElementById(strDiv).style.display = "block";
}

function fHide(strDiv) {
	document.getElementById(strDiv).style.visibility = "hidden";
	document.getElementById(strDiv).style.display = "none";
}


function fToggle(strID) {
	if(document.getElementById(strID).style.visibility == "hidden") {
		fShow(strID);
	} else {
		fHide(strID);
	}
}

function fToggleDiv(strDiv) {
	var objDiv = document.getElementById(strDiv);
	if(objDiv.style.visibility == "hidden") {
		objDiv.style.visibility = "visible";
		objDiv.style.display = "block";
		if(document.getElementById(strDiv + "plus")) {
			document.getElementById(strDiv + "plus").src = strRootPath + "img/img_minus.gif";
		}
		if(document.getElementById(strDiv + "Header")) {
			document.getElementById(strDiv + "Header").className = "cssLeftNavRed";
		}
	} else {
		objDiv.style.visibility = "hidden";
		objDiv.style.display = "none";
		if(document.getElementById(strDiv + "plus")) {
			document.getElementById(strDiv + "plus").src = strRootPath + "img/img_plus.gif";
		}
		if(document.getElementById(strDiv + "Header")) {
			document.getElementById(strDiv + "Header").className = "cssLeftNav";
		}
	}
}


function fHideDropdown(strID) {



                oTimer = setTimeout('fHideDiv(\"' + strID + '\");', 1000);

}

function fHideDiv(strID) {
        var oDiv = document.getElementById(strID);
        //oDiv.style.display = "none";
        oDiv.style.visibility = "hidden";
        if(boolHideForms && (strID == "divClaims" || strID == "divPrograms")) {
                document.getElementById("Select1").style.visibility = "visible";
                document.getElementById("Select2").style.visibility = "visible";
        }
        clearTimeout(oTimer);
}

function fShowDropdown(strID) {
        if(strCurrentMenu != "") {
                fHideDiv(strCurrentMenu);
        }
        if(boolHideForms && (strID == "divClaims" || strID == "divPrograms")) {
                document.getElementById("Select1").style.visibility = "hidden";
                document.getElementById("Select2").style.visibility = "hidden";
        }
        strCurrentMenu = strID;
        var oDiv = document.getElementById(strID);
        oDiv.style.visibility = "visible";
        oDiv.style.display = "block";
        if(oTimer != null) {
                clearTimeout(oTimer);
        }
}

oTimer = null;
strCurrentMenu = "";
strCurrentBio = "";
boolHideForms = false;

var arrMenus = new Array("About", "Programs");
var oTimer = null;
var oFadeInTimer = null;
var strSection;

function fShowDescription(strDescription) {
	document.getElementById("divDescription").innerHTML = strDescription;
	if(strDescription != "") {
		fShow("divDescription");
	}
}

function fHideDescription() {
	fHide("divDescription");
}
