function doMouseOvr(obj,color){
	if(obj){
		obj.bgColor=color;
	}
}
function doMouseOut(obj,color){
	if(obj){
		obj.bgColor=color;
	}
}

function setAction(a1, a2, a3) {
  window.document.frm_main.a1.value = a1;
  window.document.frm_main.a2.value = a2;
  window.document.frm_main.a3.value = a3;
  window.document.frm_main.submit(true);
}

function setAction(a1,a2,a3){
if(document.getElementById('a1')){document.getElementById('a1').value = a1};
if(document.getElementById('a2')){document.getElementById('a2').value = a2};
if(document.getElementById('a3')){document.getElementById('a3').value = a3};
//alert(a1 + ' ' + a2 + ' ' + a3);
window.document.frm_main.submit(true);
}

function returnInt(val){
if(val==true){return 1;}else{return 0;}
}

function confDelete(){
if(confirm('Are you sure you wish to delete this record?')){return true;}
}

var dialogArguments;
function uploadForm(field) {
 
  dialogArguments1 = field;
  var posY, posX;
  posY = 0; posX = 0;
  
  posY = (screen.availHeight / 2);
  posX = (screen.availWidth / 2) - (250 / 2);
    
  nw=window.open('uploadFile.php','ss','toolbar=no; top='+posX+'; left='+posX+'; width=250px; height=240px');
  nw.focus; 
}

function setDate(sControl,sObj){
var dtsep="/";
	var dd = document.getElementById(sObj+'dayfld').value;
    var mm = document.getElementById(sObj+'monthfld').value;
    var yy = document.getElementById(sObj+'yearfld').value;
    //var hh = document.getElementById('hourfld').value;
    //var nn = document.getElementById('minutefld').value;
    //var ss = document.getElementById('secondfld').value;
    
    theDate = yy + dtsep + mm + dtsep + dd; //+ ' ' + hh + tmsep + nn + tmsep + ss
    document.getElementById(sControl).value = theDate;    
}
function show_key1 ( the_key ) {
    if (!the_key) {
      the_key = event.keyCode;
    }
    if (the_key==13) {
      setAction(-6,0,0);
    }
    return true;
}
