// ============== fonction frame killer ==============
if (top.frames.length!=0) top.location=self.document.location;

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

// ============== fonction popup ==============
function openPopup(type,url) {
	if (type == 1) { // 1 = popup member area help
		var hauteur = 188;
		var largeur = 300;
		//centre la popup
		var top=(screen.height-hauteur)/2;
		var left=(screen.width-largeur)/2;
		window.open(url,'memberhelp','toolbar=0,location=0,directories=0,status=1,scrollbars=1,resizable=1,copyhistory=0,menuBar=0,width='+largeur+',height='+hauteur+',left='+left+',top='+top+'');
	}
	else if (type == 2) { // 2 = contact form
		var hauteur = 460;
		var largeur = 500;
		var top=(screen.height-hauteur)/2;
		var left=(screen.width-largeur)/2;
		window.open(url,'contactForm','toolbar=0,location=0,directories=0,status=0,scrollbars=auto,resizable=0,copyhistory=0,menuBar=0,width='+largeur+',height='+hauteur+',left='+left+',top='+top+'');
	}
	else if (type == 3) { // 3 = download form
		var hauteur = 450;
		var largeur = 525;
		var top=(screen.height-hauteur)/2;
		var left=(screen.width-largeur)/2;
		window.open(url,'downloadForm','toolbar=0,location=0,directories=0,status=1,scrollbars=auto,resizable=1,copyhistory=0,menuBar=0,width='+largeur+',height='+hauteur+',left='+left+',top='+top+'');
	}
	else if (type == 4) { // 4 = copyright, privacy policy
		var hauteur = 490;
		var largeur = 515;
		var top=(screen.height-hauteur)/2;
		var left=(screen.width-largeur)/2;
		window.open(url,'copycredits','toolbar=0,location=0,directories=0,status=1,scrollbars=1,resizable=1,copyhistory=0,menuBar=0,width='+largeur+',height='+hauteur+',left='+left+',top='+top+'');
	}
	else if (type == 5) { // 5 = portraits
		var hauteur = 680;
		var largeur = 640;
		var top=(screen.height-hauteur)/2;
		var left=(screen.width-largeur)/2;
		window.open(url,'portraits','toolbar=0,location=0,directories=0,status=1,scrollbars=1,resizable=1,copyhistory=0,menuBar=0,width='+largeur+',height='+hauteur+',left='+left+',top='+top+'');
	}
	else { void(0);	}
}

function pro_type(id) {
	/* on masque tous les tableaux */
	document.getElementById('hotel_resto').style.display='none';
	document.getElementById('hotel').style.display='none';
	document.getElementById('resto').style.display='none';
	document.getElementById('viticul').style.display='none';
	
	/* et on affiche celui du clic */
	document.getElementById(id).style.display='block';
}


// ============== fonction new window (target = blank) ==============
function openBlank(url) {
	if (window.open) {
		window.open(url);
	}
}


function resetInput(thisInput) {
	//alert(thisInput);
	varInput = document.getElementById(thisInput);
	varInput.value='';
}
