function ouvrirPopup(url, nomFenetre, width, height, option) {
	var dessus = (screen.height/2)-(height/2);
	var gauche = (screen.width/2)-(width/2);
	var features = 'height='+height+',width='+width+',top='+dessus +',left='+gauche+","+option;
	window.open(url, nomFenetre, features);
}

function ouvrirVideo(destination) {
	window.open(destination,'','location=yes,resizable=no,scrollbars=no,status=no,toolbar=no,location=no,directories=no,menubar=no,width=400,height=340');
}

function openPictureWindow_Fever(imageName,imageWidth,imageHeight,alt,posLeft,posTop) {
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">');
	newWindow.document.write('<img src='+imageName+' width='+imageWidth+' height='+imageHeight+' alt='+alt+'>');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

// -- ajouter aux favoris --
var bookmarkurl="http://www.toulouseweb.com"
var bookmarktitle="Toulouseweb - le portail de Toulouse"
function addbookmark(){
	if (document.all)
	window.external.AddFavorite(bookmarkurl,bookmarktitle)
}


// -- Mettre toulouseweb en page d accueil --
function PrintHomePage(url,text) {
	if ((document.all)&&(document.getElementById)) { // teste si IE5 et +
		document.write("<a href=\"javascript:\" onclick=\"javascript:this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'"+url+"\')\">"+text+"</a>");
	}
}

function redimensionediv(taille_image, nb_div) {
	if(taille_image > document.getElementById("news"+nb_div).offsetHeight)
		document.getElementById("news"+nb_div).style.height = taille_image+10+"px";
}
