
//Browser Support Code
function ajaxFunction(item,first,totem,pointer){
	for (var z=0; z < totem; z++) {
		var bgc = document.getElementById('tab' + z);
		bgc.style.color = "#b2c7a1";
		if (z == pointer) {
			bgc.style.color = "#ffffff";
		}
	}
	var ajaxRequest;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ni = document.getElementById('timetext');
			if (first != '1') {
				var nn = document.getElementById('tttt');
				ni.removeChild(nn);
			}
			var newdiv = document.createElement('div');
			newdiv.setAttribute("id","tttt");
			newdiv.innerHTML = ajaxRequest.responseText;
			ni.appendChild(newdiv);
		}
	}
	var queryString = "?timeindex=" + item;
	ajaxRequest.open("GET", "/i/tl.php" + queryString, true);
	ajaxRequest.send(null);
	var removethis = 1;
}

function toggle_visibility(id) {
      var e = document.getElementById(id);
      if(e.style.visibility == 'visible' || e.style.visibility != 'hidden')
         e.style.visibility = 'hidden';
      else
         e.style.visibility = 'visible';
   }
   
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Mr J | http://www.huntingground.net/ */

var scrollStep=1

var timerLeft=""
var timerRight=""

function toLeft(id){
  document.getElementById(id).scrollLeft=0
}

function scrollDivLeft(id){
  clearTimeout(timerRight) 
  document.getElementById(id).scrollLeft+=scrollStep
  timerRight=setTimeout("scrollDivLeft('"+id+"')",10)
}

function scrollDivRight(id){
  clearTimeout(timerLeft)
  document.getElementById(id).scrollLeft-=scrollStep
  timerLeft=setTimeout("scrollDivRight('"+id+"')",10)
}

function toRight(id){
  document.getElementById(id).scrollLeft=document.getElementById(id).scrollWidth
}

function stopMe(){
  clearTimeout(timerRight) 
  clearTimeout(timerLeft)
}


