function displayNewWindow(thisObj) 
{
	newwindow = window.open(thisObj.href,'offworld','width=630,height=500,directories=yes,resizable=yes,status=yes,menubar=yes,location=yes,scrollbars=yes'); 
	newwindow.focus();
	return false;
}


//this is for the ones which can be bolded
//necessary otherwise it'll take off the orange arrow from the ones that are bolded
function highlightArrow2(divTag, highlight)
{
	var texttag;
	texttag = document.getElementById("text" + divTag);
	if(texttag.innerHTML.indexOf("<B>") < 0)
	{
		highlightArrow(divTag, highlight);
	}
}

//this is for the ones where you can't possibly bold them.
function highlightArrow(divTag, highlight)
{
	var tag;
	tag = document.getElementById("arrow" + divTag);
	if(highlight)
	{
		tag.innerHTML = "<img src=\"../../common/imagesv2/orangearrow_right.gif\">";
	}
	else
	{
		tag.innerHTML = "<img src=\"../../common/imagesv2/greyarrow_right.gif\">";
	}
}

function checkLogin(thisFrm)
{
	if(thisFrm.password.value.trim() == "")
	{
		alert("Enter a password.");
		thisFrm.password.focus();
		return false;
	}
	return true;
}

function checkDeleteFields(thisForm)
{
	if(get_radio_value(thisForm.rdArticleID).trim() == "")
	{
		alert("Select an article to delete");
		return false;
	}
	if(confirm("You are about to delete this article.  Press OK to continue."))
	{
		return true;
	}
	return false;
}

function checkAddFields(thisForm)
{
	if(thisForm.filedate.value.trim()=="")
	{
		requiredTextBox(thisForm.filedate, "Date");
		return false;
	}
	if(!isDate(thisForm.filedate.value.trim()))
	{
		alert("Invalid date.");
		thisForm.filedate.focus()
		return false;
	}
	if(thisForm.titleshown.value.trim()=="")
	{
		requiredTextBox(thisForm.titleshown, "Title");
		return false;
	}
	if(thisForm.fileToUpload.value.trim() == "")
	{
		requiredTextBox(thisForm.fileToUpload, "File");
		return false;
	}
	if(getExtension(thisForm.fileToUpload.value.trim()) != "htm" && 
		getExtension(thisForm.fileToUpload.value.trim()) != "html" && 
		getExtension(thisForm.fileToUpload.value.trim()) != "pdf")
	{
		alert("Only htm and pdf files are permitted.");
		return false;
	}
	if(thisForm.expDate.value.trim()=="")
	{
		requiredTextBox(thisForm.expDate, "Expiration Date");
		return false;
	}
	if(thisForm.expDate.value.trim().toLowerCase() != "none" && !isDate(thisForm.expDate.value.trim()))
	{
		alert("Expiration Date must be a valid date or 'none'.");
		thisForm.expDate.focus();
		return false;
	}
	else if(thisForm.expDate.value.trim().toLowerCase() != "none" && !isFutureDate(thisForm.expDate.value.trim()))
	{
		alert("Expiration Date must be a future date.");
		thisForm.expDate.focus();
		return false;
	}
	return true;
}
