/**************
* Like Comment
***************/


        function sendRequest( sId, place ) {

            $.get("controllers/route.php", { place: place, id: sId },
				function(data){
					if( data != "" )
					{	
						showResult( data, sId );
					}else
						alert("Adatok küldése sikertelen. Próbálja meg újból.");
				}
			);
        }
		
		function showResult( sMessage,id ) {
            var divStatus = document.getElementById( "comment_" + id );
            divStatus.innerHTML = sMessage;            
        }
		
			
/*********************
* End of Like Comment
*********************/

/*********************
* Write Comment
*********************/
		$(document).ready(function() {
			$('#formComment').submit(function() {
			  $.post("controllers/route.php", $(this).serialize(),
				  function(data){
					if( data == 1 )
					{	
						$('#ctext').empty();
						$('#ctitle').empty();
						alert("A megjegyzés sikeresen elküldve. Moderálásra vár.");
					}else
						alert("Töltse ki az összes mezőt.");
				}
			  );
			  return false;
			});
			});

/*********************
* End of Write Comment
*********************/

		function var_dump(obj) {
			// JavaScript var_dump
		   if(typeof obj == "object") {
			  return "Type: "+typeof(obj)+((obj.constructor) ? "\nConstructor: "+obj.constructor : "")+"\nValue: " + obj;
		   } else {
			  return "Type: "+typeof(obj)+"\nValue: "+obj;
		   }
		}
		
function die (status) {
    // !No description available for die. @php.js developers: Please update the function summary text file.
    // 
    // version: 1004.2314
    // discuss at: http://phpjs.org/functions/die    // +   original by: Brett Zamir (http://brett-zamir.me)
    //  -   depends on: exit
    // %        note 1: Should be considered expirimental. Please comment on this function.
    // *     example 1: die();
    // *     returns 1: null    
	return this.exit(status);
}
