function showTermsAndPrivacyPolicy ( )
{

	var dialog = $('<div style="display:hidden" id="newDialog"></div>').appendTo('body');

	$("#newDialog").html("<image src='../img/progressAnimation.gif'/><a>&nbsp; Cargando...<a/>");
				
	$("#newDialog").dialog({ 
		bgiframe: true,
		buttons: { "Cerrar": function() { $(this).dialog("close"); }, 
			   "Aceptar": function() { $("#f-reg_terms").attr('checked', true); $(this).dialog("close");}
			 },
		modal: true,
		/*show: 'scale', //Allowed Values: 'blind', 'clip', 'drop', 'explode', 'fold', 'puff', 'slide', 'scale', 'size', 'pulsate'.
		hide: 'scale', //Allowed Values: 'blind', 'clip', 'drop', 'explode', 'fold', 'puff', 'slide', 'scale', 'size', 'pulsate'.*/
		title: "Terminos de Privacidad y Condiciones de Uso" ,
		height: 360,
		width: 587,
		close: function() {
			//$(this).dialog("close");
			//$("#newDialog").dialog("destroy");
			$("#newDialog").remove();
		}
	});
	

	loadTermsAndPrivacyPolicy ( );
	
}


function loadTermsAndPrivacyPolicy ( )
{

	//the AJAX request
	$.ajax({
		   type: "GET",
		   url: "../termsandpolicy.html",
		   contentType: "application/x-www-form-urlencoded; charset=utf-8",
        	   success: function( msg ) {
		
				if ( msg != '' ) {
	
					$("#newDialog").html( msg );
						
				}	   	   
	
		   }
	});

}

