/*
 * cm-file-tagging.js
 *
 * The following functions aid in the tagging of downloadable files.
 *
 */
	<!--
	
	function addClick(){
	  var thelinks = document.links;

	  if(thelinks.length >0){ 
	   for(var i = 1; i < thelinks.length; i++) {
	    var link = thelinks[i];
	    if ((link.href.indexOf(".pdf")!=-1) ||
		 (link.href.indexOf(".exe")!=-1) ||
		 (link.href.indexOf(".zip")!=-1) ||
		 (link.href.indexOf(".doc")!=-1) ||
		 (link.href.indexOf(".xls")!=-1) ||
		 (link.href.indexOf(".ppt")!=-1) ||
		 (link.href.indexOf(".wma")!=-1) ||
		 (link.href.indexOf(".mov")!=-1) ||
		 (link.href.indexOf(".swf")!=-1) ||		 		 		 		 
		 (link.href.indexOf(".avi")!=-1) ){

	  	   thelinks[i].setAttribute("onclick", "callCoremetrics()");
	          thelinks[i].setAttribute("href","JavaScript:callCoremetrics('"+link.href+"')");
	    }
	   }
	  }
	}
	
	function callCoremetrics(href){
	       cmCreateManualPageviewTag(href.pathname, "Downloadable Files",href,location.href);
	       document.location.href = href
	}
	// -->
