cj.evt.add(window, 'load', function(){
	cj.calendar.init("inCalTrigger");
	cj.calendar.init("outCalTrigger");
	document.forms[0].onsubmit = function(){
		if(this.villa_type.selectedIndex==0){
			this.villa_type.focus();
			var pos = cj.util.getElementPos(this.villa_type);
			pos.left += this.villa_type.offsetWidth + 20;
			cj.util.popMsg.init(this.villa_type.getAttribute("title"), pos, {"width":200, "height":20});
			return false;
		}
		if(!cj.form.chk(this, ['villa_num,num', 'guest_a,num', 'guest_c,num'])){
			return false;
		}
		/*
		if(this.pickup[0].checked){
			if(!cj.form.chk(this, ['arr_flt_no,text', 'arr_flt_time,text'])){
				return false;
			}
		}
		if(this.dropoff[0].checked){
			if(!cj.form.chk(this, ['dep_flt_no,text', 'dep_flt_time,text'])){
				return false;
			}
		}
		*/
		if(!cj.form.chk(this, ['fname,text', 'lname,text'])){
			return false;
		}
		if(this.travel_type.selectedIndex==0){
			this.travel_type.focus();
			var pos = cj.util.getElementPos(this.travel_type);
			pos.left += this.travel_type.offsetWidth + 20;
			cj.util.popMsg.init(this.travel_type.getAttribute("title"), pos, {"width":200, "height":20});
			return false;
		}
		if(!cj.form.chk(this, ['country,text', 'phone,text', 'email,email'])){
			return false;
		}
	}
});