//******************************************************************************
//
//
//
//******************************************************************************

var OEItm2 = null;

document.onkeydown=pressed;

function getkey(e) {

  if (window.event) {

    return window.event.keyCode;

  } else {

    if (e) {

	  return e.which;
    
	} else {

	  return null;
    }
  }
}

function click_OEItm2() {

  el = null;
  
  if (OEItm2) {
    
	el = document.getElementById(OEItm2);
  
  }
  
  if (el) {
    
	el.click();
    
	return false;
  }

  return true;
}

var fun_key_up = null;
var fun_key_dn = null;

function pressed(e) {
	
  if (navigator.userAgent.indexOf('MSIE') != -1) {
    
	if (getkey(e) == 13) { return(click_OEItm2()); }
	if (getkey(e) == 38 && fun_key_up) { return(fun_key_up()); }
	if (getkey(e) == 40 && fun_key_up) { return(fun_key_dn()); }
  
  } else { 
	
	if (e.which == 13)  { return(click_OEItm2()); }
	if (e.which == 38 && fun_key_up) { return(fun_key_up()); }
	if (e.which == 40 && fun_key_up) { return(fun_key_dn()); }
  }
}

function getElPos(elem) {

  el=document.getElementById(elem);

  var w = el.offsetWidth;
  var h = el.offsetHeight;
  var l = 0;
  var t = 0;

  while (el) {

    l += el.offsetLeft;
    t += el.offsetTop;
    el = el.offsetParent;

  }

  return {"l":l, "t":t, "w":w, "h":h};

} /* getElPos */
