/* értékelés */
etimer=[];
function eover(id, p) {
	var e=document.getElementById(id+'_e');
	if (p==0) {
		p = document.getElementById(id+'_i').value;
		if (e.className!='e')
			e.className='e';
	} else {
		if (e.className!='es')
			e.className='es';
	}
	if (etimer[id]) {
		clearTimeout(etimer[id]);
		etimer[id]=false;
	}
	for (var i=1; i<=5; i++)
		document.getElementById(id+'_'+i).className=p>=i ? 'e1' : 'e0';
}
function eout(id) {
	etimer[id]=setTimeout("etimer['"+id+"']=false;eover('"+id+"',0);", 250);
}
function eclick(tip, kod, p) {
	ajaxload({get:'ajax_ertekeles.php',post:'tip='+tip+'&kod='+kod+'&pont='+p,
		onload:function(xmlHttpReq) {
			var a=xmlHttpReq.responseText.split('|');
			if (a.length==4) {
				document.getElementById(tip+kod+'_i').value=a[1];
				document.getElementById(tip+kod+'_c').innerHTML=a[2];
				eover(tip+kod, 0);
			} else if (a.length==3 && a[1]=='x') {
				alert('Többször ugyan azt nem értékelheted!');
			}
		}
	});
}
