
// Validation rules adn POST data string for ContactEntry
function getPostDataContactEntry() {
	var closeOnExit = document.getElementById('close_on_exit');
	if(closeOnExit !== undefined){
		strClose = "&closeOnExit=" + (closeOnExit.checked ? "1" : "0");  
	}
	return 'section=contact-requests&class=ContactEntry&' + strClose;
}
function validateDataContactEntry() {
	return true;
}

// Validation rules adn POST data string for NewsletterSubscriber
function getPostDataNewsletterSubscriber() {
	var closeOnExit = document.getElementById('close_on_exit');
	if(closeOnExit !== undefined){
		strClose = "&closeOnExit=" + (closeOnExit.checked ? "1" : "0");  
	}
	return 'section=newsletter-subscriptions&class=NewsletterSubscriber&' + strClose;
}
function validateDataNewsletterSubscriber() {
	return true;
}

// Validation rules adn POST data string for Article
function getPostDataArticle() {
	var closeOnExit = document.getElementById('close_on_exit');
	if(closeOnExit !== undefined){
		strClose = "&closeOnExit=" + (closeOnExit.checked ? "1" : "0");  
	}
	return 'section=articles&class=Article&articleID=' + escape(cmsGetInputValue('articleID')) + '&articleTitle=' + escape(cmsGetInputValue('articleTitle')) + '&articleContent=' + escape(cmsGetFckValue('articleContent')) + '&articleDate=' + escape(cmsGetDateValue('articleDate')) + '' + strClose;
}
function validateDataArticle() {
	if (!cmsFull('articleTitle')) { alert('Please fill in the article title!'); return false; }
	if (!cmsValidateFck('articleContent')) { alert('Please fill in the article content!'); return false; }
	return true;
}

// Validation rules adn POST data string for SiteNews
function getPostDataSiteNews() {
	var closeOnExit = document.getElementById('close_on_exit');
	if(closeOnExit !== undefined){
		strClose = "&closeOnExit=" + (closeOnExit.checked ? "1" : "0");  
	}
	return 'section=news&class=SiteNews&newsID=' + escape(cmsGetInputValue('newsID')) + '&newsTitle=' + escape(cmsGetInputValue('newsTitle')) + '&newsContent=' + escape(cmsGetFckValue('newsContent')) + '&newsDate=' + escape(cmsGetDateValue('newsDate')) + '' + strClose;
}
function validateDataSiteNews() {
	if (!cmsFull('newsTitle')) { alert('Please fill in the news title!'); return false; }
	if (!cmsValidateFck('newsContent')) { alert('Please fill in the news content!'); return false; }
	return true;
}

// Validation rules adn POST data string for Career
function getPostDataCareer() {
	var closeOnExit = document.getElementById('close_on_exit');
	if(closeOnExit !== undefined){
		strClose = "&closeOnExit=" + (closeOnExit.checked ? "1" : "0");  
	}
	return 'section=careers&class=Career&careerId=' + escape(cmsGetInputValue('careerId')) + '&careerTitle=' + escape(cmsGetInputValue('careerTitle')) + '&careerJobDescription=' + escape(cmsGetFckValue('careerJobDescription')) + '&careerCity=' + escape(cmsGetInputValue('careerCity')) + '&careerSchool=' + escape(cmsGetSelectValue('careerSchool')) + '&careerContactName=' + escape(cmsGetInputValue('careerContactName')) + '&careerContactPhone=' + escape(cmsGetInputValue('careerContactPhone')) + '&careerContactEmail=' + escape(cmsGetInputValue('careerContactEmail')) + '&careerApproved=' + escape(cmsGetInputValue('careerApproved')) + '' + strClose;
}
function validateDataCareer() {
	if (!cmsFull('careerTitle')) { alert('Please fill in the job title!'); return false; }
	if (!cmsValidateFck('careerJobDescription')) { alert('Please fill in the job description!'); return false; }
	if (!cmsFull('careerCity')) { alert('Please fill in the city!'); return false; }
	if (!cmsFull('careerContactName')) { alert('Please fill in the contact name!'); return false; }
	if (!cmsValidatePhone('careerContactPhone')) { alert('Please fill in a valid contact phone!'); return false; }
	if (!cmsIsEmail('careerContactEmail')) { alert('Please fill in a valid contact email!'); return false; }
	return true;
}

