// JavaScript Document
function testIm(theVar)
{
alert(theVar.width);

	
}

function confirmLink(theLink,site)
{
	var is_confirmed = confirm(site);
	if (is_confirmed) 
	{
		theLink.href += '&is_js_confirmed=1';
	}
	return is_confirmed;
}

function PopupCentrer(page,titre,largeur,hauteur,options) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  w = window.open(page,titre,"top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
  w.focus();
}

function popup(url) {
	w=open(url,'popup','width=400,height=200,toolbar=no,scrollbars=no,status=no,resizable=yes');
	w.focus();	
}



function PopupCentrer2(page,largeur,hauteur,options) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
   w =  window.open(page,"diaporama","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
   w.focus();
}

function AjoutFavo() {
	if ((navigator.appName.indexOf("Microsoft",0)>=0) && (parseInt(navigator.appVersion)>=4)) {
		window.external.AddFavorite("http://www.aviron-line.com","AVIRON-LINE" );
	} else {
		alert("Cette fonction n'est proposée que pour Internet Explorer 4 et plus")
	}
}

var encours="";
function Affmeteo (liste) 
{
	var dep = liste.options[liste.selectedIndex].value;
	var path =  "http://perso0.free.fr/cgi-bin/meteo.pl?dep="+dep;

   // if (path.indexOf("#")!=0)
	//{ 
	//document.images["meteo"]=new Image;
	document.images["meteo"].src=path;
	//}

}

function resizeIm(theVar)
{

	if (theVar.width >= 50)
	{
		theVar.border = 1;
	}
	else
	{
		theVar.border= 0;
	
	}
}


function verifiermail(mail) 
{
if ((mail.indexOf("@")>=0)&&(mail.indexOf(".")>=0)) 
{
return true 
} 
else 
{
document.forms["newsletter"].elements["mail"].value = "";
alert("La syntaxe de votre E-mail est invalide. \nVeuillez le rentrer à nouveau...");
return false
}
}