/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//	Popup Message Library
//	Purpose: centralize location of mouseover messages

//	Arrays for use by popup calls:
//		arrHelpTips:	
//			text for mouseover help tips
//				- broken down into sections of help tips (related tips in seperate arrays)
//				- each message slot contains the "caption","body" combination
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var arrHelpTips = [
	[
		[ "Help: Single Page",		"help tip details..." ],
		[ "Help: Did You Know", 	"An effective way to present the facts." ],
		[ "Help: Multi-Page Article", 	"This option allows you to publish documents into several sections.  It will build a table of contents automatically for viewers to jump from section to section." ],
		[ "Help: Single Page Article", 	"Great for articles that are short in length." ],
		[ "Help: Event Note", 	"Maintain the 'Calendar of Events' and 'Event Notes'. " ],
		[ "Help: Job", 	"Select this option to provide information on Jobs." ],
		[ "Help: Next Issue", 	"Provide a preview of what's coming in the next issue..." ],
		[ "Help: Question &amp; Answer", 	"Maintain a database of frequently asked questions." ],
		[ "Help: Multi-Page Update", 	"Provide important announcements by creating an update.  This option allows you to publish the update into several sections (similar to 'multi-page articles')" ],
		[ "Help: Single Page Update", 	"Provide important announcements by creating an update." ],
/* ..............HELP ITEMS FOR ARTICLES FOLLOWS */
	],[
		[ "Help: Article Title", 	"Article titles are presented in both administration and public displays.  Article titles are typically used as links in search results and page views." ],
		[ "Help: Article Sub-Head", 	"Ensure your sub-head is engaging so it entices the user to continue reading." ],
		[ "Help: Article Body", 	"Place the full body of your article into this field." ],
		[ "Help: File Attachment", 	"If necessary, attach a file that supports your article.  To attach a file, press the 'browse...' button to search your computer for the associated file.  Please note that you can only attach one file.  Select 'File Restrictions' for more information. " ],
		[ "Help: Search Keywords", 	"Insert individual keywords separated by spaces.  Commas are not required." ],
		[ "Help: English/French Equivalent", 	"This option allows you to create the article in both languages." ],
		[ "Help: Event Article Title", 	"Provide the event title in this field." ],
		[ "Help: Event Date", 	"Specify the event date by selecting from the drop down menu." ],
		[ "Help: Event Article Description", 	"Provide a full description of the event including event details, location, directions, contact methods, etc." ],
		[ "Help: eBulletin Title", 	"Specifiy the title of the eBulletin in this field.  The title is used as an index for administrators.  The title is also presented to the public in the 'Archives' section." ],
		[ "Help: eBulletin Description", 	"Provide a detailed description of the eBulletin contents.  This description is presented to the public in the 'Archives' section." ],
		[ "Help: French/English Equivalent", 	"Select this option if you are publishing a bilingual eBulletin.  If this option is selected, you will only be able to select from content that is available in both languages." ],
		[ "Help: Article Question", 	"Specify the specific question in the field provided.  Remember to insert a question mark (?) at the end." ],
		[ "Help: Article Answer", 	"Provide the answer to the question specified in above field.  Include Web addresses if necessary." ],
		[ "Help: Category", 	"Each question must be categorized.  Select the appropriate category from the drop-down menu or create a new category by selecting the icon to the left.  Categories are displayed in administration view and public view. " ],	
		[ "Help: Job Title", 	"The 'Job Title' is not presented to the public.  It is used as an index for administrators so that you can easily locate it for modification, deletion, etc." ],
		[ "Help: Job Description", 	"Provide a complete description here.  Include links to other Websites, contact information and any additional information." ],
		[ "Help: Article Sub-Head", 	"Provide detailed information regarding the statement you made in the above field.  Include Web addresses and other information as required." ],
		[ "Help: Next Issue Title", 	"Provide information regarding what's coming in the next issue of eBulletin.  If necessary, use bullet points to highlight upcoming articles." ],
		[ "Help: Article Sub-Head", 	"Provide detailed information regarding the statement you made in the above field.  Include Web addresses and other information as required." ],
		[ "Help: Did you Know? Title", 	"Specify the 'Did you Know?' statement in the field provided.  This is displayed to users in the front-end." ],
		[ "Help: Add Image Category", 	"All Images are categorized. Create a category." ],
		[ "Help: Delete Image Category", 	"Delete this Image Category" ],
		[ "Help: eBulletin Calendar Title",		"Provide a Title for this calendar." ],
		[ "Help: Article Section", 	"You may assign this content to any section by browsing using the link provided." ],
/* ..............HELP ITEMS FOR EBULLETINS FOLLOWS */
		],[
		[ "Help: eBulletin Title", 	"Specify the title of the eBulletin in this field.  The title is used as an index for administrators.  The title is presented to the public in the 'Archives' section." ],
		[ "Help: eBulletin Description", 	"Provide a detailed description of the eBulletin contents.  This description is presented to the public in the 'Archives' section and within search results." ],
		[ "Help: Multi-Page Article Body", 	"Place the full body of your article into this field." ],
		[ "Help: Multi-Page English Section Title", 	"Provide a title for the current section." ],
		[ "Help: Multi-Page English Section Body", 	"Provide the full section details." ],
		[ "Help: English Section File Attachment", 	"If necessary, attach a file that supports your article.  To attach a file, press the 'browse...' button to search your computer for the associated file.  Please note that you can only attach one file.  Select 'File Restrictions' for more information." ],
		[ "Help: Article Title", 	"Provide a meaningful title for this article." ],
		[ "Help: Article Sub-head", 	"Provide a brief overview of this article." ],
		[ "Help: Date Trigger", 	"Select the publication date from the drop-down menu.  If you select a future date, you can preview the eBulletin by selecting 'Preview' from the toolbox." ],
		[ "Help: Multi-Page Article Sub-head", 	"Provide a brief overview of this article." ],
		// Survey related
		],[
		[ "Help: Survey Title", "Specify the title for the current survey." ],
		[ "Help: Brief Description:", "Place the description of the survey here." ],
		[ "Help: On Complete Message", 	"This message will be displayed once a user has completed the survey." ],
		[ "Help: Survey Status", 	"This will determine who can and can not complete this survey." ],
		// next "section" of help tips
		],[
		[ "Help: Re Ordering", "Click the up or down arror icon to move content up or down for re ordering." ],
		// next "section" of help tips
	]
]

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//							DO NOT MODIFY BELOW THIS POINT 								//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Methods for retrieving requested caption & body portions of messages
function GetCaption( intArrNo , intMsgNo ) {
	return arrHelpTips[intArrNo][intMsgNo][0];
}
function GetBody( intArrNo , intMsgNo ) {
	return arrHelpTips[intArrNo][intMsgNo][1];
}