// Validation rules adn POST data string for FAQ
function getPostDataFAQ() {
	var closeOnExit = document.getElementById('close_on_exit');
	if(closeOnExit !== undefined){
		strClose = "&closeOnExit=" + (closeOnExit.checked ? "1" : "0");  
	}
	return 'section=frequently-asked-questions&class=FAQ&faqID=' + escape(cmsGetInputValue('faqID')) + '&faqQuestion=' + escape(cmsGetInputValue('faqQuestion')) + '&faqAnswer=' + escape(cmsGetFckValue('faqAnswer')) + '&faqCategory=' + escape(cmsGetSelectValue('faqCategory')) + '' + strClose;
}
function validateDataFAQ() {
	if (!cmsFull('faqQuestion')) { alert('Please fill in the question!'); return false; }
	if (!cmsValidateFck('faqAnswer')) { alert('Please fill in the answer!'); return false; }
	return true;
}

// Validation rules adn POST data string for School
function getPostDataSchool() {
	var closeOnExit = document.getElementById('close_on_exit');
	if(closeOnExit !== undefined){
		strClose = "&closeOnExit=" + (closeOnExit.checked ? "1" : "0");  
	}
	return 'section=schools&class=School&schoolID=' + escape(cmsGetInputValue('schoolID')) + '&schoolName=' + escape(cmsGetInputValue('schoolName')) + '&schoolDistrict=' + escape(cmsGetSelectValue('schoolDistrict')) + '&schoolAddress=' + escape(cmsGetInputValue('schoolAddress')) + '&schoolCity=' + escape(cmsGetInputValue('schoolCity')) + '&schoolZIP=' + escape(cmsGetInputValue('schoolZIP')) + '&schoolTelephone=' + escape(cmsGetInputValue('schoolTelephone')) + '&schoolFax=' + escape(cmsGetInputValue('schoolFax')) + '&schoolAdmName=' + escape(cmsGetInputValue('schoolAdmName')) + '&schoolAdmTitle=' + escape(cmsGetInputValue('schoolAdmTitle')) + '&schoolEmail=' + escape(cmsGetInputValue('schoolEmail')) + '&schoolWebsite=' + escape(cmsGetInputValue('schoolWebsite')) + '&schoolCharter=' + escape(cmsGetSelectValue('schoolCharter')) + '&schoolMembership=' + escape(cmsGetSelectValue('schoolMembership')) + '&schoolGrades=' + escape(cmsGetInputValue('schoolGrades')) + '&schoolStudents=' + escape(cmsGetInputValue('schoolStudents')) + '&schoolDescription=' + escape(cmsGetFckValue('schoolDescription')) + '&schoolFile=' + escape(cmsGetInputValue('schoolFile')) + '&schoolHidden=' + escape(cmsGetInputValue('schoolHidden')) + '' + strClose;
}
function validateDataSchool() {
	if (!cmsFull('schoolName')) { alert('Please fill in the school name!'); return false; }
	if (!cmsFull('schoolAddress')) { alert('Please fill in the school address!'); return false; }
	if (!cmsFull('schoolCity')) { alert('Please fill in the school city!'); return false; }
	if (!cmsFull('schoolZIP')) { alert('Please fill in the school ZIP!'); return false; }
	return true;
}

// Validation rules adn POST data string for NewsletterArchive
function getPostDataNewsletterArchive() {
	var closeOnExit = document.getElementById('close_on_exit');
	if(closeOnExit !== undefined){
		strClose = "&closeOnExit=" + (closeOnExit.checked ? "1" : "0");  
	}
	return 'section=newsletter-archive&class=NewsletterArchive&newsletterID=' + escape(cmsGetInputValue('newsletterID')) + '&newsletterFile=' + escape(cmsGetInputValue('newsletterFile')) + '&FType=' + escape(cmsGetInputValue('FType')) + '&newsletterDate=' + escape(cmsGetDateValue('newsletterDate')) + '' + strClose;
}
function validateDataNewsletterArchive() {
	return true;
}
