// ------------------------------------------------------
// centerWindow(url, name, w, h, attributes)
//
// Opens a new window with the specified attributes,
// centered in the screen
// * url			the new window URL
// * name 			the new window name
// * w				the new window width
// * h				the new window height
// * attributes		other new window attributes
// ------------------------------------------------------
function centerWindow(url, name, w, h, attributes)
{
var winleft = (screen.width - w) / 2;
var wintop = (screen.height - h) / 2;
winprops = 'height=' + h + ',width=' + w + ',top=' + wintop + ',left=' + winleft;

if (attributes != '')
	{
		winprops = winprops + ',' + attributes;
	}
else
	{
		winprops = winprops + ',resizable=no,scrollbars=yes';
	}
win = window.open(url, name, winprops);
if (parseInt(navigator.appVersion) >= 4)
	{
		win.window.focus();
	}
}

// ------------------------------------------------------
// windowHelp(url, name, w, h, attributes)
//
// Opens a new window with the specified attributes,
// called helpVideo
// * url			the new window URL
// * name 			the new window name
// * w				the new window width
// * h				the new window height
// * attributes		other new window attributes
// ------------------------------------------------------
function windowHelp(url, name, w, h, attributes)
{
var winleft = 30;
var wintop = (screen.height - h - 80);
winprops = 'height=' + h + ',width=' + w + ',top=' + wintop + ',left=' + winleft;

if (attributes != '')
	{
		winprops = winprops + ',' + attributes;
	}
else
	{
		winprops = winprops + ',resizable=no,scrollbars=yes';
	}
win = window.open(url, 'helpVideo', winprops);
if (parseInt(navigator.appVersion) >= 4)
	{
		win.window.focus();
	}
}
