var textSize = 'small';

function changeImage( theImage, changeTo ) {
	theImage.src = changeTo;
}

function changeNavImage( theImage, changeTo ) {
	theImage.src = changeTo;
}

function setTextSize( size, location ) {

	textSize = size;

	var file = location + 'styles/' + size + '_text.css';
	var textStyle = document.getElementById('textStyle');
	textStyle.href = file;
	
	if( size == 'small' ) {
		var smallText = document.getElementById('smallText');
		smallText.src = location + 'images/text/small_on.gif';
		var largeText = document.getElementById('largeText');
		largeText.src = location + 'images/text/large_off.gif';
		
		// to fix the redraw overlap problem
		window.location.reload();
	} else  {
		var smallText = document.getElementById('smallText');
		smallText.src = location + 'images/text/small_off.gif';
		var largeText = document.getElementById('largeText');
		largeText.src = location + 'images/text/large_on.gif';
	}
	
}

function mouseOver( theImage, size, location ) {
	if( size != textSize ) {
		theImage.src = location + 'images/text/' + size + '_over.gif';
	}
}

function mouseOut( theImage, size, location ) {
	if( size == textSize ) {
		theImage.src = location + 'images/text/' + size + '_on.gif';
	} else {
		theImage.src = location + 'images/text/' + size + '_off.gif';
	}
}

function menuexpand(id) {
	if( document.getElementById(id).style.display == 'none' ) {
		document.getElementById(id).style.display = 'block';
	} else {
		document.getElementById(id).style.display = 'none';
	}
}

function openMovie(type) {

	var width = '820';
	var height = '505';
	
	var win = window.open('../../motion_media/'+type+'_viewer.html', type,'HEIGHT='+height+',WIDTH='+width+',toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=no');
}
