		function fillcombo()
			{
				var dDate = new Date();
				var curDate = dDate.getTime();
			
				var increment = 86400000;
				var	 nDate = new Date();
				var dayConstant = 86400000;
				var strMonths = new Array();
				var strMonth = new Array();
				var strDay = new Array();
				var nexDate=  dDate.getTime() + increment * 365;
				var xDate1 = new Date(2005,10,01);
				var xDate2 = new Date(2010,10,30);
				var testtime = xDate1.getTime();
				var testtime2 = xDate2.getTime();

				
					
				if (testtime > curDate )
				{
					
					curDate = testtime;
					
				 }
				 
			
				if (curDate > testtime2)
				{
					 testtime2=curDate ;
				}
				
				strMonths[0]  = "January";
				strMonths[1]  = "February";
				strMonths[2]  = "March";
				strMonths[3]  = "April";
				strMonths[4]  = "May";
				strMonths[5]  = "June";
				strMonths[6]  = "July";
				strMonths[7]  = "August";
				strMonths[8]  = "September";
				strMonths[9]  = "October";
				strMonths[10] = "November";
				strMonths[11] = "December";
				
				strDay[0] ="Sun";
				strDay[1] ="Mon";
				strDay[2] ="Tue";
				strDay[3] ="Wed";
				strDay[4] ="Thu";
				strDay[5] ="Fri";
				strDay[6] ="Sat";
				
				strMonth[0]  = "JAN";
				strMonth[1]  = "FEB";
				strMonth[2]  = "MAR";
				strMonth[3]  = "APR";
				strMonth[4]  = "MAY";
				strMonth[5]  = "JUN";
				strMonth[6]  = "JUL";
				strMonth[7]  = "AUG";
				strMonth[8]  = "SEP";
				strMonth[9]  = "OCT";
				strMonth[10] = "NOV";
				strMonth[11] = "DEC";
			
				
				for (i =curDate;  i <= testtime2; i++ )
				{
					
					nDate.setTime(i);
					var curDatert=nDate.getDate();
					var curDay = strDay[nDate.getDay()];
					var curMonth= strMonths[nDate.getMonth()];
					var curMnth1	= strMonth[nDate.getMonth()];
					
				
					var curMnth = nDate.getMonth() +1;
					if (curMnth < 10)
					{
					 curMnth= "0" + curMnth;
					}
					
					if (curDatert <10)
					{
						curDatert= "0" + curDatert;
					}
					
					
					var strDate = curDay + " - " + curDatert + " " + curMonth + " " +  nDate.getFullYear() ;
					var strDtVal =  nDate.getFullYear() + "" + curMnth + "" + curDatert ;
					var strBuild = "<option value = '" + strDtVal + "'>" + strDate + "</option>";
				
				
				
					document.write (strBuild);
					strBuild="";
				
					i= i + increment;
				}

			}  



//---------------------------------------------------------------------------
//
//						matchFromDate(form)
//
//---------------------------------------------------------------------------
function matchFromDate(frmsearch){
		 var objForm = document.forms[frmsearch]
		max = objForm.DeptDateTo.length;
		start_pos = objForm.DeptDateFrom.selectedIndex;
		fin_pos = start_pos + 7;
		if (fin_pos > max){
		objForm.DeptDateTo.selectedIndex = max-1;
		}
		else{
			if (fin_pos == max){
			objForm.DeptDateTo.selectedIndex = max-1;
			}
			else
			{
			objForm.DeptDateTo.selectedIndex = fin_pos-1;
			//objForm.DeptDateto.selectedIndex = start_pos;
			
			}
		}
	}
//---------------------------------------------------------------------------
//
//						 matchToDate(form1)
//
//---------------------------------------------------------------------------
function matchToDate(frmsearch){
		var objForm = document.forms[frmsearch]
	// If to Date is after from date set the to date to the from date	
		if( objForm.DeptDateFrom.selectedIndex  > objForm.DeptDateTo.selectedIndex )
		{
		objForm.DeptDateFrom.selectedIndex = objForm.DeptDateTo.selectedIndex;
		}
}