// Set a few variables

var otherWin = null;
var otherWinP = null;
var popupWidth=740;
var popupHeight=400;
var popupScroll='yes';
var popupResize='yes';
var popupLeft='1';

// ----------------------------------------------------------------------------
// Open other popups

function openPopUp() {
	var theParameters = new Array(
		'theURL',
		'popupWidth',
		'popupHeight',
		'popupScroll',
		'popupResize',
		'popupLeft');
		
	for (i=0; i < (openPopUp.arguments.length); i++) {
		theVar = theParameters[i];
		theValue = openPopUp.arguments[i];
		eval(theVar + "= theValue");
	}

	if (otherWin) {
		if(otherWin.closed==false) {
			otherWin.close();
		}
	otherWin=opendetails(theURL,popupWidth,popupHeight,popupScroll,popupResize,popupLeft,'1','popInfo');
	}
	else	{
	otherWin=opendetails(theURL,popupWidth,popupHeight,popupScroll,popupResize,popupLeft,'1','popInfo')
	}
}

// Open detail window

function opendetails(theURL,popupWidth,popupHeight,scrollBars,resizable,left,top,windowName)	{
	detailswin = null;
	detailsDetails = 'scrollbars=' + scrollBars + ',resizable=' + resizable + ',width=' + popupWidth + ',height=' + popupHeight +  ',left=' + left + ',top=' + top;
	detailswin=window.open(theURL,windowName,detailsDetails);
	detailswin.focus();
	return (detailswin);
}

function closePopUp(theWin)	{
	if (theWin) {
		if(theWin.closed==false) {
			theWin.close()
		}
	}
}

