image_window= null;
function Show_Me_Picture(image,width,height) {
	if (!image_window || image_window.closed) {
		image_window = window.open('/images/' + image,'','width=' + width + ',height=' + height + ',status=1,scrollbars=0,resizable=1');
	}
	else {
		image_window.location = '/images/' + image;
		image_window.resizeTo(width,height);
	}
	image_window.focus();
}

slide_window = null;
function Slide_Show(id) {
	if (!slide_window || slide_window.closed) {
		slide_window = window.open('/this_week/index.cfm?slide_show=' + id,'','width=600,height=400,locationbar,menubar,status,scrollbars,resizable');
	}
	else {
		slide_window.location = '/this_week/index.cfm?slide_show=' + id;
	}
	slide_window.focus();
}

email_window= null;
function Email_April() {
	if (!email_window || email_window.closed) {
		email_window = window.open('/tools/mail_form.cfm','','width=400,height=300,status=1,scrollbars=0,resizable=1');
	}
	else {
		email_window.location = '/tools/mail_form.cfm';
	}
	email_window.focus();
}

var explaination_window = null;
explaination_html_start = '<html><head><title>Explaination</title><link rel="stylesheet" href="/styles.css" /></head><body><table style="width:100%"><tr><td>';
explaination_html_end = '</td></tr></table></body></html>';

function explain(explaination) {
	if (!explaination_window || explaination_window.closed) {
		explaination_window = window.open('','explaination_window','width=500,height=250,scrollbars,status');
	}
	explaination_html = explaination_html_start;
	explaination_html += explaination;
	explaination_html += explaination_html_end;
	explaination_window.document.open();
	explaination_window.document.write(explaination_html);
	explaination_window.document.close();
	explaination_window.focus();
}

function checkLength(element,max_length) {
	the_length = element.value.length;
	explaination = 'This text is ';
	explaination += element.value.length;
	explaination += ' characters long.';
	if (element.value.length > max_length) {
		explaination += ' You must remove ' + (element.value.length - max_length) + ' characters.';
	}
	else {
		explaination += ' You may add ' + (max_length - element.value.length) + ' characters.';
	}
	explain(explaination);
}