//general
function validateForm()
{
	var passed = true;
	$$('.required').each(function(el) {
		el.observe('focus', function(event) {event.element().removeClassName('empty');});
		if (!el.value || (el.value == 0 && el.hasClassName('inp2'))) {
			el.addClassName('empty');
			passed = false;
		}
	});	
	if (!passed)
	{
		alert('Tous les champs avec * sont obligatoires');
	}
	return passed;
}

function activateMenu(menu)
{
	if ($(menu))
	{
		$(menu).addClassName('on');
		return true;
	}
	return false;
}


function openPopup(url, width, height)
{
	window.open(url, 'popup', 'width=' + width + ',height=' + height + ',top=' + (screen.height-height)/2 + ',left=' + (screen.width-width)/2);
}

String.prototype.unescapeHtml = function () {
    var temp = document.createElement("div");
    temp.innerHTML = this;
    var result = temp.childNodes[0].nodeValue;
    temp.removeChild(temp.firstChild)
    return result;
} 

function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}
