// JavaScript Document

 var months = new Array("", "Januarie", "Februarie", "Maart", "April", "Mei", "Junie", "Julie", "Augustus", "September", "Oktober", "November", "Desember");

function addCommas(nStr) {
	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ',' + '$2');
	}
	return x1 + x2;
}

function testSelected(rb) {
	for (count=0;count<rb.length;count++) {
		if (rb[count].checked)
			return true;
	}
	return false;
}

// verifies that thee email address provided is correct.

var reEmail = /^.+\@.+\..+$/
var defaultEmptyOK = false


function isEmpty(s) { 
  return ((s == null) || (s.length == 0))
}


function isEmail (s){
  if (isEmpty(s)) 
    if (isEmail.arguments.length == 1) return defaultEmptyOK;
    else return (isEmail.arguments[1] == true);
    
  else {
    return reEmail.test(s)
  }
}


function windowpic(f,w,h) {
	window.open("vergroot.asp?f="+f,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=' + w + ',height=' + h);
}

function windowpic2(f,d) {
	window.open("vergroot.asp?d="+d+"&f="+f,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=100,height=100');
}

function numbersonly(e){
  var unicode=e.charCode? e.charCode : e.keyCode;
//alert(unicode);
	if ((unicode!=8) && (unicode!=9)) { 
    if ((unicode<43 || unicode>57) && (unicode!=37) && (unicode!=39) && (unicode!=35) && (unicode!=36)) 
      return false 
  }
}


