// pop-up function

var newWin = null;

function closeWin() {
	if (newWin != null) {
		if(!newWin.closed) newWin.close();
	}
}

function openWin(strURL,strType,strWidth,strHeight) {
  closeWin();
  var strOptions="";
  if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth;
  if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
  if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
  newWin = window.open(strURL, 'newWin', strOptions);
  newWin.focus();
}

// Example of GOOD link
// <a href="XXXX.html" onclick="openWin(this.href,'console',400,200);return false;">XXXX</a>


function validatecalcForm() {
  var form = document.getElementById("calcForm");
  var invalid = false; 
  var desc = 'Please enter license amount.';
  if (form.suma.value*1 <= 0) { invalid = true; }
  
  if (invalid) {
    alert(desc);
    return false
  }
}

