var MapReferral = Class.create();
MapReferral.prototype = {
    initialize: function(changeCustomerUrl){
        
        this.changeCustomerUrl = changeCustomerUrl;
       
    },
	
	changeCustomer : function(customerId)
	{
		var url = this.changeCustomerUrl;
		
		url += 'customer_id/' + customerId;

		new Ajax.Updater('map-customer-info',url,{method: 'get', onComplete: function(){updateReferalInfo();} ,onFailure: ""}); 	
		
	}
}

function updateReferalInfo()
{
	$('customer_name').value = $('map_customer_name').value;
	$('customer_email').value = $('map_customer_email').value;
}

function affiliateResetForm()
{
	location.href='';
}
