    // Copyright Delphi Associates Inc., 1995 - 2002, unless otherwise
    // indicated, or public domain.
    // Seamus McMillan, last update 5/16/02.


        //Declare globals

var dsDate;
var Mns;
var Scs;
var dtran;
var tdy;
var mday;
var mnth;
var myear;
var thyr;
var shdy;
var shohrs;
var mhours;
var shmnth;
var custEmal = "";
var dPhEnt;
var daytel = "";
var tjName = "";
var timerID = null;
var statTxt = "";
var timerRoll = null;


        //Navigation and rollover functions

browserVer = parseFloat(navigator.appVersion);

        if (browserVer >= 3)   {
         version = "ver3"
         }
        else   {
         version = "ver2"
         }

        if (version == "ver3") {
        R1C1on = new Image();
        R1C1on.src = "images/R1C1Ov.gif";
        R2C1on = new Image();
        R2C1on.src = "images/R2C1Ov.gif";
        R3C1on = new Image();
        R3C1on.src = "images/R3C1Ov.gif";
        R4C1on = new Image();
        R4C1on.src = "images/R4C1Ov.gif";
        R5C1on = new Image();
        R5C1on.src = "images/R5C1Ov.gif";

        R1C3on = new Image();
        R1C3on.src = "images/R1C3Ov.gif";
        R2C3on = new Image();
        R2C3on.src = "images/R2C3Ov.gif";
        R3C3on = new Image();
        R3C3on.src = "images/R3C3Ov.gif";
        R4C3on = new Image();
        R4C3on.src = "images/R4C3Ov.gif";
        R5C3on = new Image();
        R5C3on.src = "images/R5C3Ov.gif";

        gueston = new Image();
        gueston.src = "images/GuestOv.gif";
        clienton = new Image();
        clienton.src = "images/ClientsOv.gif";
        testimon = new Image();
        testimon.src = "images/TestimOv.gif";
        aboutdon = new Image();
        aboutdon.src = "images/AboutOv.gif";
        projecton = new Image();
        projecton.src = "images/ProjOv.gif";
        resourceon = new Image();
        resourceon.src = "images/ResorcOv.gif";
        producton = new Image();
        producton.src = "images/ProdsOv.gif";
        orderon = new Image();
        orderon.src = "images/OrderOv.gif";

        R1C1off = new Image();
        R1C1off.src = "images/R1C1Up.gif";
        R2C1off = new Image();
        R2C1off.src = "images/R2C1Up.gif";
        R3C1off = new Image();
        R3C1off.src = "images/R3C1Up.gif";
        R4C1off = new Image();
        R4C1off.src = "images/R4C1Up.gif";
        R5C1off = new Image();
        R5C1off.src = "images/R5C1Up.gif";

        R1C3off = new Image();
        R1C3off.src = "images/R1C3Up.gif";
        R2C3off = new Image();
        R2C3off.src = "images/R2C3Up.gif";
        R3C3off = new Image();
        R3C3off.src = "images/R3C3Up.gif";
        R4C3off = new Image();
        R4C3off.src = "images/R4C3Up.gif";
        R5C3off = new Image();
        R5C3off.src = "images/R5C3Up.gif";

        guestoff = new Image();
        guestoff.src = "images/GuestUp.gif";
        clientoff = new Image();
        clientoff.src = "images/ClientsUp.gif";
        testimoff = new Image();
        testimoff.src = "images/TestimUp.gif";
        aboutdoff = new Image();
        aboutdoff.src = "images/AboutUp.gif";
        projectoff = new Image();
        projectoff.src = "images/ProjUp.gif";
        resourceoff = new Image();
        resourceoff.src = "images/ResorcUp.gif";
        productoff = new Image();
        productoff.src = "images/ProdsUp.gif";
        orderoff = new Image();
        orderoff.src = "images/OrderUp.gif";
        }


function img_act(imgName) {
        if (version == "ver3") {
        imgOn = eval(imgName + "on.src");
        document [imgName].src = imgOn;
        }
}

function img_inact(imgName) {
        if (version == "ver3") {
        imgOff = eval(imgName + "off.src");
        document [imgName].src = imgOff;
        }
}


function showWinStat(statTxt) {
        clearTimeout(timerID);
        window.status=statTxt; return true;
        timerRoll = setTimeout("showWinStat(statTxt)", 100);
}


function r1c1_act() {
        statTxt ="Computer Based Education and Training - One of Our Strengths";
        if (version == "ver3") {
        document.itemtxt.src = "images/CBE_Expl.gif";
        document.R1LMargin.src = "images/R1Lcu.gif";
        document.R2LMargin.src = "images/R2Lvl.gif";
        document.R3LMargin.src = "images/R3Lvl.gif";
        document.R4LMargin.src = "images/R4Lvl.gif";
        document.R5LMargin.src = "images/R5Lvl.gif";
        document.R6LMargin.src = "images/R6Lvl.gif";
        document.LowLeft.src = "images/LowLArr.gif";
        }
        timerID = setTimeout("showWinStat(statTxt)", 1000);
}

