
var checkOpenerFocusTID;

checkOpenerFocusTID = setInterval('checkOpenerFocus()',200);

opener.focusStatus = 0;

function checkOpenerFocus()
{
	if (opener.focusStatus == 1) 
	{
		self.focus();
		opener.focusStatus = 0;
	}
}		

function ReturnImageURLToOpener(sUrl, sThumbUrl, sFullImageUrl, sCaption, sImageId)
{
	// Return the url of the image to the calling page
    if (window.opener && !window.opener.closed) 
	{ 
		// Call the javascript in the calling form 
		window.opener.InsertImageFromPopup(sUrl, sThumbUrl, sFullImageUrl, sCaption, sImageId); 

		//done 
		window.close(); 
    } 
}

function ReturnLinkURLToOpener(sText, sUrl, sTarget)
{
	// Return the url to the calling page
	if (window.opener && !window.opener.closed) 
	{ 
		// Call the javascript in the calling form 
		window.opener.InsertURLFromPopup(sText, sUrl, sTarget); 

		//done 
		window.close(); 
    } 
}




