/**
 *
 * @access public
 * @return void
 **/
function initOverlay(){
	//document.getElementById("overlay").style.height = '1000px';
	//document.body.style.overflow = "hidden";
}

function cleanEmailInput() {
	input = document.getElementById("emailInput");
	input.value = "";
}

function emailCheck() {
	input = document.getElementById("emailInput");
	var mail = input.value;
	input.value = mail.toLowerCase();
	var mailCheck = /(^([a-z0-9]+(([\.\-\_]?[a-z0-9]+)+)?)\@(([a-z0-9]+[\.\-\_])+[a-z]{2,4})$)/;

	if (mailCheck.test(mail)) {
		testresult = true;
	} else {
		alert("Attention, votre adresse mail ne semble pas valide\n\nElle doit être de la forme prenom.nom@FAI.com,\nsans espaces ni caractères accentués");
		input.focus();
		return false;
	}
}

function hideNewsletterSubscriptionBoxShow() {
	document.getElementById('NewsletterSubscriptionBoxShow').style.display = 'none';
	document.getElementById('overlay').style.display = 'none';
	document.body.style.overflow = "";
}

/*function getPageSize(){
	var x,y;
	if (self.innerHeight) // all except Explorer
	{
		x = self.innerWidth;
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	}


	var x1,y1;
	var test1 = document.body.scrollHeight;
	var test2 = document.body.offsetHeight
	if (test1 > test2) // all but Explorer Mac
	{
		x1 = document.body.scrollWidth;
		y1 = document.body.scrollHeight;
	}
	else // Explorer Mac;
		 //would also work in Explorer 6 Strict, Mozilla and Safari
	{
		x1 = document.body.offsetWidth;
		y1 = document.body.offsetHeight;
	}

	arrayPageSize = new Array(x,y,x1,y1)
	return arrayPageSize;
}

function initOverlay() {
	var arrayPageSize = getPageSize();

	var objBody = document.getElementsByTagName("body").item(0);

	var objOverlay = document.createElement("div");
	objOverlay.setAttribute('id','overlay');
	objOverlay.style.display = 'none';
	objOverlay.style.position = 'absolute';
	objOverlay.style.top = '0';
	objOverlay.style.left = '0';
	objOverlay.style.zIndex = '90';
	objOverlay.style.width = '100%';
	objOverlay.style.background = 'white';
	objOverlay.style.height = (arrayPageSize[1] + 'px');
	objOverlay.style.display = 'block';

	objBody.insertBefore(objOverlay, objBody.firstChild);
	objBody.insertBefore(objNLS, objOverlay);
}*/