// JavaScript Document


function find_div() {
        var divCollection = document.getElementsByTagName("div");
        for (var i=0; i<divCollection.length; i++) {
            if(divCollection[i].getAttribute("id") == "content") {

var div = divCollection[i];

 if (!document.getElementsByTagName) return;
 var anchors = div.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];

x = anchor.getAttribute("href")

if (anchor.getAttribute("href") && x.substring(0, x.indexOf('.doc'))) 
	{
    	anchor.target = "_blank";
    	anchor.title = "This Word document (" + anchor.getAttribute("href") + ") will open in a new window.";
    	//anchor.className = (anchor.className != '') ? anchor.className+' exWord' : 'exWord';
		anchor.innerHTML = anchor.innerHTML + " <img src='/images/icons/doc.gif' alt='MS Word Icon'>";
	}

if (anchor.getAttribute("href") && x.substring(0, x.indexOf('.pdf'))) 
	{
    	anchor.target = "_blank";
    	anchor.title = "This PDF document (" + anchor.getAttribute("href") + ") will open in a new window.";
    	//anchor.className = (anchor.className != '') ? anchor.className+' exWord' : 'exWord';
		anchor.innerHTML = anchor.innerHTML + " <img src='/images/icons/pdf.gif' alt='PDF Icon'>";
	}

if (anchor.getAttribute("href") && x.substring(0, x.indexOf('.xls'))) 
	{
    	anchor.target = "_blank";
    	anchor.title = "This Excel document (" + anchor.getAttribute("href") + ") will open in a new window.";
    	//anchor.className = (anchor.className != '') ? anchor.className+' exWord' : 'exWord';
		anchor.innerHTML = anchor.innerHTML + " <img src='/images/icons/xls.gif' alt='Excel Document (New Window)'>";
	}
	

if (anchor.getAttribute("href") && x.substring(0, x.indexOf('.ppt'))) 
	{
    	anchor.target = "_blank";
    	anchor.title = "This Powerpoint document (" + anchor.getAttribute("href") + ") will open in a new window.";
    	//anchor.className = (anchor.className != '') ? anchor.className+' exWord' : 'exWord';
		anchor.innerHTML = anchor.innerHTML + " <img src='/images/icons/ppt.gif' alt='Powerpoint Document (New Window)'>";
	}



	
 }
            } 
        }
    }


window.onload = find_div;