function trcM(_msg) {o = document.getElementById('trcOut');if ( o != null ) {o.innerHTML = o.innerHTML + '<BR>' + _msg}}
function supEleTag(_tag) {var o = window.event.srcElement;while ( o != null && o.tagName.toUpperCase() != _tag.toUpperCase() )       {o = o.parentElement}    return o;}
function navFrame(_fra, _to) {var o = window;while (o != null && o.name != _fra && o.name != '') {alert('Frame:' + o.name);o = o.parent;}   if (o == null || o.name != _fra)  o = window.top;o.navigate(_to);}
function setInitFocus(_id) {var o =  document.getElementById(_id);    if ( o != null && typeof( o.focus ) != 'undefined' )       {o.focus();}}
function ignEnter(_allowInInput, _allowByAtt) {if (window.event.keyCode != 13) {return true;}   if (_allowInInput != null && _allowInInput == true) {var o =  window.event.srcElement;if ( o != null            && typeof( o.isContentEditable ) != 'undefined'            && o.isContentEditable == true ) {return true;}}   if (_allowByAtt != null && _allowByAtt == true) {var o =  window.event.srcElement;while ( o != null && o.tagName.toUpperCase() != 'FORM' ) {if ( o != null ) {val = ',' + o.getAttribute('allowKeys') + ',';if ( val.indexOf(',13,') >= 0 ) {return true;}}        o = o.parentElement;}}      return false;}function ignEnteroutsideInput() {return ignEnter(true, false);}function ignEnterNotAllowed() {return ignEnter(false, true);}
function ignBS(_allowInInput) {if (window.event.keyCode != 8) {return true;}      if (_allowInInput != null && _allowInInput == true) {var o =  window.event.srcElement;if ( o != null            && typeof( o.isContentEditable ) != 'undefined'            && o.isContentEditable == true ) {return true;}}      return false;}function ignBSoutsideInput() {return ignBS(true);}
function initAspx(_title, _idInitFocus, _ignKeys, _ignKeysNotInput, _ignKeysNotAllowed) {if (_title != null && _title != '') window.top.document.title = _title;if (_idInitFocus != null && _idInitFocus != '') setInitFocus(_idInitFocus);if (_ignKeys != null && _ignKeys.length > 0) {for (var i = 0;i < _ignKeys.length;i++) {if (_ignKeys[i] == 13) {document.attachEvent('onkeypress', ignEnter);}         else if (_ignKeys[i] == 8) {document.attachEvent('onkeydown', ignBS);}         else if (_ignKeys[i] == null) {;}         else alert('Illegal key in initAspx/_ignKeys: ' + _ignKeys[i]);}}   if (_ignKeysNotInput != null && _ignKeysNotInput.length > 0) {for (var i = 0;i < _ignKeysNotInput.length;i++) {if (_ignKeysNotInput[i] == 13) {document.attachEvent('onkeypress', ignEnteroutsideInput);}         else if (_ignKeysNotInput[i] == 8) {document.attachEvent('onkeydown', ignBSoutsideInput);}         else if (_ignKeysNotInput[i] == null) {;}         else alert('Illegal key in initAspx/_ignKeysNotInput: ' + _ignKeysNotInput[i]);}}   if (_ignKeysNotAllowed != null && _ignKeysNotAllowed.length > 0) {for (var i = 0;i < _ignKeysNotAllowed.length;i++) {if (_ignKeysNotAllowed[i] == 13) {document.attachEvent('onkeypress', ignEnterNotAllowed);}         else if (_ignKeysNotAllowed[i] == null) {;}         else alert('Illegal key in initAspx/_ignKeysNotAllowed: ' + _ignKeysNotAllowed[i]);}}}
function onenterClick(_clickID) {if (window.event.keyCode == 13) {o = document.getElementById(_clickID);o.click()}}
function ensureFrame(_frame, _url) {if (window.name != _frame) {window.top.navigate(_url);}}
function sndMl(_name, _dom) {var f1 = 'mai';var n1 = '';var i;for (i = _name.length - 1;i >= 0;i--) {n1 = n1 + _name.substring(i, i + 1);}  var n2 = '';if (_dom.substring(0, 2) == 'pD') {n2 = 'erDOCU';n2 = 'pow' + n2 + 'MENTS';}  if (_dom.substring(0, 2) == 'pK') {n2 = 'erKN';n2 = 'pow' + n2 + 'OW';}  if (_dom.substring(0, 1) == 'k') {n2 = 'l';n2 = 'k' + n2 + 'v';}  var n3 = '';if (_dom.substring(_dom.length - 1, _dom.length) == 'd') n3 = 'de';else                                                     n3 = 'com';window.open(f1 + 'lto:' + n1 + '@' + n2 + '.' + n3);}
function getEleValByName(_name) {var oLst = document.getElementsByName(_name);var ret  = '';if ( oLst != null && oLst.item(0) != null ) {ret = oLst.item(0).value;}  return ret;}

function celClk(_this) {var src = window.event.srcElement;var o = src;     while ( o != null && o != _this )      {o = o.parentElement;if (o.tagName != null           && (o.tagName == 'INPUT'               || (o.tagName == 'A' && o.href != null)))         {return;}}    celClkCh(_this);} function celClkCh(_par) {if (_par == null) return false;var o;var cld = _par.children;for (i=0;i<cld.length;i++)     {o = cld.item(i);if (o.tagName != null           && (o.tagName == 'INPUT'               || (o.tagName == 'A' && o.href != null)))         {o.click();return true;}      else         {if (celClkCh(o)) return true;}}  return false;} function tbhCss(_addId, _css) {tbhID(_addId).className=_css;}
function tbhImg(_addId, _img) {tbhID(_addId).src=_img;}
function tbhID(_addId) {var o = supEleTag('TD');var x = o.id.substr(0, o.id.lastIndexOf('_C_') + 1);o = document.getElementById(x + _addId);return o;}