function r2c1_act() {
        statTxt ="Cost Effectiveness, Cost Benefit, QoL and Sensitivity Analyses";
        if (version == "ver3") {
        document.itemtxt.src = "images/PharmExpl.gif";
        document.R2LMargin.src = "images/R2Lcu.gif";
        document.R3LMargin.src = "images/R3Lvl.gif";
        document.R4LMargin.src = "images/R4Lvl.gif";
        document.R5LMargin.src = "images/R5Lvl.gif";
        document.R6LMargin.src = "images/R6Lvl.gif";
        document.LowLeft.src = "images/LowLArr.gif";
        }
        timerID = setTimeout("showWinStat(statTxt)", 1000);
}

function r3c1_act() {
        statTxt ="Patient Education, including Information, Practical and Emotional Support, Cultural Sensitivity, and Literacy Customization";
        if (version == "ver3") {
        document.itemtxt.src = "images/PatEdu.gif";
        document.R3LMargin.src = "images/R3Lcu.gif";
        document.R4LMargin.src = "images/R4Lvl.gif";
        document.R5LMargin.src = "images/R5Lvl.gif";
        document.R6LMargin.src = "images/R6Lvl.gif";
        document.LowLeft.src = "images/LowLArr.gif";
        }
        timerID = setTimeout("showWinStat(statTxt)", 1000);
}

function r4c1_act() {
        statTxt ="Patent Analyses for Technology Transfer, Biomedical Product Feasibility, Marketing Support";
        if (version == "ver3") {
        document.itemtxt.src = "images/PatAnlys.gif";
        document.R4LMargin.src = "images/R4Lcu.gif";
        document.R5LMargin.src = "images/R5Lvl.gif";
        document.R6LMargin.src = "images/R6Lvl.gif";
        document.LowLeft.src = "images/LowLArr.gif";
        }
        timerID = setTimeout("showWinStat(statTxt)", 1000);
}

function r5c1_act() {
        statTxt ="CD-ROM and Web Based Multimedia, including Video, Animation, Audio, Instructional Design, Surveys, and Much More";
        if (version == "ver3") {
        document.itemtxt.src = "images/MultExpl.gif";
        document.R5LMargin.src = "images/R5Lcu.gif";
        document.R6LMargin.src = "images/R6Lvl.gif";
        document.LowLeft.src = "images/LowLArr.gif";
        }
        timerID = setTimeout("showWinStat(statTxt)", 1000);
}

function r1c3_act() {
        statTxt ="Web Site Design and Development for Your Business Requirements, including Online Quotations, Order Forms, Corporate Sites, Training, and Surveys";
        if (version == "ver3") {
        document.itemtxt.src = "images/WebDevExp.gif";
        document.R1RMargin.src = "images/R1Rcu.gif";
        document.R2RMargin.src = "images/R2Rvl.gif";
        document.R3RMargin.src = "images/R3Rvl.gif";
        document.R4RMargin.src = "images/R4Rvl.gif";
        document.R5RMargin.src = "images/R5Rvl.gif";
        document.R6RMargin.src = "images/R6Rvl.gif";
        document.LowRight.src = "images/LowRArr.gif";
        }
        timerID = setTimeout("showWinStat(statTxt)", 1000);
}

function r2c3_act() {
        statTxt ="Physician Education, CMEs, Patient Education, Pharmaceutical Updates and Training, Health Promotion and Disease Prevention";
        if (version == "ver3") {
        document.itemtxt.src = "images/HealthEdExp.gif";
        document.R2RMargin.src = "images/R2Rcu.gif";
        document.R3RMargin.src = "images/R3Rvl.gif";
        document.R4RMargin.src = "images/R4Rvl.gif";
        document.R5RMargin.src = "images/R5Rvl.gif";
        document.R6RMargin.src = "images/R6Rvl.gif";
        document.LowRight.src = "images/LowRArr.gif";
        }
        timerID = setTimeout("showWinStat(statTxt)", 1000);
}

function r3c3_act() {
        statTxt ="Continuing Medical Education (CMEs), New Drug Education, Medical Updates, Institutional and Individual Programs";
        if (version == "ver3") {
        document.itemtxt.src = "images/PhysEdExp.gif";
        document.R3RMargin.src = "images/R3Rcu.gif";
        document.R4RMargin.src = "images/R4Rvl.gif";
        document.R5RMargin.src = "images/R5Rvl.gif";
        document.R6RMargin.src = "images/R6Rvl.gif";
        document.LowRight.src = "images/LowRArr.gif";
        }
        timerID = setTimeout("showWinStat(statTxt)", 1000);
}

