function showRef(row,col,pid,lang) {
	var rowDiv = 'ref50_' + row;
	var totalRows = parseInt(document.getElementById('totalrows').innerHTML);
	var mClassName = 'ref50content r50t' + col;
		
	
	if (document.getElementById(rowDiv).style.display == 'block' && parseInt(document.getElementById('currentshown').innerHTML) == pid) {
		document.getElementById(rowDiv).style.display = 'none';
	} else {
		document.getElementById(rowDiv).className = mClassName;
		document.getElementById('currentshown').innerHTML = pid;
		
		
		/* eltunik az osszes */
	for (i=1; i <= totalRows; i++) {
		document.getElementById('ref50_' + i).style.display = 'none';
		
	}	
				
	
	document.getElementById(rowDiv).style.display = 'block';
	document.getElementById(rowDiv).innerHTML = '<div class="portfoliocontent waiting"><p><br/><br/></p></div>';
	
	new Ajax.Request('/engine/index.php', {method: 'get', parameters:'id=' + pid + '&row=' + row + '&lang=' + lang});
		
	}
	
}


function showRefI(id) {
	var x = 'refi_' + id;
	var y = 'refi2_' + id;
	if (document.getElementById(y).style.display != 'block') {
		document.getElementById(y).style.display = 'block';
		document.getElementById(x).style.backgroundPosition = '-50px -50px';
	} else {
		document.getElementById(y).style.display = 'none';
		/*document.getElementById(x).style.backgroundPosition = 'left bottom';*/
		document.getElementById(x).style.backgroundPosition = '-50px -50px';
	}
}

function showRefIB(id) {
	var x = 'refi_' + id;
	document.getElementById(x).style.backgroundPosition = 'left bottom';
	/*alert(id);*/
	/*id.style.backgroundPosition = 'left bottom';*/
}

function hideRefIB(id) {
	var x = 'refi_' + id;
	document.getElementById(x).style.backgroundPosition = '-50px -50px';
	/*alert(id);*/
	/*id.style.backgroundPosition = '-50px -50px';*/
}