ï»¿$(function(){
    $('a.spip_out').click(function(){
        window.open(this.href);
        return false;
    });
});




function addLoadEvent(func)
{
var oldonload = window.onload;
if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { oldonload(); func(); } } }
addLoadEvent(fNewPDFWindows);

  function fNewPDFWindows ()  
  {  if (!document.getElementsByTagName) return false;
  var links = document.getElementsByTagName("a");
  for (var eleLink=0; eleLink < links.length; eleLink ++) {
  if (links[eleLink].href.indexOf('.pdf') !== -1) {
  links[eleLink].onclick =
  function() {
  window.open(this.href,'resizable,scrollbars');
  return false;  
  }
  //var img = document.createElement("img");
  //img.setAttribute("src", "DECO_img/new-win-icon.gif");
  //img.setAttribute("alt", "(s'ouvre dasn une nouvelle fenÃªtre)");
  //links[eleLink].appendChild(img);
  }
  } 
  }   







//	1
//	function open_ext_link()
//		{
//			var liens = document.getElementsByTagName('a');
//			// On récupère tous les liens (<a>) du document dans une variable (un array), ici liens.
//			// Une boucle qui parcourt le tableau (array) liens du début à la fin.
//			for (var i = 0 ; i < liens.length ; ++i)  {
//				// Si les liens ont un nom de class égal à lien_ext, alors on agit.
//				if (liens[i].className == 'spip_out')  {
//					liens[i].title = 'S\'ouvre dans une nouvelle fenÃªtre';
//					// Au clique de la souris.
//					liens[i].onclick = function()  {
//						window.open(this.href);
//						return false; // On ouvre une nouvelle page ayant pour URL le href du lien cliqué et on inhibe le lien réel.
//					};
//				}
//			}
//		}
//		window.onload = open_ext_link;
// Au chargement de la page, on appelle la fonction.
		
// 2
//  $(document).ready(function () {
//    $("a.spip_out,a.spip_url").set("target", "_blank");
//  });
//
//  
// 3  
//  $(function() {
//  $('a[@href^=http]').not('[@href*=creuse.fr]')
//    //.addClass('external-link')
//    .click(function() {
//      window.open(this.href, '_blank');
//      return false;
//    });
//});

//jQuery.fn.newTarget = function() {
//  // 'this' is a jQuery object at this point - with all the jQuery functions
//
//  return this.each(function() { // return so we don't break the chain
//    // now we are inside of a jQuery function, the DOM element is the context
//    // so 'this' has changed to become a DOM element.
//
//    if (this.host != window.location.host) {
//      $(this).attr('target', '_new');
//    }
//  });
//};
//
//
