// Script to initialize map links for the various services pages that need to dynamically
// assign the links to the image tabs in the pages
// Used by template software, actual contents driven by file names in that area: /home/usa/html/portal/choicepoint

// Made change to track categories that each page can assign itself to.  These categories are
// Parsed by the javasript navagation software to determine if a particular menu item should be
// highlighted to indicate that this page belongs to that menu item (a static rollover effect)

var gSubArray  = "default" ;    
var Categories = new Array() ;

// Now just store off into the local variables, the specific values we need for this page
function maplinks(pagetype,cat1,cat2,cat3) {

        gSubArray      = pagetype ;
	if (gSubArray == '')  gSubArray = 'default' ;  // Always default this since we want to make sure we have a left side nav.

        Categories[0]  = cat1 ? cat1 : "" ;	// These are all optional
        Categories[1]  = cat2 ? cat2 : "" ;	
        Categories[2]  = cat3 ? cat3 : "" ;	

	// Determine which "button type" we need to pass in to the loadbuttons() routine that prints out the buttons
	// This value is passed on to p_purchase_chokepoint.cgi on the "service="
	// The file "buyuse_buttons.html" is SSI included on each of the pages, this page has references the "buttonType" variable

	if (pagetype.search(/behavior/i) >= 0) 
		buttonType = 'behave' ;
	else if (pagetype.search(/compatibility/i) >= 0) 
		buttonType = 'compatibility' ;
	else if (pagetype.search(/crosspost|gojobs/i) >= 0) 
		buttonType = 'post' ;
	else if (pagetype.search(/background/i) >= 0) 
		buttonType = 'background' ;
	else if (pagetype.search(/drug/i) >= 0) 
		buttonType = 'drug' ;
	else if (pagetype.search(/skill/i) >= 0) 
		buttonType = 'skill' ;
	else if (pagetype.search(/physical/i) >= 0) 
		buttonType = 'physical' ;
	else if (pagetype.search(/train/i) >= 0) 
		buttonType = 'training' ;
	else
		buttonType = '' ;
}

