<!-- Write Division Definitions for PopUps -->

<!-- Begin - Jason Banyai PopUp Help - 10/03

lc_CurrentHRef = top.location.href
ln_Slash = lc_CurrentHRef.lastIndexOf("/") + 1
lc_SubPage = lc_CurrentHRef.substring(ln_Slash)
ln_Dot = lc_SubPage.indexOf(".")

//ln_Length = lc_CurrentHRef.length
//ln_Rest = ln_Length - ln_Slash - 1
ll_PrintMenu = "False"
//lc_PageName = lc_CurrentHRef.substring(ln_Slash,ln_Dot)	// The Name of the Page calling the Function (name only w/o extension)
lc_PageName = lc_SubPage.substr(0,ln_Dot)

var lc_CurrentPage = lc_PageName.toLowerCase()	// Working name of the Page (all lowercase)
var lc_Help = "FIRST"							// The name of the Help Topic
var lc_Def = "This is my Def"					// The definition of the Help Topic
var ln_Topic = 1								// Topic Number (Incremental - start at 1)

function GetTopicDef() {
	switch(lc_Help) {
//		case "help_Toggle":
//			lc_Def = "Checked will Show Help PopUps, UnChecked Will Not"
//			break
//		case "help_ToggleOn":
//			lc_Def = "UnCheck this box to turn PopUp Help Off"
//			break
//		case "help_ToggleOff":
//			lc_Def = "Check this box to turn PopUp Help On"
//			break
		case "help_Author":
			lc_Def = "Click here to Activate your account"
			break
		case "help_Forgot":
			lc_Def = "Click here to have your password sent to you via email"
			break
		case "help_Signup":
			lc_Def = "Click here to sign up for ChemPlan OnLine"
			break
		case "help_ID":
			lc_Def = "Enter your Username"
			break
		case "help_Account":
			lc_Def = "Enter the Account Number that was sent to you via email after signing up"
			break
		case "help_Pswrd":
			lc_Def = "Enter your password"
			break
		case "help_Login":
			lc_Def = "Click Here to enter ChemPlan OnLine"
			break
		case "help_Question":
			lc_Def = "This will show your secret question"
			break
		case "help_Answer":
			lc_Def = "Enter the answer to your secret question"
			break
		case "help_Next":
			lc_Def = "Go on to the next page"
			break
		case "help_Cancel":
			lc_Def = "Cancel this procedure"
			break
		case "help_Accept":
			lc_Def = "Click Here to accept the terms presented in the Legal Agreement"
			break
		case "help_Decline":
			lc_Def = "Click Here to decline the terms presented in the Legal Agreement"
			break
		case "help_FName":
			lc_Def = "Enter your first name (required)"
			break
		case "help_LName":
			lc_Def = "Enter your last name"
			break
		case "help_CName":
			lc_Def = "Enter the name of your company (required)"
			break
		case "help_Designation":
			lc_Def = "Enter Your Title (Designation)"
			break
		case "help_Addr1":
			lc_Def = "Enter the first line of your address (required)"
			break
		case "help_Addr2":
			lc_Def = "Enter the second line of your address"
			break
		case "help_Country":
			lc_Def = "Enter the country in which you are located (required)"
			break
		case "help_State":
			lc_Def = "Enter the state in which you are located (required)"
			break
		case "help_City":
			lc_Def = "Enter Your City (required)"
			break
		case "help_Zip":
			lc_Def = "Enter your zipcode/postal code (required)"
			break
		case "help_Phone":
			lc_Def = "Enter your phone number (required)"
			break
		case "help_Fax":
			lc_Def = "Enter your fax number"
			break
		case "help_Email":
			lc_Def = "Enter your email address (required)"
			break
		case "help_NewQuestion":
			lc_Def = "Enter a secret question which will be used if you forget your password (required)"
			break
		case "help_NewAnswer":
			lc_Def = "Enter the answer to your new secret question (required)"
			break
		case "help_NewID":
			lc_Def = "Enter a Username (required)"
			break
		case "help_NewPswrd":
			lc_Def = "Enter a password (required)"
			break
		case "help_ConfirmNew":
			lc_Def = "Re-Enter your password (required)"
			break
		case "help_Subscribe":
			lc_Def = "Check here if you want to subscribe to ChemPlan OnLine"
			break
		case "help_AcctDetail":
			lc_Def = "Click here to view details of your account"
			break
		case "help_CredDetail":
			lc_Def = "Click here to view details of the credit card(s) authorized on this account"
			break
		case "help_Prefs":
			lc_Def = "Click here to view the preferences for your account"
			break
		case "help_Metric":
			lc_Def = "Click here to Search/Get Reports in Metric (SI) Units"
			break
		case "help_British":
			lc_Def = "Click here to Search/Get Reports in British (US Customary) Units"
			break
		case "help_Logout":
			lc_Def = "Click Here to Log Out of ChemPlan OnLine"
			break
		case "help_ChgPswrd":
			lc_Def = "Click here to change the password for your account"
			break
		case "help_LogDate":
			lc_Def = "Date this account logged into ChemPlan OnLine"
			break
		case "help_LogIP":
			lc_Def = "IP Address of the computer logging into ChemPlan OnLine"
			break
		case "help_LogTI":
			lc_Def = "Time (EST/CST) this account was logged in"
			break
		case "help_LogTO":
			lc_Def = "Time (EST/CST) this account was logged out"
			break
		case "help_OldPswrd":
			lc_Def = "Enter your old password"
			break
		case "help_AddCard":
			lc_Def = "You can have multiple credit cards available for use in purchasing reports"
			break
		case "help_EditCard":
			lc_Def = "Click Credit Card Number to Edit/Delete a Card"
			break
		case "help_UseCard":
			lc_Def = "Leave Checked to enable this card to be used to purchase reports, leave unchecked to keep number in database, but unused"
			break
		case "help_Save":
			lc_Def = "Save your changes"
			break
		case "help_CredCard":
			lc_Def = "Enter the Complete number of your Credit Card without dashes (-)"
			break
		case "help_CredName":
			lc_Def = "Enter the complete name as it appears on the credit card"
			break
		case "help_CredType":
			lc_Def = "Enter the credit card type (Visa, MasterCard, Discover, American Express)"
			break
		case "help_CredExp":
			lc_Def = "Enter the expiration date of your credit card"
			break
		case "help_Delete":
			lc_Def = "Remove this Credit Card from your list"
			break
		case "help_ProdTN":
			lc_Def = "Shows Data Items relating to Products and Trade Names"
			break
		case "help_Operator":
			lc_Def = "Select a Boolean Operator and Click <Insert Operator>"
			break
		case "help_InsertOper":
			lc_Def = "Choose an operator from the list and click here"
			break
		case "help_Remove":
			lc_Def = "Select an item in the Search Field and click here"
			break
		case "help_Search":
			lc_Def = "Click here to see the results of your search"
			break
		case "help_SearchList":
			lc_Def = "View a list of your saved searches"
			break
		case "help_Contains":
			lc_Def = "Your criteria exists somewhere inside the search field"
			break
		case "help_Equals":
			lc_Def = "Your criteria is a definite entry in the table to be searched"
			break
		case "help_PickButton":
			lc_Def = "Click here to open a PopUp window to browse/select entries"
			break
		case "help_GreaterThan":
			lc_Def = "Results are numerically greater than your criteria"
			break
		case "help_LessThan":
			lc_Def = "Results are numerically less than your criteria"
			break
		case "help_EqualTo":
			lc_Def = "Results are exactly equal to your criteria"
			break
		case "help_LessEqual":
			lc_Def = "Results are numerically equal to or less than your criteria"
			break
		case "help_GreaterEqual":
			lc_Def = "Results are numerically equal to or greater than your criteria"
			break
		case "help_NotEqual":
			lc_Def = "Results are not numerically equal to your criteria"
			break
		case "help_Insert":
			lc_Def = "Click here to insert your search criteria into the search building field"
			break
		case "help_NumPlants":
			lc_Def = "Number of Plants returned by your search"
			break
		case "help_NumCaps":
			lc_Def = "Number of Capital structures returned by your search"
			break
		case "help_NumPrcs":
			lc_Def = "Number of Processes returned by your search"
			break
		case "help_NumMkts":
			lc_Def = "Number of Markets returned by your search"
			break
		case "help_NumProdTN":
			lc_Def = "Number of Products and/or Trade Names returned by your search"
			break
		case "help_GoGetReports":
			lc_Def = "Go to next page to select reports"
			break
		case "help_BackToSearch":
			lc_Def = "Go back to your search and make corrections or adjustments"
			break
		case "help_SelectAll":
			lc_Def = "Select all of the possible reports"
			break
		case "help_ClearAll":
			lc_Def = "De-select all of the reports"
			break
		case "help_ReportName":
			lc_Def = "Check the box next to the report(s) and click on Purchase"
			break
		case "help_ReportRate":
			lc_Def = "Cost of each report * Number of hits returned by your search"
			break
		case "help_ReportCost":
			lc_Def = "Total Cost ($US) of all the reports you have selected"
			break
		case "help_CheckAll":
			lc_Def = "Click here to select all reports"
			break
		case "help_ClearAll":
			lc_Def = "Click here to de-select all reports"
			break
		case "help_Purchase":
			lc_Def = "Go on to the Next page to purchase reports"
			break
		case "help_ExistingCard":
			lc_Def = "Use an Existing Card authorized on this account"
			break
		case "help_NewCard":
			lc_Def = "Use a Credit Card not already authorized for this account"
			break
		case "help_TransactionAmt":
			lc_Def = "Total Payment to be charged to your credit card"
			break
		case "help_SubmitPayment":
			lc_Def = "Click here if all the above information is correct and the Transaction Amount is acceptable"
			break
		case "help_SaveSearch":
			lc_Def = "Save your search criteria for use later"
			break
		case "help_AcctDetails":
			lc_Def = "Table Showing Various Details about your Account Usage"
			break
		case "help_SelectSearch":
			lc_Def = "Click here to insert the selected search into the search building field"
			break
		case "help_UseSearch":
			lc_Def = "Select a saved search and click on 'Select Search'"
			break
		case "help_SaveClick":
			lc_Def = "Name your search and click 'Save Search' to save this search strategy for future use"
			break
		case "help_SearchPick":
			lc_Def = "Limits Items to those containing the text you type in"
			break
		case "help_ShowAllPick":
			lc_Def = "Show all items (removes filter set by Search)"
			break
		case "help_PrevList":
			lc_Def = "Show the previous 25 items"
			break
		case "help_NextList":
			lc_Def = "Show the next 25 items"
			break
		case "help_SelectIt":
			lc_Def = "Click here to insert the selected item into your search"
			break
		case "help_Download":
			lc_Def = "Select Download all to get all reports (in PDF's) in a Zip file<br>Select Reports for individual PDF files"
			break
		default:
			lc_Help = "LAST"
			lc_Def = "Finished"
			break
	}
}

