//////////////////////
// SYSTEM GLOSSARY //
/////////////////////

// Define the glossary.
var glossary = new Array();
// Joseph Renzi 07-July-2005: some definitions have "click here" at the start of the definition because these titles sometimes do not appear for very long and can sometimes be truncated.
glossary['active_offer'] = "An 'active offer' is one that is currently available.  This offer can be accepted, retracted or declined.";
glossary['accept'] = "By accepting an offer you are agreeing to the terms and conditions (to form an agreement) proposed by another trader. This becomes a binding contract known as an 'Agreement'.";
glossary['accepted_offer'] = "An 'accepted offer' between two traders that forms an 'Agreement'.";
glossary['agreement'] = "An 'agreement' is an arrangement between two traders regarding an offer that has been accepted. This agreement is a binding contract and is subject to the 'SwapAce Terms & Conditions'.";
glossary['banned'] = "This trader is currently banned from using our system.";
glossary['browse'] = "The 'browse' feature allows you to find and sort through advertisements.";
glossary['buy_text'] = system_name + " allows you to BUY.";
glossary['button_add_enhancement'] = "Select this button to add an enhancement.";
glossary['button_add_feedback'] = "Select this button to add feedback.";
glossary['button_accept_offer'] = "Select this button to accept this offer.";
glossary['button_copy_item'] = "Select this button to add a copy of this item to your wish-list.";
glossary['button_create_advertisement'] = "Select this button to advertise an item.";
glossary['button_create_item'] = "Select this button to add an item to your wish-list.";
glossary['button_decline_offer'] = "Select this button to decline this offer.";
glossary['button_edit'] = "Select this button to edit this item.";
glossary['button_edit_about_me'] = "Select this button to edit your details.";
glossary['button_make_offer'] = "Select this button to make an offer.";
glossary['button_make_counter_offer'] = "Select this button to make a counter-offer.";
glossary['button_offer_details'] = "Select this button to view the details of this offer.";
glossary['button_remove_advertisement'] = "Select this button to remove this advertisement.";
glossary['button_add_favourite'] = "Select this button to add this item to your favourites list.";
glossary['button_remove_favourite'] = "Select this button to remove this item from your favourites list.";
glossary['button_remove_item'] = "Select this button to remove this item.";
glossary['button_retract_offer'] = "Select this button to retract this offer.";
glossary['button_send_message'] = "Select this button to send a message.";
glossary['button_view_conversation'] = "Select this button to view the conversation history.";
glossary['branch'] = "One category branch is when you have one chain of categories selected (where each selected category/sub-category has at most one sub-category selected) - each additional sub-category counts as an additional branch.";

