var emptyPattern = new RegExp("[^ \\t\\v\\n\\r\\f]");function refreshFramesExclude(frameToExclude,hrefInclude){  //Get array of frames  var frames = parent.frames;  var exclude = parent.frames[frameToExclude];  if (hrefInclude == null)  {    hrefInclude = '';  }  for (i = 0; i < frames.length; i++)  {    //Make sure this frame is not reloaded    if (frames[i] != exclude)    {      frames[i].location.href = frames[i].location.href + "&" + hrefInclude;    }  }}function refreshFrame(frameName,url){  //Check the frame name  if (frameName == '') return;  //Retrieve the frame  var frame = parent.frames[frameName];  if (frame != null)  {    frame.location.reload();  }  return;}/*
  Changes a form's action attribute.
*/function swapAction(theForm, newValue, preserveParams){  if (preserveParams)  {    var theIndex = theForm.action.indexOf('?');    if (theIndex != -1)    {      theForm.action = newValue + theForm.action.substring(theIndex);    }    else    {      theForm.action = newValue;    }  }  else  {    theForm.action = newValue;  }}/*
  Tests a text box for having any character except whitespace characters.  Returns false if such a character is found.
*/function isFieldEmpty(field){  if (!emptyPattern.test(field.value))  {    return true;  }  return false;}/* Resolves a field against a nbr index */function resolveField(field, nbr){  if (field)  {    if (field.length)    {      return field[nbr];    }    else    {      return field;    }  }  else  {    return null;  }}/*
  Correctly parses and returns the int value found in the String param theValue.  JavaScript's built in parseInt does
  not handle stripping off of zeroes in the beginning.  Such as in the case of '00003'.  This function will return 3.
*/function parseIntCorrect(theValue){  if (theValue.length > 1)  {    theValue.replace(".", ",");    var i = 0;    var success = false;    while ((!success)&&(i<theValue.length))    {      if (theValue.charAt(0)=='0')      {        theValue = theValue.substring(1, theValue.length);      }      else      {        success = true;      }      i++;    }  }  return parseInt(theValue);}/*
  Assumes there is a hidden field targetBox and a checkbox requestingControl, sets the .value property of
  targetBox equal to the value of requestingControl if requestingControl is checked.
*/function setTiedId(requestingControl, theIndex, targetBox){  if (targetBox.length)  {    targetBox[theIndex].value = (requestingControl.checked)?requestingControl.value:'';  }  else  {    targetBox.value = (requestingControl.checked)?requestingControl.value:'';  }}function executeSelectionUrl(select,invalidSelection){  //Check for valid component  if (!select) return;  //Get option var  var selectedOption = select.options[select.selectedIndex];  //Check for valid selection  if (selectedOption.value == invalidSelection) return;  //Execute the url  executeUrl(selectedOption.value);}function executeUrl(url){  if (url == '') return;  top.location=url;}function setFrameSource(frameName, url){  //Verify params  if (frameName == null || frameName == '') return;  //Set frame  var frame = parent.frames[frameName];  if (frame == null) return;  frame.location.href = url;}function executeLink(frameName, url){  //Verify params  if (frameName == null || frameName == '') return;  var frame = parent.frames[frameName];  if (frame == null) return;  frame.location.href = url;}function swapMenuClass(element,className){  //Check element  if (element == null) return;  if (className == null || className == '') return  //Check element for hot tab  if (element.className == 'rocheNavMenuTabFocus') return;  //Set class name  element.className = className;}function setMenuTabFocus(tabId){  //Check element  if (tabId == null || tabId == "") return;  var element = document.getElementById(tabId);  if (!element) return;  //Set element style  swapMenuClass(element,'rocheNavMenuTabFocus');  return;}function swapClass(element,className){  //Check element  if (element == null) return;  if (className == null || className == '') return  //Set class name  element.className = className;}function openWin(URL){  aWindow = window.open(URL,"WBT","resizable=0,toolbar=no,scrollbars=no,width=800,height=600,status=no");}
