function printArticle() {
	if (window.print) {
		setTimeout('window.print();', 333);
	}
	else if (agt.indexOf("mac") != -1) {
		alert("Press 'Cmd+p' on your keyboard to print article.");
	}
	else {
		alert("Press 'Ctrl+p' on your keyboard to print article.")
	}
}

function open_me(gohere, width, height) {
	window.open(gohere, "popup", config="width="+width+",height="+height+",scrollbars=yes,toolbar=no,menubar=yes,resizable=no,top=0,left=0");
}

function fadeBox (container_element) {
	new Effect.Opacity(container_element, {duration:0.0, from:1.0, to:0.2});
}

function fadeIn(container_element, element_to_show) {
	// First hide all other div's.  This ensures a consistent effect
	$$('div.' + container_element).each(
		function(d) {
			if (d.id != element_to_show) { 
				Effect.Fade(d.id, {duration: 0.2, queue:{scope:'myscope', position:'end'}}); 
			}
	} );
	// Then Show the correct div.  This ensures a consistent effect
	$$('div.' + container_element).each(
		function(d) {
			if (d.id == element_to_show) {
				Effect.Appear(d.id, {duration: 0.5, queue:{scope:'myscope', position:'end'}});
			}
	} );
}

function changeThumbnailState(current_at_state) {
	for (i=1;i<=8;i++) { 
		var curr_thumb = "thumb" + i;
		if (document.getElementById(curr_thumb)) {
			if (curr_thumb != current_at_state) {
				document.getElementById(curr_thumb).className = "project_thumbnail";
			} else {
				document.getElementById(curr_thumb).className = "project_thumbnail_at";
			}
		}
	}
}