
var m_browser = "firefox";
var m_ie_major = 0;

var ua = window.navigator.userAgent
var msie = ua.indexOf ( "MSIE " )
if ( msie > 0 ) {     // If Internet Explorer, return version number
   m_browser = "explorer";
   m_ie_major = parseInt (ua.substring (msie+5, ua.indexOf (".", msie )));
}

function startIEFix() 
{
   var html = "";
   if ((m_browser=="explorer") && (m_ie_major<=6)) {
      html += "<table><tr><td>";
   }
   else {
      html += "</a>";
   }
   return html;
}
function stopIEFix() 
{
   var html = "";
   if ((m_browser=="explorer") && (m_ie_major<=6)) {
      html += "</td></tr></table></a>";
   }
   return html;
}
function insertProtectedHTML( 
   id,
   html
)
{
   var obj = document.getElementById( id );
   if (!obj) {
      return;
   }
   var _html = html;
   _html = _html.replace( /\[/g, "<" );
   _html = _html.replace( /\]/g, ">" );
   _html = _html.replace( /\{/g, "'" );
   _html = _html.replace( /\}/g, "'" );
   obj.innerHTML = _html;
}
function unprotHTML( 
   id,
   html
)
{
   var obj = document.getElementById( id );
   if (!obj) {
      return;
   }
   var _html = html;
   _html = _html.replace( /ltltlt/g, "<" );
   _html = _html.replace( /dbdbdb/g, '"' );
   _html = _html.replace( /andandand/g, '&' );
   obj.innerHTML = _html;
}
function onclickLink( 
   obj
)
{
   var href = obj.getAttribute( "m_href" );
   if (href && (href.length>0)) {
      document.location.href = href;
   }
}

function eq_startIEFix() 
{
   return startIEFix();
}
function eq_stopIEFix() 
{
   return stopIEFix()
}
function eq_insertProtectedHTML( 
   id,
   html
)
{
   insertProtectedHTML( id, html );
}

