// JavaScript Documentfunction changeMediaDisplay(media){	media = media;	mediaTypes = Array("still", "slideshow", "scaled_still", "swf", "quicktime", "high_bandwidth", "bigger_image");				for(var i in mediaTypes){		document.getElementById(mediaTypes[i]).style.display = "none";	//	document.getElementById(mediaTypes[i]).style.position= "absolute";		document.getElementById(mediaTypes[i]).style.left = "0px";		document.getElementById(mediaTypes[i]).style.zIndex = 40+i;					}	document.getElementById(media).style.display = "block";	//document.getElementById(media).style.position = "relative";		document.getElementById(media).style.left = "0px";	document.getElementById(media).style.zIndex = "70";			if(media == 'scaled_still'){		document.getElementById('hide_scale').style.display = "block";		document.getElementById('hide_scale').style.zIndex = "80";		document.getElementById('show_scale').style.display = "none";		document.getElementById('show_scale').style.zIndex = "90";	}	if(media == 'still'){		document.getElementById('hide_scale').style.display = "none";		document.getElementById('hide_scale').style.zIndex = "80";		document.getElementById('show_scale').style.display = "block";		document.getElementById('show_scale').style.zIndex = "90";				closeScaleImageWindow();			}	if(media != 'quicktime'){		hideQuicktime('quicktime');	}	if(media != 'swf'){		hideFlash('swf');	}}function showHideButton(media){	media = media;	if(media == 'how_we_did_it_show'){		document.getElementById('how_we_did_it_hide').style.display = "none";		document.getElementById('how_we_did_it_hide').style.zIndex = "80";		document.getElementById('how_we_did_it_show').style.display = "block";		document.getElementById('how_we_did_it_show').style.zIndex = "90";			}	if(media == 'how_we_did_it_hide'){		document.getElementById('how_we_did_it_show').style.display = "none";		document.getElementById('how_we_did_it_show').style.zIndex = "80";		document.getElementById('how_we_did_it_hide').style.display = "block";		document.getElementById('how_we_did_it_hide').style.zIndex = "90";	}	if(media == 'video_stills_button_show'){		document.getElementById('video_stills_button_hide').style.display = "none";		document.getElementById('video_stills_button_hide').style.zIndex = "170";		document.getElementById('video_stills_button_show').style.display = "block";		document.getElementById('video_stills_button_show').style.zIndex = "180";				document.getElementById('swf_button_show').style.display = "block";		document.getElementById('swf_button_show').style.zIndex = "170";				//document.getElementById('swf_button_hide').style.display = "none";		//document.getElementById('swf_button_hide').style.zIndex = "180";				//document.getElementById('quicktime_button_show').style.display = "block";		//document.getElementById('quicktime_button_show').style.zIndex = "170";		//document.getElementById('quicktime_button_hide').style.display = "none";		//document.getElementById('quicktime_button_hide').style.zIndex = "180";		//document.getElementById('hide_scale').style.display = "none";		//document.getElementById('hide_scale').style.zIndex = "80";		//document.getElementById('show_scale').style.display = "block";		//document.getElementById('show_scale').style.zIndex = "90";	}	if(media == 'video_stills_button_hide'){		document.getElementById('video_stills_button_show').style.display = "none";		document.getElementById('video_stills_button_show').style.zIndex = "170";		document.getElementById('video_stills_button_hide').style.display = "block";		document.getElementById('video_stills_button_hide').style.zIndex = "180";				document.getElementById('hide_scale').style.display = "none";		document.getElementById('hide_scale').style.zIndex = "80";		document.getElementById('show_scale').style.display = "block";		document.getElementById('show_scale').style.zIndex = "90";	}	if(media == 'swf_button_show'){		document.getElementById('swf_button_hide').style.display = "none";		document.getElementById('swf_button_hide').style.zIndex = "170";		document.getElementById('swf_button_show').style.display = "block";			document.getElementById('swf_button_show').style.zIndex = "180";				document.getElementById('quicktime_button_show').style.display = "block";		document.getElementById('quicktime_button_show').style.zIndex = "170";		document.getElementById('quicktime_button_hide').style.display = "none";		document.getElementById('quicktime_button_hide').style.zIndex = "180";				document.getElementById('video_stills_button_hide').style.display = "none";		document.getElementById('video_stills_button_hide').style.zIndex = "170";		document.getElementById('video_stills_button_show').style.display = "block";			document.getElementById('video_stills_button_show').style.zIndex = "180";					document.getElementById('hide_scale').style.display = "none";		document.getElementById('hide_scale').style.zIndex = "80";		document.getElementById('show_scale').style.display = "block";		document.getElementById('show_scale').style.zIndex = "90";}	if(media == 'swf_button_hide'){		document.getElementById('swf_button_show').style.display = "none";		document.getElementById('swf_button_show').style.zIndex = "170";		document.getElementById('swf_button_hide').style.display = "block";		document.getElementById('swf_button_hide').style.zIndex = "180";		document.getElementById('hide_scale').style.display = "none";		document.getElementById('hide_scale').style.zIndex = "80";		document.getElementById('show_scale').style.display = "block";		document.getElementById('show_scale').style.zIndex = "90";	}	if(media == 'quicktime_button_show'){		document.getElementById('video_stills_button_hide').style.display = "none";		document.getElementById('video_stills_button_hide').style.zIndex = "170";		document.getElementById('video_stills_button_show').style.display = "block";		document.getElementById('video_stills_button_show').style.zIndex = "180";				document.getElementById('swf_button_hide').style.display = "none";		document.getElementById('swf_button_hide').style.zIndex = "170";		document.getElementById('swf_button_show').style.display = "block";		document.getElementById('swf_button_show').style.zIndex = "180";				document.getElementById('quicktime_button_hide').style.display = "none";		document.getElementById('quicktime_button_hide').style.zIndex = "170";		document.getElementById('quicktime_button_show').style.display = "block";		document.getElementById('quicktime_button_show').style.zIndex = "180";		document.getElementById('hide_scale').style.display = "none";		document.getElementById('hide_scale').style.zIndex = "80";		document.getElementById('show_scale').style.display = "block";		document.getElementById('show_scale').style.zIndex = "90";}	if(media == 'quicktime_button_hide'){		document.getElementById('quicktime_button_show').style.display = "none";		document.getElementById('quicktime_button_show').style.zIndex = "170";		document.getElementById('quicktime_button_hide').style.display = "block";		document.getElementById('quicktime_button_hide').style.zIndex = "180";	}		if(media == 'scaled_still'){		document.getElementById('hide_scale').style.display = "block";		document.getElementById('hide_scale').style.zIndex = "80";		document.getElementById('show_scale').style.display = "none";		document.getElementById('show_scale').style.zIndex = "90";	}		if(media == 'still'){		document.getElementById('hide_scale').style.display = "none";		document.getElementById('hide_scale').style.zIndex = "80";		document.getElementById('show_scale').style.display = "block";		document.getElementById('show_scale').style.zIndex = "90";	}		}//--- launch Bigger Imagevar BiggerImageWindow;function openBGImageWindow(directory, filename){	var theBigImage = directory + "/" + filename + "_800.jpg";	BiggerImageWindow = window.open(theBigImage,'BiggerImage','width=820,height=680, status=yes, directories=no, location=yes,toolbar=yes,resizable=yes,scrollbars=yes');	BiggerImageWindow.document.focus();	BiggerImageWindow.document.write('<html><head><title>Microscope Imaging Station: $assetInfo_name</title><\/head><body topmargin=\"10\" leftmargin=\"10\" rightmargin=\"10\" bottommargin=\"10\" bgcolor=\"#000000\"><img src=\"'+theBigImage+'\"><\/body><\/html>');}function closeBGImageWindow(){if (BiggerImageWindow && !BiggerImageWindow.closed){		BiggerImageWindow.close();	}}//--- launch Scale Bar windowvar ScaleImageWindow;function openScaleImageWindow(directory, filename){	var theScaleImage = directory + "/" + filename + "_320_scale.jpg";	ScaleImageWindow = window.open("","ScaleImage","width=340,height=500, status=yes, directories=yes, menubar=yes, location=yes,toolbar=yes,resizable=yes");	if (ScaleImageWindow.opener == null) {        ScaleImageWindow.opener = window;    }	ScaleImageWindow.document.body.innerHTML = "";	ScaleImageWindow.document.write("<html><head><title>Microscope Imaging Station:" + filename + " <\/title><\/head><body topmargin=\"0\" leftmargin=\"10\" rightmargin=\"10\" bottommargin=\"10\"> Image with scale bar <br /><img src=\""+theScaleImage+"\"> <br /> Save this image to your computer. You can use this still image as a scale reference for downloaded Quicktime movies.<\/body><\/html>");	ScaleImageWindow.document.body.bgColor="#000000";	ScaleImageWindow.document.body.style.color="#FFFFFF";	ScaleImageWindow.document.body.style.fontFamily="Verdana, Arial, Helvetic, sans-serif";	ScaleImageWindow.document.body.style.fontSize="0.8em";	ScaleImageWindow.focus();}function closeScaleImageWindow(){if (ScaleImageWindow && !ScaleImageWindow.closed){		ScaleImageWindow.close();	}}//--- launch Bigger Videovar HBVideoWindow;function openHBWindow(directory, filename, info_name, width, height){loadHBVideo = "hbvideo.php?Asset=" + info_name + "&Width="+ width + "&Height="+ height+ "&Location="+ directory+ "/"+ filename + "_hb.swf";theHBVideoWindowName = filename+ "_window";theHBDimensions = "width=" + width + ", height=" + height + ", status=yes, directories=no, location=yes,toolbar=yes,resizable=yes";HBVideoWindow = window.open(loadHBVideo,theHBVideoWindowName,theHBDimensions);HBVideoWindow.focus();}function closeHBVideoWindow(){if (HBVideoWindow && !HBVideoWindow.closed){		HBVideoWindow.close();	}}function showFlash(filename, target, width, height){target=target;document.getElementById(target).innerHTML = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='" + width + "' height='" + height + "' accesskey='f' tabindex='1' >  <param name='movie' value='"+ filename + "' />				    <param name='quality' value='high' /> <param name='bgcolor' value='#554E49' />  <embed src='"+ filename + "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='" + width + "' height='" + height + "' bgcolor=\"#554E49\"'></embed> </object>";}function hideFlash(target){target=target;document.getElementById(target).innerHTML = "";}function hideQuicktime(target){target=target;document.getElementById(target).innerHTML = "";}function showQuicktime(filename, target, width, height){target=target;document.getElementById(target).innerHTML = "<object classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' codebase='http://www.apple.com/qtactivex/qtplugin.cab' width='" + width + "' height='" + height + "'>				<param name='cache' value='true'>		<param name='src' value='" + filename + "'> <param name='autoplay' value='true'>				<param name='controller' value='true'> 		<param name='bgcolor' value='000000'>	<embed width='" + width + "' height='" + height + "' pluginspage='http://www.apple.com/quicktime/download/' src='" + filename + "' type='video/quicktime' controller='true' autoplay='true' cache='true' bgcolor='black' ></object>";}