function GetTopicForPage() {
	switch(lc_CurrentPage) {
		case "login":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_Author"
					break
				case 2:
					lc_Help = "help_Forgot"
					break
				case 3:
					lc_Help = "help_Signup"
					break
				case 4:
					lc_Help = "help_ID"
					break
				case 5:
					lc_Help = "help_Account"
					break
				case 6:
					lc_Help = "help_Pswrd"
					break
				case 7:
					lc_Help = "help_Login"
					break
				default:
					lc_Help = "LAST"
					break
			}
			break
		case "authorize":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_ID"
					break
				case 2:
					lc_Help = "help_Account"
					break
				case 3:
					lc_Help = "help_Author"
					break
				default:
					lc_Help = "LAST"
					break
			}
			break
		case "main":
			switch(ln_Topic) {
				default:
					lc_Help = "LAST"
					ll_PrintMenu = "True"
					break
				}
			break
		case "forgotpassword":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_ID"
					break
				case 2:
					lc_Help = "help_Question"
					break
				case 3:
					lc_Help = "help_Answer"
					break
				case 4:
					lc_Help = "help_Forgot"
					break
				default:
					lc_Help = "LAST"
					break
				}
			break
		case "subscribe":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_Next"
					break
				case 2:
					lc_Help = "help_Cancel"
					break
				default:
					lc_Help = "LAST"
					break
				}
			break
		case "agreement":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_Accept"
					break
				case 2:
					lc_Help = "help_Decline"
					break
				default:
					lc_Help = "LAST"
					break
				}
			break
		case "register":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_FName"
					break
				case 2:
					lc_Help = "help_LName"
					break
				case 3:
					lc_Help = "help_CName"
					break
				case 4:
					lc_Help = "help_Designation"
					break
				case 5:
					lc_Help = "help_Addr1"
					break
				case 6:
					lc_Help = "help_Addr2"
					break
				case 7:
					lc_Help = "help_Country"
					break
				case 8:
					lc_Help = "help_State"
					break
				case 9:
					lc_Help = "help_City"
					break
				case 10:
					lc_Help = "help_Zip"
					break
				case 11:
					lc_Help = "help_Phone"
					break
				case 12:
					lc_Help = "help_Fax"
					break
				case 13:
					lc_Help = "help_Email"
					break
				case 14:
					lc_Help = "help_NewQuestion"
					break
				case 15:
					lc_Help = "help_NewAnswer"
					break
				case 16:
					lc_Help = "help_NewID"
					break
				case 17:
					lc_Help = "help_NewPswrd"
					break
				case 18:
					lc_Help = "help_ConfirmNew"
					break
				case 19:
					lc_Help = "help_Next"
					break
				default:
					lc_Help = "LAST"
					break
				}
			break
		case "ccinfo":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_CredCard"
					break
				case 2:
					lc_Help = "help_CredName"
					break
				case 3:
					lc_Help = "help_CredType"
					break
				case 4:
					lc_Help = "help_CredExp"
					break
				case 5:
					lc_Help = "help_Subscribe"
					break
				case 6:
					lc_Help = "help_Next"
					break
				default:
					lc_Help = "LAST"
					break
				}
			break
		case "account":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_LogDate"
					break
				case 2:
					lc_Help = "help_LogIP"
					break
				case 3:
					lc_Help = "help_LogTI"
					break
				case 4:
					lc_Help = "help_LogTO"
					break
				case 5:
					lc_Help = "help_ChgPswrd"
					break
				case 6:
					lc_Help = "help_AcctDetails"
					break
				default:
					lc_Help = "LAST"
					ll_PrintMenu = "True"
					break
				}
			break
		case "changepassword":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_OldPswrd"
					break
				case 2:
					lc_Help = "help_NewPswrd"
					break
				case 3:
					lc_Help = "help_ConfirmNew"
					break
				case 4:
					lc_Help = "help_Save"
					break
				default:
					lc_Help = "LAST"
					ll_PrintMenu = "True"
					break
				}
			break
		case "cardlist":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_AddCard"
					break
				case 2:
					lc_Help = "help_CredCard"
					break
				case 3:
					lc_Help = "help_EditCard"
					break
				default:
					lc_Help = "LAST"
					ll_PrintMenu = "True"
					break
				}
			break
		case "addcardinfo":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_CredCard"
					break
				case 2:
					lc_Help = "help_CredName"
					break
				case 3:
					lc_Help = "help_CredType"
					break
				case 4:
					lc_Help = "help_CredExp"
					break
				case 5:
					lc_Help = "help_UseCard"
					break
				case 6:
					lc_Help = "help_Save"
					break
				case 7:
					lc_Help = "help_Delete"
					break
				case 8:
					lc_Help = "help_Cancel"
					break
				default:
					lc_Help = "LAST"
					ll_PrintMenu = "True"
					break
				}
			break
		case "preferences":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_FName"
					break
				case 2:
					lc_Help = "help_LName"
					break
				case 3:
					lc_Help = "help_CName"
					break
				case 4:
					lc_Help = "help_Designation"
					break
				case 5:
					lc_Help = "help_Addr1"
					break
				case 6:
					lc_Help = "help_Addr2"
					break
				case 7:
					lc_Help = "help_Country"
					break
				case 8:
					lc_Help = "help_State"
					break
				case 9:
					lc_Help = "help_City"
					break
				case 10:
					lc_Help = "help_Zip"
					break
				case 11:
					lc_Help = "help_Phone"
					break
				case 12:
					lc_Help = "help_Fax"
					break
				case 13:
					lc_Help = "help_Email"
					break
				case 14:
					lc_Help = "help_Question"
					break
				case 15:
					lc_Help = "help_Answer"
					break
				case 16:
					lc_Help = "help_Save"
					break
				default:
					lc_Help = "LAST"
					ll_PrintMenu = "True"
					break
				}
			break
		case "picklist":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_SearchPick"
					break
				case 2:
					lc_Help = "help_ShowAllPick"
					break
				case 3:
					lc_Help = "help_PrevList"
					break
				case 4:
					lc_Help = "help_NextList"
					break
				case 5:
					lc_Help = "help_SelectIt"
					break
				default:
					lc_Help = "Last"
					break
			}
			break
		case "result":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_NumPlants"
					break
				case 2:
					lc_Help = "help_NumCaps"
					break
				case 3:
					lc_Help = "help_NumPrcs"
					break
				case 4:
					lc_Help = "help_NumMkts"
					break
				case 5:
					lc_Help = "help_NumProdTN"
					break
				case 6:
					lc_Help = "help_GoGetReports"
					break
				case 7:
					lc_Help = "help_BackToSearch"
					break
				
				default:
					lc_Help = "Last"
					ll_PrintMenu = "True"
					break
			}
			break
		case "result_h1":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_NumPlants"
					break
				case 2:
					lc_Help = "help_NumCaps"
					break
				case 3:
					lc_Help = "help_NumPrcs"
					break
				case 4:
					lc_Help = "help_NumMkts"
					break
				case 5:
					lc_Help = "help_NumProdTN"
					break
				case 6:
					lc_Help = "help_GoGetReports"
					break
				case 7:
					lc_Help = "help_BackToSearch"
					break
				
				default:
					lc_Help = "Last"
					ll_PrintMenu = "True"
					break
			}
			break

		case "repuserlog":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_SelectAll"
					break
				case 2:
					lc_Help = "help_ClearAll"
					break
				case 3:
					lc_Help = "help_ReportName"
					break
				case 4:
					lc_Help = "help_ReportRate"
					break
				case 5:
					lc_Help = "help_ReportCost"
					break
				case 6:
					lc_Help = "help_Purchase"
					break
				default:
					lc_Help = "Last"
					ll_PrintMenu = "True"
					break
			}
			break
		case "purchasereport":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_ExistingCard"
					break
				case 2:
					lc_Help = "help_NewCard"
					break
				case 3:
					lc_Help = "help_CredName"
					break
				case 4:
					lc_Help = "help_CredCard"
					break
				case 5:
					lc_Help = "help_CredExp"
					break
				case 6:
					lc_Help = "help_TransactionAmt"
					break
				case 7:
					lc_Help = "help_SubmitPayment"
					break
				case 8:
					lc_Help = "help_Cancel"
					break
				default:
					lc_Help = "Last"
					ll_PrintMenu = "True"
					break
			}
			break
		case "viewlist":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_UseSearch"
					break
				case 2:
					lc_Help = "help_Cancel"
					break
				case 3:
					lc_Help = "help_SelectSearch"
					break
				default:
					lc_Help = "Last"
					ll_PrintMenu = "True"
					break
			}
			break
		case "savesearch":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_SaveClick"
					break
				default:
					lc_Help = "Last"
					ll_PrintMenu = "True"
					break
			}
			break

		case "sample_reports":
			switch(ln_Topic) {
				case 1:
					lc_Help = "help_Download"
					break
				default:
					lc_Help = "Last"
					ll_PrintMenu = "True"
					break
			}
			break
		case "wait":
			switch(ln_Topic) {
				default:
					lc_Help = "Last"
					ll_PrintMenu = "True"
					break
			}
			break
		default:
			lc_Help = "LAST"
			break
	}
}

