var TheWindow

function OpenWindow(TheURL,TheTop,TheLeft,TheHeight,TheWidth,ScrollYesNo,ResizeYesNo,LocationYesNo,StatusYesNo,ToolbarYesNo,MenubarYesNo)
{

	try
	{TheWindow.close()}
	catch(e)
	{}

	now = new Date()
	WinName = Date.parse(now)

	if (TheTop == "")
	{WinTop = screen.height/2 - (TheHeight/2)}
	else
	{WinTop = TheTop}

	if (TheLeft == "")
	{WinLeft = screen.width/2 - (TheWidth/2)}
	else
	{WinLeft = TheLeft}

	TheWindow = eval("window.open('" + TheURL + "','" + WinName + "','top=" + WinTop + ",left=" + WinLeft + ",width=" + TheWidth + ",height=" + TheHeight + ",scrollbars=" + ScrollYesNo + ",resizable=" + ResizeYesNo + ",location=" + LocationYesNo + ",status=" + StatusYesNo + ",toolbar=" + ToolbarYesNo + ",menubar=" + MenubarYesNo + "')")

}


function LoadPage(FormInfo)
{

	if (FormInfo.options[FormInfo.selectedIndex].value == "")
	{FormInfo.selectedIndex = 0}

	else
	{

		WindowArray = FormInfo.options[FormInfo.selectedIndex].value.split(",")

		now = new Date()
		WinName = now.getMilliseconds()
		
		if (WindowArray.length > 2)
		{
			
			TheURL = WindowArray[0]
			TheTop = WindowArray[1]
			TheLeft = WindowArray[2]
			TheHeight = WindowArray[3]
			TheWidth = WindowArray[4]
			ScrollYesNo = WindowArray[5]
			ResizeYesNo = WindowArray[6]
			LocationYesNo = WindowArray[7]
			StatusYesNo = WindowArray[8]
			ToolbarYesNo = WindowArray[9]
			MenubarYesNo = WindowArray[10]

			FormInfo.selectedIndex = 0

			if (TheWindow != null && !TheWindow.closed)
			{TheWindow.close()}

			if (TheTop == "")
			{WinTop = screen.height/2 - (TheHeight/2)}
			else
			{WinTop = TheTop}

			if (TheLeft == "")
			{WinLeft = screen.width/2 - (TheWidth/2)}
			else
			{WinLeft = TheLeft}

			window.focus()

			TheWindow = eval("window.open('" + TheURL + "','newWin','top=" + WinTop + ",left=" + WinLeft + ",width=" + TheWidth + ",height=" + TheHeight + ",scrollbars=" + ScrollYesNo + ",resizable=" + ResizeYesNo + ",location=" + LocationYesNo + ",status=" + StatusYesNo + ",toolbar=" + ToolbarYesNo + ",menubar=" + MenubarYesNo + "')")
		
		}
	
		else 
		{

			target = WindowArray[1]
	
			if (target == "top")
			{top.parent.location.href = WindowArray[0]}
			else if (target == "self")
			{self.location.href = WindowArray[0]}
			else
			{
			parent.frames[target].location.href = WindowArray[0]
			FormInfo.selectedIndex=0
			parent.frames[target].focus()
			}
		
		}

	}

}