//----------------------------------------------------------------------------------------------------
//-- Opens Generic Locked Window
//----------------------------------------------------------------------------------------------------
function openGenericLockedWindow(loc, newWidth, newHeight){
	var reportWindow

	reportWindow = window.open(loc, 'report', 'status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,width=' + newWidth + ',height=' + newHeight);
	reportWindow.focus();
}	


//----------------------------------------------------------------------------------------------------
//-- Opens Generic Unlocked Window
//----------------------------------------------------------------------------------------------------
function openGenericUnLockedWindow(loc, newWidth, newHeight){
	var reportWindow

	reportWindow = window.open(loc, 'report', 'status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,width=' + newWidth + ',height=' + newHeight);
	reportWindow.focus();
}


//----------------------------------------------------------------------------------------------------
//-- Allow user to bookmark a specific page.  Used in Support Sections.  Link is on the sidebar
//----------------------------------------------------------------------------------------------------


function bookmark()
{
	if (document.all)
		{
			window.external.AddFavorite(location.href, document.title); return false
		}
}

//----------------------------------------------------------------------------------------------------
//-- Clears the default text from a text box...text box calls funtion onFocus
//----------------------------------------------------------------------------------------------------


function clearTextBox(obj)
{
	obj.value = "";
}

//----------------------------------------------------------------------------------------------------
//-- Pre loads images
//-- To use type the following on a page:
//-- jsLoadImages('/enterfoldername/enterimagename.gif or jpg',
//--              '/enterfoldername/enterimagename.gif or jpg');
//----------------------------------------------------------------------------------------------------
var images = new Array();

function jsLoadImages(){ 
	for (var i=0; i < jsLoadImages.arguments.length; i++){
		images[i] = new Image();
		images[i].src = jsLoadImages.arguments[i];
	}
}

//----------------------------------------------------------------------------------------------------
//-- Redirect the browser to the url provided
//----------------------------------------------------------------------------------------------------


function redirectBrowser(url)
{
	location.href = url;
}

//----------------------------------------------------------------------------------------------------
//-- Check for enter key and set focus and click object provided
//----------------------------------------------------------------------------------------------------


function CheckFormEnter(e, sButtonName)
{
	var characterCode

	if(e && e.which)
	{ 
		e = e
		characterCode = e.which // (for NN4 support)
	}
	else
	{
		e = event
		characterCode = e.keyCode // (for IE)
	}

	if(characterCode == 13) //(ascii 13 - enter key)
	{
		var button = document.getElementById(sButtonName);
		button.focus();
		button.click();
	}
}