/*

Title:           Help Functions
Author:          Jared McGuire
Description:     Provides a method of delivering information to the user.

Change Log:      08.08.2006     Created.
                 10.24.2006     Added tab control to prevent form breakage.

*/

// icons
var SmallIconPath = "/Media/Image/Help.gif"
var LargeIconPath = "/Media/Image/HelpPopup.gif"

// place a help icon.
function HelpLink(HelpText, Width, Height) {
	if (Width == undefined) Width = 300
	if (Height == undefined) Height = 150
	
	document.write("<a href=\"javascript:HelpPopup('" + HelpText + "'," + Width + "," + Height + ")\" tabindex=\"1000\">")
	document.write("<img src=\"" + SmallIconPath + "\" border=\"0\"></a>")
}

// popup help
function HelpPopup(HelpText, Width, Height) {
	var features = "status=no,menubar=no,titlebar=no,scrollbars=no,resizable=yes,alwaysraised=yes,dependent=yes,width=" + Width + ",height=" + Height
	
	popup = window.open("", "Help", features)
	
	popup.document.write("<html><head><title>Help</title></head><body>")
	popup.document.write("<table><tr valign=\"top\">")
	popup.document.write("<td><img src=\"" + LargeIconPath + "\" style=\"margin-right:.8em\"></td>")
	popup.document.write("<td style=\"font: .8em Arial\">" + HelpText + "</td>")
	popup.document.write("</tr></table>")
	popup.document.write("<p align=\"center\"><input type=\"button\" value=\"Close\" onclick=\"self.close()\"></p>")
	popup.document.write("</body></html>")
	popup.focus()
	popup.document.close()
}