<!--
var moForm;
var moFormReturnField;
var mbFormFocused=0;

function ReturnHandlerMS()
{
 if ( (moForm) && (moFormReturnField) )
 {
  if (window.event.keyCode==13)
  {
   if ( moFormReturnField.value != '' )
   {
    moForm.submit();
    window.event.returnValue = false;
   }
  }
 }
}

function ReturnHandlerNS(e)
{
 if ( (moForm) && (moFormReturnField) )
 {
  if (e.which==13)
  {
   if ( moFormReturnField.value != '' )
   {
    moForm.submit();
    return false;
   }
  }
 }
}

if (navigator.appName == 'Netscape')
{
  window.captureEvents(Event.KEYPRESS);
  window.onKeyPress = ReturnHandlerNS;
}

function tdurlclick(sURL,sTarget,bNew)
{
 if (navigator.appName != 'Netscape')
 {
  if (window.event.srcElement)
  {
   if (window.event.srcElement.id)
   {
    if (window.event.srcElement.id=='TD')
    {
     if (bNew)
      var win = window.open(sURL,sTarget);
     else
      location.href=sURL;
    }
   }
  }
 }
}

function tdformclick(oform)
{
 if (navigator.appName != 'Netscape')
 {
  if (window.event.srcElement)
  {
   if (window.event.srcElement.id)
   {
    if ( (window.event.srcElement.id=='TD') || (window.event.srcElement.id=='TD2') )
    {
     oform.submit();
    }
   }
  }
 }
}

function SafeSend(strStart,strEnd)
{
 location.href = 'mailto: ' + strStart + '@' + strEnd;
}

function storeCaret (textEl)
{
 if (textEl.createTextRange) 
  textEl.caretPos = document.selection.createRange().duplicate();
 textEl.caretPosStored = 1;
}

function insertAtCaret (textEl, text)
{
 if (textEl.caretPosStored==null)
  window.alert("Please click on text area to select position within text first");
 else
 {
  if (textEl.createTextRange && textEl.caretPos && textEl.caretPosStored)
  {
   var caretPos = textEl.caretPos;
   if ( caretPos.text.length > 1 )
    caretPos.text = text + caretPos.text;
   else
    caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
  }
  else
  {
   textEl.value = text;
   window.alert(caretPos.text);
  }
 }
}

function btnhigh(ostyle,strcolor)
{
 ostyle.backgroundColor=strcolor;
 ostyle.cursor='hand';
}

function btnlow(ostyle,strcolor)
{
 ostyle.backgroundColor=strcolor;
 ostyle.cursor='hand';
}

function dropdown(objdrop,objtext)
{
 if (objtext.caretPosStored==null)
 {
  window.alert("Please click on text area to select position within text first");
  objdrop.selectedIndex=0;
  objtext.focus();
 }
 else
 {
  var saction = objdrop.options[objdrop.selectedIndex].value;
  if (saction!='')
  {
   if(saction.substring(0,7)=='[IMAGE.')
   {
    var a1 = window.confirm('Align image with text? Click OK for "yes", Cancel for "no"');
    if (a1)
    {
     var a2 = window.confirm('Left align image with text? Click OK for "left aligned", Cancel for "right aligned"');
     a = (a2)?'L':'R';
    }
    else
    {
     var a2 = window.confirm('Is image alone, or with other images on same line? Click OK for "alone", Cancel for "with other images"');
     a = (a2)?'A':'0';
    }
    sactionparts = saction.split('.');
    saction = sactionparts[0] + '.' + sactionparts[1] + '.' + a + '.' + sactionparts[3];
   }
   insertAtCaret(objtext,saction);
   objdrop.selectedIndex=0;
   objtext.focus();
  }
 }
}

//-->

