function testCarteProspectToclient( servername, page ) {
	var t0 = $('lelien').innerHTML;
	$('responseCheck').innerHTML = '';
	$('lelien').innerHTML = '<img src="http://'+ servername +'/wp-content/themes/themeWP/images/patentier.gif" alt=""/> Patientez pendant le chargement des donn&eacute;es.';
	var opt = {
	   method: 'post',
	   postBody: 'action=checkProspectIsClientByNumCarte&numCarte='+ escape( $('champCarte').value )+'&page='+escape( page )+'&'+ $('information').serialize(),
	   onSuccess: function( t ) {
	   		var rep = eval('(' + t.responseText + ')');	   		
	   		if( rep.error == 1 )
	   		{
	   			$('responseCheck').className = 'red';
	   			$('responseCheck').innerHTML = rep.html;
	   			$('lelien').innerHTML = t0;
	   		}
	   		else if( rep.error == 2 )
	   		{
	   			$('prospect').className = 'txtCentre';
	   			$('prospect').innerHTML = rep.html;
	   		}
	   		else if( rep.error == 3 )
	   		{
	   			$('prospect').className = 'finQuestion';
	   			$('prospect').innerHTML = rep.html;
	   		}
			}
	};
	new Ajax.Request( 'http://'+servername+'/wp-content/plugins/SVPprospectToclient/php/dispatcher.php', opt );
}
function open_popup2( url ){
	var h=200;
	var l=400;
	var hauteur=Math.round((screen.availHeight-h)/2); 
	var largeur=Math.round((screen.availWidth-l)/2); 
	window.open( url , null, "width=400,height=200,top="+hauteur+", left="+largeur+", status=no, resizable=no, toolbar=no, menubar=no, scrollbars=no")
}

//Bannière callback
function open_popup(ip){
	var h=410;
	var l=490;
	var hauteur=Math.round((screen.availHeight-h)/2); 
	var largeur=Math.round((screen.availWidth-l)/2); 
	window.open("http://webcallback.axialys.net/popup.php?ip="+ip, null, "width="+l+", height="+h+", top="+hauteur+", left="+largeur+", status=no, resizable=no, toolbar=no, menubar=no, scrollbars=no")
}

function initEvent(e){
	Event.stop(e);
	//Protection des adresses emails
	$$('span.svpadd').each( function( ele ) {
		ele.innerHTML = ele.getAttribute('attr') + '@svp.com';
	});
}
Event.observe( window ,'load', initEvent );