function handleNewInternalLink(sCaller, sLink) {
	sOtherLinks = document.getElementById('AutoLinks').innerHTML;
	if ( sOtherLinks.length > 0 ) {
		document.getElementById('AutoLinks').innerHTML = sOtherLinks + ', ' + sLink;
	} else {
		document.getElementById('AutoLinks').innerHTML = sOtherLinks + sLink
	}
	
}
function deleteFile(nDocumentID, nNodeID, sDestination) {
	if (confirm('Are you sure you want to delete this file?  You cannot undo this action.') ) {
		document.location = sDestination + '?FileDelete=' + nDocumentID + '&NodeID=' + nNodeID;
	}
}
function deleteImage(nNodeID, sDestination) {
	if (confirm('Are you sure you want to delete this image?  You cannot undo this action.') ) {
		document.location = sDestination + '?ImgDelete=1&NodeID=' + nNodeID;
	}
}
function closeReplaceWindow(sOption) {
		//
		//	We're using visiblity here instead of display becuase setting display to none on a div that 
		//	contained a file input item caused a crash in Mozilla.  Check out bug 210895
		//
	if ( sOption == "OK" ) {
		document.getElementById("ReplaceFileBox").style.visibility = 'hidden';
		document.getElementById("ReplacementFile_Ind").value = '1';
		document.getElementById("ThumbImage").style.filter='alpha(opacity:35)';
		document.getElementById("ThumbImage").style.opacity = '.35';
		alert('You must now click the Save Changes button to upload the new file');
	} else {
		document.getElementById("ReplaceFileBox").style.visibility = 'hidden';
		document.getElementById("ReplacementFile_Ind").value = '0';
		document.getElementById("ThumbImage").style.filter='alpha(opacity:100)';
		document.getElementById("ThumbImage").style.opacity = '1';
	}
}

function replaceFile() {
	document.getElementById("ReplaceFileBox").style.visibility = 'visible';
	//document.getElementById("ReplaceFileBox").style.display = 'block';
}
function checkForm(eForm) {
	sFormName = eForm.name;
	bValidForm = true;
	bValidForm = checkRequiredFields(sRequiredFields, sRequiredFieldNames, sFormName);
	return bValidForm;
}

