function CMSalonCommect_SendEmail(id){
	var container = document.getElementById('cbl_'+id);

	try{
		var targetname = document.getElementById('contact_targetname_'+id);
		var targetemail = document.getElementById('contact_targetemail_'+id);
		var targetcell = document.getElementById('contact_targetcell_'+id);
		var name = document.getElementById('contact_name_'+id);		
		var email = document.getElementById('contact_email_'+id);
		var article_title = document.getElementById('article_title_'+id);
		var comment = document.getElementById('contact_comment_'+id);	
		var question = document.getElementById('question');
		var answer = document.getElementById('answer');
		var url = document.getElementById('url');
		
		targetname = targetname?targetname.value:'';
		targetemail = targetemail?targetemail.value:'';
		targetcell = targetcell?targetcell.value:'';
		name = name?name.value:'';
		comment = comment?comment.value:'';		
		email = email?email.value:'';	
		article_title= article_title?article_title.value:'';		
		answer = answer?answer.value:'';	
		question = question?question.value:'';
		url = url?url.value:'';
		
		var msg = '';
		if(name=='') msg += ' -  Please supply your name.\r\n';
		if(article_title=='') msg += ' -  Please supply the title of the article.\r\n';
		if(email=='') msg += ' -  Please supply your email address.\r\n';		
		if(comment=='') msg += ' -  Please supply your comments.\r\n';
		if(agent.call('/modules/CMSalonCommect/CMSalonCommect.ajax.php','validEmail','',email) != true) msg += ' -  Please supply a valid email address.\r\n';
		if(agent.call('/modules/CMSalonCommect/CMSalonCommect.ajax.php','checkCapt','',question,answer) != true) msg += ' -  Please prove that you\'re not a computer.\r\n';
		
		if(msg==''){						
			agent.call('/modules/CMSalonCommect/CMSalonCommect.ajax.php','CMSalonCommect_SendEmail','cbl_'+id,targetname,targetemail,targetcell,name,email,article_title,comment, url);
		   
		}else{
			alert('There were problems sending this form:\r\n' + msg);
		}
	}
	catch(e){
		container.innerHTML = '<div class="CMSalonCommect_content"><table cellpadding="0" cellspacing="0" class="CMSalonCommect_Table"><tr><td class="CMSalonCommect_Heading">Oops</td></tr><tr><td class="CMSalonCommect_Label">There was an error sending your enquiry.<br />' + e + '</td></tr></table></div>';	
	}
}