//This script specifically designed for this site's accordion tabs
function ToggleTabs(a){
	var total = 9;
	if (document.getElementById(a).out) {} else {
		for(i = 1; i <= total; i++) {
			if (document.getElementById('tab'+i).out) {SwapClass('trig'+i,'trig'+i+'off'); CheckTab('tab'+i);}
		}
		for(n = 1; n <= total; n++) {
			if (a == 'tab'+n) {SwapClass('trig'+n,'trig'+n+'on'); CheckTab(a);}
		}
	}
}


function CheckTab(elementId){
	var element = document.getElementById(elementId);
	var hPos1 =   0;	var hPos2 =   0;
	var vPos1 =   0;	var vPos2 =   0;
	var w1    =  34;	var w2    = 507;
	var h1    = 394;	var h2    = 394;
	var rtime = 300;
	if(elementId == 'tab1'){var w1 = 0; w2 = 473;}
	if(element.out == null || element.out == false){
		animate(elementId, hPos2, vPos2, w2, h2, rtime, null); element.out = true;
	}
	else {
		animate(elementId, hPos1, vPos1, w1, h1, rtime, null); element.out = false;
	}
}

