﻿// Anti-mail non prévu.
// Usage : NoMail( 'fin DNS', 'compte', 'début DNS', 'title du lien' );
function NoMail( s1, s2, s3, title )
{
	document.write( "<a title='" + title + "' href='mailto:" + s2 + "@" + s3 + s1 + "'>" + s2 + "@" + s3 + s1 + "</a>" );
}

// Dessine un flash (correctif pour IE, afin d'éviter le cadre clignotant désagréable)
function draw_flash( name, width, height )
{
	document.write( "<object type=\"application/x-shockwave-flash\" data=\"" + name + "\" style=\"width: " + width + "px; height: " + height + "px\">" );
	document.write( "<param name=\"movie\" value=\"" + name + "\">" );
	document.write( "<param name=\"quality\" value=\"high\">" );
	document.write( "<param name=\"menu\" value=\"false\">" );
	document.write( "</object>" );
}

function recherche()
{
	texte = document.Recherche.Texte.value;
	valid = true;
	if (texte=="")
	{
		alert("Le champ de recherche est vide");
		document.Recherche.Texte.focus();
		valid=false;
	}
	if (valid)
	{
		document.location.href = document.location.href.split("?")[0] + "?p=Search&search="+texte;
	}

}
function fixPNG() {
	if(navigator.appName == 'Microsoft Internet Explorer') {
		var png = /\.png$/;
		var imgs = document.getElementsByTagName("img");
		for(var i = 0 ; i < imgs.length; i++) {
			if(imgs.item(i).src.indexOf(".png")>0) {
				imgs.item(i).style.width = imgs.item(i).offsetWidth;
				imgs.item(i).style.height = imgs.item(i).offsetHeight;
				imgs.item(i).style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + imgs.item(i).src + '\',sizingMethod=\'image\')';
				imgs.item(i).src = '/img/pix.gif';
			}
		}
	}
}