<!--
function getElem(id, cntr)
{
  var el;
  if (cntr)
  {
    if(cntr.document.getElementById) el = cntr.document.getElementById(id);
    else el = cntr.document.all(id);
  }
  else
  {
    if(document.getElementById) el = document.getElementById(id);
    else el = document.all(id);
  }
  return el;
}
function setClass(id, className)
{
  if (!className) return;
  var el = getElem(id);
  if (el) el.className = '' + className;
}
function showHide(id, show)
{
  if (show == null) show = false;
  var el = getElem(id);
  if (el) el.style.display = (show ? '' : 'none');
}
function show(id, cntr)
{
  var el = getElem(id, cntr);
  if (el) el.style.display = '';
}
function hide(id, cntr)
{
  var el = getElem(id, cntr);
  if (el) el.style.display = 'none';
}
function setHTML2(id, cntr, content)
{
  var el = getElem(id, cntr);
  if (el) el.innerHTML = content;
}
function setHTML(id, content)
{
  setHTML2(id, null, content);
}
function SetCollectionClass(oColl, strClass)
{
  if (!strClass) return;
  for (var i = 0; i < oColl.length; i++)
  {
    var obj = oColl[i];
    obj.className = "" + strClass;
  }
}
function ValidatorFocus()
{
  for (var i = 0; i < Page_Validators.length; i++)
  {
    if (!Page_Validators[i].isvalid)
    {
      getElem(Page_Validators[i].controltovalidate).focus();
      break;
    }
  }
}
function trim(stringToTrim)
{
  return stringToTrim.replace(/^\s+|\s+$/g,"");
}
function ltrim(stringToTrim)
{
  return stringToTrim.replace(/^\s+/,"");
}
function rtrim(stringToTrim)
{
  return stringToTrim.replace(/\s+$/,"");
}
var emailPatternStrict = "^([-\\w\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([-\\w]+\\.)+))([a-zA-Z]{2,6}|[0-9]{1,3})(\\]?)$";
var passwordAllowedCharsPattern = "^\\w+$";
var strongPasswordPattern = "^(?=.{6,})(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])\\w*$";
var intPattern = "^[+-]?\\d+$";
var positiveIntPattern = "^\\d+$";
var positiveFloatPattern = "^\\d+([\\.\\,](\\d+))?$";

function replaceBtn(oldBtnId, newBtnId)
{
  var elOldBtn = getElem(oldBtnId);
  var elNewBtn = getElem(newBtnId);
  if (elOldBtn) elOldBtn.style.display = 'none';
  if (elNewBtn) elNewBtn.style.display = '';
}
function updateButton(enable, idBtn)
{
  var elBtn = getElem(idBtn);
  if (elBtn) elBtn.style.display = (enable ? 'inline' : 'none');
}
function MM_openBrWindow(theURL,winName,features)
{
  window.open(theURL,winName,features);
}
function OpenWnd(sUrl,features)
{
  var oWin = window.open(sUrl,"_blank",features);
  oWin.focus();
}
function popWnd(sURL,winName,features)
{
  var newWin = window.open(sURL,winName,features);
  if (newWin) newWin.focus();
}
function doResizeIframe(extraHeight, ifrId)
{
  ifrId = ifrId || 'ifrMain';
  if (typeof(parent.resizeIFrame) == 'function')
    parent.resizeIFrame(ifrId, extraHeight);
}
//-->