glossary['community'] = system_name + " communities are specific groups of geographic locations, special interests or a combination of both.";
glossary['completed_item_click'] = "Click here for more information. This item is part of an accepted offer.";
glossary['counter_offer'] = "An offer made by a trader in response to another offer.";
// Re-introduced as this was being used in the help. Don't know why we missed this.
glossary['category'] = "A group (or classification) that an item belongs to.";
glossary['credit'] = "Credit is " + system_name + "'s online currency. It can be earned, purchased and used within the system.";
glossary['decline_offer'] = "A 'declined offer' is one that has been rejected by the receiving trader.";
glossary['enhancement'] = "An enhancement is an upgrade to an advertisement (to make it stand out).";
glossary['feedback'] = "'Feedback' is our rating system that allows traders to record their opinion about other traders that they have formed an agreement with."
glossary['free'] = "This indicates that the advertiser is providing this item for free or wants to obtain this item for free.";
glossary['free_text'] = system_name + " allows you to get or give stuff for FREE.";
glossary['help_icon'] = "Click here for help with this screen."
glossary['html'] = "Click here to learn more about HTML (opens in a new window).";
glossary['image_click'] = "Click to open in a new window. Note: some 'pop-up blockers' may prevent the image from being displayed in a new window.";
glossary['image_enlarge'] = "Click here to enlarge"
glossary['instant_trade'] = "The 'instant trade' price allows you to instantly obtain or provide this item.";
glossary['instant_trade_click'] = "Click here to instantly obtain or provide this item.";
glossary['instant_trade_click_obtain'] = "Click here to obtain this item now.";
glossary['instant_trade_click_provide'] = "Click here to provide this item now.";
glossary['inactive_item'] = "This item is currently not advertised.";
glossary['individual_feedback'] = "'Individual Feedback' is one piece of feedback (made up of a score and an optional comment).";
glossary['individual_feedback_comment'] = "This is one 'comment' that is a part of one piece of feedback.";
glossary['individual_feedback_score'] =  "This is one 'score' that is a part of an one piece of feedback.";
glossary['item'] = "An item is a product, service/job, people/group or event/activity that a trader would like to obtain or provide.";
glossary['item_title_link'] = "Click here to view item details.";
glossary['item_processing_click'] = "Click here for more information.  This item is currently being processed.";
glossary['money_only'] = "This indicates that you can offer 'money only' (i.e. you can not offer to swap items).";
glossary['money_only_offer'] = "A 'money-only' offer is an offer that contains money only (i.e. it does not include the swapping of any items).";
glossary['meet_text'] = system_name + " allows you to MEET.";
glossary['message'] = "A message is a communication with another trader.";
glossary['my_wish_list_total_offers'] = "This is the total number of offers relating to this item.";
glossary['make_offer_add_item'] = "Click here to create a new item, then return to this screen and select 'refresh' in your browser (so that the new item will appear).";
glossary['my_stuff'] = "The 'home' for a trader that provides many functions to manage their account.";
glossary['obtain'] = "This indicates that the trader would like to 'obtain' (or buy) the item.";
glossary['open_swap'] = "This indicates that the advertiser is 'open to swapping' (i.e. you can offer swap items and/or money).";
glossary['offer'] = "An offer is a proposal to enter into an agreement with another trader.";
glossary['offered_item_click'] = "Click here for more information. This indicates that the item is part of an active offer.";
glossary['offer_accepted_click'] = "Click here for more information. This offer has been accepted.";
glossary['offer_retracted_click'] = "Click here for more information. This offer has been retracted.";
glossary['offer_declined_click'] = "Click here for more information. This offer has been declined.";
glossary['offer_active_click'] = "Click here for more information. This offer is active.";
glossary['offer_processing_click'] = "Click here for more information. This offer is being processed.";
glossary['oms'] = "Click here for more information. Our unique 'Offer Management System' allows you to make multiple offers to multiple people and ensures that you do not commit to more than one agreement.";
glossary['overall_feedback_rating'] = "Click here for more details about a trader's 'overall feedback rating'.";
glossary['pop_up_blocker'] = "Click here for more information. 'Pop-Up Blockers' can stop new windows from appearing.";
glossary['provide'] = " This indicates that the trader would like to 'provide' (or sell) the item.";
glossary['readvertise'] = "Click here for more details. The Auto ReAdvertise option helps you by automatically ReAdvertising your item at the end of the advertisement period (i.e. if the item is not part of an agreement).";
glossary['readvertise_change'] = "Click here to turn the ReAdvertise option on & off.";
glossary['replies_messages_sent'] = "This displays the messages that you have received after you sent your message.";
glossary['replies_messages_received'] = "This displays the messages that you have sent since you received the message.";
glossary['replies_offers_sent'] = "This displays the offers that have been made after you sent your message.";
glossary['replies_offers_received'] = "This displays the offers that have been made since you received their message.";
glossary['retracted_offer'] = "A 'retracted offer' is one that has been withdrawn by the trader that made it.";
glossary['sidebar'] = "The 'sidebar' appears on the left-hand side of the " + system_name + " website. The sidebar allows you to access features and actions that are relevant to the particular screen that you are viewing.";
glossary['search'] = "Click here to search.";
glossary['search_clear'] = "Clears your settings and selects the default options.";
glossary['search_reset'] = "Resets these settings to how they were when you first entered the screen.";
glossary['search_criteria'] = "Click here to change your search criteria.";
glossary['search_enhancement'] = "Click here to add an enhancement to one of your advertisements.";
glossary['search_offers'] = "This is the total number of offers made to the advertisement.";
glossary['swap_text'] = system_name + " allows you to SWAP.";
glossary['sell_text'] = system_name +  " allows you to SELL.";
glossary['status_not_real'] = "This is not a real system. None of the items in this system are real.";
glossary['status_real'] = "Click here for more details";
glossary['supersede'] = "'Supersede' means to ' replace'. Click here for more information about the 'Overall Feedback Rating'.";
glossary['thumbnail_none'] = "No Thumbnail.";
glossary['table_item_title'] = "Click here to sort by item title. ";
glossary['table_direction'] = "Click here to sort by the 'Obtain'/'Provide' direction.";
glossary['table_location'] = "Click here to sort by location";
glossary['table_time_left'] = "Click here to sort by the time left. This is the time remaining before the advertisement finishes.";
glossary['table_offers'] = "Click here to sort by number of offers. This is the total number of offers for the item.";
glossary['table_image'] = "This is a picture for the item.";
glossary['table_offer_made_end_and_left'] = "Click here to sort by end time (time left). This is the time remaining before the offer will expire.";
glossary['table_offer_made_when'] = "Click here to sort by the time that the offer was made.";
glossary['table_offer_declined_trader'] = "Click here to sort by the trader that declined the offer.";
glossary['table_offer_declined_time'] = "Click here to sort by the time that the offer was declined.";
glossary['table_message_received_item'] = "Click here to sort by the title of the item that this message is associated with.";
glossary['table_message_received_trader'] = "Click here to sort by the trader that sent the message.";
glossary['table_message_received_time'] = "Click here to sort by the time that the message was received.";
glossary['table_message_received'] = "Click here to sort by message text.";
glossary['table_message_sent_item'] = "Click here to sort by the title of the item that this message is associated with.";
glossary['table_message_sent_trader'] = "Click here to sort by the trader that the message was sent to.";
glossary['table_message_sent_time'] = "Click here to sort by the time that the message was sent.";
glossary['table_message_sent'] = "Click here to sort by message text.";
glossary['table_feedback_trader_to'] = "Click here to sort by the trader that the feedback was provided to.";
glossary['table_feedback_agreement'] = "Click here to sort by agreement number that this feedback relates to.";
glossary['table_feedback_trader_from'] = "Click here to sort by the trader that provided the feedback.";
glossary['table_feedback_date'] = "Click here to sort by date/time that the feedback was provided.";
glossary['table_feedback_comment'] = "Click here to sort by the feedback comment.";
glossary['table_feedback_score'] = "Click here to sort by the feedback score.";
glossary['table_offer_accept_time'] = "Click here to sort by the time that the offer was accepted.";
glossary['table_trader_from_offer'] = "Click here to sort by the trader that accepted the offer.";
glossary['table_offers'] = "Click here to sort by number of offers. This is the total number of offers for the item.";
glossary['table_offer_expire'] = "Click here to sort by offer expiration time. This is the time left before the offer expires.";
glossary['table_offer_time'] = "Click here to sort by the date/time that the offer was made.";
glossary['table_offering_trader'] = "Click here to sort by the trader that made the offer.";
glossary['table_offer_retracted'] = "Click here to sort by the date/time that the offer was retracted.";
glossary['table_trader_from'] = "Click here to sort by the trader that sent the message.";
glossary['table_trader_to'] = "Click here to sort by the trader that received the message.";
glossary['table_trader'] = "Click here to sort by trader.";
glossary['table_sent'] = "Click here to sort by the time that the message was sent.";
glossary['table_sort_order'] = 'To sort a table simply click on one of the underlined column titles.';
glossary['table_message'] = "Click here to sort by the message text.";
glossary['table_item_number'] = "Click here to sort by the item number. This is the unique " + system_name + " number that has been allocated to the item.";
glossary['table_item_offers'] = "Click here to sort by the number of offers that this item is associated with.";
glossary['table_active_offers'] = "Click here to sort by the number of active offers that this item is a part of.";
glossary['table_best_price'] = "Click here to sort by the current best price. If there are no offers then this will display the minimum/maximum acceptable price.";
glossary['table_instant_price'] = "Click here to sort by the instant trade price. This is the price for which you can instantly obtain/provide this item.";
glossary['table_item_type'] = "Click here to sort by item type (i.e. 'open-swap', 'money-only' or 'free').";
glossary['table_retracted_time'] = "Click here to sort by time that the offer was retracted.";
glossary['table_retracted_trader'] = "Click here to sort by the trader that retracted the offer.";
glossary['toolbar_community_clicked'] = "You are on the 'Community' screen. This is where you can browse and learn more about " + system_name + " communities.";
glossary['toolbar_community'] = "Select this tab to go to the 'Community' screen. This is where you can browse and learn more about " + system_name + " communities.";
glossary['toolbar_home_clicked'] = "You are on the '" + system_name + " Home-Page'.";
glossary['toolbar_home'] = "Select this tab to go to the '" + system_name + " Home-Page'.";
glossary['toolbar_my_stuff_clicked'] = "You are on the 'My Stuff (My Home)' screen. This is where you can manage your stuff.";
glossary['toolbar_my_stuff'] = "Select this tab to go to the 'My Stuff (My Home)' screen. This is where you can manage your stuff.";
glossary['toolbar_browse_clicked'] = "You are on the 'Browse' screen. This screen allows you to find and sort advertisements.";
glossary['toolbar_browse'] = "Select this tab to go to the 'Browse' screen. This screen allows you to find and sort advertisements.";
glossary['toolbar_search_clicked'] = "You are on the 'Search' screen. This screen allows you to perform searches.";
glossary['toolbar_search'] = "Select this tab to go to the 'Search' screen. This screen allows you to perform searches.";
glossary['toolbar_help_clicked'] = "You are on the 'Help Overview' screen. This screen allows you to access help for " + system_name + ".";
glossary['toolbar_help'] = "Select this tab to go to the 'Help Overview' screen. This screen allows you to access help for " + system_name + ".";
glossary['toolbar'] = "Tabs located at the top of the " + system_name + " website. This toolbar allows you to access parts of the system ('Home', 'My Stuff', 'Browse', 'Search', 'Community' and 'Help').";
glossary['trader'] = "A trader is a registered user of the " + system_name + " system.";
glossary['tab'] = "A tab is part of the Top Toolbar Menu (located at the top of the " + system_name + " website). Select a tab to navigate through the main parts of " + system_name + ".";
glossary['trader_username_link'] = "Trader User-Name:  Click here to view more information about this trader.";
glossary['trader_feedback_link'] = "Trader Feedback Rating: Click here to view more information about feedback for this trader.";
glossary['wish_list'] = "The 'Wish-list' is a list of the items that you would like to obtain and/or provide. You may also create new items and advertisements from this screen.";
glossary['rss_feed'] = "RSS feed. Click here for more information."
glossary['add_items'] = "You can add as many different items as you like for free. Adding lots of different items increases the chance that someone will find one of your items and want to buy, sell, swap or meet with you."
///////
// Entries to be merged together
///////
// for example, in the help article it has been used 'when you make an offer to an advertised item", or "select the advertised item"
// Not being used in the code
glossary['advertised'] = "This is the status of an item that is part of an advertisement. An advertisement is an announcement of a trader's desire to obtain or provide an item.";
// Advertisement is used everywhere in the help, for example, "how do i find an advertisement", "search for an advertisement you would like to make an offer to".
// Also being used in the code
glossary['advertisement'] = "An advertisement is an announcement of a trader's desire to obtain or provide an item.";
// being used in code but not in help
glossary['advertisement_click'] = "Click here for more information. An advertisement is an announcement of a trader's desire to obtain or provide an item.";



