function getFile(id, w, h)
{
	if (w != -1)
	{
		if (( w > 0 ) & ( h > 0)) 
		{
			h += 55;
			w += 40;
			
			if ( w > screen.width ) { w = screen.width; }
			if ( h > screen.height ) { h = screen.height; }
		}
		else
		{
			w = screen.width;
			h = screen.height;
		}
		
		sizeString = 'height=' + h + ',width=' + w + ',';
		window.open(site_root + 'get_file.php?id=' + id, '_blank',  'menubar=no, ' + sizeString + 'scrollbars=yes, resizable=yes,toolbar=no,location=no,status=no');
	}
	else
	{
		document.location.href = 'get_file.php?id=' + id;
	}
	return false;
}

function openInWindow(URL, w, h)
{
	if ((w > screen.width)) { w = screen.width; }
	if ((h > (screen.height - 50) || h==0)) { h = screen.height; }
	
	sizeString = 'height=' + h + ',width=' + w + ',';

	window.open(URL, '_blank',  'menubar=no, ' + sizeString + 'scrollbars=yes, resizable=yes,toolbar=no,location=no,status=no');
	
	return false;
}


var oldClass = '';
var oldClassIE = ''; 

function mOver(el)
{
	oldClassIE = el.className; //IE
	oldClass = el.getAttribute('class', 'cat_row_sel');
	el.className = 'cat_row_sel'; // IE
	el.setAttribute('class','cat_row_sel'); // Others
}

function mOut(el)
{
	//el.className = 'cat_row'; // IE
	//el.setAttribute('class','cat_row'); // Others

	el.className = oldClassIE; // IE
	el.setAttribute('class',oldClass); // others
}

function popItem(cat, item, s)
{
	openInWindow('./show_item.php?cat=' + cat + '&id='  + item + '&s=' + s, 640, 0);
}
