
function fnSetCalendarFromToday(arr,arrBtn,x,y){
  var dt = new Date();
	for(var i=0;i<arr.length;i++){
		if(arr[i]!="" && arr[i]!="undefined" && arr[i]!=null) {
		  dt = new Date();
			Calendar.setup({
			    inputField     :    arr[i],
			    ifFormat       :    "%Y-%m-%d",
			    showsTime      :    false,
			    button         :    arrBtn[i],
				position       :    [x,y],
			    singleClick    :    true,
			    dateStatusFunc :	  function (date) { 
                              return (Date.parse(date)<= Date.parse(dt)) ?false : false;
                            }
			});
		}
	}
}
function fnSetCalendarFromTodays(arr,arrBtn,x,y){
  var dt = new Date();
	for(var i=0;i<arr.length;i++){
		if(arr[i]!="" && arr[i]!="undefined" && arr[i]!=null) {
		  dt = new Date();
			Calendar.setup({
			    inputField     :    arr[i],
			    ifFormat       :    "%Y-%m-%d",
			    showsTime      :    false,
			    button         :    arrBtn[i],
				position       :    [x,y],
			    singleClick    :    true,
			    dateStatusFunc :	  function (date) { 
                              return (Date.parse(date)<= Date.parse(dt)) ?true : false;
                            }
			});
		}
	}
}