var tabSuffix="-tab";
var txtSuffix="-txt";
var TO;
function openTab(tabName) {
	if (document.getElementById(tabName+txtSuffix)!=null) {
		if (tabName!=currentTab) {
			document.getElementById(currentTab+txtSuffix).style.display="none";
			document.getElementById(currentTab+tabSuffix).className="";
		}
		
		document.getElementById(tabName+txtSuffix).style.display="block";
		document.getElementById(tabName+tabSuffix).className="selected";
		
		currentTab=tabName;
		window.location.hash = tabName;
	}
}

function openFromUrl() {
	var urlhash = window.location.hash;
	urlhash = urlhash.substr(1);
	if (urlhash!="") {
		openTab(urlhash);
	}
	else {
		openTab(defaultTab);
	}
}