//rollover
if (document.images){
	acc2 = new Image();
	acc2.src = "img/accueil2.gif";
	ins2 = new Image();
	ins2.src = "img/inscrip2.gif";
	hlp2 = new Image();
	hlp2.src = "img/aide2.gif";
	ven2 = new Image();
	ven2.src = "img/vendre2.gif";
	cat2 = new Image();
	cat2.src = "img/chat2.gif";
	mpg2 = new Image();
	mpg2.src = "img/mapage2.gif";
	ser2 = new Image();
	ser2.src = "img/services2.gif";
	
	acc1 = new Image();
	acc1.src = "img/accueil1.gif";
	ins1 = new Image();
	ins1.src = "img/inscrip1.gif";
	hlp1 = new Image();
	hlp1.src = "img/aide1.gif";
	ven1 = new Image();
	ven1.src = "img/vendre1.gif";
	cat1 = new Image();
	cat1.src = "img/chat1.gif";
	mpg1 = new Image();
	mpg1.src = "img/mapage1.gif";
	ser1 = new Image();
	ser1.src = "img/services1.gif";
}

function rollOn(n){
	if (document.images){
		light=eval(n+"2.src");
	document [n].src=light;
	}
}

function rollOff(n){
	if (document.images){
		dark=eval(n+"1.src");
	document [n].src=dark;
	}
}

/*
	=============== OpenPopup ===============
	this demo popup is being launched only
	one time per browser session and use cookies
*/

/*
function ScanCookie(variable)
	{
	cook = document.cookie;
	variable += "=";
	place = cook.indexOf(variable,0);
	if (place <= -1)
		return("0");
	else
		{
		end = cook.indexOf(";",place)
		if (end <= -1)
			return(unescape(cook.substring(place+variable.length,cook.length)));
		else
			return(unescape(cook.substring(place+variable.length,end)));
		}
	}

function CreationCookie(nom,valeur,permanent)
	{
	if(permanent)
		{
		dateExp = new Date(2020,11,11);
		dateExp = dateExp.toGMTString();
		ifpermanent = '; expires=' + dateExp + ';';
		}
	else
		ifpermanent = '';
	document.cookie = nom + '=' + escape(valeur) + ifpermanent;
	}

if(ScanCookie("popup")==0) {
	window.open('popup.html','popup','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=250,height=250,left=200,top=200');
	CreationCookie("popup","oui",false)
}
*/

// =============== End OpenPopup ===============

/* about Evatek */
function aboutEvatek() {
	window.open('about.html','aboutpopup','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=250,height=250,left=200,top=200');
}

// ============== Popup ==============
function openPopup(type,url) {
	if (!window.open) alert('Merci de bien vouloir autoriser les fenêtres popup sur ce site');
	else {
		if (type == 1) { // 1 = webmatin
			var hauteur = 400;
			var largeur = 600;
			var top=(screen.height-hauteur)/2;
			var left=(screen.width-largeur)/2;
			window.open(url,'webmatin','toolbar=0,location=0,directories=0,status=1,scrollbars=0,resizable=1,copyhistory=0,menuBar=0,width='+largeur+',height='+hauteur+',left='+left+',top='+top+'');
		}
		else { void(0);	}
	}
}

// ============== fonction anti-spam ==============
function noSpam(user,domain) {
	locationstring = "mailto:" + user + "@" + domain;
	window.location = locationstring;
}

// =============== Random entier ===============
function getRandomInt(min,max) {
	return(min>=max)?max:Math.floor(((max+1-min)*Math.random())+min);
}

// =============== Autre fonction entier ===============
document.myWrite = document.write;

function get_random() {
    var ranNum= Math.round(Math.random()*9000);
    return ranNum;
}