function r4c3_act() {
        statTxt ="Internet Training, Writing HTML, JavaScript, Protocols, CGI, Web Site Design and Development";
        if (version == "ver3") {
        document.itemtxt.src = "images/InternetExp.gif";
        document.R4RMargin.src = "images/R4Rcu.gif";
        document.R5RMargin.src = "images/R5Rvl.gif";
        document.R6RMargin.src = "images/R6Rvl.gif";
        document.LowRight.src = "images/LowRArr.gif";
        }
        timerID = setTimeout("showWinStat(statTxt)", 1000);
}

function r5c3_act() {
        statTxt ="Case Law, Precedents, Procedures, Statutes, All States and All Federal Circuits, including the US Supreme Court";
        if (version == "ver3") {
        document.itemtxt.src = "images/LegalExp.gif";
        document.R5RMargin.src = "images/R5Rcu.gif";
        document.R6RMargin.src = "images/R6Rvl.gif";
        document.LowRight.src = "images/LowRArr.gif";
        }
        timerID = setTimeout("showWinStat(statTxt)", 1000);
}

function itm_inactL() {
        if (version == "ver3") {
        document.itemtxt.src = "images/DelSmlHd.jpg";
        document.R1LMargin.src = "images/R1Blank.gif";
        document.R2LMargin.src = "images/R2Blank.gif";
        document.R3LMargin.src = "images/R3Blank.gif";
        document.R4LMargin.src = "images/R4Blank.gif";
        document.R5LMargin.src = "images/R5Blank.gif";
        document.R6LMargin.src = "images/R6Blank.gif";
        document.LowLeft.src = "images/LowLUp.gif";
        }
        clearTimeout(timerRoll);
        clearTimeout(timerID);
        window.status='   '; return true
}

function itm_inactR() {
        if (version == "ver3") {
        document.itemtxt.src = "images/DelSmlHd.jpg";
        document.R1RMargin.src = "images/R1aBlank.gif";
        document.R2RMargin.src = "images/R2aBlank.gif";
        document.R3RMargin.src = "images/R3aBlank.gif";
        document.R4RMargin.src = "images/R4aBlank.gif";
        document.R5RMargin.src = "images/R5aBlank.gif";
        document.R6RMargin.src = "images/R6aBlank.gif";
        document.LowRight.src = "images/LowRUp.gif";
        }
        clearTimeout(timerRoll);
        clearTimeout(timerID);
        window.status='   '; return true
}


function pushTJ(tjName) {
        if (version == "ver3") {
              if (tjName=="dance") {
                      document.shoTJdispl.src = "images/Dancer.jpg";
              } else if (tjName=="newag") {
                      document.shoTJdispl.src = "images/Future.jpg";
              } else if (tjName=="chipper") {
                      document.shoTJdispl.src = "images/Chips.jpg";
              } else if (tjName=="corp") {
                      document.shoTJdispl.src = "images/Modern.jpg";
              } else if (tjName=="pinstr") {
                      document.shoTJdispl.src = "images/Starstripe.jpg";
              }
        }
}


          //  Window Management

function shoclient()  {
img_inact('client');
window.open('clients.htm','delsub',
'width=600,height=550,resizable=1,scrollbars=1,status=0,menubar=0,location=0,directories=0,toolbar=0');
self.blur();
}

function shotest()  {
img_inact('testim');
window.open('testimon.htm','delsub',
'width=600,height=550,resizable=1,scrollbars=1,status=0,menubar=0,location=0,directories=0,toolbar=0');
self.blur();
}

function shoproj()  {
img_inact('project');
window.open('projct.htm','delsub',
'width=600,height=550,resizable=1,scrollbars=1,status=0,menubar=0,location=0,directories=0,toolbar=0');
self.blur();
}

function shoSMres()  {
window.open('resumes/SMResum.html','reswin',
'width=640,height=550,resizable=1,scrollbars=1,status=0,menubar=0,location=0,directories=0,toolbar=0');
self.blur();
}

function shoVHFres()  {
window.open('resumes/VHFRes.html','reswin',
'width=640,height=550,resizable=1,scrollbars=1,status=0,menubar=0,location=0,directories=0,toolbar=0');
self.blur();
}

function shoSMcomp()  {
window.open('resumes/ComSkSM.html','reswin',
'width=640,height=550,resizable=1,scrollbars=1,status=0,menubar=0,location=0,directories=0,toolbar=0');
self.blur();
}

function shoVHFcomp()  {
window.open('resumes/ComSkVHF.html','reswin',
'width=640,height=550,resizable=1,scrollbars=1,status=0,menubar=0,location=0,directories=0,toolbar=0');
self.blur();
}