function PrintHelpToggles() {
	document.write('<div class="PopUp" id="help_ToggleOn"><table border=2 bordercolor=Blue width=148px><tr><td align=center><font color=Blue>')
	document.write("UnCheck this box to turn PopUp Help Off")
	document.write("</font></td></tr></table></div>")

	document.write('<div class="PopUp" id="help_ToggleOff"><table border=2 bordercolor=Blue width=148px><tr><td align=center><font color=Blue>')
	document.write("Check this box to turn PopUp Help On")
	document.write("</font></td></tr></table></div>")
}

function PrintDef() {
	document.write('<div class="PopUp" id="')
	document.write(lc_Help)
	document.write('"><table border=2 bordercolor=Blue width=148px><tr><td align=center><font color=Blue>')
	document.write(lc_Def)
	document.write("</font></td></tr></table></div>")
	
//	document.write("Printed " + lc_Help + "<br>")
}

function PrintMenuBar() {
	lc_Help = "help_AcctDetail"
	GetTopicDef()
	PrintDef()
	
	lc_Help = "help_CredDetail"
	GetTopicDef()
	PrintDef()

	lc_Help = "help_Prefs"
	GetTopicDef()
	PrintDef()
	
	lc_Help = "help_Metric"
	GetTopicDef()
	PrintDef()
	
	lc_Help = "help_British"
	GetTopicDef()
	PrintDef()
		
	lc_Help = "help_SaveSearch"
	GetTopicDef()
	PrintDef()

	lc_Help = "help_Logout"
	GetTopicDef()
	PrintDef()
}

PrintHelpToggles()
GetTopicForPage()
GetTopicDef()

while (lc_Help != "LAST"){
	PrintDef()
	ln_Topic++
	GetTopicForPage()
	GetTopicDef()
}

if (ll_PrintMenu == "True") {
	PrintMenuBar()
}

// -->

<!-- End Popup Definitions -->
