
/*
 * openCurrentWindow
 * Copyright EuroForm june 10, 2002 by Kenneth Lund
 *
*/

function OpenCurrentWindow(strURL)
{
	document.location = strURL;
}

/*********************************************************/

/*
 * openNewWindow
 * Copyright EuroForm june 10, 2002 by Kenneth Lund
 *
*/

function openNewWindow(strURL)
{
	window.open(strURL);
}

/*********************************************************/

/*
 * openPopUpWindow
 * Copyright EuroForm june 13, 2002 by Kenneth Lund
 *
*/

function openPopUpWindow(strURL, intWidth, intHeight, intTop, intLeft, scrollbar)
{
	if(scrollbar == 'yes')
	    window.open(strURL,'showWindow','width=' + intWidth + ',height=' + intHeight + ',top=' + intTop + ',left=' + intLeft + ',resizable=no,scrollbars=yes,menubar=no,status=no' );
    else
        window.open(strURL,'showWindow','width=' + intWidth + ',height=' + intHeight + ',top=' + intTop + ',left=' + intLeft + ',resizable=no,scrollbars=no,menubar=no,status=no' );
}

/*********************************************************/

/*
 * writeDate
 * Copyright EuroForm may 17, 2002 by Kenneth Lund
 *
*/

function writeDate(datDate, booClock)
{
	var strSeconds = datDate.getSeconds();
	var strMinutes = datDate.getMinutes();
	var strHours = datDate.getHours();
	var strDate = datDate.getDate();
	var strMonth = datDate.getMonth() + 1;
	var strYear = datDate.getYear();

	if(strSeconds.toString().length < 2)
	{
		strSeconds = "0" + strSeconds + "";
	}
	else
	{
		strSeconds = strSeconds;
	}

	if(strMinutes.toString().length < 2)
	{
		strMinutes = "0" + strMinutes + "";
	}
	else
	{
		strMinutes = strMinutes;
	}

	if(strHours.toString().length < 2)
	{
		strHours = "0" + strHours + "";
	}
	else
	{
		strHours = strHours;
	}

	if(strDate.toString().length < 2)
	{
		strDate = "0" + strDate + "";
	}
	else
	{
		strDate = strDate;
	}

	if(strMonth.toString().length < 2)
	{
		strMonth = "0" + strMonth + "";
	}
	else
	{
		strMonth = strMonth;
	}
	
	if(booClock == true)
		var strDateString = "" + strDate + "-" + strMonth + "-" + strYear + " " + strHours + ":" + strMinutes + ":" + strSeconds + "";
	else
		var strDateString = "" + strDate + "-" + strMonth + "-" + strYear + "";
	
	return strDateString;
}