	/*ON load check for data*/
	function loadchosen(){
		var query = window.location.search;
		// Skip the leading ?, which should always be there,
		// but be careful anyway
		if (query.substring(0, 1) == '?') {
			query = query.substring(1);
		}
		var data = query.split(',');
		for (i = 0; (i < data.length); i++) {
			data[i] = unescape(data[i]);
		}
		for (i = 0; (i < data.length); i++) {
		//run the function
			
			if(data[i] != ""){
				//run the function
				showTabData(String(data[i]));
			}
		}
	}
	function showTabData(idForDisplay){
		var tabTech = document.getElementById('tab-tech'); 
		var tabDrill = document.getElementById('tab-drill');
		var tabFull = document.getElementById('tab-full');
		var tabTraj = document.getElementById('tab-traj');
		var tabOrder = document.getElementById('tab-order');		
		var tabTest = document.getElementById('tab-test');	
		var tabLinks = document.getElementById('tab-links');
		var tabPlace = document.getElementById('tab-place');
		var tabWarranty = document.getElementById('tab-warranty');
		
		var techtab = document.getElementById('techtab');
		var drilltab = document.getElementById('drilltab');
		var fulltab = document.getElementById('fulltab');
		var trajtab = document.getElementById('trajtab');
		var ordertab = document.getElementById('ordertab');		
		var testtab = document.getElementById('testtab');
		var linkstab = document.getElementById('linkstab');
		var warrantytab = document.getElementById('warrantytab');
		
		tabTech.style.display = "none";
		tabDrill.style.display = "none";
		tabFull.style.display = "none";	
		tabTraj.style.display = "none";	
		tabOrder.style.display = "none";
		tabTest.style.display = "none";
		tabLinks.style.display = "none";
		tabPlace.style.display = "none";
		tabWarranty.style.display = "none";
		 
		title = document.getElementById('lefttitle');
		//main window that holds the content
		dishwindow = document.getElementById('dishcontent');
		dishbkg = document.getElementById('disharea');
		window1 = document.getElementById('news_bg');
		//set defaults
		window1.style.display = "block";
		dishbkg.style.backgroundImage="";
		
		if (idForDisplay == "tech"){	
			tabTech.style.display = "block";
			dishwindow.className = "left-in";
			title.style.display = "block";
			title.innerHTML = "Court Smart Technology&#8482;";
			//clear out a couple other divs.
			window1.style.display = "none";
			dishbkg.style.backgroundImage="url(images/cp_bkg.jpg)";			
			//executeTab(novatab);
		}else if(idForDisplay == "drill"){
			tabDrill.style.display = "block";
			dishwindow.className = "left-in";
			title.style.display = "block";
			title.innerHTML = "Drill Wizard&#8482;"; 		
			//clear out a couple other divs.
			window1.style.display = "none";
			dishbkg.style.backgroundImage="url(images/cp_bkg2.jpg)";	
		}else if(idForDisplay == "full"){
			tabFull.style.display = "block";
			dishwindow.className = "left-in";
			title.style.display = "block";
			title.innerHTML = "Full-Court Performance&#8482;";
			//clear out a couple other divs.
			window1.style.display = "none";
			dishbkg.style.backgroundImage="url(images/cp_bkg2.jpg)";	
		}else if(idForDisplay == "traj"){
			tabTraj.style.display = "block";
			dishwindow.className = "left-in";
			title.style.display = "block";
			title.innerHTML = "Trajectory Control";
			//executeTab(machtab);
		}else if(idForDisplay == "order"){
			tabOrder.style.display = "block";
			dishwindow.className = "left-in";
			title.style.display = "block";
			title.innerHTML = "How to Order"; 
			//executeTab(genetab);
		}else if(idForDisplay == "test"){
			tabTest.style.display = "block";
			dishwindow.className = "left-in";
			title.style.display = "block";
			title.innerHTML = "Testimonials"; 
			//executeTab(sassytab);
		}else if(idForDisplay == "links"){
			tabLinks.style.display = "block";
			dishwindow.className = "left-in";
			title.style.display = "block";
			title.innerHTML = "LInks"; 
			//executeTab(nadatab);
		}else if(idForDisplay == "warranty"){
			tabWarranty.style.display = "block";
			dishwindow.className = "left-in";
			title.style.display = "block";
			title.innerHTML = "Warranty"; 
			//executeTab(nadatab);
		}else if(idForDisplay == "hideme"){
			tabTech.style.display = "none";
			tabDrill.style.display = "none";
			tabFull.style.display = "none";		
			tabOrder.style.display = "none";
			tabTest.style.display = "none";
			tabLinks.style.display = "none";
			tabWarranty.style.display = "none";
			tabPlace.style.display = "block";
		
			dishwindow.className = "left-out";
			title.style.display = "none";
			fleXcrollTo('mycustomscroll','0px','0px',false);
		}
		
 	}
	
//a basic example external module to control scroll from outside
//NOT required for fleXcroll to run, and user do NOT need to
//know what this is for standard operation.
function fleXcrollTo(id,x,y,relative) {
	var scrollDiv = document.getElementById(id);
	//Return if the target is null
	if (scrollDiv == null) return;
	//Do the scroll by using custom method attached by fleXcroll
	//but first check if the method exists.
	if(scrollDiv.contentScroll) scrollDiv.contentScroll(x,y,relative);
	if(scrollDiv.scrollUpdate) scrollDiv.scrollUpdate();
	
}

