function Ext_Contact(id){
	if(GE('iNorx_Ext_ContactEmail'+id)) var email = GE('iNorx_Ext_ContactEmail'+id).value;
	else var email = 'membre@membre.com';
	var msg = GE('iNorx_Ext_ContactMsg'+id).value;
	var place = email.indexOf("@",1);
	var point = email.indexOf(".",place+1);
	if((place > -1)&&(email.length >2)&&(point > 1)){
		var xhr = getXhr();
		xhr.onreadystatechange = function(){ 
			if(xhr.readyState == 4){
				if(getAjax(xhr)){
					GE('iNorx_Ext_ContactLoad'+id).style.display = 'none';
					GE('iNorx_Ext_ContactOk'+id).style.display = 'block';
				}
			}
		};
		if(GE('iNorx_Ext_ContactEmail'+id)) GE('iNorx_Ext_ContactEmail'+id).disabled = 'disabled';
		GE('iNorx_Ext_ContactMsg'+id).disabled = 'disabled';
		GE('iNorx_Ext_ContactSub'+id).style.display = 'none';
		GE('iNorx_Ext_ContactLoad'+id).style.display = 'block';
		ExtAjax(xhr, 'Contact', 'no', 'id='+id+'&email='+email+'&msg='+msg);
	}
	else{
		iNorx_alert('Alerte:', 'Entrez une adresse e-mail valide!', false);
	}
}

function Ext_Contact_Log(id){
	if(GE('iNorx_Ext_ContactMail'+id)){
		var xhr = getXhr();
		xhr.onreadystatechange = function(){ 
			if(xhr.readyState == 4){
				if(rep = getAjax(xhr)){
					if(rep == 'false') GE('iNorx_Ext_ContactMail'+id).innerHTML = '';
					else GE('iNorx_Ext_ContactMail'+id).innerHTML = rep;
				}
			}
		};
		ExtAjax(xhr, 'Contact', 'no', 'act=log&id='+id);
	}
}
