//pazymi eilute
function setPointer(theRow, thePointerColor)
{
	if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {return false;}
	if (typeof(document.getElementsByTagName) != 'undefined') {var theCells = theRow.getElementsByTagName('td');}
    else if (typeof(theRow.cells) != 'undefined') {var theCells = theRow.cells;}
    else {return false;}
    
	var rowCellsCnt  = theCells.length;
    for (var c = 0; c < rowCellsCnt; c++) {theCells[c].style.backgroundColor = thePointerColor;}
    return true;
}

function submitSearchForm(id) {
	if(id==1) {
		var obj = document.forms['search1'];
		action = obj.action.value + ',key.' + obj.key.value;
		//alert(''+action);
		window.location = action;
	}
	if(id==2) {
		var obj = document.forms['search2'];
		action = obj.action.value + ',filter_id.' + obj.filter_id.value + ',key.' + obj.key.value;
		window.location = action;
	}
}

// Open a window at the center of the screen
function openCenteredWindow(url, name, width, height, extra) {
	var x=0, y = 0;
	if (screen) {
		x = Math.floor((screen.availWidth-width)/2);
		y = Math.floor((screen.availHeight-height)/2);
		//alert('x' + x + ' y ' +y);
	}

	if (typeof(extra) == 'undefined') {
		extra = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0	';	
	}
	window.open(url, '', 'height='+height+',width='+width+',top='+y+',left='+x+', '+extra);
}
