
function fecha(){

var todaysDate = new Date();

		document.write('<select name="selArriveDay" style="MARGIN-TOP:1px;">')
		
		for (var counter = 1; counter<=31;counter++)
		{
			document.write('<option ')  
			document.write('value=' + counter)
			if (counter == parseInt(todaysDate.getDate())) 
				{
					document.write(' selected') 
				}
			document.write('>' + counter )
			document.write('</option>')
		}
		document.write('</select> ')



		document.write('<select name="selArriveMonth" style="MARGIN-TOP:1px;">')

		var m_names = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

		//for (var yearCounter = todaysDate.getFullYear(); yearCounter<2012; yearCounter++ )
		//{
			//if(yearCounter == todaysDate.getFullYear())
			//{
				
				//for (var monthCounter = todaysDate.getMonth()+1; monthCounter<=12;monthCounter++)
				//{
					//document.write('<option ')
					
					//document.write('value=' + monthCounter /*+ '-' + yearCounter*/)															
					

					//if (monthCounter == parseInt(todaysDate.getMonth()+1))
						//{
							//document.write(' selected')
						//}
					//document.write('>' + m_names[monthCounter-1] /*+ '-' + yearCounter*/)							
					
					//document.write('</option>')																									
					
				//}										
				
			//}
			//else
			//{
				
				for (var monthCounter = 1; monthCounter<=12;monthCounter++)
				{
					document.write('<option ')
					document.write('value=' + monthCounter /*+ '-' + yearCounter*/)

					if (monthCounter == parseInt(todaysDate.getMonth()+1))
						{
							document.write(' selected')
						}
					document.write('>' + m_names[monthCounter-1] /*+ '-' + yearCounter*/)
					document.write('</option>')
				}
				
			//}
		//}

		document.write('</select> ')
		
		
		///////////////////////////////////////////////////////
		
		document.write('<select name="selArriveYear" style="MARGIN-TOP:1px;" >')

		//var m_names = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");

		for (var yearCounter = todaysDate.getFullYear(); yearCounter<2012; yearCounter++ )
		{
			if(yearCounter == todaysDate.getFullYear())
			{
				//for (var monthCounter = todaysDate.getMonth()+1; monthCounter<=12;monthCounter++)
				//{
					document.write('<option ')
					
					document.write('value=' + yearCounter)															
					

					if (yearCounter == parseInt(todaysDate.getFullYear()))
						{
							document.write(' selected')
						}
					document.write('>' + yearCounter)							
					
					document.write('</option>')																									
					
				//}										
				
			}
			else
			{
				//for (var monthCounter = 1; monthCounter<=12;monthCounter++)
				//{
					document.write('<option ')
					document.write('value=' + yearCounter)

					if ((monthCounter == parseInt(todaysDate.getMonth()+1)) && (yearCounter == parseInt(todaysDate.getFullYear())))
						{
							document.write(' selected')
						}
					document.write('>' + yearCounter)
					document.write('</option>')
				//}
			}
		}

		document.write('</select> ')
		
		
		
		
		////////////////////////////////////////////////////////
		
		
		
		
		
		
		
		
		
		
		
		
		
		//split selmonthyear which holds month-year as one value into 2 values
		//var str=document.CheckPremfrm.selMonthYear.value;
		//var myStr = str.split("-")
		//hidden controls to hold selected year and month from split function
		//document.write('<input type="hidden" name="hdnSelectedMonth" value=' + myStr[0] + '>')
		//document.write('<input type="hidden" name="hdnSelectedYear" value=' + myStr[1] + '>')


}
		
		