/* jquery */

$(function ($) {
// confirm action
$('.confirm').click(function (e) {
e.preventDefault();
var theHREF = $(this).attr("href");
if (confirm("Sure? The action can't be undone!")) {
window.location.href = theHREF; } });
// form validation
$("form").submit( function() {
var error = false;
$(this).find(".required").each(function(){
if ($(this).val().length == 0) {
alert("Please do not leave a required field blank");
$(this).focus();
error = true;
return false; } });
if (error) { return false; }
return true; });
});
// hide errors
$(window).error(function() { return true; });

/* site functions */

function goToURL(newUrl) { window.location = newUrl; }

function popUp(URL) { day = new Date(); id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=2,location=0,statusbar=1,menubar=0,resizable=1,width=600,height=525,left = 100,top = 134');"); }
function popUpSmall(URL) { day = new Date(); id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=2,location=0,statusbar=1,menubar=0,resizable=0,width=300,height=300,left = 100,top = 134');"); }

