/**
  * This function checks that the date is not in the past.
  */
function checkValidDate(sDay, sMonth, sYear, sErrorMessage)
{
	var iDay = sDay.value;
	var iMonth = sMonth.value;
	var iYear = sYear.value;
	
	today = new Date();
	if (iYear<today.getYear() || (iYear==today.getYear() && iMonth<today.getMonth()) || (iYear==today.getYear() && iMonth==today.getMonth() && iDay < today.getDate()) )
	{
		alert(sErrorMessage);
		return false;
	}
	return true;
}
/** 
 * This function sets the focus to the specified window.
 */
function initScreen(wind)
{
	wind.focus();
}

function showWindow( m_url, winname, winwidth, winheight, wndparams)
{
	if ((winname == null) || (winname == "")) winname = "lvs";
	
	winleft = (screen.availWidth / 2) - (winwidth / 2);
	wintop = (screen.availHeight / 2) - (winheight / 2);
	
	if (wndparams == null) wndparams = "scrollbars=no,resizable=no";
	oWinInfo=(window.open(m_url, winname,"left=" + winleft + ",top=" + wintop + ",width=" + winwidth + ",height=" + winheight + "," + wndparams));
	//	registerWindow(oWinInfo);
	if (navigator.appName != "Microsoft Internet Explorer") {
		if(oWinInfo.self != null)  oWinInfo.focus();
	}
}
	

