function checkFbLogin(redirect) {
    $.get('/facebook/fbLogin',{'redirect':redirect},function(response){ 
        try {
			object = eval('('+response+')');
        }
		catch(exp) {
			object = response;
		}
					
		if(typeof(object)=='object') {
			location.href = redirect;
		}
		else {
			$('#layerOverlay').show();
		    $('#layerContainer').attr('class', 'fbRegistration');
	        $('#layerContainer').html(response);
		    getWindowSize('#layerContainer');
	        $('#layerContainer').show();
        }			
	});	
		
    return false;
}

function submitForm(url,formName,responseElement) {
	$.post(url,$('#'+formName).serialize(),function(response){
	   $('#'+responseElement).html(response);	                  
	},"html")
	return false;
}
