function scene_on(scene){
	if(document.images){
		var selected = eval('document.scene');
		selected.src = 'images/analyze_nav_' + scene + '.gif';
	}
}


function scene_off(scene){
	if(document.images){
		var selected = eval('document.scene');
		selected.src = 'images/analyze_nav_off.gif';
	}
}


function on(choice){
	if(document.images){
		var chosen = eval('document.' + choice);
		chosen.src = 'images/analyze_nav_' + choice + '_over.gif';
	}
}


function off(choice){
	if(document.images){
		var chosen = eval('document.' + choice);
		chosen.src = 'images/analyze_nav_' + choice + '.gif';
	}
}



var timeout_formatId;

function reset_FormatMenu(imgRurl) {
	if(document.images) {
   		document.format.src=imgRurl;
	}
}


function format_on(pick){
	clearTimeout(timeout_formatId);
	if(document.images){
		var format = eval('document.format');
		format.src = 'images/popup_nav_' + pick + '.gif';
	}
}

function format_off(pick){
	if(document.images){
		var default_img = 'images/popup_nav_' + pick + '.gif';
		timeout_formatId = setTimeout("reset_FormatMenu(\"" + default_img + "\")",10);
	}
}


function set_on(pick, type){
	if(document.images){
		if(type == 'hobbs'){
			var set = eval('document.hobbs');
			set.src = 'images/sets_nav_hobbs_on.jpg';
		} else if (type == 'sets'){
			var set = eval('document.sets');
			set.src = 'images/sets_nav_' + pick + '.jpg';
		} else if (type == 'costumes'){
			var costume = eval('document.costumes');
			costume.src = 'images/costumes_nav_' + pick + '.jpg';
		}
	}
}

function set_off(type){
	if(document.images){
		if (type == 'hobbs'){
			var default_img = eval('document.hobbs');
			default_img.src = 'images/sets_nav_hobbs.jpg';
		} else if (type == 'sets'){
			var default_img = eval('document.sets');
			default_img.src = 'images/sets_nav_off.jpg';
		} else if (type == 'costumes'){
			var default_img = eval('document.costumes');
			default_img.src = 'images/costumes_nav_off.jpg';
		}
	}
}


function pop(scene, format){
	var script = scene + "_script.html";
	var storyboard = scene + "_storyboard.html";
	var film = scene + "_film.html";
	var hobbs = "sets_hobbs_01.html";
	var sets = "sets_" + scene + "_01.html";
	var costumes_lo = "costumes_" + scene + "_lo.html";
	var costumes_hi = "costumes_" + scene + "_hi.html";
	if (format == 'script'){
				var script_win = window.open(script,'script_win','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=437,height=437');
				script_win.focus();
	} else if (format == 'storyboard') {
				var storyboard_win = window.open(storyboard,'storyboard_win','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=437,height=437');
				storyboard_win.focus();
	} else if (format == 'film') {
				var film_win = window.open(film,'film_win','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=437,height=437');
				film_win.focus();
	} else if (format == 'hobbs') {
				var hobbs_win = window.open(hobbs,'hobbs_win','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=437,height=437');
				hobbs_win.focus();
	} else if (format == 'sets') {
				var sets_win = window.open(sets,'sets_win','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=437,height=437');
				sets_win.focus();
	} else if (format == 'costumes_lo') {
				var costumes_lo_win = window.open(costumes_lo,'costumes_lo_win','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=640,height=480');
				costumes_lo_win.focus();
	} else if (format == 'costumes_hi') {
				var costumes_hi_win = window.open(costumes_hi,'costumes_hi_win','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=320,height=500');
				costumes_hi_win.focus();
	}
	return false;
}

function sketch_pop(person){
	if (person == 'steerpike'){
		var sketch = "../novels/trilogy_sketches_12.html";
	} else if (person == 'prunes'){
		var sketch = "../novels/trilogy_sketches_15.html";
	}
	var sketch_win = window.open(sketch,'sketch_win','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=437,height=437');
	sketch_win.focus();
	return false;
}
