/*

Loads the Lastest Press Releases

*/


function loadXMLDoc2(url)
{ if (window.XMLHttpRequest)
  { req = new XMLHttpRequest()
  } 
  else if (window.ActiveXObject)
  { req = new ActiveXObject("Microsoft.XMLHTTP")
  }
  
  if (req)
  { req.onreadystatechange = processReqChange2
    req.open("GET",url,true)
    req.send(null)
  }
}

function processReqChange2()
{ var ready = req.readyState
  var data = null
  if (ready == 4)
  { data = req.responseXML
    parseData2(data)
  }
}

function parseData2(data)
{ document.getElementById("xmlPressReleases").innerHTML = ""
  
  for(i=0;i<2;i++)
  { pressTitle = data.getElementsByTagName("NewsRelease")[i].getElementsByTagName("Title")[0].firstChild.nodeValue
    pressID = data.getElementsByTagName("NewsRelease")[i].getAttribute("ReleaseID")
  
    list = document.getElementById("xmlPressReleases")
    outerUL = document.createElement("ul")
    innerLI = document.createElement("li")
    innerA = document.createElement("a")
    innerLItext = document.createTextNode(pressTitle)
    innerA.appendChild(innerLItext)
    innerA.setAttribute("href","http://investor.ca.com/phoenix.zhtml?c=83100&p=irol-newsArticle&ID=" + pressID)
    innerA.setAttribute("target","_blank")
    innerLI.appendChild(innerA)
    outerUL.appendChild(innerLI)
    list.appendChild(outerUL)
  }
  
  req = null
  loadXMLDoc3(xmlEventsFile)
}