function jsChangeImg(oImg, sNewImg) {
	if (typeof oImg == "object") {
		oImg.src = "images/" + sNewImg + ".gif";
	}
} //jsChangeImg

function jsCloseWin() {
	window.close();
} //jsCloseWin()

function jsHistoryBack() {
	history.back();
}

function jsNotReady() {
	window.alert("Feature not ready");
}

function jsOutNewMsg(dDisplayUntil, sMsg) {
	if (sMsg == undefined) sMsg = "New!";
	var sReturn = "";
	var dToday  = new Date();
	if (compareDates(dToday, dDisplayUntil, "<=")) {
		sReturn = " <SPAN class='cNew'>" + sMsg + "</SPAN>";
	}
	return sReturn
} //jsOutNewMsg

function jsSelAddSelected(sAvailable, sSelected) {
	var oAvailable = jsGetObjectRef(sAvailable);
	var oSelected  = jsGetObjectRef(sSelected);
window.alert("Avail innerHTML = " + oAvailable.innerHTML);
}
function jsBtnMsg(sBtn) {
	var sMsg = "";
	switch (sBtn) {
		case "add":
		sMsg = "The 'Add' button is used to add new records to TechReg.";
		break;
		case "edit":
		sMsg = "The 'Edit' button is used to update existing individual records in TechReg.";
		break;
		case "help":
		sMsg = "The 'Help' button contains help comments for the selected section.";
		break;
	    case "status":
		sMsg = "Have you completed all of the categories that you wish to 'submit' at this time? 'Incomplete' categories will not be submitted for certification.";
		break;
		case "update":
		sMsg = "The 'Update' button is used to update existing groups of records in TechReg.";
		break;
		case "qualifications":
		sMsg = "The 'Qualifications' button is used to match your qualifications and work experience with those required by the selected categories.";
		default:
		break;
	}
	if (sMsg != "") {
		window.alert(sMsg);
	}
} //jsBtnMsg


function jsAddOne() {
  jsSelectBtn("addone");
} //jsAddOne

function jsDelOne() {
  jsSelectBtn("delone");
} //jsDelOne

function jsSelectBtn(sBtnClicked) {
	var oHid = jsGetObjectRef("hidBtnClk");
	if (typeof oHid == "object") {
		oHid.value = sBtnClicked;
		document.forms[0].submit();
	}
} //jsSelectBtn

function jsSubmitForm(nFormNum) {
	if (nFormNum == undefined) nFormNum = 0;
	document.forms[nFormNum].submit();
}

function jsSetFontSize(sFontSize) {
  var oHidFont = jsGetObjectRef("hidFontSize");
  if (typeof oHidFont == "object") {
    oHidFont.value = sFontSize;
    jsSubmit();
  }
} //jsSetFontSize

function jsPopup(sUrl) {
	var winOpen = window.open(sUrl,'Information','width=790,height=550,menubar=no,toolbar=no');
}

function jsPopupLong(sUrl) {
	var winOpen = window.open(sUrl,'Information','width=790,height=700,menubar=no,toolbar=no');
}

function jsPopupScroll(sUrl) {
	var winOpen = window.open(sUrl,'Information','width=790,height=550,menubar=no,toolbar=no,scrollbars=yes')
}

function jsPopupScrollWithResize(sUrl) {
	var winOpen = window.open(sUrl,'Information','width=790,height=550,menubar=no,toolbar=no,scrollbars=yes,resizable=yes')
}

function jsPrint(sUrl) {
	var winOpen = window.open(sUrl,'Print','width=790,height=550,menubar=yes,resizable=yes,scrollbars=yes')
}



