function _onfocus(id){
		
		var idval = document.getElementById(id);
		if(idval.value == idval.defaultValue) idval.value = ''; 	
	
	}
	
	function _onblur(id){
		
		var idval = document.getElementById(id);
		if(idval.value == '') idval.value = idval.defaultValue;
	
	}
	
	function remove_file(filename){
								
		$.post("/remove_file.php", { filenev: filename }, function(data) {
    				
    		$("#upload_box").html(data);
			$("#nyomtatas_gomb").css("display", "none");
			$("#nyomtatas_gomb").css("width", "0px");
    				
    	});
			
	}
	
	function remove_borito(filename){
								
		$.post("/remove_borito.php", { filenev: filename }, function(data) {
    				
    		$("#_egyeni_borito_box").html(data);
			
    	});
			
	}
	
	function dolgozatUpload()
	{
		$("#loading")
		.ajaxStart(function(){
			$(this).show();
		})
		.ajaxComplete(function(){
			$(this).hide();
		});

		$.ajaxFileUpload
		(
			{
				url:'/dolgozatupload.php',
				secureuri:false,
				fileElementId:'fileToUpload',
				dataType: 'json',
				success: function (data, status)
				{
					if(typeof(data.error) != 'undefined')
					{
						if(data.error != '')
						{
							alert(data.error);
						}else
						{
							$("#upload_box").html(data.input_remove);
							$("#nyomtatas_gomb").css("display", "block");
							$("#nyomtatas_gomb").css("width", "150px");
						}
						
					}
					
					
					
					
				},
				error: function (data, status, e)
				{
					alert(e);
				}
			}
		)
		
		return false;

	}





	function boritoUpload()
	{
		$("#loading")
		.ajaxStart(function(){
			$(this).show();
		})
		.ajaxComplete(function(){
			$(this).hide();
		});

		$.ajaxFileUpload
		(
			{
				url:'/boritoupload.php',
				secureuri:false,
				fileElementId:'boritoFeltoltes',
				dataType: 'json',
				success: function (data, status)
				{
					if(typeof(data.error) != 'undefined')
					{
						if(data.error != '')
						{
							alert(data.error);
						}else
						{
							
							$("#_egyeni_borito_box").html(data.input_remove);
							
						}
						
					}
					
					
					
					
				},
				error: function (data, status, e)
				{
					alert(e);
				}
			}
		)
		
		return false;

	}
	
	
	
	
	function ajaxFileUpload()
	{
		$("#loading")
		.ajaxStart(function(){
			$(this).show();
		})
		.ajaxComplete(function(){
			$(this).hide();
		});

		$.ajaxFileUpload
		(
			{
				url:'/doajaxfileupload.php',
				secureuri:false,
				fileElementId:'fileToUpload',
				dataType: 'json',
				success: function (data, status)
				{
					if(typeof(data.error) != 'undefined')
					{
						if(data.error != '')
						{
							alert(data.error);
						}else
						{
							
						}
						
					}
					
					var idval = $("#kep_galeria_id").val();
    				var nameval = $("#kep_nev").val();
    				var filenev = data.filenev;
					
					$.post("/pages/edit_picture.php", { name: nameval, id: idval, filenev: filenev }, function(data) {
    				
    					$("#kepek_box").html(data);
    				
    				});
					
				},
				error: function (data, status, e)
				{
					alert(e);
				}
			}
		)
		
		return false;

	}

