// JavaScript Document var delay = 1000; function loaded() { $("#ajaxWorkingEmail").removeClass("ac_loading"); } function loading() { $("#ajaxWorkingEmail").addClass("ac_loading"); } function emailPage() { $('div#responseContainer').html(''); loading(); jQuery.post("http://www.theberean.org/index.cfm?fuseaction=Email.page", {toAddress: $("input[@name=toAddress]").val(), fromAddress: $("input[@name=fromAddress]").val(), ID: $("input[@name=BereanID]").val(), comments: escape($("textarea[@name=comments]").val())}, function(r) { $('div#responseContainer').html(r); }); setTimeout("loaded()", delay); } function showForBook(book) { if ($("#book" + book + "_link").html() == 'show') { if( $('#book' + book).html().length) { $('#book' + book).show() } else { $('#book' + book).show().load("index.cfm",{fuseaction:"home.showForBook",book:book}); } $("#book" + book + "_link").html('hide'); } else { $("#book" + book).hide(); $("#book" + book + "_link").html('show'); } } function homepage() { window.location = "http://www.theberean.org"; } // Retrieve a named cookie value function getCookie(name) { var dc = document.cookie; // find beginning of cookie value in document.cookie var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null; } else begin += 2; // find end of cookie value var end = document.cookie.indexOf(";", begin); if (end == -1) end = dc.length; // return cookie value return unescape(dc.substring(begin + prefix.length, end)); } function setCookie(name, value, expires, path, domain, secure) { var curCookie = name + '=' + escape(value) + ((expires) ? '; expires=' + expires.toGMTString() : '') + ((path) ? '; path=' + path : '') + ((domain) ? '; domain=' + domain : '') + ((secure) ? '; secure' : ''); document.cookie = curCookie; } function popup() { if (getCookie("popup") != "popped") { var expire = new Date((new Date()).getTime() + 1000 * 24 * 3600000); setCookie("accept", "oreo", expire, "/", "", false); if (getCookie("accept")) { if(typeof showAd != "undefined") { showAd(); setCookie("popup", "popped", expire, "/", "", false); } } } } function showAd() { document.getElementById('hover').style.visibility = 'visible'; } function hideAd() { document.getElementById('hover').style.visibility = 'hidden'; } function closeShareThis() { $("div#akst_form").hide(); }