﻿

//Modification History
//16/10/2007  julian Gates reworked popup scripts to work in Firefox browser.
var newwindow;
function popupWindow(url)
{
    xTop = 0;
	yTop = 0;
	height=screen.height-250
	width=screen.width -200
	newwindow=window.open(url, 'name', 'height='+height+',width='+width+',scrollbars=1,resizable=0,menubar=0,toolbar=0,status=1,location=0,directories=0,left=' + xTop + ',top=' + yTop + '');
}

	function popupWindowFixedSize(url)
	{
		xTop = 5;
		yTop = 5;
		height= 650;
		width= 900;
		newwindow = window.open(url, 'name', 'height='+height+',width='+width+',scrollbars=1,resizable=0,menubar=0,toolbar=0,status=0,location=0,directories=0,left=' + xTop + ',top=' + yTop + '');
	}
	
function SetReturnCommand(ReturnFormName,Command)
{
	eval('var theform = document.' + ReturnFormName + ';');
	newwindow.close();
	theform.item('txtCommandData').value = Command
	theform.submit()	
	
}	

function CloseWindow()
	{
		self.close;
	}	
	
function SetReturn(ReturnFormName,Command)
{
	eval('var theform = document.' + ReturnFormName + ';');
	theform.item('txtCommandData').value = Command
	theform.submit()
	//confirm(theform)
}	

	function popupWindowDynamic(url,height1,width1,xtop1,ytop1)
	{
		xTop = xtop1;
		yTop = ytop1;
		height= height1;
		width= width1;
		newwindow = window.open(url, 'name', 'height='+height+',width='+width+',scrollbars=1,resizable=0,menubar=0,toolbar=0,status=0,location=0,directories=0,left=' + xTop + ',top=' + yTop + '');
	}
