/*Début xt_med*/
function splitURL(urlStr)
{
urlStr = urlStr.replace(/\\/g,'/');
res = /^(.*):\/\/([^\/]+)(\/?.*)\/(.+)\.(\w*)$/.exec(urlStr);
if(res)
{ 
urlBits = new Object();
urlBits.domain = res[2];
urlBits.path = res[3];
urlBits.file = res[4];
urlBits.extension = res[5];
return urlBits;
}
return null;
} 

function click_out() {
  xtn2b = xtn2.split("=");
   if (splitURL(this.href)) {
          texte_xiti = "Lien "+splitURL(this.href).extension.toUpperCase()+" - Fichier : "+splitURL(this.href).file;
          xt_med('C',xtn2b[1],texte_xiti,'T');
	} else {
          texte_xiti = "Lien vers le domaine : "+this.href;			
           xt_med('C',xtn2b[1],texte_xiti,'S');
           }
}

function a_test() {
	
    for (i = 0; i < document.links.length; i++) {
        hostname = document.links[i].hostname;
		path = document.links[i].pathname;
		
        if (hostname != '' && hostname != 'en.industrie-expo.com') {
            document.links[i].onclick = click_out;
		} 		
		if (path.indexOf(".pdf") !=-1) {
			document.links[i].onclick = click_out;
		}
		if (path.indexOf(".xls") !=-1) {
			document.links[i].onclick = click_out;
		}
		if (path.indexOf(".doc") !=-1) {
			document.links[i].onclick = click_out;
		}
		if (path.indexOf(".zip") !=-1) {
			document.links[i].onclick = click_out;
		}		
		
    }
}

function customOnLoad() {
   a_test();
}
/*Fin xt_med*/
