/***** ScriptReaction Mutli Media Development - All Code Copyright 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 	= '#fff';
					color 				= '#000066';
					fontWeight			= 'bold';
					textDecoration		= 'none';
					marginTop			= '1px';
					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 			= '';
				fontWeight		= '';
				textDecoration	= '';
				marginTop		= '';
				cursor 			= '';
			}
			var thePage = document.getElementById('tabItem' + i);
			with(thePage.style){
				display = 'none';	
			}
		}
	},
	
	<!-- specific click actions -->
	doAction1: function (x){
		document.getElementById('tabItem' + x).style.display = 'block';
	}
}

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