function price_opener(id){
	window.open("../../../ar_szavazo.php?id="+id,"arszavazo","width=300, height=380, top=100, left=100");
}
function window_opener(href){
	window.open(href);
	return false;
}
function close_window(){
	window.opener.location.reload()
	window.close();
}
function check_minmax(min,max){
	var ar = document.getElementById("ar").value;
/*	if(ar < min){
		alert("A megadott ár kisebb, mint a minimum("+min+") érték");
		return false;
	}
	else if(ar > max){
		alert("A megadott ár("+ar+") nagyobb, mint a maximum("+max+") érték");
		return false;
	}
	else*/ 
	if(ar>0) return true;
	else return false;
}
function addCommas(nStr)
{
	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ',' + '$2');
	}
	return x1 + x2;
}
