// JavaScript Document
					function isBrowserSupp() {
						// Get the version of the browser
						version =  parseFloat( navigator.appVersion );
				
						if ( ( version >= 2.0 ) && ( version < 2.1 ) && ( navigator.appName.indexOf( "Netscape" ) != -1 ) ) {
							return false;
						} else {
							return true;
						}
				
						return true;
					}

					function getDaysInMonth( mthIdx, YrStr ) {
						// all the rest have 31
						//alert('mth: ' + mthIdx + ', yr ' + YrStr);
						var maxDays = 31
						// except Feb. (of course)
						if( mthIdx == 1 ) {
							if( isLeapYear( YrStr ) ) {
								maxDays=29;
							} else {
								maxDays=28;
							}
						}
				
						// thirty days hath...
						if( mthIdx == 3 || mthIdx == 5 || mthIdx == 8 || mthIdx == 10 ) {
							maxDays=30;
						}
						return maxDays;
					}

					function isLeapYear( yrStr ) {
						var leapYear = false;
						var year = parseInt( yrStr, 10 );
						// every fourth year is a leap year
						if ( year % 4 == 0 ) {
							leapYear = true;
							// unless it's a multiple of 100
							if( year % 100 == 0 ) {
								leapYear = false;
								// unless it's a multiple of 400
								if( year % 400 == 0 ) {
									leapYear=true;
								}
							}
						}
						return leapYear;
					}

					function adjustDate( mth, Dt ) {
						var value = 0;

						mthIdx = parseInt(mth.options[mth.selectedIndex].value.substr(0,2)-1);

						var today = new Date()
						//var theYear = parseInt( today.getYear(), 10 )
						var theYear = parseInt(mth.options[mth.selectedIndex].value.substr(3,4));

/*						if( mthIdx < today.getMonth() ) {
							theYear = ( theYear + 1 )
						}
						if( theYear < 100 ) {
							theYear = "19" + theYear
						} else {
							if( ( theYear - 100 ) < 10 ) {
								theYear = "0" + ( theYear - 100 )
							} else {
								theYear = ( theYear - 100 ) + ""
							}
							theYear = "20" + theYear
						}*/
				
				
						var numDays = getDaysInMonth( mthIdx, theYear );
				
						if( mthIdx == 1 ) {
							if( Dt.options.selectedIndex + 1 < numDays ) {
								return 0;
							} else {
								Dt.options.selectedIndex=numDays - 1;
								//check for leap year
								if( numDays == 29 ) {
									return 99;
								} else {
									return 1;
								}
							}
						}

						if( Dt.options.selectedIndex + 1 < numDays ) {
							value = 0;
						} else {
							if ( Dt.options.selectedIndex > numDays ) {
								Dt.options.selectedIndex--;
								value = 3;
							} else {
								//index is 31 or 30
								value = 2;
							}
						}
						return value;
					}
				
					//changes departure month when arrival month is changed
					function amadChange( inM, inD, outM, outD, inDayName, outDayName ) {

						if ( !isBrowserSupp() ) {
							return;
						}

						var res = adjustDate( inM, inD );
						showDay( inM, inD, inDayName );
						if( res != 0 ) {
							   outD.options.selectedIndex = 0;
/*						------ Month dynamically populated for next year, no longer jan-dec ----------
							   if ( outM.options.selectedIndex == 11 ) {
									outM.options.selectedIndex = 0
							   } else {
*/									outM.options.selectedIndex=inM.options.selectedIndex + 1;
									outD.options.selectedIndex = 1;
							   //}
						} else {
							outM.options.selectedIndex = inM.options.selectedIndex;
							if (outD.options.selectedIndex <= inD.options.selectedIndex) {
								outD.options.selectedIndex = inD.options.selectedIndex + 2;
							}
							
						}
						showDay( outM, outD, outDayName );
						return;
					}

					function dmddChange( outM, outD ) {
						if ( !isBrowserSupp() ) {
							return;
						}
						
						showDay( outM, outD, outDayName );
						
						adjustDate( outM, outD );
						return;
					}
