/*****************************************************************************************
*
* General helper functions
*
*****************************************************************************************/
/**
* Extend the String object so that we can use the trim() function like; sVar.trim();
*
* var first_name = "Chris ";
* first_name = first_name.trim();
*
* @return string
*/
String.prototype.trim = function() {
var a = this.replace(/^\s+/, '');
return a.replace(/\s+$/, '');
};
/**
* Write an email address to the screen. Helps so that bots can't parse email addresses from the site.
*
* writeEmail("info", "info", "churchmedia.cc");
*
* @param string
* @param string
* @param string
*/
function writeEmail(contact, email, emailHost) {
document.write("" + contact + "@" + emailHost+"");
}
function writeEmailBtn(contact, email, emailHost) {
document.write("" + "" + "Email" + "" + "");
}
function writeStaffEmail(name, email, emailHost) {
document.write(""+ name +"");
}
/**
* Pop up window in a certain size and no scrollbar.
*/
function pop(url, name, props) {
window.open(url, name, props);
}