   var result_div = '';
   var error_div = '';
   var hour_div = '';
   
   
  function ptaKepHelyHiba(ojjektum, hiba){
  	if(document.getElementById(error_div)) {
			document.getElementById(error_div).innerHTML = "Hiba. " + hiba.name + " :: " + hiba.fileName + " :: " + hiba.lineNumber + " :: " + hiba.message;
  	}
  	else {
  		alert( "Hiba. " + hiba.name + " :: " + hiba.fileName + " :: " + hiba.lineNumber + " :: " + hiba.message);  		
  	}
	}
	
	function ptaLoading(){
		if(document.getElementById(hour_div)) {
			document.getElementById(hour_div).style.display = "";
		}
	}
   
	function ptaComplete(){
		if(document.getElementById(hour_div)) {	
			document.getElementById(hour_div).style.display = "none";
		}
	}
	
	function ptaCompleteZip(originalRequest) {
		if(document.getElementById(result_div)) {	
			$(result_div).value = originalRequest.responseText;
			if(document.getElementById(hour_div)) $(hour_div).style.display = "none";
		}
	}
	
	function changegroup() {
  	  	
  	result_div = 'txtgroup';
 	  error_div = 'dv_list';
 	  hour_div = 'loading1';
   	 	  
 	  if(document.getElementById(hour_div)) document.getElementById(hour_div).style.display = "";
   	 	      	  
   	var poststr = "show=getgroupdesc" +
                  "&id=" + escape(encodeURI( $('boxgroup').value ));
                  
    var ajax = new Ajax.Request(		
			"getparam.php",
				{
					method: "post",
					parameters: poststr,
					onLoading: ptaLoading,
					onComplete: ptaCompleteZip,
					onException: ptaKepHelyHiba
				}
			);
			
  }
  
  
	function addrating(tmprate, tmpid) {
  	  	
  	result_div = 'dvRate';
 	  error_div = 'dvRate';   	 	  
 	  	      	  
   	var poststr = "show=addrate" +
                  "&id=" + escape(encodeURI( tmpid )) + "&rate=" + escape(encodeURI( tmprate ));
            
    var ajax = new Ajax.Updater(
			result_div,
			"getRate.php",
			{
				method: "post",
				parameters: poststr,
				onLoading: ptaLoading,
				onComplete: ptaComplete,
				onException: ptaKepHelyHiba
			}
		);	
        
  }

 
