/***************************************************************************
 *                                dt.js
 *                            -------------------
 *   begin                : Monday, Sep 23, 2003
 *   copyright            : (C) 2003 The Eeastit Remote Sync Group
 *   email                : support@eastit.net
 *
 *   $Id: activeuser.php,v 1.0.0.0 2003/09/23 00:10:27 Guozhi.hu Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is Remote Sync. software; 
 *	 Mods: date list init function
 *
 ***************************************************************************/

function initList(lstVal,minVal,maxVal,curVal)
{
	var tmpVal = '';

	for(var i=minVal;i<=maxVal;i++)
	{
		optNew = document.createElement("OPTION");
		if(i<10)
			tmpVal = '0' + i;
		else
			tmpVal = i;
		optNew.text = tmpVal;
		optNew.value = tmpVal;
		if(lstVal=='day'){
			document.regForm.Day.add(optNew);
			if(i==curVal)
				document.regForm.Day.selectedIndex = document.regForm.Day.length -1;
		}else if(lstVal=='mon'){
			document.regForm.Mon.add(optNew);
			if(i==curVal)
				document.regForm.Mon.selectedIndex = document.regForm.Mon.length -1;
		}else{
			document.regForm.Year.add(optNew);
			if(i==curVal)
				document.regForm.Year.selectedIndex = document.regForm.Year.length -1;
		}
	}
}