function shoSMpubs()  {
window.open('resumes/SMPubs.html','reswin',
'width=640,height=550,resizable=1,scrollbars=1,status=0,menubar=0,location=0,directories=0,toolbar=0');
self.blur();
}


       //  ======================================================

function setStamp()  {                // generates Timestamp
        dtran=new Date();
        tdy=dtran.getDay();
        mday=dtran.getDate();
        mhours = dtran.getHours();
        mnth=dtran.getMonth();
        myear=dtran.getYear();
             Mns =dtran.getMinutes();
             Scs=dtran.getSeconds();
        Mns = (((Mns < 10) ? "0" : "") + Mns);
        Scs = (((Scs < 10) ? "0" : "") + Scs);

         if (myear < 1900)   {
             thyr=(1900 + myear)
            }
          else   {
             thyr=myear
            }

         var timeValue = "" + ((mhours > 12) ? mhours - 12 : mhours)
         timeValue  += ":" + Mns
         timeValue  += ":" +Scs
         timeValue  += (mhours >= 12) ? " PM" : " AM"

        if (tdy==0) {
                shdy = "Sunday"
        } else if (tdy==1) {
                shdy = "Monday"
        } else if (tdy==2) {
                shdy = "Tuesday"
        } else if (tdy==3) {
                shdy = "Wednesday"
        } else if (tdy==4) {
                shdy = "Thursday"
        } else if (tdy==5) {
                shdy = "Friday"
        } else if (tdy==6) {
                shdy = "Saturday"
        }

        if (mnth==0) {
                shmnth = "January"
        } else if (mnth==1) {
                shmnth = "February"
        } else if (mnth==2) {
                shmnth = "March"
        } else if (mnth==3) {
                shmnth = "April"
        } else if (mnth==4) {
                shmnth = "May"
        } else if (mnth==5) {
                shmnth = "June"
        } else if (mnth==6) {
                shmnth = "July"
        } else if (mnth==7) {
                shmnth = "August"
        } else if (mnth==8) {
                shmnth = "September"
        } else if (mnth==9) {
                shmnth = "October"
        } else if (mnth==10) {
                shmnth = "November"
        } else if (mnth==11) {
                shmnth = "December"
        }

        dsDate=(shdy+", "+shmnth+" "+mday+", "+thyr+", at "+timeValue+".");
        document.GstBk.Timestamp.value = dsDate;
}


              //=================================
              // Functions to validate entered contact information


function chekTel(dPhEnt)   {
            if (dPhEnt== "") {
                 daytel = "";
                 var dpchk = "0";
             }
             else  {
                  daytel = dPhEnt;
                  var dpchk = "T";
             }

               for (i=0; i<dPhEnt.length; i++) {
                    if (dPhEnt.charAt(i) == "-") {
                         continue;
                    }
                    if (dPhEnt.charAt(i) == " ") {
                         continue;
                    }
                    if (dPhEnt.charAt(i) == "(") {
                         continue;
                    }
                    if (dPhEnt.charAt(i) == ")") {
                         continue;
                    }
                    if (dPhEnt.charAt(i) < "0") {
                         var dpchk = "F";
                         daytel = "";
                    }
                    if (dPhEnt.charAt(i) > "9") {
                         var dpchk = "F";
                         daytel = "";
                    }
               }
            if (dpchk == "F")  {
                alert("This entry does not appear to be a valid telephone number.");
                document.GstBk.GstPhone.value = "";
             }
}

  // This function copyright 1997, Tom Negrino and Dori Smith.
  // From "JavaScript for the WWW, Visual QuickStart Guide, 2nd Ed."

function chekEmail(email) {
          var invalidChars = "/:,; "
          if (email == "") {                              // cannot be empty
                    custEmal = "";
                    var emlchk = "0";
               }
             else  {
                  custEmal = email;
                  var emlchk = "T";
             }

       if (email != "") {
               for (i=0; i<invalidChars.length; i++) {     // any invalid characters?
                    badChar = invalidChars.charAt(i);
                    if (email.indexOf(badChar,0) > -1) {
                         var emlchk = "F";
                         custEmal = "";
                    }
               }

               atPos = email.indexOf("@",1)               // there must be one "@" symbol
               if (atPos == -1) {
                         var emlchk = "F";
                         custEmal = "";
               }
               if (email.indexOf("@",atPos+1) != -1) {     // and only one "@" symbol
                         var emlchk = "F";
                         custEmal = "";
               }
               periodPos = email.indexOf(".",atPos)
               if (periodPos == -1) {                         // and at least one "." after the "@"
                         var emlchk = "F";
                         custEmal = "";
               }
               if (periodPos+3 > email.length)     {       // at least 2 chars after the "."
                         var emlchk = "F";
                         custEmal = "";
               }
      }

            if (emlchk == "F")  {
                alert("This does not appear to be a valid email address.");
                document.GstBk.GstEmal.value = "";
             }
}




