

function loadlastnew(xml, divid) 
{

try
{
  
  if (navigator.userAgent.indexOf('MSIE') >= 0) 
  {
    var myXML=new ActiveXObject("MSXML2.FreeThreadedDOMDocument");
     myXML.async=false;
     myXML.load(xml);
     var subgroup = myXML.selectNodes("//subgroup");
     
    
     var str ="";

         
     for(var i=0; i<Math.min(subgroup.length, 2); i++) 
     {
        
         
        for (var c=0; c<Math.min(subgroup[i].childNodes.length, 6); c++) 
        {
           
            var item = subgroup[i].childNodes[c];
	    var latest_news_id = "latest_news_" + c;
          if (item.getAttribute("link").indexOf("attach.aspx") >=0)
		  {
            str +="<LI><DIV style='FLOAT: left'><A id=\"" + latest_news_id + "\"  href=\"javascript:void(window.open('"+item.getAttribute("link")
+"','','resizable=yes, status=yes, scrollbars=yes, toolbar=no, menubar=no, width=640, height=480, left=0, top=0'))"
+"\">"+item.firstChild.nodeValue+"</A></DIV><DIV class=date_ind>"+item.getAttribute("date")+"</DIV></LI>";
			}
          else if (item.getAttribute("link").indexOf("http://") ==0 || item.getAttribute("link").indexOf("https://") ==0)
          {
            str +="<LI><DIV style='FLOAT: left'><A id=\"" + latest_news_id + "\"  href=\"javascript:void(window.open('"+item.getAttribute("link")
+"','','resizable=yes, status=yes, scrollbars=yes, toolbar=no, location=yes, menubar=no, width=768, height=768, left=0, top=0'))"
+"\">"+item.firstChild.nodeValue+"</A></DIV><DIV class=date_ind>"+item.getAttribute("date")+"</DIV></LI>";
          }
			else
          {
            str +="<LI><DIV style='FLOAT: left'><A id=\"" + latest_news_id + "\"  href=\""+item.getAttribute("link")
+"\">"+item.firstChild.nodeValue+"</A></DIV><DIV class=date_ind>"+item.getAttribute("date")+"</DIV></LI>";
			} 
		latest_news_list[c] = latest_news_id;
        }
    }

     document.getElementById(divid).innerHTML = str;

  
  }else if (navigator.userAgent.indexOf('Firefox') >= 0) 
  {
    var myXML = new XmlDocument();
         myXML.loadFromFile(xml);

     var subgroup = myXML.selectNodesByName("subgroup");
     //var subgroup = myXML.selectNodes("//subgroup");
     
    
     var str ="";

         
     for(var i=0; i<Math.min(subgroup.length, 2); i++) 
     {
        
         
        for (var c=0; c<Math.min(subgroup[i].childNodes.length, 6); c++) 
        {
           
            //var item = subgroup[i].childNodes[c];
            var a=subgroup[i].getElementsByTagName('item');
             item =a[c];
	    var latest_news_id = "latest_news_" + c;


          if (item.getAttributeNode("link").nodeValue.indexOf("attach.aspx") >=0)
		  {
            str +="<LI><DIV style='FLOAT: left'><A id=\"" + latest_news_id + "\" href=\"javascript:void(window.open('"+item.getAttributeNode("link").nodeValue
+"','','resizable=yes, status=yes, scrollbars=yes, toolbar=no, menubar=no, width=640, height=480, left=0, top=0'))"
+"\">"+item.firstChild.nodeValue+"</A></DIV><DIV class=date_ind>"+item.getAttributeNode("date").nodeValue+"</DIV></LI>";
			}
          else if (item.getAttributeNode("link").nodeValue.indexOf("http://") ==0 || item.getAttributeNode("link").nodeValue.indexOf("https://") ==0)
          {
            str +="<LI><DIV style='FLOAT: left'><A id=\"" + latest_news_id + "\" href=\"javascript:void(window.open('"+item.getAttributeNode("link").nodeValue
+"','','resizable=yes, status=yes, scrollbars=yes, toolbar=no, location=yes, menubar=no, width=768, height=768, left=0, top=0'))"
+"\">"+item.firstChild.nodeValue+"</A></DIV><DIV class=date_ind>"+item.getAttributeNode("date").nodeValue+"</DIV></LI>";
          }
			else
          {
            str +="<LI><DIV style='FLOAT: left'><A id=\"" + latest_news_id + "\" href=\""+item.getAttributeNode("link").nodeValue
+"\">"+item.firstChild.nodeValue+"</A></DIV><DIV class=date_ind>"+item.getAttributeNode("date").nodeValue+"</DIV></LI>";
			} 
		latest_news_list[c] = latest_news_id;
        }
    }
     
     document.getElementById(divid).innerHTML = str;


  }else if (navigator.userAgent.toLowerCase().indexOf("safari") >= 0)  {

  

   var xmlObj = new XMLHttpRequest();
   xmlObj.open( "GET",xml, false);
   xmlObj.send(null);


    

     if( xmlObj.readyState == 4 )
 {
    
     
     var subgroup= xmlObj.responseXML.documentElement.getElementsByTagName("subgroup");


     var str ="";
     
    
    

         
     for(var i=0; i<Math.min(subgroup.length, 2); i++) 
     {
        
         
        for (var c=0; c<Math.min(subgroup[i].childNodes.length, 6); c++) 
        {
           
            //var item = subgroup[i].childNodes[c];
            var a=subgroup[i].getElementsByTagName('item');
             item =a[c];
	    var latest_news_id = "latest_news_" + c;


          if (item.getAttributeNode("link").nodeValue.indexOf("attach.aspx") >=0)
		  {
            str +="<LI><DIV style='FLOAT: left'><A id=\"" + latest_news_id + "\" href=\"javascript:void(window.open('"+item.getAttributeNode("link").nodeValue
+"','','resizable=yes, status=yes, scrollbars=yes, toolbar=no, menubar=no, width=640, height=480, left=0, top=0'))"
+"\">"+item.firstChild.nodeValue+"</A></DIV><DIV class=date_ind>"+item.getAttributeNode("date").nodeValue+"</DIV></LI>";
			}
          else if (item.getAttributeNode("link").nodeValue.indexOf("http://") ==0 || item.getAttributeNode("link").nodeValue.indexOf("https://") ==0)
          {
            str +="<LI><DIV style='FLOAT: left'><A id=\"" + latest_news_id + "\" href=\"javascript:void(window.open('"+item.getAttributeNode("link").nodeValue
+"','','resizable=yes, status=yes, scrollbars=yes, toolbar=no, location=yes, menubar=no, width=768, height=768, left=0, top=0'))"
+"\">"+item.firstChild.nodeValue+"</A></DIV><DIV class=date_ind>"+item.getAttributeNode("date").nodeValue+"</DIV></LI>";
          }
			else
          {
            str +="<LI><DIV style='FLOAT: left'><A id=\"" + latest_news_id + "\" href=\""+item.getAttributeNode("link").nodeValue
+"\">"+item.firstChild.nodeValue+"</A></DIV><DIV class=date_ind>"+item.getAttributeNode("date").nodeValue+"</DIV></LI>";
			} 
		latest_news_list[c] = latest_news_id;
        }
    }
     
     document.getElementById(divid).innerHTML = str;

     }
   
  }else
  {
      alert('Your browser is not currently supported.');
      return;
  }
}
catch (exception)
{
 alert(exception.message);
}

}


