// JavaScript Document\
function checkS(e){
return false;
var thumbW = document.getElementById("thumbTable").clientWidth;
var div = document.getElementById("outerThumb");
   div.mouseIsOver = false;
   div.onmouseover = function() { mouseIsOver = true; };
   div.onmouseout = function() { mouseIsOver = false; } 
// capture the mouse position
    if (!e) var e = window.event;
	if (mouseIsOver == true) {
    if (e.pageX) { posx = e.pageX - 40; }
    else if (e.clientX) { posx = e.clientX - 40; }
	}

var perx = posx/(600 - 80);
var newW = Math.round(thumbW - 600)*perx;
div.scrollLeft = newW;
}

var current = 1;
var total = 6;
var speed = 50;

function changeOpac(opacity, id) { 
    var object = document.getElementById(id).style; 
    object.opacity = (opacity / 100);
}

function thumb(newThumb) {
	clearInterval ( playing );
	fadeout(current);
	fadein(newThumb);
	//document.getElementById("link"+current).style.visibility = "hidden";
	current = newThumb*1;
	//document.getElementById("link"+current).style.visibility = "visible";
	pauseit();
}

function goplay() {
	if ( current == total) { next1 = 1 } else { next1 = current + 1; }
	fadeout(current);
	fadein(next1);
	//document.getElementById("link"+current).style.visibility = "hidden";
	if ( current == total) { current = 1 } else { current = current + 1; }
	//document.getElementById("link"+current).style.visibility = "visible";
}

function pauseit() {
	clearInterval ( playing );
	document.getElementById("NAVplay").style.visibility = "visible";
	document.getElementById("NAVpause").style.visibility = "hidden";
}

function play() {
	if ( current == total) { next1 = 1 } else { next1 = current + 1; }
	fadeout(current);
	fadein(next1);
	document.getElementById("link"+current).style.visibility = "hidden";
	if ( current == total) { current = 1 } else { current = current + 1; }
	document.getElementById("link"+current).style.visibility = "visible";
	clearInterval ( playing );
	playing = setInterval ( "goplay()", 5000 );
	document.getElementById("NAVplay").style.visibility = "hidden";
	document.getElementById("NAVpause").style.visibility = "visible";
}

function next() {
	clearInterval ( playing );
	if ( current == total) { next1 = 1 } else { next1 = current + 1; }
	fadeout(current);
	fadein(next1);
	//document.getElementById("link"+current).style.visibility = "hidden";
	if ( current == total) { current = 1 } else { current = current + 1; }
	//document.getElementById("link"+current).style.visibility = "visible";
	pauseit();
}

function prev() {
	clearInterval ( playing );
	if ( current == 1) { next1 = total } else { next1 = current - 1; }
	fadeout(current);
	fadein(next1);
	//document.getElementById("link"+current).style.visibility = "hidden";
	if ( current == 1) { current = total } else { current = current - 1; }
	//document.getElementById("link"+current).style.visibility = "visible";
	pauseit();
}

document.getElementById(1).style.opacity = 1;
document.getElementById(1).style.zIndex = 100;
//document.getElementById("th"+current).style.border = "1px solid #FFCC00";
playing = setInterval ( "goplay()", 5000 );
//document.getElementById("link"+current).style.visibility = "visible";

function showNav() { document.getElementById('NAVmain').style.bottom = 20; };
function hideNav() { document.getElementById('NAVmain').style.bottom = 2000; };
