﻿var PrevClassName = "";
var champ = "0";

function ChangeCssClass(aDiv,aClass)
{
		document.getElementById(aDiv).className = aClass;
}

function ChangeCssClassBis(aDiv,aClass)
{
		PrevClassName = document.getElementById(aDiv).className;
		document.getElementById(aDiv).className = aClass;
}

var yWithScroll;
var xWithScroll;
function getPageSizeWithScroll(){
	if (window.innerHeight && window.scrollMaxY) {// Firefox
		yWithScroll = window.innerHeight + window.scrollMaxY;
		xWithScroll = window.innerWidth + window.scrollMaxX;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		yWithScroll = document.body.scrollHeight;
		xWithScroll = document.body.scrollWidth;
	} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		yWithScroll = document.body.offsetHeight;
		xWithScroll = document.body.offsetWidth;
  	}

	
}

function IsValidMail(email)
{
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email)){
		return (true)
	}
	return (false)
}

function OpenCloseDiv(aDiv)
{


	if (document.getElementById(aDiv).style.display == "")
	{
		document.getElementById(aDiv).style.display = "none";
	}
	else
	{
		document.getElementById(aDiv).style.display = "";
	}
	

	
	

}

function DisplayNavRapide()
{
	var target = $('LstLunettes');
	var fx = new Fx.Styles(target, {duration: 1000, wait: false});
	
	target.setStyles({'height': 0});

	fx.options.transition = Fx.Transitions['Expo']['easeOut'];
	fx.options.duration = 1000;
		
	fx.start({'height': 40});
}


function self_goto(aLink)
{
	document.location.href = decodeBase64(aLink);
}

function blank_goto(aLink)
{
	 var popDetail= window.open(decodeBase64(aLink));
}

