    
    /*Create an exclusive approach that only shows one item open*/
function wanscript_showjustme(button,other1,other2,other3,other4,other5,other6,other7)
	{
		wanscript_showmore(button);
		HideMoreButton(other1);
		HideMoreButton(other2);
		HideMoreButton(other3);
		HideMoreButton(other4);
		HideMoreButton(other5);
		HideMoreButton(other6);
		HideMoreButton(other7);
	}   
function wanscript_showjustme_of_4(button,other1,other2,other3)
	{
		wanscript_showmore(button);
		HideMoreButton(other1);
		HideMoreButton(other2);
		HideMoreButton(other3);
	}  
    
    function wanscript_showmore(button)
	{
		// This to switch the displayed link - bigswap ();
		var el = document.getElementById(button);
	
		if ( el.style.display == 'block' ) 
			{
				el.style.display = 'none';
			}
        else 
            {    			
    			el.style.display = 'block';
			}
	}
	

/*This one is to match every AFF to a given set of agency numbers*/

function wanscript_aff2an(myAFF)
	{
		if (myAFF == "AMK") {myagencynumber = ("IATA/ARC/AMK");}
		 else if (myAFF == "FLC") {myagencynumber = ("Pseudo City Code followed by T3 number with No spaces");}
		 else if (myAFF == "FCI") {myagencynumber = ("Pseudo City Code followed by T3 number with No spaces");}
		 else if (myAFF == "FCH") {myagencynumber = ("Pseudo City Code followed by T3 number with No spaces");}
		 else if (myAFF == "FLU") {myagencynumber = ("ABTA Number");}
		 else if (myAFF == "FCRA") {myagencynumber = ("Pseudo City Code");}
		 else if (myAFF == "FCC") {myagencynumber = ("Pseudo City Code");}
		 else if (myAFF == "FCU") {myagencynumber = ("Pseudo City Code");}
		 else if (myAFF == "STA") {myagencynumber = ("Debtor");}
		 else if (myAFF == "STW") {myagencynumber = ("Debtor");}
		 else if (myAFF == "INTA") {myagencynumber = ("IATA/INTA");}
		 else if (myAFF == "AMX") {myagencynumber = ("ABTA /IATA");}
		 else if (myAFF == "CR") {myagencynumber = ("ABTA /IATA");}
		 else if (myAFF == "INTL") {myagencynumber = ("ABTA /IATA");}
		 else if (myAFF == "MIK") {myagencynumber = ("ABTA /IATA");}
		 else if (myAFF == "RLE") {myagencynumber = ("ABTA /IATA");}		 
		 else {myagencynumber = ("IATA/RA/ARC/ABTA/INTA");}
	}

	
/* Good behaviour - the following in code for unobtrusive javascript going forward Donny May 30th 2007 */

function shrinkSection(contentBlock)
{
  if( document.getElementById && document.getElementsByTagName ) /*make sure the browser supports these*/
	{
		if( document.getElementById(contentBlock) )/*check if the targetted ID exists*/
		{
			var myticketRules = document.getElementById(contentBlock);
			var myticketRulesLists = myticketRules.getElementsByTagName('ul');/*extract all the lists in the section*/
			var mysoleticketRulesList = myticketRulesLists[0];/*pick the first, and sole list*/
			if (mysoleticketRulesList !=null)
			{
				mysoleticketRulesList.style.display = 'none'/*Hide the content by default*/;

				myticketRules.onclick = function()
					{
						if ( mysoleticketRulesList.style.display == 'block' ) 
							{
								mysoleticketRulesList.style.display = 'none';
							}
						else 
							{
								mysoleticketRulesList.style.display = 'block';
							}
					};
			}
		}
	}
}

function mybehaviours()
	{/* call all the functions required in this application */
		shrinkSection('ticket_discounts');
		shrinkSection('ticket_bonuses');
		shrinkSection('ticket_rules');
	}

