<!--
var tvWin = null;
var popupScroll='no';
var resizable='yes';

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");
	}

	if (isOpen(detailswin))	{
			close_Details_Window(detailswin);
	}
	
	opendetails(theURL,popupWidth,popupHeight,popupScroll,resizable);
}

function opendetails(theURL,theWidth,theHeight,theScroll,theResizable)	{

detailsDetails = 'scrollbars=' + theScroll + ',resizable=' + theResizable + ',width=' + theWidth + ',height=' + theHeight +  ',left=1,top=1';
detailswin=window.open(theURL,'imagedetails',detailsDetails);
		openeddetails=true;
}

function close_win()	{
	close_Details_Window(detailswin);
}

function close_Details_Window(theWin)	{
	if (isOpen(theWin)) {
		theWin.close()
		}
}

function isOpen(theWindow)	{
	var isItOpen=false;
	if(theWindow)	{
		if(theWindow.closed==false)	{
			isItOpen=true;
		}
	}
	return isItOpen;
}


// ----------------------------------------------------------------------------
// Open TV Popup; takes arguments bw (bandwidth) and video filename

function openTV(bw,videoFN) {
	
	if (tvWin != null)	{
		if (tvWin.closed == false)	{
			tvWin.close();
		}
	}

	if(bw=='audio')	{
		theWidth=315;
		theHeight=100;
	}
	else if(bw=='low')	{
		theWidth=430;
		theHeight=260;
	}
	else	{
		theWidth=580;
		theHeight=347;
	}
	theURL = "../video/tv_" + bw + ".html?" + videoFN;
	
	if (tvWin) {
		if(tvWin.closed==false) {
			tvWin.focus();
		}
		else	{
			tvWin = opendetails(theURL,theWidth,theHeight,'no','no','150','1','theTV','no');
		}
	}
	else	{
		tvWin = opendetails(theURL,theWidth,theHeight,'no','no','150','1','theTV','no');
	}
}

//-->
