/************************************************************************************ 
*
*	Desciption:	Code to open up links in a new window. XHTML Strict compliant
*	Build-Date:	16/01/07 (3)		
*
*************************************************************************************/



function loaded()
{
    anchorTarget("_blank");
}

function anchorTarget(value)
{

  // Declare the variables
  var allAnchors, thisAnchor;

  // Store all the anchor tags in the allAnchors array
  allAnchors = document.getElementsByTagName('a');

  // Loop through all the anchor tags
  for (var i = 0; i < allAnchors.length; i++) {
    // Store the current anchor in the thisAnchors variable
    thisAnchor = allAnchors[i];

    // check if the link is not on the same domain, not an anchor point (page anchor - #) and not a javascript script
    if(thisAnchor.href.indexOf(document.domain) < 0 && thisAnchor.href != "" && thisAnchor.href.indexOf('javascript') < 0)
    {
      // Add the target attribute to the current anchor tag
      thisAnchor.target = value;
    }
  }

}