function selectOption(ele,num) {
	var selObj = document.getElementById(ele);
	selObj.selectedIndex = num;
}	

function submitAjaxForm(theform,divx) {
  var status = AjaxRequest.submit(
    theform
    ,{
      'onSuccess':function(req){ document.getElementById(divx).innerHTML = req.responseText; }
    }
  );
  return status;
}

function clearDefault(el) {
	if (el.defaultValue==el.value) el.value = ""
}

//confirm action before redirect
function confirmAction(myURL,myMES){
	var res = confirm(myMES);
	if(res){
		location.href=myURL;
	}
}

//Load Booking Form
function loadBookingForm (str,mm,yy) {
	function SimpleAJAXCallback(in_text){
		document.getElementById('loadform').innerHTML = in_text;
		navigate(mm,yy,'');
		document.getElementById('fullname').focus();
	}
	SimpleAJAXCall('ajax.call.php?ajax=loadform&u='+encodeURI(str),SimpleAJAXCallback,'POST');
}
