function mediaPage(s,f){
	var hide = 'mediaSelection' + s;
	var show = 'mediaSelection' + f;
	document.getElementById(hide).style.display = 'none';
	document.getElementById(show).style.display = 'block';
	return false;}
function mediaSwap(a,t,n,tp){
	document.getElementById('mediaDisplay').innerHTML = '<img src="/images/refresh/media/mediaLoading.gif" alt="Loading..." class="mediaLoading"/>';
	if(!tp){var tp='true';}
	if(t=='video'){
		var video = '<object type="application/x-shockwave-flash" data="/library/FLVPlayer_Progressive.swf" width="369px" height="207px"><param name="movie" value="/library/FLVPlayer_Progressive.swf" /><param name="wmode" value="transparent"/><param name="FlashVars" value="&amp;MM_ComponentVersion=1&amp;skinName=/library/Corona_Skin_3&amp;streamName=' + a + '&amp;autoPlay=' + tp + '&amp;autoRewind=true" /><a title="You must install the Flash Plugin for your Browser in order to view this component." href="http://www.macromedia.com/shockwave/download/alternates/" target="_blank"><img src="/images/refresh/noFlash.jpg" width="369px" height="207px" alt="You must install the Flash Plugin for your Browser in order to view this component."/></a></object>';
		document.getElementById('mediaDisplay').innerHTML = video;
	}
	else{
		var imageSize = new Image();
		imageSize.onload=function(){
			var height = imageSize.height;
			var width = imageSize.width;
			var zi = '';
			if(imageSize.height > 207){
				height = 207;
				width = Math.round(imageSize.width/(imageSize.height/207));
				zi = '<div class="zoomIcon"></div>';
			}
			if(imageSize.height < 207){
				height = 207;
				width = Math.round(imageSize.width/(imageSize.height/207));
			}
			var image = '<img src="' + a + '" width="' + width + 'px" height="' + height + 'px" alt="' + n +' Screenshot"/><a href="/library/viewscreen.php?name=' + n + '&width=' + imageSize.width + '&height' + imageSize.height + '=&image=' + a + '" onclick="return screenPopup(\'/library/viewscreen.php?name=' + n + '&width=' + imageSize.width + '&height' + imageSize.height + '=&image=' + a + '\',' + imageSize.height + ',' + imageSize.width + ')">' + zi + '</a>';
			document.getElementById('mediaDisplay').innerHTML = image;
		}
		imageSize.src = a;
	}
	return false;}
function screenPopup(a,h,w){
	pageTracker._trackEvent('FullSizeImage', 'Click');
	var dimensions = 'height=' + (h+123) + ',width=' + (w+30);
	screenWindow = window.open(a,'name',dimensions);
	if(window.focus){screenWindow.focus();}
	return false;}