// JavaScript Document
function openPopUp(theURL) {

	if (openeddetails) {
		if(detailswin.closed==false) {
			detailswin.location.href=theURL;
			detailswin.focus();
		}
		else	{
			opendetails(theURL,popupWidth,popupHeight);
		}
	}
	else	{
		opendetails(theURL,popupWidth,popupHeight)
	}
}

function opendetails(theURL,popupWidth,popupHeight)	{

detailsDetails = 'scrollbars=yes,resizable=yes,width=' + popupWidth + ',height=' + popupHeight +  ',left=1,top=1';
detailswin=window.open(theURL,'example',detailsDetails);
		openeddetails=true;
}

function closePopUp(theWin)	{
	if (theWin) {
		theWin.close()
		}
}