function cur(c) {
	if (c=='HUF' || c=='EUR') {
		f_setCookie("currency", c);
		document.location.reload();
	};
}
function f_getCookie(Name){ 
	var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
	if (document.cookie.match(re)) //if cookie found
		return document.cookie.match(re)[0].split("=")[1] //return its value
	return null
}

function f_setCookie(name, value) {
	var exdate=new Date();
	var exdays = 365; // nap
	exdate.setDate(exdate.getDate() + exdays);
	var value = escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
	var cstr = name+"="+value+"; path=/";
//	alert(cstr);
	document.cookie = cstr;
}
function clearsearch() {
	if (document.getElementById('q').value.substring(0,5) == 'keres') document.getElementById('q').value = '';
}
function clearsearch2() {
	if (document.getElementById('q2').value.substring(0,5) == 'keres') document.getElementById('q2').value = '';
}
function zoom(pic) {
		 window.open('zoom.php?photo='+pic, 'ZOOM', 'scrollbars=no,status=no,location=no,toolbar=no,resizable=no,width=200,height=200');
}
function zoom4(mit,xx,yy) {
    window.open(mit, 'ZOOM4', 'scrollbars=yes,status=yes,location=no,toolbar=yes,resizable=yes,width='+xx+',height='+yy);
}

function setRowBg(sor, newclass) {
    if (newclass == '' || typeof(sor.style) == 'undefined') {
        return false;
    }
    
	if (typeof(document.getElementsByTagName) != 'undefined') {
        var cella = sor.getElementsByTagName('td');
    } else if (typeof(sor.cells) != 'undefined') {
        var cella = sor.cells;
    } else {
        return false;
    }

    var cellak  = cella.length;
    for (var c = 0; c < cellak; c++) {
        cella[c].className = newclass;
        //cella[c].style.cursor = 'pointer';
    }

    return true;
}

