var HLP_SHOW_POS_MOUSE = 0;
var HLP_SHOW_POS_CENTER = 1;
var HLP_SHOW_POS_V_MOUSE_H_CENTER = 2;


var HLP_TEXT_ITEMTMPLT_NAME = "<h3>Template name</h3><p>This is simply a descriptive name that you can give to easily identify the template you're creating when you come to assign it to a saleable item.</p><p>It is for your own use only and will never be seen by customers.</p>";
var HLP_TEXT_FSTMPLT_PAGEHTML = "<h3>Full Page Html</h3><p>This is the html that makes up the page that visitors see when they click through to your free sign-up form. </p>";

function ShowHelp (e, text, showPos, width, height)
{
    var posx = 0;
    var posy = 0;
    if (width == null)
    {
        width = 250;
    }
    if (height == null)
    {
		height = 250;
    }
    switch (showPos)
    {
		case HLP_SHOW_POS_MOUSE:
			if (!e) var e = window.event;
			if (e.pageX || e.pageY)
			{
				posx = e.pageX;
				posy = e.pageY;
			}
			else if (e.clientX || e.clientY)
			{
				posx = e.clientX;
				posy = e.clientY;
			}
			break;
		case HLP_SHOW_POS_CENTER:
			//Get screen dims
			var winWidth = GetWindowSize(true);
			var winHeight = GetWindowSize(false);
			posx = (winWidth / 2);
			posy = (winHeight / 2) - 85; //100-15
			break;
		case HLP_SHOW_POS_V_MOUSE_H_CENTER:
			var winWidth = GetWindowSize(true);
			if (!e) var e = window.event;
			if (e.pageX || e.pageY)
			{
				posy = e.pageY;
			}
			else if (e.clientX || e.clientY)
			{
				posy = e.clientY;
			}
			posx = (winWidth / 2);
			break;
    }

    var helpObj = document.getElementById("helpBox");
    var helpInner = document.getElementById("helpBoxInner");
    helpObj.style.display = 'block';
    helpInner.innerHTML = text;
    helpObj.style.left = (posx - (width / 2)) + "px";
    helpObj.style.top = (posy + 15) + "px";
    helpObj.style.width = width + "px";
    helpInner.style.width = (width - 5) + "px";
    helpObj.style.height = height + "px";
    helpInner.style.height = (height + 88) + "px";
    
    

}



function HideHelp()
{
    var helpObj = document.getElementById("helpBox");
    helpObj.style.display = 'none';

}
