
/*********************************************************************
File Name:	tab.js
File Info:	Javascript
Author:		WEB DESIGN LAB
		http://www.webdlab.com/
Last Modified:	10.01.2009
*********************************************************************/

/*--------------------------------------------------------------------
Script
--------------------------------------------------------------------*/

function tabChange(){
var tabobj = document.getElementsByTagName('a');
for(var i=0; i < tabobj.length; i++){
if(tabobj[i].className == 'tab_A'){
	tabobj[i].onclick = function(){
	tab_h('tabA','url(images/top/bt_topics_partner.gif)');
	tab_b('tab1');
	return false;
	}
}else if(tabobj[i].className == 'tab_B'){
	tabobj[i].onclick = function(){
	tab_h('tabB','url(images/top/bt_topics_client.gif)');
	tab_b('tab2');
	return false;
	}
}else if(tabobj[i].className == 'tab_C'){
	tabobj[i].onclick = function(){
	tab_h('tabC','url(images/top/bt_topics_tieup.gif)');
	tab_b('tab3');
	return false;
	}
}
}
}

function addEvent(init) {
	if (window.addEventListener) {
		window.addEventListener("load",init, false);
	} else if (window.attachEvent) {
		window.attachEvent("onload",init);
	}
}

addEvent(function(){ tabChange(); tab_h('tabA','url(images/top/bt_topics_partner.gif)'); tab_b('tab1'); });

function tab_h(tabh,tabi) {
	document.getElementById('tabA').style.backgroundImage = 'url(images/top/bt_topics_partner_off.gif)';
	document.getElementById('tabB').style.backgroundImage = 'url(images/top/bt_topics_client_off.gif)';
	document.getElementById('tabC').style.backgroundImage = 'url(images/top/bt_topics_tieup_off.gif)';
if(tabh) {
	document.getElementById(tabh).style.backgroundImage = tabi;
	}
}

function tab_b(tabb) {
	document.getElementById('tab1').style.display = 'none';
	document.getElementById('tab2').style.display = 'none';
	document.getElementById('tab3').style.display = 'none';
if(tabb) {
	document.getElementById(tabb).style.display = 'block';
	}
}

