

//---------------------------------------------------------------------------

//

//						fillcombo

//

//---------------------------------------------------------------------------	

		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;

			

			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 <= nexDate; 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 + " " +  fourdigits(nDate.getYear()) ;

				var strDtVal =  curDatert + "/"  + curMnth +  "/"  + nDate.getYear() ;

				var strBuild = "<option value = '" + strDtVal + "'>" + strDate + "</option>";

			

				

				document.write (strBuild);

				strBuild="";

				

				i= i + increment;

			}



		}  

		

	

		

		function fourdigits(number)

		{

				return (number < 1000) ? number + 1900 : number;

   		}









		function fillcomboski()

		{

			var dDate = new Date();

			var curDate = dDate.getTime();

			var curYear = dDate.getYear();

			var curMonth = dDate.getMonth();

			if (curMonth < 4)

			curYear = curYear - 1;

			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(curYear,10,01);

			var xDate2 = new Date(curYear+1,03,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 + " " +  fourdigits(nDate.getYear()) ;

				var strDtVal =  curDatert + "/"  + curMnth +  "/"  + nDate.getYear() ;

				var strBuild = "<option value = '" + strDtVal + "'>" + strDate + "</option>";







				document.write (strBuild);

				strBuild="";



				i= i + increment;

			}



		}  





		

		//---------------------------------------------------------------------------

		//

		//						matchFromDate(form)

		//

		//---------------------------------------------------------------------------

		function matchFromDate(form1){

		 	var objForm = document.forms[form1]

			max = objForm.DeptDateTo.length;

			start_pos = objForm.DeptDateFrom.selectedIndex;

			fin_pos = start_pos + 5;

			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(form1){

			var objForm = document.forms[form1]

			// 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;

			}

		}



//---------------------------------------------------------------------------

		//

		//						matchFromDate(form)

		//

		//---------------------------------------------------------------------------

		function matchFromSkiDate(form1){

		 	var objForm = document.forms[form1]

			max = objForm.DeptDateMax.length;

			start_pos = objForm.DeptDateMin.selectedIndex;

			fin_pos = start_pos + 5;

			if (fin_pos > max){

				objForm.DeptDateMax.selectedIndex = max-1;

			}

			else{

				if (fin_pos == max){

					objForm.DeptDateMax.selectedIndex = max-1;

				}

				else

				{

					objForm.DeptDateMax.selectedIndex = fin_pos-1;

					//objForm.DeptDateTo.selectedIndex = start_pos;

			

				}

			}

		}

		//---------------------------------------------------------------------------

		//

		//						 matchToDate(form1)

		//

		//---------------------------------------------------------------------------

		function matchToSkiDate(form1){

			var objForm = document.forms[form1]

			// If to Date is after from date set the to date to the from date	

			if( objForm.DeptDateMin.selectedIndex  > objForm.DeptDateMax.selectedIndex )

			{

			objForm.DeptDateMin.selectedIndex = objForm.DeptDateMax.selectedIndex;

			}

		}






