function focusBox(firstBoxName,secondBoxName)
{
	var nameBox = document.getElementById(firstBoxName);
	var passBox = document.getElementById(secondBoxName);
	if(nameBox.value.length == 0)
	{
		nameBox.focus();
	}
	else
	{
		passBox.focus();
	}
}

function openApplicationWindow(url)
{			
	if (url.length > 0 && document.all)
	{				
		//orgw = document.body.clientWidth;
		//orgh = document.body.clientHeight;
		orgw = screen.availWidth;
		orgh = screen.availHeight;
		x = 0;//window.screenTop;
		y = 0;//window.screenLeft;
		//alert(orgw + "X" + orgh + "\n" + x + ","+y);
		PARMS = 'status=YES,resizable=YES' + 
			',outerWidth='  + orgw + 
			',outerHeight=' + orgh +
			',screenX=' + x +
			',screenY=' + y;
		var newWin = null;
		//newWin = self.open(url, window.name, PARMS);
		if(newWin != null)
		{
			newWin.moveTo(y,x);				
			self.opener = top;
			self.close();
		}				
		else
		{
			self.location = url;
		}
	}
}
function closeMars()
{
	if(!self.opener)
	{
		self.opener = top;
	}
	self.close();
}
