// JavaScript Document
function popup(file,options,width,height) {
  if ((width != 0 || width !=null) && (height != 0 || height !=  null)) {
    options = options+",width="+width+",height="+height;
  }
  var textWindow=window.open(file,"TextWindow",options);
}
function popSlideShow(file) {
	popup(file,'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=no','640','490');
}

var currentTab = null;
var currentTabContent = null;
function selectTab(tab) {
	if(currentTab == null) {
		currentTab = document.getElementById("tab1")
		currentTabContent = document.getElementById("tab1Content");
	}
	currentTab.setAttribute("class", "tab");
	currentTab.setAttribute("className", "tab");
	currentTabContent.setAttribute("class", "tabContent");
	currentTabContent.setAttribute("className", "tabContent");
	currentTab = tab;
	currentTabContent = document.getElementById(currentTab.id+"Content");
	currentTabContent.setAttribute("class", "currentTabContent");
	currentTabContent.setAttribute("className", "currentTabContent");
	currentTab.setAttribute("class", "currentTab");
	currentTab.setAttribute("className", "currentTab");
	currentTab.blur();
}

var delay = 1200;
function nextLeftImg() {
	LEFT_SLIDES.next();
	setTimeout("nextCenterImg()", delay);
}
function nextCenterImg() {
	CENTER_SLIDES.next();
	setTimeout("nextRightImg()", delay);
}
function nextRightImg() {
	RIGHT_SLIDES.next();
	setTimeout("nextLeftImg()", delay);
}

function onloadEvents() {
	setTimeout("nextLeftImg()", delay*2);
	//LEFT_SLIDES.play();
	//setTimeout("CENTER_SLIDES.play()", 333);
	//setTimeout("RIGHT_SLIDES.play()", 666);
}

