function context_click()
{
  var ttstr,obj = event.srcElement;
  if( !obj || obj.tagName != "SPAN" || !obj.className ) return ;

  event.cancelBubble=true;
  if ( obj.className.toUpperCase() == 'CONTEXT_ITEMCATE' )
  {
      ttstr = obj.params ;
      if ( !ttstr ) { alert("No context help."); return ; }
      ttstr = "/public/public_new/other_02/other_0210/itemcate_hlp.jsp?cat_id="+ttstr ;
      window.open(ttstr,'','left=0,top=0,width=550,height=400,resizable=no,scrollbars=yes,menubar=no,status=yes,titlebar=yes,toolbar=no,location=no');
      return ;
  }

  if ( obj.className.toUpperCase() == 'CONTEXT_ITEM' )
  {
      ttstr = obj.params ;
      if ( !ttstr ) { alert("No context help."); return ; }
      ttstr = "/public/public_new/other_02/other_0210/item_hlp.jsp?item_code="+escape(ttstr) ; 
      window.open(ttstr,'','left=0,top=0,width=550,height=400,resizable=no,scrollbars=yes,menubar=no,status=yes,titlebar=yes,toolbar=no,location=no');
      return ;
  }

  if ( obj.className.toUpperCase() == 'CONTEXT_TERM' )
  {
      ttstr = obj.params ;
      if ( !ttstr ) { alert("No context help."); return ; }
      ttstr = "/public/public_new/other_02/other_0210/term_hlp.jsp?term_code="+escape(ttstr) ;
      window.open(ttstr,'','left=0,top=0,width=550,height=400,resizable=no,scrollbars=yes,menubar=no,status=yes,titlebar=yes,toolbar=no,location=no');
      return ;
  }

  if ( obj.className.toUpperCase() == 'CONTEXT_APPLICATION' )
  {
      ttstr = obj.params ;
      if ( !ttstr ) { alert("No context help."); return ; }
      ttstr = "/public/public_new/other_02/public_new/other_0210/itemapp_hlp.jsp?item_app="+escape(ttstr);
      window.open(ttstr,'','left=0,top=0,width=550,height=400,resizable=no,scrollbars=yes,menubar=no,status=yes,titlebar=yes,toolbar=no,location=no');
      return ;
  }
  alert("No context help.");
}

function context_on_mouseover()
{
  var ttstr , obj = event.srcElement;
  if( !obj || obj.tagName != "SPAN" || !obj.className ) return ;
  ttstr = obj.className.toUpperCase() ;
  if (ttstr!= 'CONTEXT_ITEMCATE'&& ttstr!= 'CONTEXT_ITEM'&& ttstr!= 'CONTEXT_TERM'&& ttstr!= 'CONTEXT_APPLICATION') return;

  if ( document.public_library_context_hlp_obj )    //restore context if context exist
  {
     document.public_library_context_hlp_obj.innerHTML = document.public_library_context_hlp_value ;
  }

  document.public_library_context_hlp_obj   = obj   ;    //save new context
  document.public_library_context_hlp_value = obj.innerHTML ;
  document.public_library_context_hlp_accessTime = new Date();

  obj.innerHTML =  obj.innerHTML + "<img src='/public/public_new/other_02/other_0210/images/pander16.gif'>" ;
  event.cancelBubble=true; 
}

function context_on_mouseout()
{
  var ttstr , obj = event.srcElement;
  if( !obj || obj.tagName != "SPAN" || !obj.className ) return ;
  ttstr = obj.className.toUpperCase() ;
  if (ttstr!= 'CONTEXT_ITEMCATE'&& ttstr!= 'CONTEXT_ITEM'&& ttstr!= 'CONTEXT_TERM'&& ttstr!= 'CONTEXT_APPLICATION') return;

  if( (new Date()).getMilliseconds< document.public_library_context_hlp_accessTime.getMilliseconds + 1000 ) return ;

/*obj.innerHTML = document.public_library_context_hlp_value ;  //restore context
  document.public_library_context_hlp_obj   = null  ;
  document.public_library_context_hlp_accessTime = new Date(2002,2,2);
*/

  event.cancelBubble=true; 
}

document.onclick=context_click;
document.onmouseover=context_on_mouseover;
document.onmouseout=context_on_mouseout;