// Detect the Browser

function Is() {
	var agent = navigator.userAgent.toLowerCase();
	this.major = parseInt(navigator.appVersion);
	this.minor = parseFloat(navigator.appVersion);
	this.ns = ((agent.indexOf('mozilla') != -1) && (agent.indexOf('spoofer') == -1) && (agent.indexOf('compatible') == -1) && (agent.indexOf('opera') == -1) && (agent.indexOf('webtv') == -1));
	this.ns2 = (this.ns && (this.major == 2));
	this.ns3 = (this.ns && (this.major == 3));
	this.ns4 = (this.ns && (this.major == 4));
	this.ns6 = (this.ns && (this.major >= 5));
	this.ie = (agent.indexOf("msie") != -1);
	this.ie3 = (this.ie && (this.major < 4));
	this.ie4 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5") == -1));
	this.ie5 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5") != -1));
	this.ieX = (this.ie && !this.ie3 && !this.ie4);
	this.op3 = (agent.indexOf("opera") != -1);
	this.win = (agent.indexOf("win")!=-1);
	this.mac = (agent.indexOf("mac")!=-1);
	this.unix = (agent.indexOf("x11")!=-1);
}
	var is = new Is(); // Create a browser detection object

if (document.images) {
	img1on = new Image();    img1on.src =  "images/tnav1_on.gif";
	img2on = new Image();    img2on.src =  "images/tnav2_on.gif";
	img3on = new Image();    img3on.src =  "images/tnav3_on.gif";
	img4on = new Image();    img4on.src =  "images/tnav4_on.gif";
	img5on = new Image();    img5on.src =  "images/tnav5_on.gif";
	img6on = new Image();    img6on.src =  "images/acc-o.gif";

	img1off = new Image();   img1off.src =  "images/tnav1.gif";
	img2off = new Image();   img2off.src =  "images/tnav2.gif";
	img3off = new Image();   img3off.src =  "images/tnav3.gif";
	img4off = new Image();   img4off.src =  "images/tnav4.gif";
	img5off =  new Image();  img5off.src =  "images/tnav5.gif";	
	img6off =  new Image();  img6off.src =  "images/acc.gif";
	}

	function imgOn(imgName) {
		if (document.images) {
				document[imgName].src = eval(imgName + "on.src");
		}
	}

	function imgOff(imgName) {
		if (document.images) {
				document[imgName].src = eval(imgName + "off.src");
		}
	}


if(document.layers){
window.onResize=reloadNow;}
function reloadNow(){
document.location = document.location;
}

//Open Window
function Popper(theURL,winName,features) {
	newWin = window.open(theURL,winName,features);
	
}



// This is to keep the Footer on the bottom
function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}
function setFooter() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('wrapper').offsetHeight;
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			if (windowHeight - (contentHeight + footerHeight) >= 0) {
				footerElement.style.position = 'relative';
				footerElement.style.top = (windowHeight - (contentHeight + footerHeight)) + 'px';
			}
			else {
				footerElement.style.position = 'static';
			}
		}
	}
}
window.onload = function() {
	setFooter();
}
window.onresize = function() {
	setFooter();
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}