//HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
//
//    External Javascript file common to all pages.
//    The main purpose is to make cross-platform
//    (IE & Netscape) DHTML pages.
//
//    Author:      Diming Chen
//    Creation:    May. 30, 2002
//
//HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
// determine the browser type
var ns = false;
var ie = false;

if(navigator.appName.indexOf("Explorer") > 0) ie = true;
else ns = true;

// determine the mouse coordinates
if(ns) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = stopClock;

function stopClock() {
    top.topframe.stopClock();
}

function checkForm() {
    var cname = document.comments.cname.value;
    var cmail = document.comments.cmail.value;
    var csub  = document.comments.csubject.value;
    var ccomm = document.comments.candq.value;
    var gotit = document.comments.getter.value;
    var conperson = new Array ("ctheo",
                               "jbliss",
                               "lford",
                               "bsklar",
                               "sca",
                               "suegrady");
    var ournames = new Array ("Constandinos Theophilides",
                           "Jeffery H. Bliss",
                           "Loretta Ford",
                           "Robert L. Sklar",
                           "Sean C. Ahearn",
                           "Sue C. Grady");

    if (cname.length==0 || cname.indexOf(" ")==0 ||
        cmail.length==0 || cmail.indexOf(" ")==0 ||
        csub.length==0  || csub.indexOf(" ")==0 ||
        ccomm.length==0 || ccomm.indexOf(" ")==0) {
        alert("Please fill out all fields without leading space(s).");
        return;
    }
    if(gotit != "carsi") {
        var conindex = document.comments.cperson.selectedIndex;
        gotit = conperson[conindex];
        document.comments.getter.value = gotit;
        document.comments.names.value = ournames[conindex];
    }

    document.comments.submit();
}


