<!--

/* * * * * * * * * * * * * * * * * * * * * * * *
*										    	*
*	File: parts.perf_dealersearch.html			*
*											    *
*	Functions: getRef(), changeRegion()			*
*											    *
*	Purpose: These functions handle 			*
*	the toggling of different dealer regions   	*
*											    *
*	Author: Shane Handford		    			*
*	E-mail: shane.handford@maclaren.com  		*
*								    			*
*	Date: 04/14/03				    			*
*								    			*
*	Revisions:					    			*
*								    			*
* * * * * * * * * * * * * * * * * * * * * * * * */

// get a reference to the object
function getRef(id) {
	return (document.getElementById ? document.getElementById(id) : document.all[id]);
}

/* GLOBAL VAR */
var lastBlock = "pr";  
// must be set initially to an existing dealerDiv. 
// used to hold the value of the last shown block.  we need to hide the previous block before showing a new one.

// toggles the different dealer divs
function changeRegion(arg){

	if (arg==""){return;}
	
	var introDivObj = getRef("introText3");
	introDivObj.style.display = "none";

	/********* !! VERY IMPORTANT !! *******
	The copy on the site is displayed based on certain conditions.
	If there is no dealer list - display seperate copy and vice versa.

	IF DEALERS ARE ADDED TO THESE REGIONS
	THEY MUST BE REMOVED FROM THIS TEST */
	if (arg=="pr" || arg=="teri"){ // These regions have no dealers.
	


		var intro3DivObj = getRef("introText3");
		intro3DivObj.style.display = "none";
		


	} else {



		var intro3DivObj = getRef("introText3");
		intro3DivObj.style.display = "block";		
		
	

	}
	
	var oldDivObj = getRef(lastBlock);
	oldDivObj.style.display = "none";
	
	var divObj = getRef(arg);
	divObj.style.display = "block";
	
	lastBlock = arg;

}
			
//-->