///////
// Entries that are no longer being used, but we are keeping them here in case we want to reintroduce them
///////
// glossary['active_advertisements'] = "These are advertisements that are still running in the system, they have not yet reached their end date and no offers have been accepted on them.";
// replaced by 'advertisement_click'
glossary['advertised_click'] = "Click here for more information. This item has been advertised.";

// glossary['bin_price'] = "The monetary amount that an item can be purchased instantly."; LW: renamed to instant_trade
glossary['category'] = "A group (or type) that an item belongs to.";
glossary['considering'] = "A period of time that a trader has the ability to reflect, analyse and decide on offers that have been made to their advertisement.";

// glossary['completed_item'] = "This item has been included in an accepted offer.";
// glossary['considering_advertisements'] = "These are advertisements which have reached their end date with offers made which you have not yet actioned. Advertisements will last in this state for 7 days before becoming expired, allowing you to consider these offers and accept/reject them as you wish.";
// glossary['expired_advertisements'] = "These are advertisements that have either reached their end date with no active offers on them, or have gone through the considering state and had all offers rejected.";

// replaced by item_processing_click
glossary['item_processing'] = "This item is currently being processed. The item's advertisement duration has recently ended and the " + system_name + " system is processing any offers that have been received.";

// glossary['login'] = "A function that allows a registered trader to access the SwapAce system";
// glossary['log-out'] = "A function that allows a registered trader to exit the SwapAce system";

