<!-- person.js
/////////////////////////////////////////////////
// the following functions used in person.php //
////////////////////////////////////////////////

//////////////////////////// action & type changes /////////////////////
function changeAction(a) {
 actn=document.myform.action.value;
 u   =document.myform.userId.value;
 p   =document.myform.pw.value;
 document.myform.a.value=a; //2=Lookup, 3=Update, 4=Reset
 if (a==2) document.myform.action.value='query';
 else
 if (a==3) document.myform.action.value='update';
 newpage='./person.php?action='+actn+'&userId='+u+'&pw='+p; window.location.href=newpage;
 return true; 
}
//////////////////////////// textarea note changes /////////////////////
function processNote() {
	SQUOTE="'";
	var r3 =/(\n)/g;		  //  regular expression for new line
    var r4 =/(\r)/g;		 //   regular expression for carriage return
	var r5 =/([\'\"+\+\\&\&\;])/g;  
    t = document.myform.note.value;
	t = t.replace(r3,'LF');
	t = t.replace(r4,'CR');
    t = t.replace(r5,'');  
	t = escape(t);
	t = SQUOTE + t + SQUOTE;
    //alert('processNote sets dbnote='+t);
	document.myform.dbnote.value      = t ;
  return true;
}
function textArea() {
  var r1 = /(CR)(LF)/g;
  var r5 =/([\'\\])/g;  
  t = document.myform.dbnote.value; 
  t = t.replace(r1,'\r\n');
  t = t.replace(r5,'');  
  document.myform.note.value= unescape(t);
  return;
}
function txtArea2() {
  var r1 = /(CR)(LF)/g;
  var r5 =/([\'\\])/g;  
  t = document.myform.dbnote.value; 
  t = t.replace(r1,'\r\n');
  t = t.replace(r5,'');  
  return unescape(t);
} 
/////////////////////////////////////////////////
// the following functions used in personb.php //
/////////////////////////////////////////////////
function ckBox(i) {
  obj=eval("document.myform.upd"+i);
  if(obj.checked==true) return true;
  else				    return false;
}
function editUN() {
//alert('editUN'+document.myform.fun.value);
if (document.myform.fun.value != '') {
    if (document.myform.fun.value < 1 || document.myform.fun.value > 20) document.myform.fun.value=''; }
}
function editTYP() {
  if (document.myform.ftyp.value != '') document.myform.ftyp.value=document.myform.ftyp.value.toLowerCase();
}
function editYR() {
  if (document.myform.fyr.value != '') {
     x=new Number(document.myform.fyr.value.valueOf());
     if (x < 2000) x=x+2000;
	 if (!(x > 2003 && x < 2010)) document.myform.fyr.value='';
	 else { x+=''; document.myform.fyr.value=x;}}
}
-->