function getMaxDays(year, month) {
		
		switch (month) {
		
		// Month 1 = 0, set Switch accordingly
		
		case 0:	return 31; break;
		case 1:	if (year % 4 == 0 && year % 400 != 0) {	return 29; } else {	return 28; }	break;
		case 2: return 31; break;	
		case 3: return 30; break;
		case 4: return 31; break;
		case 5: return 30; break;
		case 6: return 31; break;
		case 7: return 31; break;
		case 8: return 30; break;
		case 9: return 31; break;
		case 10: return 30; break;
		case 11: return 31; break;
														
	}
}

function onlyDigits(e) {

  var isIE = document.all?true:false;
  var isNS = document.layers?true:false;
  var _ret = true;

  if (isIE) {
    if (window.event.keyCode < 46 || window.event.keyCode > 57) {
      window.event.keyCode = 0;
      _ret = false;
    }
  }

  if (isNS) {
    if (e.which < 46 || e.which > 57) {
      e.which = 0;
      _ret = false;
    }
  }

  return (_ret); 

}

function popupConfirmMsg(msg) {
  document.MM_returnValue = confirm(msg);
}

function popuptype(type, msg) {
	if (listForm.elements['action_option'].value == type) {
		if (confirm(msg)) {
			document.MM_returnValue = document.listForm.submit();
		}
	}
}

function popupmsg(msg, url) {
	if (confirm(msg)) {
		window.location = url;
	}
}

function openwindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function valNotNull(e) {
  
  var isIE = document.all?true:false;
  var isNS = document.layers?true:false;
  var _ret = true;
  
  if (isIE) {
    if (window.event.keyCode < 49 || window.event.keyCode > 57) {
      window.event.keyCode = 0;
      _ret = false;
    }
  }

  if (isNS) {
    if (e.which < 49 || e.which > 57) {
      e.which = 0;
      _ret = false;
    }
  }
  
  return (_ret); 

}
