<!--
var popupScroll='no';
var resizable='yes';
var theWidth1;
var theHeight1;
var detailswin;


function open_Details_Window() {
	var theParameters = new Array(
		'theURL',
		'popupWidth',
		'popupHeight',
		'popupScroll',
		'resizable'
		);
	
	for (i=0; i < (open_Details_Window.arguments.length); i++) {
		theVar = theParameters[i];
		theValue = open_Details_Window.arguments[i];
		eval(theVar + "= theValue");
	}
	//detailswin.close();
	if (isOpen(detailswin))	{
			close_Details_Window(detailswin);
	}
	return(opendetails(theURL,popupWidth,popupHeight,popupScroll,resizable));
}

function open_Details_Window1() {
	var theParameters = new Array(
		'theURL',
		'popupWidth',
		'popupHeight',
		'popupScroll',
		'resizable'
		);
	
	for (i=0; i < (open_Details_Window1.arguments.length); i++) {
		theVar = theParameters[i];
		theValue = open_Details_Window1.arguments[i];
		eval(theVar + "= theValue");
	}

	
			//detailswin.close();
	
if (isOpen(detailswin))	{
			close_Details_Window(detailswin);
	}
	
	opendetails(theURL,popupWidth,popupHeight,popupScroll,resizable);
}


function open_Details_Window2() {
	
	var theParameters = new Array(
		'theURL',
		'popupWidth',
		'popupHeight',
		'popupScroll',
		'resizable'
		
		);
	
	for (i=0; i < (open_Details_Window.arguments.length); i++) {
		theVar = theParameters[i];
		theValue = open_Details_Window.arguments[i];
		eval(theVar + "= theValue");
	}
	
	//detailswin.close();
	
	if (isOpen(detailswin2))	{
			close_Details_Window(detailswin2);
	}
	
	return(opendetails2(theURL,popupWidth,popupHeight,popupScroll,resizable));
}



function opendetails(theURL,theWidth,theHeight,theScroll,theResizable)	{
theWidth1 = theWidth;
theHeight1 = theHeight;

detailsDetails = 'scrollbars=' + theScroll + ',resizable=' + theResizable + ',width=' + theWidth + ',height=' + theHeight +  ',left=500,top=175';
detailswin=window.open(theURL,'imagedetails',detailsDetails);
		openeddetails=true;
if (window.focus) {detailswin.focus()}
return(detailswin);

}

function opendetails2(theURL,theWidth,theHeight,theScroll,theResizable)	{
theWidth1 = theWidth;
theHeight1 = theHeight;

detailsDetails = 'scrollbars=' + theScroll + ',resizable=' + theResizable + ',width=' + theWidth + ',height=' + theHeight +  ',left=100,top=40';
detailswin2=window.open(theURL,'imagedetails',detailsDetails);
		openeddetails2=true;
if (window.focus) {detailswin2.focus()}
return(detailswin2);

}

function close_win()	{
	close_Details_Window(detailswin);
}

function close_Details_Window(theWin)	{
	if (theWin) {
		theWin.close()
		}
}

function close_Details_Window1(theWin)	{
	if (theWin) {
		theWin.close()
		}
}

function isOpen(theWindow)	{
	var isItOpen=false;
	if(theWindow)	{
		if(theWindow.closed==false)	{
			isItOpen=true;
		}
	}
	return isItOpen;
}



function playMedia(baseName,caption,type)	{
	if(type == null)	{
		type = 'v';
	}
	if(type == 'v')	{	// If it's video...
		PBSVideoWindow_X=580;
		PBSVideoWindow_Y=360;
		var pbsArgs = "playertemplate=/greatwar/media_players/videowindow.html";
		var mediaTypes = "_lo.rm,_hi.rm";
	}	else	{
		PBSAudioWindow_X=460;
		PBSAudioWindow_Y=145;
		var pbsArgs = "playertemplate=/greatwar/media_players/audiowindow.html";
		var mediaTypes = "_36.rm";
	}
	var pbsPrefix = "/greatwar/";
	var pbsMediaString = "";
	var mediaTypesArray;
	mediaTypesArray = mediaTypes.split(",");
	for(x=0;x<mediaTypesArray.length;x++)	{
		if(x != 0)	{
			pbsMediaString = pbsMediaString + ",";
		}
		pbsMediaString = pbsMediaString + pbsPrefix + baseName + mediaTypesArray[x];
	}
	if(type == 'v')	{	// If it's video...
		launchPBSVideoPlayer(pbsMediaString,caption,pbsArgs);
	}	else	{
		launchPBSAudioPlayer(pbsMediaString,caption,pbsArgs);
	}
}

function showFlash()	{
	var swfName = showFlash.arguments[0];
	var swfW = showFlash.arguments[1];
	var swfH = showFlash.arguments[2];
	var swfBgcolor = showFlash.arguments[3];
	if (PBS_FlashCanPlay(5)) {
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
		
		document.write('  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" ');

		document.write(' id="' + swfName + '" width="' + swfW + '" height="' + swfH + '">');
		
		document.write('<param name="movie" value="' + swfName + '.swf"><param name="quality" value="high"><param name="bgcolor" value="#' + swfBgcolor + '">');

		document.write('<embed src="' + swfName + '.swf" quality="high" bgcolor="#' + swfBgcolor + '" autostart="false"');
		document.write(' swLiveConnect="false" width="' + swfW + '" height="' + swfH + '" name="' + swfName + '"');
		document.write(' TYPE="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer">');
		document.write('</embed>');
		document.write('</object>');
	} else{
		for (i=4; i < (showFlash.arguments.length); i+=4)	{
			document.write('<img src="../images/' + showFlash.arguments[i] + '" width="' + showFlash.arguments[i+2] + '" height="' + showFlash.arguments[i+3] + '" border="0" hspace="0" vspace="0" alt="' + showFlash.arguments[i+1] + '">');
		}
	}
}

function showglossary(isHome)	{
	if(isHome==null)	{
		thePrefix = "../";
	}	else	{
		thePrefix = "";
	}
	open_Details_Window(thePrefix + 'resources/glossary_pop.html','490','400','yes','yes');
}

//-->
