var smWin = null;
function sm_popup(theURL,w,h){
   LeftP = (screen.width) ? (screen.width-w)/2 : 0;
   TopP = (screen.height) ? (screen.height-h)/2 : 0;
   settings = 'height='+h+',width='+w+',top='+TopP+',left='+LeftP+',scrollbars,resizable,location=no,directories=no';
   smWin = window.open(theURL,"help",settings);
   smWin.focus();
}

var lgWin = null;
function winOpen(theURL){
   lgWin = window.open(theURL,"ITDN","menubar,toolbar,scrollbars,location,directories=no,resizable,width=640,height=410");
   lgWin.focus();
}
var nWin = null;
function winNews(theURL){
   nWin = window.open(theURL,"news","left=60,screenx=60,top=60,screeny=60,menubar,toolbar,scrollbars,location,directories=no,resizable,width=640,height=410");
   nWin.focus();
}

var hlpWin = null;
function hlpOpen(theURL,w,h){
   setWin = 'height='+h+',width='+w+',top=100,left=100,toolbar,scrollbars,resizable,location,directories';
   hlpWin = window.open(theURL,"help",setWin);
   hlpWin.focus();
}

function ShowDate(){
   var revdate=new Date(document.lastModified);
   document.write("Last Update: "+revdate);
}

function askConfirm(obj,str) {
    // onSubmit="return askConfirm(this.form,'question');"
    if (confirm(str + "\n\nOK=Yes - Cancel=No")){
        return (true) ;
    } else {
        return (false) ;
    }
}

function labelOver1(formName,color,style,width) {
    var frm = document.forms[0] ; // document.forms[0]
    var n = frm.elements.length ;
    for (i = 0; i < n; i ++) {
        if (frm.elements[i].tagName == 'LABEL') { // must be caps
            var lbl = frm.elements[i] ;
            var orgColor = lbl.style.borderColor ;
            var orgStyle = lbl.style.borderStyle ;
            var orgWidth = lbl.style.borderWidth ; // height
            var borderOrg  = orgColor + ' ' + orgStyle + ' ' + orgWidth + 'px' ;
            var borderOver = color + ' ' + style + ' ' + width + 'px' ;
            //lbl.onmouseover = (lbl.style.border = borderOver) ;
            lbl.onmouseover = "lbl.style.border = borderOver" ;
            lbl.onmouseout = "lbl.style.border = borderOrg" ;
        }
    }
}
function boxOn(thislabel) {
    thislabel.style.backgroundColor = 'red' ;
}
function boxOff(thislabel) {
    thislabel.style.backgroundColor = '#FFFFFF' ;
}
function labelOver(color,style,width) {
    var arr = document.getElementsByTagName('INPUT') ;
    var n = arr.length ;
    //alert('color: '+arr[1].style.borderColor) ;
    for (i = 0; i < n; i ++) {
        var lbl = arr[i] ;

        var orgColor = lbl.style.borderColor ;
        var orgStyle = lbl.style.borderStyle ;
        var orgWidth = lbl.style.borderWidth ; // height
        var borderOrg  = orgColor + ' ' + orgStyle + ' ' + orgWidth + 'px' ;
        var borderOver = color + ' ' + style + ' ' + width + 'px' ;
        //lbl.onmouseover = (lbl.style.border = borderOver) ;
        //arr[i].style.borderColor = 'red' ;
        //arr[i].onfocus = colorMe(arr[i]) ;
        lbl.onfocus = (lbl.style.backgroundColor = 'red') ;
        lbl.onblur = (lbl.style.backgroundColor = 'white') ;
        //lbl.onmouseout = "lbl.style.border = borderOrg" ;
        //lbl.onmouseover = "lbl.style.border = borderOver" ;
        //lbl.onmouseout = "lbl.style.border = borderOrg" ;

    }
    arr[1].focus() ;
}