<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function changeframes(framename, url) {
  eval('top.'+framename).location.href = url;
}

function openWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}


function importFile(sid,elm) {
  w=window.open('./?sid='+sid+'&pid=importFile&toField='+elm,'geturl','toolbars=no,scrollbars=yes,resizable=yes,status=yes,width=790,height=550');
  w.focus();
}

function selectFile(elm,url) {
 eval('window.opener.document.all.'+elm).value=url.substring(0,url.length);
 eval('window.opener.document.all.'+elm).focus();
 window.close();
}

function insertText(text,formName,fieldName) {
  var txtarea = eval('document.'+formName+'.'+fieldName);
  text = ' ' + text + ' ';
  if (txtarea.createTextRange && txtarea.caretPos) {
    var caretPos = txtarea.caretPos;
    caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
    txtarea.focus();
  } else {
    txtarea.value  += text;
    txtarea.focus();
  }
}

function myVoid() { ; } // do nothing


function replace(string,text,by) {
    // Replaces text with by in string
    var strLength = string.length, txtLength = text.length;
    if ((strLength == 0) || (txtLength == 0)) return string;

    var i = string.indexOf(text);
    if ((!i) && (text != string.substring(0,txtLength))) return string;
    if (i == -1) return string;

    var newstr = string.substring(0,i) + by;

    if (i+txtLength < strLength)
        newstr += replace(string.substring(i+txtLength,strLength),text,by);

    return newstr;
}


//-->

