function initLinks()
{
	
	if (!document.getElementsByTagName){return;}
	var anchors = document.getElementsByTagName("a");

	// loop through all anchor tags
	for (var i=0; i<anchors.length; i++){
		var anchor = anchors[i];

		if (anchor.getAttribute("href") && (anchor.getAttribute("rel") == "lightbox")){
			// anchor.onclick = function () {showLightbox(this); return false;}
		} else {
            if (anchor.href.indexOf('.pdf') != -1) {
                anchor.setAttribute('target', '_blank');
                anchor.className = 'link_pdf';
            }
            if (anchor.href.indexOf('.doc') != -1) {
                anchor.setAttribute('target', '_blank');
                anchor.className = 'link_doc';
            }
            if (anchor.href.indexOf('.rtf') != -1) {
                anchor.setAttribute('target', '_blank');
                anchor.className = 'link_doc';
            }
            if (anchor.href.indexOf('.xls') != -1) {
                anchor.setAttribute('target', '_blank');
                anchor.className = 'link_excel';
            }		

			if (anchor.getAttribute("rel") == "extern") {
                anchor.setAttribute('target', '_blank');
                anchor.className = 'link_extern';			
			}
		}
	}
}