save_vendor_msg 		= function(msg) { show_msg(msg, 'save_vendor_msg'); }

function save_profile_vendor(ptr, id) {
	f = function(o) {
		xmlDoc 		= create_xml_doc(o.responseText);
		events 		= xmlDoc.getElementsByTagName('save');	
		
		if(xmlDoc.getElementsByTagName('msg').length)
			save_vendor_msg(getText(xmlDoc, 'msg'));			
	}
	
	svm = $('save_vendor_msg');
	
	if(!svm) {
		svm = $(document.createElement('div'));
		svm.setAttribute('id', 'save_vendor_msg');
		svm.addClassName('directory_alert');
		document.body.appendChild(svm);
		svm.hide();
	}	

	new Ajax.Request(save_vendor_file, { postBody: 'id=' + id + '&j=' + ut(), method: 'post', onSuccess: f } ); 		
}