/**
 * Bridge XMLHTTP to XMLHttpRequest in pre-7.0 Internet Explorers
 */
if( typeof XMLHttpRequest == "undefined" ) XMLHttpRequest = function()
{ try{ return new ActiveXObject("Msxml2.XMLHTTP.6.0") }catch(e){}
  try{ return new ActiveXObject("Msxml2.XMLHTTP.3.0") }catch(e){}
  try{ return new ActiveXObject("Msxml2.XMLHTTP") }catch(e){}
  try{ return new ActiveXObject("Microsoft.XMLHTTP") }catch(e){}
  throw new Error("This browser does not support XMLHttpRequest or XMLHTTP.")
};

/* setTarget

   Find the link target for the detaiuls link of an item (_self, _blank etc.
   Parameters: anchor object id, Type (event, webitem, email) and id.

*/
function setTarget(obj,type, id)
{ var url = "/getTarget.asp"

  var postdata = "type=" + type + "&id=" + id
  var oReq = new XMLHttpRequest
  oReq.open("POST",url,false)
  oReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
  oReq.send(postdata)
//alert(oReq.statusText + "\n" + oReq.responseText)

  if (oReq.statusText != "OK")
  { alert(oReq.statusText) }
  else
  { obj.target = oReq.responseText}//;alert(oReq.responseText)}
  return true
}

function toggle (id)
{ var obj, idobj = document.getElementById(id)
  if (idobj.style.display == 'none')
  { idobj.style.display = 'block'
  } else
  { idobj.style.display = 'none'}
}