function incrTime(od,sec){
			d = new Date();
			d.setTime(od.getTime() + (sec*1000));
			return d;
		}
		function selectfun(){
			if(document.xform.queryC[1].checked){
				document.xform.arrCity.selectedIndex=0;
				document.xform.arrCity.disabled=true;
				document.xform.catgcode.disabled=false;      
			}else{
				document.xform.arrCity.disabled=false;
				document.xform.catgcode.selectedIndex=0;
				document.xform.catgcode.disabled=true;   
			}
		}

		function exc(ds){
			if(ds=='q'){
				document.xform.startyear.value='2006';
				document.xform.startmonth.value=document.xform.depmon.value.substring(0,2);
				document.xform.startday.value=document.xform.depday.value;				
				if(document.xform.depCity.selectedIndex==0){
					alert('Please select point of departure!');
					return;
				}
				if(document.xform.queryC[1].checked){
					if(document.xform.catgcode.selectedIndex==0){
						alert('Please select interest !');
						return;
					}
				} else {
					if(document.xform.arrCity.selectedIndex==0){
						alert('Please select destination !');
						return;
					}			
				}

				var toDay = new Date(new Date().getFullYear(),new Date().getMonth(),new Date().getDate());
				//var selectedDay = new Date(eval(document.xform.startyear.value),eval(document.xform.startmonth.value)-1,eval(document.xform.startday.value));
				var yearS = toDay.getFullYear();

				if((toDay.getMonth())>(eval(document.xform.startmonth.value)-1)){
					document.xform.startyear.value = (yearS+1);
				} else {
					document.xform.startyear.value = yearS;
				}
				
				var selectedDay = new Date(eval(document.xform.startyear.value),eval(document.xform.startmonth.value)-1,eval(document.xform.startday.value));
				
				//check date
				//var toDay = new Date(new Date().getFullYear(),new Date().getMonth(),new Date().getDate());
				//var selectedDay = new Date(eval(document.xform.startyear.value),eval(document.xform.startmonth.value)-1,eval(document.xform.startday.value));
				document.xform.action.value="tripList";
				document.xform.actionType.value="pre";
				document.xform.submit();		
			}
		}
		function getBrowserName()
		{
			aName = navigator.appName.toUpperCase();
			if (aName.indexOf("MICROSOFT") >= 0) return "Explorer";
			if (aName.indexOf("NETSCAPE") >= 0) return "Netscape";
			return "";
		}
		function initYear(){
			var yearP = (new Date()).getFullYear();
			var yearN = ((new Date()).getFullYear() +1);
			document.xform.startyear.options[0] = new Option(yearP,yearP);
			document.xform.startyear.options[1] = new Option(yearN,yearN);	
		}
		function getBrowserVersion()
		{
			var bVerC = false;
			browser = getBrowserName();
			version = 0;
			s = 0;
			e = 0;
			appVer = navigator.appVersion;
			if (browser == "Explorer")
			{
				appVer = navigator.userAgent;
				s = appVer.indexOf("MSIE ",0) + 5;
				e = appVer.indexOf(";",s);
				version = eval(appVer.substring(s,e));
				if(version>=6){
					bVerC=true;
				}
			}
			return version;
		}
		function launchCalendar(calForm, formName) {
			eval('document.'+formName+'.currentCalForm.value = calForm');
			var calWin =  window.open('inc/calendarDP.htm',formName,'scrollbars=no,menu=no,width=300,height=185,top=125,left=325');
			calWin.focus();

		}		
