﻿var pageHasLoaded = false;

function popup(Source)
{
	window.open ('Help/Help.aspx?HelpPage=' + Source);
}
		
function help(source, resource)
{
	var helpWin = window.open("","helpContent","height=500,width=700,location=0,menubar=0,status=0,toolbar=0,scrollbars=1,resizable=1");
	//helpWin.open("Help/Help.aspx?HelpPage=" + Source, "helpContent","height=500,width=700,location=0,menubar=0,status=0,toolbar=0,scrollbars=1,resizable=1");
	
	if(resource == 0){
		//contextual help
		helpWin.location = "Help/Help.aspx?HelpPage=" + source;
	}
	else{
		//url
		helpWin.location = source;
	}
	helpWin.focus();
}

function pageLoad()
{
	pageHasLoaded = true;
}

// Return false to disable autopostback only until page has completely loaded
function checkPageLoaded()
{
	if (!pageHasLoaded)
	{
		alert("Please allow page to load completely before selecting an action.");
		return false;
	}
}

if(typeof(Sys) !== "undefined") Sys.Application.notifyScriptLoaded();