// JavaScript Document
w = 0;

function changeTab(tab,scrollNow){
	for(b=1966; b<1975; b++){
		if(b != tab){
			setStyleById(b, "display", "none");
		}else{
			setStyleById(b, "display", "block");
		}
		/*
		if(b != tab){
			setStyleById(b, "display", "none");
		}else{
			setStyleById(b, "display", "block");
		}
		*/
	}
	if(scrollNow){
		/* location.hash = tab; */
		/* window.scrollBy(0,-50); */
	}
}
//  i - element id
//  p - property
//  v - value
//
function setStyleById(i, p, v) {
	var n = document.getElementById(i);
	n.style[p] = v;
}
function doPopups() {
	z = 0;
  	if (!document.getElementsByTagName) return false;
  		var links = document.getElementsByTagName("a");
  		for (var i=0; i < links.length; i++) {
			if (links[i].className.match("tab")) {
				/*
				if(z == 0){
					theTab = links[i].id.substr(0,4);
					changeTab(theTab);
					z = 1;
				}
				*/
				links[i].onclick = function() {
					theTab = this.id.substr(0,4);
					//setStyleById(theTab,"display","none");
					//location.hash = theTab;
					
					changeTab(theTab);
					/*
					location.hash = theTab;
					window.scrollBy(0,-50);
					*/
					return false;
				}
			}
  		}
	intTabs();
}
function intTabs(){
	url = location.href;
	if(url.indexOf("#") != -1){
		aTab = String(url.substr(url.indexOf("#")+1,url.length));
		scrollNow = true;
	}else{
		aTab = '1970';
		scrollNow = false;
	}
	changeTab(aTab,scrollNow);
}
window.onload = doPopups;