// replaced by offered_item_click
glossary['offered_item'] = "This indicates that the item is part of an active offer."; 

// replaced by offer_processing_click
glossary['offer_processing'] = "This offer is currently waiting on an item to be processed. An advertisement period has just ended and the OMS (Offer Management System) is processing any offers that have been received.";

// glossary['offered_item'] = "An item that is part of an active offer is one that has been included in an offer made by another trader or in an offer made by the trader who created it";

// replaced by oms
glossary['oms_help'] = "Our unique 'Offer Management System' allows you to make multiple offers to multiple people and ensures that you do not commit to more than one agreement."; 

// glossary['overall_feedback_percentage'] = "To be completed. This is a figure that represents the traders 'individual feedback scores' as a percentage.";

glossary['ticket'] = "A ticket is a record of your enquiry/question that has been sent to the " + system_name + " support team. This ticket contains your enquiry/question details and status.";

// glossary['transaction'] = "A transaction is an agreement between two traders where a combination of items and/or items are being exchanged";
// glossary['transaction'] = "A transaction is basically an accepted offer. It is an agreement between traders in regards to the exchange of item(s) and/or money.";



function addGlossaryDefinition( item ) {
    if(glossary[item.title]) {

        item.T_STATIC=true;
        item.T_BORDERCOLOR='black';
        item.T_BGCOLOR='#FFFFCC';
        item.T_FONTCOLOR='black';
        
        if(item.onmouseover && (item.onmouseover.toString().indexOf('setLink') != -1 || item.onmouseover.toString().indexOf('setHelpLink') != -1)) item.onmouseover();
        
        var funcString = "return escape(\""+glossary[item.title]+"\")";
        item.setAttribute("onmouseover", funcString);
        item.onmouseover=new Function(funcString);
    }
}



function gloss(){
    var i = 0; 

    for(i = 0 ; i < document.anchors.length ; i++){
        addGlossaryDefinition(document.anchors[i]);
    }

    for(i = 0 ; i < document.images.length ; i++){
        addGlossaryDefinition(document.images[i]);
    }
    
    var inclusionList = new Array('reset', 'button', 'submit', 'image');
    if(document.getElementsByTagName) {
        var inputTags = document.getElementsByTagName('input');
        for(i = 0; i < inputTags.length; i++) {
            element = inputTags[i];
            if(element && element.type && SA_isInArray(element.type, inclusionList)) {
                addGlossaryDefinition(element);
            }
        }
    }
    
}
