/***** SBCentre.ca » Small Business Centre » Developed by ScriptReaction » www.scriptreaction.com *****/

var navTabs = {
	set: function (action,total,start){
		navTabs.action = action; //action function id
		navTabs.total = total;
		navTabs.start = start;
	},
	launch: function (){
		navTabs.ck(navTabs.start);
	},
	menuOn: 0,
	ck: function (x){ //tab click
		if(x != navTabs.menuOn){
			navTabs.menuOn = x; 
			navTabs.rs();
			var thetab = document.getElementById('tab'+x);
			with(thetab){
				with(style){
					backgroundColor = '#0054A4';
					color 			= '#fff';
					borderBottom	= '1px solid #0054A4';
					cursor 			= 'default';
				}
			blur();
			}
			eval('navTabs.doAction' + navTabs.action + '("' + x + '")');
		}
	},
	rs: function (){ //tab reset
		for(var i=1; i<=navTabs.total; i++){
			var thetab = document.getElementById('tab'+i);
			with(thetab.style){
				backgroundColor = '';
				color 			= '';
				borderBottom	= '';
				cursor 			= '';
			}
		}
	},
	
	<!-- specific click actions -->
	doAction1: function (x){
		for(var i=1; i<=navTabs.total; i++){
			var thePage = document.getElementById('tabItem' + i);
			with(thePage.style){
				display = 'none';
			}
		}
		var thePage = document.getElementById('tabItem' + x);
		thePage.style.display = 'block';
	}
}

/********** nav tabs init **********/
global.addEvent(window,'load',navTabs.launch);