function hiltMenuTab(tabTable){
	if(tabTable.rows[0].cells[0].style.backgroundImage=="none"){
		tabTable.rows[0].cells[0].style.backgroundImage="url(images/top_menu_l_ro.jpg)";
		tabTable.rows[0].cells[0].style.backgroundRepeat="no-repeat";
		tabTable.rows[0].cells[1].style.backgroundImage="url(images/top_menu_c_ro.jpg)";
		tabTable.rows[0].cells[1].style.backgroundRepeat="repeat-x";
		tabTable.rows[0].cells[2].style.backgroundImage="url(images/top_menu_r_ro.jpg)";
		tabTable.rows[0].cells[2].style.backgroundRepeat="no-repeat";
	}else{
		tabTable.rows[0].cells[0].style.backgroundImage="none";
		tabTable.rows[0].cells[0].style.backgroundRepeat="no-repeat";
		tabTable.rows[0].cells[1].style.backgroundImage="none";
		tabTable.rows[0].cells[1].style.backgroundRepeat="repeat-x";
		tabTable.rows[0].cells[2].style.backgroundImage="none";
		tabTable.rows[0].cells[2].style.backgroundRepeat="no-repeat";
	}
}

function hiltSelectedMenuTab(tabTable){
	if(tabTable.rows[0].cells[0].style.backgroundImage.indexOf("_ro")==-1){
		tabTable.rows[0].cells[0].style.backgroundImage="url(images/top_menu_l_ro.jpg)";
		tabTable.rows[0].cells[0].style.backgroundRepeat="no-repeat";
		tabTable.rows[0].cells[1].style.backgroundImage="url(images/top_menu_c_ro.jpg)";
		tabTable.rows[0].cells[1].style.backgroundRepeat="repeat-x";
		tabTable.rows[0].cells[1].style.color="black";
		tabTable.rows[0].cells[2].style.backgroundImage="url(images/top_menu_r_ro.jpg)";
		tabTable.rows[0].cells[2].style.backgroundRepeat="no-repeat";
	}else{
		tabTable.rows[0].cells[0].style.backgroundImage="url(images/top_menu_l_s.jpg)";
		tabTable.rows[0].cells[0].style.backgroundRepeat="no-repeat";
		tabTable.rows[0].cells[1].style.backgroundImage="url(images/top_menu_c_s.jpg)";
		tabTable.rows[0].cells[1].style.backgroundRepeat="repeat-x";
		tabTable.rows[0].cells[1].style.color="white";
		tabTable.rows[0].cells[2].style.backgroundImage="url(images/top_menu_r_s.jpg)";
		tabTable.rows[0].cells[2].style.backgroundRepeat="no-repeat";
	}
}

function hiltBtn(btn){
	if(btn.rows[0].cells[0].style.backgroundImage=="url(images/button.jpg)" || btn.rows[0].cells[0].style.backgroundImage=="url(images/buttonR.jpg)"){
		if(btn.rows[0].cells[0].style.backgroundImage=="url(images/button.jpg)"){
			btn.rows[0].cells[0].style.backgroundImage="url(images/buttonR.jpg)";
			btn.rows[0].cells[0].style.color="black";
		}else{
			btn.rows[0].cells[0].style.backgroundImage="url(images/button.jpg)";
			btn.rows[0].cells[0].style.color="white";
		}
	}else{
		if(btn.rows[0].cells[0].style.backgroundImage=="url(images/button_wide.jpg)"){
			btn.rows[0].cells[0].style.backgroundImage="url(images/button_wideR.jpg)";
			btn.rows[0].cells[0].style.color="black";
		}else{
			btn.rows[0].cells[0].style.backgroundImage="url(images/button_wide.jpg)";
			btn.rows[0].cells[0].style.color="white";
		}
	}
}

function hiltButton(btn){
	if(btn.rows[0].cells[0].style.backgroundImage=="url(images/btn_l_s.jpg)"){
		btn.rows[0].cells[0].style.backgroundImage="url(images/btn_l_ro.jpg)";
		btn.rows[0].cells[0].style.backgroundRepeat="no-repeat";
		btn.rows[0].cells[1].style.backgroundImage="url(images/btn_c_ro.jpg)";
		btn.rows[0].cells[1].style.color="black";
		btn.rows[0].cells[1].style.backgroundRepeat="repeat-x";
		btn.rows[0].cells[2].style.backgroundImage="url(images/btn_r_ro.jpg)";
		btn.rows[0].cells[2].style.backgroundRepeat="no-repeat";
	}else{
		btn.rows[0].cells[0].style.backgroundImage="url(images/btn_l_s.jpg)";
		btn.rows[0].cells[0].style.backgroundRepeat="no-repeat";
		btn.rows[0].cells[1].style.backgroundImage="url(images/btn_c_s.jpg)";
		btn.rows[0].cells[1].style.color="white";
		btn.rows[0].cells[1].style.backgroundRepeat="repeat-x";
		btn.rows[0].cells[2].style.backgroundImage="url(images/btn_r_s.jpg)";
		btn.rows[0].cells[2].style.backgroundRepeat="no-repeat";
	}
}

function hiltRow(rowObj,hiltColor){
	rowObj.style.backgroundColor = hiltColor;
}

function unltRow(rowObj,unltColor){
	rowObj.style.backgroundColor = unltColor;
}

var tabs;
var numTabs;

function initTabs(num){
	numTabs = num;
	tabs = new Array(num);
	for(i=0;i<num;i++){
		tabs[i] = document.getElementById("tab_"+(i+1));
	}
}

function tab(myTab){
	var myPos;
	for(i=0;i<tabs.length;i++){
		if(tabs[i] == myTab){
			myPos = i;
			break;
		}
	}
	for(i=0;i<tabs.length - 1;i++){
		var rr;
		var m;
		for(j=0;j<tabs[i].childNodes.length;j++){
			if(tabs[i].childNodes[j].id == "r2"){
				rr = tabs[i].childNodes[j];
			}
			else if(tabs[i].childNodes[j].id == "m"){
			  m = tabs[i].childNodes[j];
			}
		}
		if(i<myPos){
			rr.style.backgroundImage = "url(images/tabs_r_under.gif)";
		}else{
			rr.style.backgroundImage = "url(images/tabs_r_over.gif)";
		}
		if(i==myPos){
			m.style.fontWeight = "bold";
		}else{
			m.style.fontWeight = "normal";
		}
	}
	for(j=0;j<tabs[tabs.length-1].childNodes.length;j++){
		if(tabs[tabs.length-1].childNodes[j].id == "m"){
			 m = tabs[tabs.length-1].childNodes[j];
			 break
		}
	}
	if(myPos == tabs.length-1){
		m.style.fontWeight = "bold";
	}else{
		m.style.fontWeight = "normal";
	}
}
