function change_top_tab(tab_layer,tab_id,total_tabs,tab_target,tab_result){
	var tab_on_left;
	var tab_on_center;
	var tab_on_right;
	var bottom_on;
	PopLayer(tab_target,'change',tab_result,'center','true');
	for(i=0; i<total_tabs; i++){
		tab_on_left = 'tab'+tab_layer+i+'left';
		tab_on_center = 'tab'+tab_layer+i+'center';
		tab_on_right = 'tab'+tab_layer+i+'right';
		bottom_on = 'bottom'+tab_layer+i;
		if(i == tab_id){
			document.getElementById(tab_on_left).src="/files/images/tabs/onLeft.png";
			document.getElementById(tab_on_center).className="top_tab_on";
			document.getElementById(tab_on_right).src="/files/images/tabs/onRight.png";
			document.getElementById(bottom_on).className="top_border_off";
		}else{
			document.getElementById(tab_on_left).src="/files/images/tabs/offLeft.png";
			document.getElementById(tab_on_center).className="top_tab_off";
			document.getElementById(tab_on_right).src="/files/images/tabs/offRight.png";
			document.getElementById(bottom_on).className="top_border_on";
		}
	}
}
function change_top_layer_tab(tab_layer,tab_id,total_tabs,tab_target,tab_result){
	var tab_on_left;
	var tab_on_center;
	var tab_on_right;
	var bottom_on;
	PopLayer(tab_target,'change',tab_result,'center','false');
	for(i=0; i<total_tabs; i++){
		tab_on_left = 'tab'+tab_layer+i+'left';
		tab_on_center = 'tab'+tab_layer+i+'center';
		tab_on_right = 'tab'+tab_layer+i+'right';
		bottom_on = 'bottom'+tab_layer+i;
		if(i == tab_id){
			document.getElementById(tab_on_left).src="/files/images/tabs/onLeft.png";
			document.getElementById(tab_on_center).className="top_tab_on";
			document.getElementById(tab_on_right).src="/files/images/tabs/onRight.png";
			document.getElementById(bottom_on).className="top_border_off";
		}else{
			document.getElementById(tab_on_left).src="/files/images/tabs/offLeft.png";
			document.getElementById(tab_on_center).className="top_tab_off";
			document.getElementById(tab_on_right).src="/files/images/tabs/offRight.png";
			document.getElementById(bottom_on).className="top_border_on";
		}
	}
}

