/* ============================================================================
Function for opening link in a new window - this is required because as of 
xHTML 1.1 Strict (=v16), target is no longer a valid property of anchor tags.

This function should be linked in all v16 UK IT Manager pages via the following
include file:
  ./itsolutions/ssi/head_itsolutions.shtml

Sample usage:
  <a href="sample_link.html" rel="blank">sample text</a>
============================================================================ */

function rel_blank()
{
  if (!document.getElementsByTagName) return;
  var anchors = document.getElementsByTagName("a");
  for (var i=0; i<anchors.length; i++)
  {
    var anchor = anchors[i];
    if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "blank")
	  anchor.target = "_blank";
  }
}

if(window.addEventListener)
{ // non-IE code
  window.addEventListener("load",rel_blank,true);
}
else if(window.attachEvent)
{ // IE code
  window.attachEvent("onload",rel_blank);
}