
// Utility javascript functions for Julia B Website

function checkBrowser() {
   var fAppVersion;
   if (navigator.appName == "Microsoft Internet Explorer") {
      fAppVersion = parseFloat(navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE") + 5), 3);
   }
   else {
      fAppVersion = parseFloat(navigator.appVersion);
   }

   if (fAppVersion < 5.0) {
      alert("Your browser does not support current web technologies. Some features will not work as intended however, most features will work. Click OK to continue.");
   }
}

// Selects existing value in form text field
function selectItem() {
   var theEventCallerId;

   // Figure out who called us
   if(navigator.appName == "Netscape") {
      theEventCallerId = arguments.callee.caller.arguments[0].target.id;
   }
   else {
      theEventCallerId=window.event.srcElement.id;
   }

   var textArea = document.getElementById(theEventCallerId);
   textArea.select();
}

// Set the focus the the calling control
function setFocus(sId) {
   var textArea = document.getElementById(sId);
   textArea.focus();
}
