
$.ajaxSetup({ 
	type : 'POST',
	url:'/ajax.php',
	dataType : 'json', 
	beforeSend : function(){ 
		$('#main').html('<div class="loading"><img src="/images/loader64.gif" /></div>'); 
	}, 
	error: function(request,textStatus,errorThrown){ 
		alert(textStatus+ ' ErrorThrown: '+ errorThrown); 
	},
	dataFilter: function(data){ 
	//alert(data);
		return data; 
	}
}); 
function changeRoleType(t){ 
	newRoleType = t.options[t.selectedIndex].value; 
	data = 'action=changeRoleType&roleType='+newRoleType; 
	$.ajax({
		data : data, 
		success : function(){ 
			window.location.href="/account.html"; 
		}
	}); 
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
} 
function addRegProperty(){
	prop = $('.properties'); 
	c = (prop.find('.property').size() + 1); 
	prop.append('<h3 id="propertyTitle'+c+'">Address #'+c+'</h3><div id="property'+c+'" class="property">'+prop.find('.property:first').html()+' <div style="text-align:right"><a href="javascript:void(0)" onclick="removeProperty('+c+');">Remove &raquo;</a></div> </div>'); 
	newProp = $('#property'+c);
	newProp.find('.propertyAddress').attr('name','properties['+c+'][address]'); 	
	newProp.find('.propertyCity').attr('name','properties['+c+'][city]'); 	
	newProp.find('.propertyState').attr('name','properties['+c+'][state]'); 	
	newProp.find('.propertyZip').attr('name','properties['+c+'][zip]'); 	
	newProp.find('.propertyOwner').attr('name','properties['+c+'][owner]'); 	
}
function removeProperty(id){ 
	$('#property'+id).remove();
	$('h3#propertyTitle'+id).remove();  
}
function switchSubTabs(t){ 
	$('.subTab').removeClass('active'); 
	$('.subTab#subTab'+t).addClass('active'); 
	$('.subTabNavs a').removeClass('active');
	$('.subTabNavs a.subTabNav'+t).addClass('active');
}


