/*
// 2006-03-18
// Copyright (c) Artburo | http://www.artburo.ru/
// Author - Stepan Galkin
*/

/* common vars */
var checkedRowId = null;

/* common functions */
function OpenWindow(file, width, height, target, scroll)
{

	var width  = width ? width : 640;
	var height = height ? height : 550;
	var x = (screen.width - width)/2;
	var y = (screen.height - height)/4;
	var scroll = (scroll != null ? scroll : true);
	window.open(
		file, target, 'left=' + x + ', top=' + y + ', width=' + width + ', height=' + height + ', ' +
		'menubar=no, resizable=yes, scrollbars=' + (scroll ? 'yes' : 'no') + ', status=yes, titlebar=yes, toolbar=no, help=no'
	);
}

function checkTr(rowId)
{
	if (!document.getElementById || !document.getElementById(rowId)) return false;
	if (document.getElementById(checkedRowId)) document.getElementById(checkedRowId).className = '';
	document.getElementById(rowId).className = 'selected';
	checkedRowId = rowId;
}

function ResponseLocation(URL)
{
	if (URL) document.location.href = URL;
}

function OnTop()
{
	window.scroll(0, 0);
}