// JavaScript Document

	function fade_in() {
		window.setTimeout('fade("client_image", "in", 500)', 101);
	}
	
	function load_client(num) {
		
	}
	
	// let's swap the featured image.  First check that the image has indeed been changed
	var current_fn = '';
	function swap_client(fn) {
		if (current_fn !== fn) {
			current_fn = fn;
			fade("client_image", "out", 100);
			window.setTimeout("document.getElementById('client_image').src = '" + fn + "'", 100);
		}
	}

	client_selected = 0;
	function load_client(el, photo_filename, info_filename) {
		if (client_selected !== el) {
			// restore previous highlighted element to normal state
			if (document.getElementById("cl_"+client_selected)) {
				document.getElementById("cl_"+client_selected).className = '';
			}
			client_selected = el;
		
			// highlight new element
			document.getElementById("cl_"+el).className = 'selected';
		
			// preview window
			swap_client("images/" + photo_filename);
		
			// ajax the content window
			loader(info_filename+'.php', 'ajax');
		}
	}
