

function loadFundHighlight(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("//Fund");
     
    
     var str ="";//"<DIV class=quick_link_list style=\"PADDING-TOP: 5px\">";
     
  
         
     for(var i=0; i<Math.min(subgroup.length, 2); i++) 
     {
        //str +="</DIV>";
         //str +="<UL>";
         
         
        for (var c=0; c<Math.min(subgroup[i].childNodes.length, 5); c++) 
        {
           
           var item = subgroup[i].childNodes[c];
           var fund_highlight_id = "fund_highlight_" + c;
           var target = "";
           var link = "";
           if (item.getAttribute("link").indexOf("attach.aspx") >=0)
	   {
             link ="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'))";
             target ="";
	   }
           else if (item.getAttribute("link").indexOf("?FundID=") >0 || item.getAttribute("link").indexOf("&FundID=") >0)
           {
             link =""+item.getAttribute("link");
             target ="target=\""+item.getAttribute("target")+"\"";
           }
	   else
           {
             link ="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'))";
	   } 
           if(item.getAttribute("Hot_Icon") =="1")
           {			 
             str +="<LI><A id=\"" + fund_highlight_id + "\"  href=\""+link+"\" "+target+">"+item.firstChild.nodeValue+"</A> <IMG alt=hot.gif src=\"../flib/tw/images/hot.gif\"> ";			 
           }
           else
           {
             str +="<LI><A id=\"" + fund_highlight_id + "\" href=\""+link+"\" "+target+">"+item.firstChild.nodeValue+"</A> ";
           }
		   fund_highlight_list[c] = fund_highlight_id;
        }
    }
     
     //str +="</UL>";
     
    
     document.getElementById(divid).innerHTML = str;
	 document.getElementById(divid).style.visibility = "hidden";
	 //alert(divid);

  }else if (navigator.userAgent.indexOf('Firefox') >= 0) 
  {
     var myXML = new XmlDocument();
         myXML.loadFromFile(xml);

     var subgroup = myXML.selectNodesByName("Fund");
     
    
     var str ="";
     
  
         
     for(var i=0; i<Math.min(subgroup.length, 2); i++) 
     {
        
        var item_nodes = subgroup[i].getElementsByTagName('item');
      
        for (var c=0; c<Math.min(item_nodes.length, 5); c++) 
        {
           
           //var item = subgroup[i].childNodes[c];
             //var a=subgroup[i].getElementsByTagName('item');

             var item =item_nodes[c];

            
           var fund_highlight_id = "fund_highlight_" + c;
           var target = "";
           var link = "";
           if (item.getAttributeNode("link").nodeValue.indexOf("attach.aspx") >=0)
	   {
             link ="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'))";
             target ="";
	   }
           else if (item.getAttributeNode("link").nodeValue.indexOf("?FundID=") >0 || item.getAttributeNode("link").nodeValue.indexOf("&FundID=") >0)
           {
             link =""+item.getAttributeNode("link").nodeValue;
             target ="target=\""+item.getAttributeNode("target").nodeValue+"\"";
           }
	   else
           {
             link ="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'))";
	   } 
           if(item.getAttributeNode("Hot_Icon").nodeValue =="1")
           {			 
             str +="<LI><A id=\"" + fund_highlight_id + "\"  href=\""+link+"\" "+target+">"+item.firstChild.nodeValue+"</A> <IMG alt=hot.gif src=\"../flib/tw/images/hot.gif\"> ";			 
           }
           else
           {
             str +="<LI><A id=\"" + fund_highlight_id + "\" href=\""+link+"\" "+target+">"+item.firstChild.nodeValue+"</A> ";
           }
		   fund_highlight_list[c] = fund_highlight_id;
        }
    }
     
     
     document.getElementById(divid).innerHTML = str
     document.getElementById(divid).style.visibility = "hidden";

  }else if (navigator.userAgent.toLowerCase().indexOf("safari") >= 0)  
{
var xmlObj = new XMLHttpRequest();
 xmlObj.open( "GET",xml, false);
 xmlObj.send(null);

 

 if( xmlObj.readyState == 4 )
 {
    
    //xmlObj.responseXML.documentElement is the root path "<Fund>" 
     var subgroup= xmlObj.responseXML.documentElement.getElementsByTagName('item');

     var str ="";
      
     for(var i=0; i<Math.min(subgroup.length, 5); i++) 
     {
	var item = subgroup[i];
	var c = i;

           var fund_highlight_id = "fund_highlight_" + c;
           var target = "";
           var link = "";
           if (item.getAttributeNode("link").nodeValue.indexOf("attach.aspx") >=0)
	   {
             link ="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'))";
             target ="";
	   }
           else if (item.getAttributeNode("link").nodeValue.indexOf("?FundID=") >0 || item.getAttributeNode("link").nodeValue.indexOf("&FundID=") >0)
           {
             link =""+item.getAttributeNode("link").nodeValue;
             target ="target=\""+item.getAttributeNode("target").nodeValue+"\"";
           }
	   else
           {
             link ="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'))";
	   } 
           if(item.getAttributeNode("Hot_Icon").nodeValue =="1")
           {			 
             str +="<LI><A id=\"" + fund_highlight_id + "\"  href=\""+link+"\" "+target+">"+item.firstChild.nodeValue+"</A> <IMG alt=hot.gif src=\"../flib/tw/images/hot.gif\"> ";			 
           }
           else
           {
             str +="<LI><A id=\"" + fund_highlight_id + "\" href=\""+link+"\" "+target+">"+item.firstChild.nodeValue+"</A> ";
           }
		   fund_highlight_list[c] = fund_highlight_id;
    }
     
   
    
     document.getElementById(divid).innerHTML = str;
	 document.getElementById(divid).style.visibility = "hidden";

 }

}else
  {
      alert('Your browser is not currently supported.');
      return;
  }
}
catch (exception)
{
 alert(exception.message);
}

}


