//<![CDATA[
/*----------------artofweb - sitecontrol 3rd breathing-------------------------------
------------------------------------------------------------------------------------*/

	
	function user_register_fnc() {
		$.getJSON('/main_res/ajax/init.php',
			{
				module: 'db_pg_users',
				func: 'register_user_ajax',
				out: 'json'
			},
			function (data) {
				if (data.html) {
					$("#id-auth-block").hide();
					$("#register_and_auth").dialog("close");
					$('#uregister').empty();				
					$("#uregister").dialog({
						autoOpen: false,
						width: 400,
						resizable: false,
						modal: true
					});
					$('#uregister').append(data.html);
					$('#uregister').dialog('open');
					var tt = $("#id_cmp").val();
					$("#product_id").val(tt); 

				} else {
					alert('500. Server error.');
				}
			}
		);
	}


//]]>
