function link_attachment(){

 var mod_link = $$('.articolo_content a');	
		
    	for (var i=0; i < mod_link.length; i++) {
		var testo =  mod_link[i].href.slice(0,28)
		var ancor =  mod_link[i].href.split("#")
		
			if (testo == 'http://www.geneticagraria.it' && ancor.length == 1 ){							
				var link_ = mod_link[i].href.slice(28)
				
				if(link_.indexOf(".asp") > -1  || link_.indexOf(".html") > -1 || link_.indexOf(".htm") > -1 || link_.indexOf(".php") > -1 || link_.indexOf(".aspx") > -1)	{
					//mod_link[i].href = testo +link_	
					//alert(link_)
				}else{
					mod_link[i].href = testo +'/attachment'+link_
				}
			}	
    	}
		
	if(typeof($('sponsor')) != 'null' ){		
		var img_link = $('sponsor').getElementsByTagName("img") ;	
		for (var a=0; a < img_link.length; ++a) {
		var path_splice = img_link[a].src.slice(28) 
		img_link[a].src = 'http://www.geneticagraria.it/attachment/' + path_splice
		}
	}
        
}


