function TR_$(div) {
	return document.getElementById(div)	
}
/*
function TR_OpenPopUpDiv(div,activator,left,top) {

	l = TR_$('TR_MainFrame').offsetLeft + left
	t = TR_$('TR_MainFrame').offsetTop + top + BANNER_HEIGHT;

//	TR_$(activator).click();	
	
	TR_$(div).style.left = l + "px" ;	
	TR_$(div).style.top = t + "px" ;	
	TR_$(div).style.display= "block";
	TR_$('cover').style.display= "block";			
}

function TR_ClosePopUpDiv(div,deactivator) {
	try {
		TR_$(deactivator).click();	
	} catch(e) {}	
	TR_$(div).style.display= "none";
	TR_$('cover').style.display= "none";			
}	
*/

function TR_ShowTab(tab,tabMenuItem) {
	TR_$(ACTIVE_TAB).style.display = "none";
	TR_$(ACTIVE_TAB_MENU).style.color = "navy";	
	TR_$(ACTIVE_TAB_MENU).style.backgroundColor = "gray";
	
	TR_$(tab).style.display = "block";
	TR_$(tabMenuItem).style.color = "black";	
	TR_$(tabMenuItem).style.backgroundColor = "#cccccc"	;
	
	ACTIVE_TAB_MENU = tabMenuItem
	ACTIVE_TAB = tab
}


function TR_ResizeTabs(finalHeight) {
	for (i=0;i<TABS.length;i++) {
		TR_$(TABS[i]).style.height = (finalHeight - 160) + "px";
	}
}
/*
function TR_Resize_TR_MainFrame() {
	finalHeight = 600
	if (window.innerHeight==undefined){
		finalHeight =  document.documentElement.clientHeight
	} else {
		finalHeight =  window.innerHeight
	}
	finalHeight = finalHeight - BANNER_HEIGHT - 40
	if (finalHeight<420)
		finalHeight=420
		
	// Main Stuff	
	TR_$('TR_Content').style.height = finalHeight + "px";	
	TR_$('TR_Tabs').style.height = (finalHeight - 145) + "px";	

	TR_ResizeTabs(finalHeight);	
	// TuneRooms Tabs
	TR_$('TR_Tabs_TuneRooms_ListingContainer').style.height = (finalHeight - 187) + "px";	
	TR_$('TR_Tabs_TuneRooms_DetailContainer').style.height = (finalHeight - 187) + "px";	

}

function TR_Resize_TR_IFrame() {
	finalHeight = 600
	if (window.innerHeight==undefined){
		finalHeight =  document.documentElement.clientHeight
	} else {
		finalHeight =  window.innerHeight
	}
	TR_$('TR_MainIframe').style.height = finalHeight;

}
*/
var BANNER_HEIGHT = 120;
var TABS = new Array(	"TR_TuneRoomTab",
						"TR_BlogTab",
						"TR_CommunicationTab",
						"TR_ProfileTab"
					);
var ACTIVE_TAB = "TR_TuneRoomTab";
var ACTIVE_TAB_MENU = "TR_TuneRooms_TabMenuItem";


