var dtCh= "/";
var minYear=1900;
var maxYear=2100;

function trim(str) {
  while (str.charAt(str.length - 1)==" ") 
    str = str.substring(0, str.length - 1); 
  while (str.charAt(0)==" ") 
    str = str.substring(1, str.length); 
  return str; 
} 

function isNumeric(str) {
  var pattern = "0123456789-."
  var i = 0; 
  do {
    var pos = 0; 
    for (var j=0; j<pattern.length; j++) 
      if (str.charAt(i)==pattern.charAt(j)) {
pos = 1; 
        break; 
      } 
    i++; 
  } while (pos==1 && i<str.length) 
  if (pos==0) 
    return false; 
  return true; 
}
function isEmpty(str) {
	if ( (trim(str) =="") || (str ==null) || (trim(str).length == 0) ){
		return true;
	} else {
		return false;
	}
}

function isEmail(input){
	var str=input;
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;
	if (filter.test(str))
		return true;
	else
		return false;
}

function isInteger(s){
	var i;
    for (i = 0; i < s.length; i++){   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}


function poptastic(url)
{
	newwindow=window.open(url,'LookUps','toolbar=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no');
	if (window.focus) {newwindow.focus()}
} 

