//Uploading DIVISION PROJECT documents from the division pages

function checkProjectComplete() {  
	var alert_message = ""; 

	if (isEmpty(window.document.addProject.proTitle.value)) {
		alert_message = alert_message + "   - Title\n";
	}
	if (isEmpty(window.document.addProject.proFile.value)) {
		alert_message = alert_message + "   - Project File (PDF)\n";
	}

	if (alert_message) {
		alert ("ADD A PROJECT FILE\n\nSorry, your form is incomplete.\n" +
			   "Can you please supply the following information:\n\n" +
				alert_message);
		return false;
	} else { 
		return true;
	}
}

//Uploading CAREERS documents from the division pages

function checkPositionComplete() {  
	var alert_message = ""; 

	if (isEmpty(window.document.addPosition.posTitle.value)) {
		alert_message = alert_message + "   - Title\n";
	}
	if (isEmpty(window.document.addPosition.posFile.value)) {
		alert_message = alert_message + "   - Position File (PDF)\n";
	}

	if (alert_message) {
		alert ("ADD A POSITION FILE\n\nSorry, your form is incomplete.\n" +
			   "Can you please supply the following information:\n\n" +
				alert_message);
		return false;
	} else { 
		return true;
	}
}

//Adding NEWS articles

function checkNewsAddComplete() {  
	var alert_message = ""; 

	if (isEmpty(window.document.addNews.nwsTitle.value)) {
		alert_message = alert_message + "   - Title\n";
	}
	if (isEmpty(window.document.addNews.nwsText.value)) {
		alert_message = alert_message + "   - Body Text\n";
	}

	if (alert_message) {
		alert ("ADD A NEWS ARTICLE\n\nSorry, your form is incomplete.\n" +
			   "Can you please supply the following information:\n\n" +
				alert_message);
		return false;
	} else { 
		return true;
	}
}

//adding Insite Edition PDF

function checkInsiteComplete() {  
	var alert_message = ""; 

	if (isEmpty(window.document.addInsite.insTitle.value)) {
		alert_message = alert_message + "   - Title\n";
	}
	if (isEmpty(window.document.addInsite.insFile.value)) {
		alert_message = alert_message + "   - 'Insite' File (PDF)\n";
	}
	if (isEmpty(window.document.addInsite.insDescription.value)) {
		alert_message = alert_message + "   - Description\n";
	}	

	if (alert_message) {
		alert ("ADD AN 'INSITE' EDITION PDF\n\nSorry, your form is incomplete.\n" +
			   "Can you please supply the following information:\n\n" +
				alert_message);
		return false;
	} else { 
		return true;
	}
}




function isEmpty (strValue) {
	return (! strValue.replace (/^(\s*)/, "", strValue));
}
