
function szotarbeolvas(szo,szo2,hova,html) {
//	alert(szo);
	 $.post(servercime+'admin/_szotarleker_.php', { szo: szo, szo2: szo2},
   		function(data){
   			if (html==true) {
     			$(hova).html(data);
   			} else {
   				$(hova).val(data);
   			}
   		});

/*
	$.ajax({
	  type: 'POST',
	  url: servercime+'admin/_szotarleker_.php',  
	  data: 'szo='+szo,
	  dataType: "text/xml",
	  async: false,
	  success: function(adata){
	  		return '+'+adata+'-';
		}
	});
*/
}


function clikkcount(id,hova,tabla,frame) {
	/*$.post("click.php", {id: id} );*/
	$('#errors').append('<form id="clickform" target="'+frame+'" method="POST" action="'+servercime+'click.php">'+
	'<input type="hidden" name="cltabla" value="'+tabla+'">'+
	'<input type="hidden" name="clid" value="'+id+'">'+
	'<input  name="hova" type="hidden" value="'+hova+'">'+
	'</form>');	
	$('#clickform').submit();
	$('#clickform').remove();
}

function emailkuld(tabla,id,szerver) {
	   Shadowbox.open({
        player:     'iframe',
        content:    szerver+'emailkuld.php?ct='+tabla+'&ctid='+id,
        height:     655,
        width:      695
    });

}

function katbezar(cl,be) {
	if (be) {
		$('li.'+cl).each( function() {
				$(this).hide();
			}
		);
	} else {
		//alert('nyit'+cl);
		var nyit=$('#'+cl).attr('fokat');
		$('li.fk-'+ nyit).each( function() {
			$(this).show();
			}
		);
	}
}


function kotelezo(nev,igen,rejt) {
	if (igen) {
		$('#'+nev).addClass("required");
		$('label[for="'+nev+'"]').addClass("kotelezo");
	} else {		
		$('#'+nev).removeClass("required");
		$('label[for="'+nev+'"]').removeClass("kotelezo");	
		$('label[for="'+nev+'"].error').remove();	
	}
	if (rejt) {
		$('#'+nev).hide();
		$('label[for="'+nev+'"]').hide();
	} else {
		$('#'+nev).show();
		$('label[for="'+nev+'"]').show();
	}
	return $('#'+nev);
}

function inputinfo() {
    $('input:text').focus( function() { 
        showHint($('span.hint',$(this).parent()).html(),$(this));
    });
     $('input:password').focus( function() { 
        showHint($('span.hint',$(this).parent()).html(),$(this));
    });
    $('input:checkbox').focus( function() { 
        showHint($('span.hint',$(this).parent()).html(),$(this).next());
    });
	$('select').focus( function() { 
        showHint($('span.hint',$(this).parent()).html(),$(this));
    });		        
	$('textarea').focus( function() { 
        showHint($('span.hint',$(this).parent()).html(),$(this));
    });	
    $('*').blur( function() { 
        closeHint();
    });
}




$(document).ready(function() {
	$("div.kepdiv").bind('mouseover',function() {
		$(this).stop().animate({height:$(this).attr("merety")+'px',width:$(this).attr("meretx")+'px'},'fast');
		$(this).addClass('nkeret');
		
	});
	
	$("div.kepdiv").bind('mouseout',function() {
		$(this).stop().animate({height:'80px',width:'80px'},'fast');
		$(this).removeClass('nkeret');
	});

	$("a.log_out").bind('click',function() {
			$.post(servercime+'_formsubmit_.php',{process:'logout'},				   
					function(data){   				
	 				if (data.substring(0,2)=='OK') { 
	 					window.location.href=data.substring(3);
			 		} else {
			 			alert('hiba!');
			 		}
	 			}
	 		);
	});	
	$('.lngmnu').each( function() {
			$(this).mouseover(function () {
				if (!$(this).hasClass('disabl')) {
					$(this).animate({ 
					        opacity: 0.5,
					      }, 20 );
					}
				}).mouseout(function () {
					if (!$(this).hasClass('disabl')) {
						$(this).animate({ 
						        opacity: 1,
						      }, 300 );
					}
				});
				
				if(lang==$(this).attr('lang')) {
					$(this).hide();
				}
				$(this).click(function() {
					$('body').append('<form id="clickform" method="POST">'+
						'<input type="hidden" name="lang" value="'+$(this).attr('lang')+'">'+
						'</form>');	
						$('#clickform').submit();
						$('#clickform').remove();						
					}
				);
	});
	
	$('#imgkkod').bind('click', function(e){
	    	$('#imgkkod').attr("src",servercime+'sic.php?id='+$('#imgkkod').attr("kid")+'&rnd='+Math.random());
	    	$('#kepkod').val('');
	    	}
	);
	$(".nopaste").bind('paste',function(e) {
    		     e.preventDefault();
	    });
	
});



