// JavaScript Document

var x; // utiliser pour la fermeture des fenêtres dans article.html...

function editer(strURL,strType){

//	location.href='#URL_SITE_SPIP/ecrire/?exec=articles_edit&id_article=#ID_ARTICLE'
	var strOptions="";
	var strType="fixed";
	var strHeight=",height=700";
	var strWidth=",width=900";
	
	if (strType=="console") strOptions="resizable"+strHeight+strWidth;
	if (strType=="fixed") strOptions="scrollbars,resizable,status"+strHeight+strWidth;
	if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location"+strHeight+strWidth;
	x = window.open(strURL, 'newWin', strOptions);
	x.focus();
}

function montrer(objid){
	d=document
	if(d.all){d=d.all[objid]}
	else{d=d.getElementById(objid)}
	if(d.style){d=d.style}
	if(d){d.display="block"}
}

function cacher(objid){
	d=document
	if(d.all){d=d.all[objid]}
	else{d=d.getElementById(objid)}
	if(d.style){d=d.style}
	if(d){d.display="none"}
}

	
var site = location.hostname;

function targetLinks() {
	var str;
	var where;
	where="_blank";
	for(var i=0;i<=(document.links.length-1);i++) {
		str=document.links[i].href;
		if((str.search(site)==-1)
		   &&((str.search('http://')!=-1)
			||(str.search('https://')!=-1)
			||(str.search('ftp://')!=-1))){
				document.links[i].target=where;
		}
	}
}

$(document).ready(function() {
	targetLinks();
});