// JavaScript Document ADDONMOJSCALENDAR
function catcalc(cal) {
        var date = cal.date;
        var time = date.getTime()
		var field = document.getElementById(cal);
    }
	
function addLoadEvent() {
    // Select all input elements
    inputs = document.getElementsByTagName('input');
    for (var i = 0; input = inputs[i]; ++i) {
      if (input && (input.getAttribute('type') == 'text')) {
        Calendar.setup(
          {
            inputField  : input.id,         // ID of the input field
            ifFormat    : "%d/%m/%Y",    // the date format
            showsTime   : true,
            timeFormat  : "24",
			onUpdate    :  catcalc
          }
        );
      }
    }
  }
  
function LoadCalendarVersionBouton() {
    // Select all input elements
    inputs = document.getElementsByTagName('input');
	
    for (var i = 0; input = inputs[i]; ++i) {
      if (input && (input.getAttribute('type') == 'text') && (input.getAttribute('id')) ) {  
	 var button = document.createElement('button');
			button.appendChild(document.createTextNode('...'));
			button.setAttribute('id', input.getAttribute('id') + '-button');
			input.parentNode.insertBefore(button, input.nextSibling);  
		  Calendar.setup(
          {
            inputField  : input.id,         // ID of the input field
            ifFormat    : "%d/%m/%Y",    // the date format
            button      : input.getAttribute('id') + '-button',       // ID of the button
            showsTime   : true,
            timeFormat  : 24,
			onUpdate    :  catcalc
          }
        );
      }
    }
  };
