//Define Constants

var DEFAULT_WIN_FEATURES = "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,";
var CREATE_CHANNEL_WIN_SIZE = "width=600,height=400";
var DELETE_CHANNEL_WIN_SIZE = "width=700,height=250";
var PAGE_REVERT_WIN_SIZE = "width=700,height=400";
var PAGE_MODIFICATIONS_WIN_SIZE = "width=500,height=300";

/// <summary>
///		Javascript function in repsonse to "Create Channel" Console link clicked
/// </summary>
function NIHCMS_openWindowCreateChannel( strURL )
{
	NIHCMS_openWindowOnFocus(strURL, "", CREATE_CHANNEL_WIN_SIZE );
}

/// <summary>
///		Javascript function in repsonse to "Delete Channel" Console link clicked
/// </summary>
function NIHCMS_openWindowDeleteChannel( strURL )
{
	NIHCMS_openWindowOnFocus(strURL, "", DELETE_CHANNEL_WIN_SIZE );
}

/// <summary>
///		Javascript function in repsonse to "Page Revert" Console link clicked
/// </summary>
function NIHCMS_openWindowPageRevert( strURL )
{
	NIHCMS_openWindowOnFocus(strURL, "", PAGE_REVERT_WIN_SIZE );
}

/// <summary>
///		Javascript function in repsonse to "Page Modifications" Console link clicked
/// </summary>
function NIHCMS_openWindowPageModifications( strURL )
{
	NIHCMS_openWindowOnFocus(strURL, "", PAGE_MODIFICATIONS_WIN_SIZE );
}


// ---- [Public] Open a new window and focus it
function NIHCMS_openWindowOnFocus(strURL, strWinTarget, strWinSize) 
{
	var pWindow = window.top.open(strURL, strWinTarget, DEFAULT_WIN_FEATURES + strWinSize);
	if (pWindow)
		pWindow.focus();
}