/* -------------------------------------------------------
 :: popup.js 3.7.30 :: Set of Popup functions
                                                            
-------------------------[ (c)2002 nataniel@xpect.pl ]--- */

var oPopup;
var oPopupBody;

if (IEVersion() > 5)
{
	oPopup = window.createPopup();
	oPopupBody = oPopup.document.body;
}

function ShowPopup(pWidth, pHeight)
{
	if (IEVersion() > 5)
	{
		if (typeof pHeight == 'undefined')
		{
			oPopup.show(0, 0, pWidth, 0);
			pHeight = oPopupBody.scrollHeight;
			
			// Hides the dimension detector popup object.
			oPopup.hide();
		}
		
		// Shows the actual popup object with correct height.
		oPopup.show(15, 25, pWidth, pHeight, event.srcElement);
	}
}
	
function HidePopup()
{
	if (IEVersion() > 5)
	{
		oPopup.hide();
	}
}

function PopupLayer(pID, pWidth, pHeight)
{
	if (IEVersion() > 5)
	{
		oPopupBody.innerHTML = document.getElementById(pID).innerHTML;
		if (typeof pHeight != 'undefined')
		{
			ShowPopup(pWidth, pHeight);
		}
		else
		{
			ShowPopup(pWidth);
		}
	}
}

function PopupText(pText, pWidth)
{
	if (IEVersion() > 5)
	{
		oPopupBody.innerHTML = '<DIV STYLE="font-size: 9px; font-family: Verdana; background: #FFFFE7; border: solid; border-width: 1px; border-color: #000000; padding: 4px 4px 4px 4px">'
			+ pText + '</DIV>';
		ShowPopup(pWidth);
	}
}

function PopupWindow(pFileName, pForce)
{
	return PopupWindowXY(pFileName, 'popup', 400, 510, pForce);
}

function PopupWindowXY(pFileName, x, y, pScrollbars, pWindowName)
{
	if (typeof pWindowName == 'undefined')
	{
		pWindowName = 'popup';
	}
	
	if (typeof pScrollbars != 'undefined')
	{
		if (pScrollbars) {
			return window.open(pFileName, pWindowName, 'toolbar=no, scrollbars=yes, directories=no, status=no, menubar=no, resizable=no, width='+x+', height='+y);
		} else {
			return window.open(pFileName, pWindowName, 'toolbar=no, scrollbars=no, directories=no, status=no, menubar=no, resizable=no, width='+x+', height='+y);
		}
	}
	else
	{
		return window.open(pFileName, pWindowName, 'toolbar=no, scrollbars=auto, directories=no, status=no, menubar=no, resizable=no, width='+x+', height='+y);
	}
}