// ACCESSOR METHODS FOR MOUSEOVER POPUPS
// NOTE: several functions should eventually exist here for various formats of mouseovers

// Functions for displaying HELP TIPS
function showHelpTip( intArrNo , intMsgNo , strEvent ) {
	// There is an optional argument to align the left-hand side
	var blnOptionalXPos = blnOptionalXPos = (arguments.length > 3);
	var blnOptionalYPos = blnOptionalYPos = (arguments.length > 4);
	if (blnOptionalXPos) {
		strXPos = arguments[3].toString();
		if (strXPos.length == 0) { blnOptionalXPos = false; } // perhaps 3rd of four arguements was not passed
	}
	if (blnOptionalYPos)
	{
		strYPos = arguments[4].toString();
		if (strYPos.length == 0) { blnOptionalYPos = false; } // perhaps 4rd of four arguements was not passed
	}
	var strHelpCaption = GetCaption( intArrNo , intMsgNo );
	var strHelpBody = GetBody( intArrNo , intMsgNo );
	if ( (browserIsIE5) && (!(browserIsIE55)) ) { // if ie 5.0 only (not 4.x, 5.5+)
		if (strEvent == 'onClick') { // only if triggering event was a click do we show the alert box
			alert( strHelpCaption + '\n_______________________________\n\n' + strHelpBody);
		}
	} else {
		overrideDefaultCSS(); // use the classes specified below to override global CSS for HelpTip specific classes
		var overlayCall = "overlayPopup( strHelpBody, CAPTION, strHelpCaption, WIDTH, 250,";
		if (blnOptionalXPos) { overlayCall += " FIXX, " + strXPos + ", "; }
		if (blnOptionalYPos) { overlayCall += " OFFSETY, " + strYPos + ", "; } else { overlayCall += " BELOW, "; }
		overlayCall += " SNAPX,10, SNAPY, 10 );";
		eval(overlayCall);
//		if (blnOptionalXPos) {
//			overlayPopup( strHelpBody, CAPTION, strHelpCaption, BELOW, WIDTH, 250, FIXX, strXPos ,SNAPX,10, SNAPY, 10 );	
//		} else {
//			overlayPopup( strHelpBody, CAPTION, strHelpCaption, BELOW, WIDTH, 250, SNAPX,10, SNAPY, 10 );		
//		}
		resetDefaultCSS(); // restore to original styles (non-help-specific ones
	}
	self.status = GetCaption( intArrNo , intMsgNo ).replace( '&amp;','&');
	return true;
}

var arrStyleClasses = null; // global default style storage container
function overrideDefaultCSS() {
	// These CLASS definitions override the global defaults so that HELP TIPS may appear differently than other popups
	ol_textfontclass = "ht_textfontclass"; // Main font class
	ol_captionfontclass = "ht_captionfontclass"; // Caption font class
	ol_closefontclass = "ht_closefontclass"; // Close font class
	ol_fgclass = "ht_fgclass"; // Main background class (eqv of fgcolor)
	ol_bgclass = "ht_bgclass"; // Frame background class (eqv of bgcolor)
	arrStyleClasses = new Array( ol_textfontclass , ol_fgclass , ol_bgclass , ol_captionfontclass , ol_closefontclass );
}

function resetDefaultCSS() {
	// Restore the previous styles for global defaults
	ol_textfontclass = arrStyleClasses[0]; // Main font class
	ol_captionfontclass = arrStyleClasses[3]; // Caption font class
	ol_closefontclass = arrStyleClasses[4]; // Close font class
	ol_fgclass = arrStyleClasses[1]; // Main background class (eqv of fgcolor)
	ol_bgclass = arrStyleClasses[2]; // Frame background class (eqv of bgcolor)
}
